AgsMachine

AgsMachine — visualize audio object.

Stability Level

Stable, unless otherwise indicated

Functions

#define AGS_MACHINE_INPUT_LINE()
#define AGS_MACHINE_AUTOMATION_PORT()
gint ags_machine_input_line_sort_func ()
AgsMachineInputLine * ags_machine_input_line_alloc ()
gchar * ags_machine_get_machine_name ()
void ags_machine_set_machine_name ()
void ags_machine_reset_pattern_envelope ()
AgsMachineAutomationPort * ags_machine_automation_port_alloc ()
void ags_machine_automation_port_free ()
GList * ags_machine_automation_port_find_channel_type_with_control_name ()
GList * ags_machine_get_output_pad ()
void ags_machine_add_output_pad ()
void ags_machine_remove_output_pad ()
GList * ags_machine_get_input_pad ()
void ags_machine_add_input_pad ()
void ags_machine_remove_input_pad ()
void ags_machine_samplerate_changed ()
void ags_machine_buffer_size_changed ()
void ags_machine_format_changed ()
void ags_machine_resize_audio_channels ()
void ags_machine_resize_pads ()
void ags_machine_map_recall ()
GList * ags_machine_find_port ()
void ags_machine_stop ()
void ags_machine_apply_preset ()
void ags_machine_refresh_port ()
void ags_machine_add_default_recalls ()
AgsMachine * ags_machine_find_by_name ()
void ags_machine_playback_set_active ()
void ags_machine_set_run ()
void ags_machine_set_run_extended ()
GList * ags_machine_get_editor_model ()
void ags_machine_add_editor_model ()
void ags_machine_remove_editor_model ()
GList * ags_machine_get_dialog_model ()
void ags_machine_add_dialog_model ()
void ags_machine_remove_dialog_model ()
GList * ags_machine_find_dialog_model ()
GtkListStore * ags_machine_get_possible_links ()
GtkListStore * ags_machine_get_possible_audio_output_connections ()
GtkListStore * ags_machine_get_possible_audio_input_connections ()
void ags_machine_open_files ()
void ags_machine_copy_pattern ()
void ags_machine_check_message ()
AgsMachine * ags_machine_new ()

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkGrid
                ╰── AgsMachine
                    ├── AgsSF2Synth
                    ╰── AgsFFPlayer

Includes

#include <ags/app/ags_machine.h>

Description

AgsMachine is a composite widget to act as base class to visualize AgsAudio.

Functions

AGS_MACHINE_INPUT_LINE()

#define AGS_MACHINE_INPUT_LINE(ptr) ((AgsMachineInputLine *)(ptr))

AGS_MACHINE_AUTOMATION_PORT()

#define AGS_MACHINE_AUTOMATION_PORT(ptr) ((AgsMachineAutomationPort *)(ptr))

ags_machine_input_line_sort_func ()

gint
ags_machine_input_line_sort_func (gconstpointer a,
                                  gconstpointer b);

Sort machine input line.

Parameters

a

the AgsMachineInputLine

 

b

another AgsMachineInputLine

 

Returns

0 if equal, -1 if smaller and 1 if bigger offset

Since: 3.16.0


ags_machine_input_line_alloc ()

AgsMachineInputLine *
ags_machine_input_line_alloc ();

Allocate AgsMachineInputLine.

Returns

the newly allocated struct

Since: 3.16.0


ags_machine_get_machine_name ()

gchar *
ags_machine_get_machine_name (AgsMachine *machine);

Get machine name of machine .

Parameters

machine

the AgsMachine

 

machine_name

the machine name

 

Since: 4.0.0


ags_machine_set_machine_name ()

void
ags_machine_set_machine_name (AgsMachine *machine,
                              gchar *machine_name);

ags_machine_reset_pattern_envelope ()

void
ags_machine_reset_pattern_envelope (AgsMachine *machine);

Reset pattern envelope from preset.

Parameters

machine

the AgsMachine

 

Since: 3.6.20


ags_machine_automation_port_alloc ()

AgsMachineAutomationPort *
ags_machine_automation_port_alloc (GType channel_type,
                                   gchar *control_name);

Allocate AgsMachineAutomationPort

Parameters

channel_type

the GType of channel

 

control_name

the control name as string

 

Returns

the new allocated AgsMachineAutomationPort

Since: 3.0.0


ags_machine_automation_port_free ()

void
ags_machine_automation_port_free (AgsMachineAutomationPort *automation_port);

Free automation_port

Parameters

automation_port

the AgsAutomationPort

 

Since: 3.0.0


ags_machine_automation_port_find_channel_type_with_control_name ()

