Top |
gpointer | control-key | Read / Write |
char * | control-name | Read / Write |
gpointer | marker | Read / Write |
AgsTimestamp * | timestamp | Read / Write |
#define | AGS_PROGRAM_DEFAULT_BPM |
#define | AGS_PROGRAM_TICS_PER_BEAT |
#define | AGS_PROGRAM_MINIMUM_MARKER_LENGTH |
#define | AGS_PROGRAM_MAXIMUM_MARKER_LENGTH |
#define | AGS_PROGRAM_DEFAULT_LENGTH |
#define | AGS_PROGRAM_DEFAULT_JIFFIE |
#define | AGS_PROGRAM_DEFAULT_DURATION |
#define | AGS_PROGRAM_DEFAULT_OFFSET |
#define | AGS_PROGRAM_DEFAULT_PRECISION |
#define | AGS_PROGRAM_MAXIMUM_STEPS |
#define | AGS_PROGRAM_CLIPBOARD_VERSION |
#define | AGS_PROGRAM_CLIPBOARD_TYPE |
#define | AGS_PROGRAM_CLIPBOARD_FORMAT |
#define | AGS_PROGRAM_CLIPBOARD_LEGACY_FORMAT |
enum | AgsProgramFlags |
AgsProgram acts as a container of AgsMarker. The timestamp
property tells the
engine what the first x offset of AgsMarker applies.
You can lookup AgsMarker by start x offet with ags_program_find_near_timestamp()
.
The next x offset is calculated as following:
next_x_offset = x_offset + relative_offset;
The relative_offset is calculated as following:
relative_offset = AGS_PROGRAM_DEFAULT_OFFSET;
Use ags_program_add_marker()
to add AgsMarker to AgsProgram and
ags_program_remove_marker()
to remove it again.
In order to copy or cut markers you select them first by calling ags_program_add_region_to_selection()
.
#define AGS_PROGRAM_GET_OBJ_MUTEX(obj) (&(((AgsProgram *) obj)->obj_mutex))
GRecMutex *
ags_program_get_obj_mutex (AgsProgram *program
);
Get object mutex.
Since: 3.1.0
gboolean ags_program_test_flags (AgsProgram *program
,AgsProgramFlags flags
);
Test flags
to be set on program
.
Since: 5.1.0
void ags_program_set_flags (AgsProgram *program
,AgsProgramFlags flags
);
Set flags
on program
.
Since: 5.1.0
void ags_program_unset_flags (AgsProgram *program
,AgsProgramFlags flags
);
Unset flags
on program
.
Since: 5.1.0
GList * ags_program_find_near_timestamp (GList *program
,AgsTimestamp *timestamp
);
Retrieve appropriate program for timestamp.
program |
the GList containing AgsProgram. |
[element-type AgsAudio.Program][transfer none] |
timestamp |
the matching AgsTimestamp, or |
Since: 5.1.0
GList * ags_program_find_near_timestamp_extended (GList *program
,gchar *control_name
,AgsTimestamp *timestamp
);
Retrieve appropriate program for control name and timestamp.
program |
the GList containing AgsProgram. |
[element-type AgsAudio.Program][transfer none] |
control_name |
the control name |
|
timestamp |
the matching AgsTimestamp, or |
Since: 5.1.0
gint ags_program_sort_func (gconstpointer a
,gconstpointer b
);
Compare a
and b
.
Since: 5.1.0
GList * ags_program_add (GList *program
,AgsProgram *new_program
);
Add new_program
sorted to program
program |
the GList containing AgsProgram. |
[element-type AgsAudio.Program][transfer none] |
new_program |
the AgsProgram to add |
Since: 5.1.0
GList *
ags_program_remove_all_empty (GList *program
);
Remove all empty program
.
Since: 5.4.1
AgsTimestamp *
ags_program_get_timestamp (AgsProgram *program
);
Get timestamp.
Since: 5.1.0
void ags_program_set_timestamp (AgsProgram *program
,AgsTimestamp *timestamp
);
Set timestamp.
Since: 5.1.0
gpointer
ags_program_get_control_key (AgsProgram *program
);
Get control key.
Since: 5.4.0
void ags_program_set_control_key (AgsProgram *program
,gpointer control_key
);
Set control key.
Since: 5.4.0
gchar *
ags_program_get_control_name (AgsProgram *program
);
Get control name.
Since: 5.3.9
void ags_program_set_control_name (AgsProgram *program
,gchar *control_name
);
Set control name.
Since: 5.3.9
GList *
ags_program_get_marker (AgsProgram *program
);
Get marker.
Since: 5.1.0
void ags_program_set_marker (AgsProgram *program
,GList *marker
);
Set marker by replacing existing.
program |
the AgsProgram |
|
marker |
the GList containing AgsMarker. |
[element-type AgsAudio.Marker][transfer full] |
Since: 5.1.0
void ags_program_add_marker (AgsProgram *program
,AgsMarker *marker
,gboolean use_selection_list
);
Add marker
to program
.
program |
the AgsProgram |
|
marker |
the AgsMarker to add |
|
use_selection_list |
if |
Since: 5.1.0
void ags_program_remove_marker (AgsProgram *program
,AgsMarker *marker
,gboolean use_selection_list
);
Removes marker
from program
.
program |
the AgsProgram |
|
marker |
the AgsMarker to remove |
|
use_selection_list |
if |
Since: 5.1.0
gboolean ags_program_remove_marker_at_position (AgsProgram *program
,guint x
);
Removes one AgsMarker of program.
Since: 5.1.0
GList *
ags_program_get_selection (AgsProgram *program
);
Retrieve selection.
Since: 5.1.0
gboolean ags_program_is_marker_selected (AgsProgram *program
,AgsMarker *marker
);
Check selection for marker.
Since: 5.1.0
AgsMarker * ags_program_find_point (AgsProgram *program
,guint x
,gboolean use_selection_list
);
Find markers by offset.
Since: 5.1.0
GList * ags_program_find_region (AgsProgram *program
,guint x0
,guint x1
,gboolean use_selection_list
);
Find markers by offset and region.
program |
the AgsProgram |
|
x0 |
x start offset |
|
x1 |
x end offset |
|
use_selection_list |
if |
Since: 5.1.0
void
ags_program_free_selection (AgsProgram *program
);
Clear selection.
Since: 5.1.0
void
ags_program_free_all_selection (GList *program
);
Clear all selection of program
.
Since: 3.14.10
void ags_program_add_point_to_selection (AgsProgram *program
,guint x
,gboolean replace_current_selection
);
void ags_program_remove_point_from_selection (AgsProgram *program
,guint x
);
void ags_program_add_region_to_selection (AgsProgram *program
,guint x0
,guint x1
,gboolean replace_current_selection
);
Add marker within region to selection.
program |
the AgsProgram |
|
x0 |
x start offset |
|
x1 |
x end offset |
|
replace_current_selection |
if |
Since: 5.1.0
void ags_program_remove_region_from_selection (AgsProgram *program
,guint x0
,guint x1
);
Remove markers within region of selection.
Since: 5.1.0
void
ags_program_add_all_to_selection (AgsProgram *program
);
Select all marker to selection.
Since: 5.1.0
xmlNode *
ags_program_copy_selection (AgsProgram *program
);
Copy selection to clipboard.
Since: 5.1.0
xmlNode *
ags_program_cut_selection (AgsProgram *program
);
Cut selection to clipboard.
Since: 5.1.0
void ags_program_insert_from_clipboard (AgsProgram *program
,xmlNode *program_node
,gboolean reset_x_offset
,guint x_offset
);
Paste previously copied markers.
program |
the AgsProgram |
|
program_node |
the clipboard XML data |
|
reset_x_offset |
if |
|
x_offset |
region start cursor offset |
Since: 5.1.0
void ags_program_insert_from_clipboard_extended (AgsProgram *program
,xmlNode *program_node
,gboolean reset_x_offset
,guint x_offset
,gboolean do_replace
);
Paste previously copied markers.
program |
the AgsProgram |
|
program_node |
the clipboard XML data |
|
reset_x_offset |
if |
|
x_offset |
region start cursor offset |
|
do_replace |
if |
Since: 5.1.0
gchar **
ags_program_get_control_name_unique (GList *program
);
Retrieve program port control_name.
Since: 5.1.0
GList * ags_program_find_control_name (GList *program
,gchar *control_name
);
Find port control_name.
program |
the GList containing AgsProgram. |
[element-type AgsAudio.Program][transfer none] |
control_name |
the string control_name to find |
Since: 5.1.0
guint ags_program_get_value (AgsProgram *program
,guint x
,guint x_end
,gboolean use_prev_on_failure
,GValue *value
);
GList * ags_program_filter (GList *program
,gchar *specifier
);
Filter program
by specifier
.
program |
the GList containing AgsProgram. |
[element-type AgsAudio.Program][transfer none] |
specifier |
the string specifier to find |
Since: 5.4.0
AgsProgram *
ags_program_new (gchar *control_name
);
Creates a new instance of AgsProgram.
Since: 5.1.0
#define AGS_PROGRAM_DEFAULT_LENGTH (64 * 16 * 16 * 1200 / AGS_PROGRAM_TICS_PER_BEAT)
#define AGS_PROGRAM_DEFAULT_JIFFIE (60.0 / AGS_PROGRAM_DEFAULT_BPM / AGS_PROGRAM_TICS_PER_BEAT)
#define AGS_PROGRAM_DEFAULT_DURATION (AGS_PROGRAM_DEFAULT_LENGTH * AGS_PROGRAM_DEFAULT_JIFFIE * AGS_USEC_PER_SEC)
#define AGS_PROGRAM_DEFAULT_OFFSET (64 * (1 / AGS_PROGRAM_MINIMUM_MARKER_LENGTH))
#define AGS_PROGRAM_CLIPBOARD_LEGACY_FORMAT "AgsProgramNativePiano"
Enum values to control the behavior or indicate internal state of AgsProgram by enable/disable as flags.
“control-key”
property “control-key” gpointer
The effect's assigned control key.
Owner: AgsProgram
Flags: Read / Write
Since: 5.4.0
“control-name”
property “control-name” char *
The program's control-name.
Owner: AgsProgram
Flags: Read / Write
Default value: NULL
Since: 5.1.0
“marker”
property “marker” gpointer
The assigned AgsMarker
[transfer full]
Owner: AgsProgram
Flags: Read / Write
Since: 5.1.0