AgsAutomation

AgsAutomation — Automation class supporting selection and clipboard.

Functions

Properties

gpointer acceleration Read / Write
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
AgsTimestamp * timestamp 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: 1.0.0


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: 1.0.0


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: 1.0.0


ags_automation_get_selection ()

GList *
ags_automation_get_selection (AgsAutomation *automation);

Retrieve selection.

Parameters

automation

the AgsAutomation

 

Returns

the selection.

Since: 1.0.0


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: 1.0.0


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: 1.0.0


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: 1.0.0


ags_automation_free_selection ()

void
ags_automation_free_selection (AgsAutomation *automation);

Clear selection.

Parameters

automation

an AgsAutomation

 

Since: 1.0.0


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: 1.0.0


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: 1.0.0


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: 1.0.0


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: 1.0.0


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: 1.0.0


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: 1.0.0


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: 1.0.0


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: 1.0.0


ags_automation_get_value ()

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

Get automation value.

Parameters

automation

the AgsAutomation

 

x

the x-offset

 

x_end

the x-end-offset

 

use_prev_on_failure

if TRUE use previous value, else return G_MAXUINT

 

value

the return location of value

 

Returns

the x_offset

Since: 1.0.0


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: 1.0.0


AGS_AUTOMATION()

#define AGS_AUTOMATION(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOMATION, AgsAutomation))

AGS_AUTOMATION_CLASS()

#define AGS_AUTOMATION_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTOMATION, AgsAutomationClass))

AGS_AUTOMATION_GET_CLASS()

#define AGS_AUTOMATION_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_AUTOMATION, AgsAutomationClass))

AGS_IS_AUTOMATION()

#define AGS_IS_AUTOMATION(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTOMATION))

ags_automation_get_type ()

GType
ags_automation_get_type (void);

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)

AGS_AUTOMATION_MAXIMUM_STEPS

#define AGS_AUTOMATION_MAXIMUM_STEPS (128)

enum AgsAutomationFlags

Enum values to control the behavior or indicate internal state of AgsAutomation by enable/disable as flags.

Members

AGS_AUTOMATION_CONNECTED

indicates the automation was connected by calling AgsConnectable::connect()

 

AGS_AUTOMATION_BYPASS

ignore any automation data

 

AGS_TYPE_AUTOMATION

#define AGS_TYPE_AUTOMATION                (ags_automation_get_type())

struct AgsAutomation

struct AgsAutomation;

struct AgsAutomationClass

struct AgsAutomationClass {
  GObjectClass gobject;
};

Property Details

The “acceleration” property

  “acceleration”             gpointer

The acceleration list.

Flags: Read / Write

Since: 1.0.0


The “audio” property

  “audio”                    AgsAudio *

The assigned AgsAudio

Flags: Read / Write

Since: 1.0.0


The “channel-type” property

  “channel-type”             GType *

The effect's assigned channel type.

Flags: Read / Write

Allowed values: void

Since: 1.0.0


The “control-name” property

  “control-name”             gchar *

The effect's assigned control name.

Flags: Read / Write

Default value: NULL

Since: 1.0.0


The “current-accelerations” property

  “current-accelerations”    gpointer

Offset of current position.

Flags: Read / Write

Since: 1.0.0


The “default-value” property

  “default-value”            gdouble

The effect's default-value.

Flags: Read / Write

Allowed values: [-65535,65535]

Default value: 0

Since: 1.0.0


The “line” property

  “line”                     guint

The effect's line.

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Since: 1.0.0


The “lower” property

  “lower”                    gdouble

The effect's lower.

Flags: Read / Write

Allowed values: [-65535,65535]

Default value: 0

Since: 1.0.0


The “next-accelerations” property

  “next-accelerations”       gpointer

Offset of next position.

Flags: Read / Write

Since: 1.0.0


The “port” property

  “port”                     AgsPort *

The assigned AgsPort

Flags: Read / Write

Since: 1.0.0


The “steps” property

  “steps”                    guint

The effect's steps.

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Since: 1.0.0


The “timestamp” property

  “timestamp”                AgsTimestamp *

The automation's timestamp.

Flags: Read / Write

Since: 1.0.0


The “upper” property

  “upper”                    gdouble

The effect's upper.

Flags: Read / Write

Allowed values: [-65535,65535]

Default value: 0

Since: 1.0.0