AgsAutomation

AgsAutomation — Automation class supporting selection and clipboard.

Functions

Properties

AgsAudio * audio Read / Write
GType * channel-type Read / Write
gchar * control-name Read / Write
gpointer current-accelerations Read / Write
gdouble default-value Read / Write
guint line Read / Write
gdouble lower Read / Write
gpointer next-accelerations Read / Write
AgsPort * port Read / Write
guint steps Read / Write
gdouble upper Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── AgsAutomation

Implemented Interfaces

AgsAutomation implements AgsConnectable and AgsPortlet.

Includes

#include <ags/audio/ags_automation.h>

Description

AgsAutomation acts as a container of AgsAcceleration.

Functions

ags_automation_find_port ()

GList *
ags_automation_find_port (GList *automation,
                          GObject *port);


ags_automation_find_near_timestamp ()

GList *
ags_automation_find_near_timestamp (GList *automation,
                                    guint line,
                                    GObject *timestamp);

Retrieve appropriate automation for timestamp.

Parameters

automation

a GList containing AgsAutomation

 

line

the matching audio channel

 

timestamp

the matching timestamp

 

Returns

Next match.

Since: 0.4.3


ags_automation_add_acceleration ()

void
ags_automation_add_acceleration (AgsAutomation *automation,
                                 AgsAcceleration *acceleration,
                                 gboolean use_selection_list);

Adds a acceleration to automation.

Parameters

automation

an AgsAutomation

 

acceleration

the AgsAcceleration to add

 

use_selection_list

if TRUE add to selection, else to default automation

 

Since: 0.4.3


ags_automation_remove_acceleration_at_position ()

gboolean
ags_automation_remove_acceleration_at_position
                               (AgsAutomation *automation,
                                guint x,
                                gdouble y);

Removes one AgsAcceleration of automation.

Parameters

automation

an AgsAutomation

 

x

offset

 

y

acceleration

 

Returns

TRUE if successfully removed acceleration.

Since: 0.4.3


ags_automation_get_selection ()

GList *
ags_automation_get_selection (AgsAutomation *automation);

Retrieve selection.

Parameters

automation

the AgsAutomation

 

Returns

the selection.

Since: 0.4.3


ags_automation_is_acceleration_selected ()

gboolean
ags_automation_is_acceleration_selected
                               (AgsAutomation *automation,
                                AgsAcceleration *acceleration);

Check selection for acceleration.

Parameters

automation

the AgsAutomation

 

acceleration

the AgsAcceleration to check for

 

Returns

TRUE if selected

Since: 0.4.3


ags_automation_find_point ()

AgsAcceleration *
ags_automation_find_point (AgsAutomation *automation,
                           guint x,
                           gdouble y,
                           gboolean use_selection_list);

Find acceleration by offset and acceleration.

Parameters

automation

an AgsAutomation

 

x

offset

 

y

acceleration, will be ignored

 

use_selection_list

if TRUE selection is searched

 

Returns

the matching acceleration.

Since: 0.4.3


ags_automation_find_region ()

GList *
ags_automation_find_region (AgsAutomation *automation,
                            guint x0,
                            gdouble y0,
                            guint x1,
                            gdouble y1,
                            gboolean use_selection_list);

Find acceleration by offset and tone region.

Parameters

automation

an AgsAutomation

 

x0

start offset

 

y0

start tone

 

x1

end offset

 

y1

end tone

 

use_selection_list

if TRUE selection is searched

 

Returns

the matching acceleration as GList.

Since: 0.4.3


ags_automation_free_selection ()

void
ags_automation_free_selection (AgsAutomation *automation);

Clear selection.

Parameters

automation

an AgsAutomation

 

Since: 0.4.3


ags_automation_add_point_to_selection ()

void
ags_automation_add_point_to_selection (AgsAutomation *automation,
                                       guint x,
                                       gdouble y,
                                       gboolean replace_current_selection);

Select acceleration at position.

Parameters

automation

an AgsAutomation

 

x

offset

 

y

tone

 

replace_current_selection

if TRUE selection is replaced

 

Since: 0.4.3


ags_automation_remove_point_from_selection ()

void
ags_automation_remove_point_from_selection
                               (AgsAutomation *automation,
                                guint x,
                                gdouble y);

Remove acceleration at position of selection.

Parameters

automation

an AgsAutomation

 

x

offset

 

y

tone

 

Since: 0.4.3


ags_automation_add_region_to_selection ()

void
ags_automation_add_region_to_selection
                               (AgsAutomation *automation,
                                guint x0,
                                gdouble y0,
                                guint x1,
                                gdouble y1,
                                gboolean replace_current_selection);


ags_automation_remove_region_from_selection ()

void
ags_automation_remove_region_from_selection
                               (AgsAutomation *automation,
                                guint x0,
                                gdouble y0,
                                guint x1,
                                gdouble y1);

Remove acceleration within region of selection.

Parameters

automation

an AgsAutomation

 

x0

start offset

 

y0

start tone

 

x1

end offset

 

y1

end tone

 

Since: 0.4.3


ags_automation_add_all_to_selection ()

void
ags_automation_add_all_to_selection (AgsAutomation *automation);


ags_automation_copy_selection ()

xmlNode *
ags_automation_copy_selection (AgsAutomation *automation);

Copy selection to clipboard.

Parameters

automation

an AgsAutomation

 

Returns