GList *
ags_machine_automation_port_find_channel_type_with_control_name
                               (GList *list,
                                GType channel_type,
                                gchar *control_name);

Find AgsAutomationPort by specifying channel type and control name.

Parameters

list

a GList containing AgsAutomationPort

 

channel_type

the GType to match

 

control_name

the control name as string to match

 

Returns

the matching AgsAutomationPort or NULL

Since: 3.0.0


ags_machine_get_output_pad ()

GList *
ags_machine_get_output_pad (AgsMachine *machine);

Get line member of machine .

Parameters

machine

the AgsMachine

 

Returns

the GList containing AgsPad

Since: 4.0.0


ags_machine_add_output_pad ()

void
ags_machine_add_output_pad (AgsMachine *machine,
                            AgsPad *output_pad,
                            guint x,
                            guint y,
                            guint width,
                            guint height);

Add output_pad to machine .

Parameters

machine

the AgsMachine

 

output_pad

the AgsPad

 

x

the x position

 

y

the y position

 

width

the width

 

height

the height

 

Since: 4.0.0


ags_machine_remove_output_pad ()

void
ags_machine_remove_output_pad (AgsMachine *machine,
                               AgsPad *output_pad);

Remove output_pad from machine .

Parameters

machine

the AgsMachine

 

output_pad

the AgsPad

 

Since: 4.0.0


ags_machine_get_input_pad ()

GList *
ags_machine_get_input_pad (AgsMachine *machine);

Get line member of machine .

Parameters

machine

the AgsMachine

 

Returns

the GList containing AgsPad

Since: 4.0.0


ags_machine_add_input_pad ()

void
ags_machine_add_input_pad (AgsMachine *machine,
                           AgsPad *input_pad,
                           guint x,
                           guint y,
                           guint width,
                           guint height);

Add input_pad to machine .

Parameters

machine

the AgsMachine

 

input_pad

the AgsPad

 

x

the x position

 

y

the y position

 

width

the width

 

height

the height

 

Since: 4.0.0


ags_machine_remove_input_pad ()

void
ags_machine_remove_input_pad (AgsMachine *machine,
                              AgsPad *input_pad);

Remove input_pad from machine .

Parameters

machine

the AgsMachine

 

input_pad

the AgsPad

 

Since: 4.0.0


ags_machine_samplerate_changed ()

void
ags_machine_samplerate_changed (AgsMachine *machine,
                                guint samplerate,
                                guint old_samplerate);

Notify about samplerate changed.

Parameters

machine

the AgsMachine

 

samplerate

the samplerate

 

old_samplerate

the old samplerate

 

Since: 3.0.0


ags_machine_buffer_size_changed ()

void
ags_machine_buffer_size_changed (AgsMachine *machine,
                                 guint buffer_size,
                                 guint old_buffer_size);

Notify about buffer_size changed.

Parameters

machine

the AgsMachine

 

buffer_size

the buffer_size

 

old_buffer_size

the old buffer_size

 

Since: 3.0.0


ags_machine_format_changed ()

void
ags_machine_format_changed (AgsMachine *machine,
                            guint format,
                            guint old_format);

Notify about format changed.

Parameters

machine

the AgsMachine

 

format

the format

 

old_format

the old format

 

Since: 3.0.0


ags_machine_resize_audio_channels ()

void
ags_machine_resize_audio_channels (AgsMachine *machine,
                                   guint new_size,
                                   guint old_size);

Resize audio channel allocation.

Parameters

machine

the AgsMachine

 

new_size

new allocation

 

old_size

old allocation

 

Since: 3.0.0


ags_machine_resize_pads ()

void
ags_machine_resize_pads (AgsMachine *machine,
                         GType channel_type,
                         guint new_size,
                         guint old_size);

Resize pad allocation.

Parameters

machine

the AgsMachine

 

channel_type

the channel GType

 

new_size

new allocation

 

old_size

old allocation

 

Since: 3.0.0


ags_machine_map_recall ()

void
ags_machine_map_recall (AgsMachine *machine);

You may want the machine to add its default recall.

Parameters

machine

the AgsMachine to add its default recall.

 

Since: 3.0.0


ags_machine_find_port ()

GList *
ags_machine_find_port (AgsMachine *machine);

Parameters

machine

the AgsMachine

 

Returns

an GList containing all related AgsPort

Lookup ports of associated recalls.

Since: 3.0.0


ags_machine_stop ()

void
ags_machine_stop (AgsMachine *machine,
                  GList *recall_id,
                  gint sound_scope);

Notify about to stop playback of recall_id .

Parameters

machine

the AgsMachine

 

