krähemann.com

AgsMachine

AgsMachine — visualize audio object.

Stability Level

Stable, unless otherwise indicated

Properties

AgsAudio * audio Read / Write
guint buffer-size Read / Write
guint format Read / Write
gchar * machine-name Read / Write
guint samplerate Read / Write

Signals

void buffer-size-changed Run Last
gpointer find-port Run Last
void format-changed Run Last
void map-recall Run Last
void resize-audio-channels Run Last
void resize-pads Run Last
void samplerate-changed Run Last
void stop Run Last

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── AgsMachine
                        ├── AgsAudiorec
                        ├── AgsDesk
                        ├── AgsDrum
                        ├── AgsDssiBridge
                        ├── AgsEqualizer10
                        ├── AgsFFPlayer
                        ├── AgsFMSyncsynth
                        ├── AgsFMSynth
                        ├── AgsLadspaBridge
                        ├── AgsLiveDssiBridge
                        ├── AgsLiveLv2Bridge
                        ├── AgsLv2Bridge
                        ├── AgsMatrix
                        ├── AgsMixer
                        ├── AgsPanel
                        ├── AgsPitchSampler
                        ├── AgsSF2Synth
                        ├── AgsSFZSynth
                        ├── AgsSpectrometer
                        ├── AgsSyncsynth
                        ╰── AgsSynth

Implemented Interfaces

AgsMachine implements AtkImplementorIface, GtkBuildable and AgsConnectable.

Includes

#include <ags/X/ags_machine.h>

Description

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

Functions

AGS_MACHINE_AUTOMATION_PORT()

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

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_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_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_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_file_chooser_dialog_new ()

GtkFileChooserDialog *
ags_machine_file_chooser_dialog_new (AgsMachine *machine);

Creates a new machine file chooser dialog in order to open audio files.

Parameters

machine

the AgsMachine

 

Returns

a new GtkFileChooserDialog

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_popup_add_edit_options ()

void
ags_machine_popup_add_edit_options (AgsMachine *machine,
                                    guint edit_options);

Add options to edit submenu

Parameters

machine

the assigned machine.

 

edit_options

the options to set

 

Since: 3.0.0


ags_machine_popup_add_connection_options ()

void
ags_machine_popup_add_connection_options
                               (AgsMachine *machine,
                                guint connection_options);

Add options to connection submenu

Parameters

machine

the assigned machine.

 

connection_options

the options to set

 

Since: 3.0.0


ags_machine_popup_add_export_options ()

void
ags_machine_popup_add_export_options (AgsMachine *machine,
                                      guint export_options);

ags_machine_popup_add_import_options ()

void
ags_machine_popup_add_import_options (AgsMachine *machine,
                                      guint import_options);

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


AGS_IS_MACHINE()

#define AGS_IS_MACHINE(obj)             (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MACHINE))

AGS_IS_MACHINE_CLASS()

#define AGS_IS_MACHINE_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MACHINE))

AGS_MACHINE()

#define AGS_MACHINE(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MACHINE, AgsMachine))

AGS_MACHINE_CLASS()

#define AGS_MACHINE_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MACHINE, AgsMachineClass))

AGS_MACHINE_GET_CLASS()

#define AGS_MACHINE_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MACHINE, AgsMachineClass))

ags_machine_get_type ()

GType
ags_machine_get_type (void);

Types and Values

AGS_MACHINE_DEFAULT_VERSION

#define AGS_MACHINE_DEFAULT_VERSION "2.1.60"

AGS_MACHINE_DEFAULT_BUILD_ID

#define AGS_MACHINE_DEFAULT_BUILD_ID "Wed Feb 20 18:38:17 UTC 2019"

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_CONNECTED

   

AGS_MACHINE_REVERSE_NOTATION

   

AGS_MACHINE_STICKY_CONTROLS

   

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 AgsMachineAutomationPort

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

AGS_TYPE_MACHINE

#define AGS_TYPE_MACHINE                (ags_machine_get_type())