the selection as XML.

Since: 0.4.3


ags_automation_cut_selection ()

xmlNode *
ags_automation_cut_selection (AgsAutomation *automation);

Cut selection to clipboard.

Parameters

automation

an AgsAutomation

 

Returns

the selection as XML.

Since: 0.4.3


ags_automation_merge_clipboard ()

void
ags_automation_merge_clipboard (xmlNode *audio_node,
                                xmlNode *automation_node);


ags_automation_insert_from_clipboard ()

void
ags_automation_insert_from_clipboard (AgsAutomation *automation,
                                      xmlNodePtr content,
                                      gboolean reset_x_offset,
                                      guint x_offset,
                                      gboolean reset_y_offset,
                                      gdouble y_offset);


ags_automation_get_current ()

GList *
ags_automation_get_current (AgsAutomation *automation);


ags_automation_get_specifier_unique ()

gchar **
ags_automation_get_specifier_unique (GList *automation);

Retrieve automation port specifier.

Parameters

automation

a GList containing AgsAutomation

 

Returns

a NULL terminated string array

Since: 0.4.3


ags_automation_find_specifier ()

GList *
ags_automation_find_specifier (GList *automation,
                               gchar *specifier);

Find port specifier.

Parameters

automation

a GList containing AgsAutomation

 

specifier

the string specifier to find

 

Returns

Next matching GList

Since: 0.4.3


ags_automation_find_specifier_with_type_and_line ()

GList *
ags_automation_find_specifier_with_type_and_line
                               (GList *automation,
                                gchar *specifier,
                                GType channel_type,
                                guint line);

Find port specifier with channel type and line.

Parameters

automation

a GList containing AgsAutomation

 

specifier

the string specifier to find

 

channel_type

the channel GType

 

line

the line

 

Returns

Next matching GList

Since: 0.7.30


ags_automation_get_value ()

guint
ags_automation_get_value (AgsAutomation *automation,
                          guint x,
                          guint x_end,
                          gboolean use_prev_on_failure,
                          GValue *value);

Since: 0.7.32


ags_automation_new ()

AgsAutomation *
ags_automation_new (GObject *audio,
                    guint line,
                    GType channel_type,
                    gchar *control_name);

Creates an AgsAutomation.

Parameters

audio

an AgsAudio

 

line

the line to apply

 

channel_type

the channel type

 

control_name

the control name

 

Returns

a new AgsAutomation

Since: 0.4.2

Types and Values

AGS_AUTOMATION_DEFAULT_BPM

#define AGS_AUTOMATION_DEFAULT_BPM (120.0)


AGS_AUTOMATION_TICS_PER_BEAT

#define AGS_AUTOMATION_TICS_PER_BEAT (1.0)


AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH

#define AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH (1.0 / 16.0 / 64.0)


AGS_AUTOMATION_DEFAULT_LENGTH

#define AGS_AUTOMATION_DEFAULT_LENGTH (64 * 16 * 1200 / AGS_AUTOMATION_TICS_PER_BEAT)


AGS_AUTOMATION_DEFAULT_JIFFIE

#define AGS_AUTOMATION_DEFAULT_JIFFIE (60.0 / AGS_AUTOMATION_DEFAULT_BPM / AGS_AUTOMATION_TICS_PER_BEAT)


AGS_AUTOMATION_DEFAULT_DURATION

#define AGS_AUTOMATION_DEFAULT_DURATION (AGS_AUTOMATION_DEFAULT_LENGTH * AGS_AUTOMATION_DEFAULT_JIFFIE * AGS_MICROSECONDS_PER_SECOND)


AGS_AUTOMATION_DEFAULT_PRECISION

#define AGS_AUTOMATION_DEFAULT_PRECISION (8)


enum AgsAutomationFlags

Members

AGS_AUTOMATION_CONNECTED

   

AGS_AUTOMATION_BYPASS

   

Property Details

The “audio” property

  “audio”                    AgsAudio *

The audio of automation.

Flags: Read / Write

Since: 0.4.3


The “channel-type” property

  “channel-type”             GType *

The channel type to apply.

Flags: Read / Write

Allowed values: void

Since: 0.4.3


The “control-name” property

  “control-name”             gchar *

The control name.

Flags: Read / Write

Default value: NULL

Since: 0.4.3


The “current-accelerations” property

  “current-accelerations”    gpointer

The current accelerations for offset.

Flags: Read / Write

Since: 0.4.2


The “default-value” property

  “default-value”            gdouble

The default value of effect.

Flags: Read / Write

Allowed values: [-65535,65535]

Default value: 0

Since: 0.4.3


The “line” property

  “line”                     guint

The numerical line of effect.

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Since: 0.4.3


The “lower” property

  “lower”                    gdouble

The lower of effect.

Flags: Read / Write

Allowed values: [-65535,65535]

Default value: 0

Since: 0.4.3


The “next-accelerations” property

  “next-accelerations”       gpointer

The next accelerations for offset.

Flags: Read / Write

Since: 0.4.2


The “port” property

  “port”                     AgsPort *

The port of automation.

Flags: Read / Write

Since: 0.4.2


The “steps” property

  “steps”                    guint

The steps of effect.

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Since: 0.4.3


The “upper” property

  “upper”                    gdouble

The upper of effect.

Flags: Read / Write

Allowed values: [-65535,65535]

Default value: 0

Since: 0.4.3