recall_id

the GList containing AgsRecallID

 

sound_scope

the sound scope

 

Since: 3.0.0


ags_machine_apply_preset ()

void
ags_machine_apply_preset (AgsMachine *machine,
                          GtkListStore *list_store);

Apply preset.

Parameters

machine

the AgsMachine

 

Since: 5.2.6


ags_machine_refresh_port ()

void
ags_machine_refresh_port (AgsMachine *machine);

Notify about to refresh ports.

Parameters

machine

the AgsMachine

 

Since: 4.2.1


ags_machine_add_default_recalls ()

void
ags_machine_add_default_recalls (AgsMachine *machine);

ags_machine_add_default_recalls is deprecated and should not be used in newly-written code.


ags_machine_find_by_name ()

AgsMachine *
ags_machine_find_by_name (GList *list,
                          char *name);

Find the specified by name machine.

Parameters

list

a GList of AgsMachine

 

name

the name of machine

 

Returns

the matching AgsMachine, or NULL

Since: 3.0.0


ags_machine_playback_set_active ()

void
ags_machine_playback_set_active (AgsMachine *machine,
                                 AgsPlayback *playback,
                                 gboolean is_active);

Start/stop playback of machine .

Parameters

machine

the AgsMachine

 

playback

the AgsPlayback

 

is_active

if TRUE playback is started, otherwise stopped

 

Since: 3.0.0


ags_machine_set_run ()

void
ags_machine_set_run (AgsMachine *machine,
                     gboolean run);

Start/stop playback of machine .

Parameters

machine

the AgsMachine

 

run

if TRUE playback is started, otherwise stopped

 

Since: 3.0.0


ags_machine_set_run_extended ()

void
ags_machine_set_run_extended (AgsMachine *machine,
                              gboolean run,
                              gboolean sequencer,
                              gboolean notation,
                              gboolean wave,
                              gboolean midi);

Start/stop playback of machine .

Parameters

machine

the AgsMachine

 

run

if TRUE playback is started, otherwise stopped

 

sequencer

if doing sequencer

 

notation

if doing notation

 

wave

if doing wave

 

midi

if doing midi

 

Since: 3.0.0


ags_machine_get_editor_model ()

GList *
ags_machine_get_editor_model (AgsMachine *machine);

Get editor model.

Parameters

machine

the AgsMachine

 

Returns

the GList containing xmlNode

Since: 4.4.0


ags_machine_add_editor_model ()

void
ags_machine_add_editor_model (AgsMachine *machine,
                              xmlNode *node);

Add node to machine .

Parameters

machine

the AgsMachine

 

node

the xmlNode

 

Since: 4.4.0


ags_machine_remove_editor_model ()

void
ags_machine_remove_editor_model (AgsMachine *machine,
                                 xmlNode *node);

Get node from machine .

Parameters

machine

the AgsMachine

 

node

the xmlNode

 

Since: 4.4.0


ags_machine_get_dialog_model ()

GList *
ags_machine_get_dialog_model (AgsMachine *machine);

Get dialog model.

Parameters

machine

the AgsMachine

 

Returns

the GList containing xmlNode

Since: 4.0.0


ags_machine_add_dialog_model ()

void
ags_machine_add_dialog_model (AgsMachine *machine,
                              xmlNode *node);

Add node to machine .

Parameters

machine

the AgsMachine

 

node

the xmlNode

 

Since: 4.0.0


ags_machine_remove_dialog_model ()

void
ags_machine_remove_dialog_model (AgsMachine *machine,
                                 xmlNode *node);

Get node from machine .

Parameters

machine

the AgsMachine

 

node

the xmlNode

 

Since: 4.0.0


ags_machine_find_dialog_model ()

GList *
ags_machine_find_dialog_model (AgsMachine *machine,
                               GList *dialog_model,
                               gchar *node_name,
                               gchar *attribute,
                               gchar *value);

Find dialog model.

Parameters

machine

the AgsMachine

 

dialog_model

the GList

 

node_name

the node name

 

attribute

the attribute

 

value

the attribute value

 

Returns

the matching GList with data xmlNode, or NULL

Since: 4.0.0


ags_machine_get_possible_links ()

GtkListStore *
ags_machine_get_possible_links (AgsMachine *machine);

Find links suitable for machine .

Parameters

machine

the AgsMachine

 

Returns

a GtkListStore containing one column with a string representing machines by its type and name.

Since: 3.0.0


ags_machine_get_possible_audio_output_connections ()

GtkListStore *
ags_machine_get_possible_audio_output_connections
                               (AgsMachine *machine);

Find audio output connections suitable for machine .