struct AgsMachine

struct AgsMachine;

struct AgsMachineClass

struct AgsMachineClass {
  GtkBinClass bin;

  void (*samplerate_changed)(AgsMachine *machine,
			     guint samplerate, guint old_samplerate);
  void (*buffer_size_changed)(AgsMachine *machine,
			      guint buffer_size, guint old_buffer_size);
  void (*format_changed)(AgsMachine *machine,
			 guint format, guint old_format);

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

  void (*map_recall)(AgsMachine *machine);
  GList* (*find_port)(AgsMachine *machine);

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

Property Details

The “audio” property

  “audio”                    AgsAudio *

The assigned AgsAudio to visualize.

Owner: AgsMachine

Flags: Read / Write

Since: 3.0.0


The “buffer-size” property

  “buffer-size”              guint

The buffer length.

Owner: AgsMachine

Flags: Read / Write

Default value: 1024

Since: 3.0.0


The “format” property

  “format”                   guint

The format.

Owner: AgsMachine

Flags: Read / Write

Default value: 16

Since: 3.0.0


The “machine-name” property

  “machine-name”             gchar *

The machine's name.

Owner: AgsMachine

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “samplerate” property

  “samplerate”               guint

The samplerate.

Owner: AgsMachine

Flags: Read / Write

Default value: 48000

Since: 3.0.0

Signal Details

The “buffer-size-changed” signal

void
user_function (AgsMachine *machine,
               guint       buffer_size,
               guint       old_buffer_size,
               gpointer    user_data)

The ::buffer-size-changed signal notifies about changed buffer size.

Parameters

machine

the AgsMachine

 

buffer_size

the buffer size

 

old_buffer_size

the old buffer size

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “find-port” signal

gpointer
user_function (AgsMachine *machine,
               gpointer    user_data)

Parameters

machine

the AgsMachine to resize

 

user_data

user data set when the signal handler was connected.

 

Returns

a GList with associated ports

The ::find-port signal emits as recall should be mapped.

Flags: Run Last

Since: 3.0.0


The “format-changed” signal

void
user_function (AgsMachine *machine,
               guint       format,
               guint       old_format,
               gpointer    user_data)

The ::format-changed signal notifies about changed format.

Parameters

machine

the AgsMachine

 

format

the format

 

old_format

the old format

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “map-recall” signal

void
user_function (AgsMachine *machine,
               gpointer    user_data)

The ::map-recall should be used to add the machine's default recall.

Parameters

machine

the AgsMachine

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “resize-audio-channels” signal

void
user_function (AgsMachine *machine,
               guint       new_size,
               guint       old_size,
               gpointer    user_data)

The ::resize-audio-channels signal notifies about changed channel allocation within audio.

Parameters

machine

the AgsMachine to modify

 

new_size

the new size

 

old_size

the old size

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “resize-pads” signal

void
user_function (AgsMachine *machine,
               gulong      channel_type,
               guint       new_size,
               guint       old_size,
               gpointer    user_data)

The ::resize-pads signal notifies about changed channel allocation within audio.

Parameters

machine

the AgsMachine to modify

 

channel_type

either AGS_TYPE_INPUT or AGS_TYPE_OUTPUT

 

new_size

the new size

 

old_size

the old size

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “samplerate-changed” signal

void
user_function (AgsMachine *machine,
               guint       samplerate,
               guint       old_samplerate,
               gpointer    user_data)

The ::samplerate-changed signal notifies about changed samplerate.

Parameters

machine

the AgsMachine

 

samplerate

the samplerate

 

old_samplerate

the old samplerate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “stop” signal

void
user_function (AgsMachine *machine,
               gpointer    recall_id,
               gint        sound_scope,
               gpointer    user_data)

The ::stop signal gets emited as audio stops playback.

Parameters

machine

the AgsMachine

 

recall_id

the GList containing AgsRecallID

 

sound_scope

the sound scope

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0