Parameters

machine

the AgsMachine

 

Returns

a GtkListStore containing one column with a string representing machines by its type and name.

Since: 3.0.0


ags_machine_get_possible_audio_input_connections ()

GtkListStore *
ags_machine_get_possible_audio_input_connections
                               (AgsMachine *machine);

Find audio input connections suitable for machine .

Parameters

machine

the AgsMachine

 

Returns

a GtkListStore containing one column with a string representing machines by its type and name.

Since: 3.0.0


ags_machine_open_files ()

void
ags_machine_open_files (AgsMachine *machine,
                        GSList *filenames,
                        gboolean overwrite_channels,
                        gboolean create_channels);

Opens audio files and modifies or creates new channels if wished.

Parameters

machine

the AgsMachine

 

filenames

the filenames

 

overwrite_channels

reset channels

 

create_channels

instantiate new channels

 

Since: 3.0.0


ags_machine_copy_pattern ()

void
ags_machine_copy_pattern (AgsMachine *machine);

ags_machine_check_message ()

void
ags_machine_check_message (AgsMachine *machine);

Check message queue for message envelopes.

Parameters

machine

the AgsMachine

 

Since: 3.0.0


ags_machine_new ()

AgsMachine *
ags_machine_new (GObject *soundcard);

Creates an AgsMachine

Parameters

soundcard

the assigned soundcard.

 

Returns

a new AgsMachine

Since: 3.0.0

Types and Values

AGS_MACHINE_DEFAULT_VERSION

#define AGS_MACHINE_DEFAULT_VERSION "6.10.0"

AGS_MACHINE_DEFAULT_BUILD_ID

#define AGS_MACHINE_DEFAULT_BUILD_ID "Thu May  2 16:12:23 UTC 2024"

enum AgsMachineFlags

Members

AGS_MACHINE_SOLO

   

AGS_MACHINE_IS_EFFECT

   

AGS_MACHINE_IS_SEQUENCER

   

AGS_MACHINE_IS_SYNTHESIZER

   

AGS_MACHINE_IS_WAVE_PLAYER

   

AGS_MACHINE_TAKES_FILE_INPUT

   

AGS_MACHINE_MAPPED_RECALL

   

AGS_MACHINE_PREMAPPED_RECALL

   

AGS_MACHINE_BLOCK_PLAY

   

AGS_MACHINE_BLOCK_STOP

   

AGS_MACHINE_BLOCK_STOP_CALLBACK

   

AGS_MACHINE_REVERSE_NOTATION

   

AGS_MACHINE_STICKY_CONTROLS

   

AGS_MACHINE_REFRESH_PORTS

   

AGS_MACHINE_NO_UPDATE

   

enum AgsMachineFileInputFlags

Members

AGS_MACHINE_ACCEPT_WAV

   

AGS_MACHINE_ACCEPT_OGG

   

AGS_MACHINE_ACCEPT_SOUNDFONT2

   

AGS_MACHINE_ACCEPT_SFZ

   

enum AgsMachineMappingFlags

Members

AGS_MACHINE_MONO

   

AGS_MACHINE_DISABLE_LINE_MEMBER

   

AGS_MACHINE_DISABLE_BULK_MEMBER

   

enum AgsMachineEditOptions

Members

AGS_MACHINE_POPUP_COPY_PATTERN

   

AGS_MACHINE_POPUP_PASTE_PATTERN

   

AGS_MACHINE_POPUP_ENVELOPE

   

enum AgsMachineConnectionOptions

Members

AGS_MACHINE_POPUP_CONNECTION_EDITOR

   

AGS_MACHINE_SHOW_AUDIO_OUTPUT_CONNECTION

   

AGS_MACHINE_SHOW_AUDIO_INPUT_CONNECTION

   

AGS_MACHINE_POPUP_MIDI_DIALOG

   

AGS_MACHINE_SHOW_MIDI_INPUT

   

AGS_MACHINE_SHOW_MIDI_OUTPUT

   

enum AgsMachineExportOptions

Members

AGS_MACHINE_POPUP_MIDI_EXPORT

   

AGS_MACHINE_POPUP_WAVE_EXPORT

   

enum AgsMachineImportOptions

Members

AGS_MACHINE_POPUP_MIDI_IMPORT

   

AGS_MACHINE_POPUP_WAVE_IMPORT

   

struct AgsMachineInputLine

struct AgsMachineInputLine {
  guint pad;
  guint audio_channel;

  guint line;

  gboolean mapped_recall;
};

struct AgsMachineAutomationPort

struct AgsMachineAutomationPort {
  GType channel_type;
  gchar *control_name;
};