Advanced Gtk+ Sequencer Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#include <ags/audio/ags_channel.h> #define AGS_CHANNEL_ERROR struct AgsChannel; struct AgsChannelClass; enum AgsChannelError; enum AgsChannelFlags; enum AgsChannelRecallIDMode;void ags_channel_add_recall (AgsChannel *channel
,,
GObject *recall);
gboolean playvoid ags_channel_add_recall_container (AgsChannel *channel
,);
GObject *recall_containervoid ags_channel_add_recall_id (AgsChannel *channel
,AgsRecallID *recall_id
);void ags_channel_cancel (AgsChannel *channel
,AgsRecallID *recall_id
);void ags_channel_done (AgsChannel *channel
,AgsRecallID *recall_id
);void ags_channel_duplicate_recall (AgsChannel *channel
,AgsRecallID *recall_id
);GQuark ags_channel_error_quark ();GList * ags_channel_find_port (AgsChannel *channel
); AgsRecall * ags_channel_find_recall (AgsChannel *channel
,,
char *effect); AgsChannel * ags_channel_first (
char *nameAgsChannel *channel
); AgsChannel * ags_channel_first_with_recycling (AgsChannel *channel
);void ags_channel_init_recall (AgsChannel *channel
,,
gint stageAgsRecallID *recall_id
); AgsChannel * ags_channel_last (AgsChannel *channel
); AgsChannel * ags_channel_last_with_recycling (AgsChannel *channel
); AgsChannel * ags_channel_new (); AgsChannel * ags_channel_nth (
GObject *audioAgsChannel *channel
,); AgsChannel * ags_channel_pad_first (
guint nthAgsChannel *channel
); AgsChannel * ags_channel_pad_last (AgsChannel *channel
); AgsChannel * ags_channel_pad_nth (AgsChannel *channel
,);
guint nthvoid ags_channel_play (AgsChannel *channel
,AgsRecallID *recall_id
,);
gint stagevoid ags_channel_recall_id_set (AgsChannel *output
,AgsRecallID *recall_id
,,
gboolean ommit_own_channel,
guint mode...
);void ags_channel_recursive_play (AgsChannel *channel
,AgsRecallID *recall_id
,); AgsRecallID * ags_channel_recursive_play_init (
gint stageAgsChannel *channel
,,
gint stage,
gboolean arrange_recall_id,
gboolean duplicate_templates,
gboolean playback,
gboolean sequencer,
gboolean notation,
gboolean resolve_dependenciesAgsRecallID *recall_id
);void ags_channel_recursive_play_threaded (AgsChannel *channel
,AgsRecallID *recall_id
,);
gint stagevoid ags_channel_recursive_reset_recall_ids (AgsChannel *channel
,AgsChannel *link
,AgsChannel *old_channel_link
,AgsChannel *old_link_link
);void ags_channel_recursive_reset_recycling_container (AgsChannel *channel
,AgsRecyclingContainer *old_recycling_container
,AgsRecyclingContainer *recycling_container
);void ags_channel_recycling_changed (AgsChannel *channel
,AgsRecycling *old_start_region
,AgsRecycling *old_end_region
,AgsRecycling *new_start_region
,AgsRecycling *new_end_region
,AgsRecycling *old_start_changed_region
,AgsRecycling *old_end_changed_region
,AgsRecycling *new_start_changed_region
,AgsRecycling *new_end_changed_region
);void ags_channel_remove (AgsChannel *channel
,AgsRecallID *recall_id
);void ags_channel_remove_recall (AgsChannel *channel
,,
GObject *recall);
gboolean playvoid ags_channel_remove_recall_container (AgsChannel *channel
,);
GObject *recall_containervoid ags_channel_remove_recall_id (AgsChannel *channel
,AgsRecallID *recall_id
);void ags_channel_resolve_recall (AgsChannel *channel
,AgsRecallID *recall_id
);void ags_channel_safe_resize_audio_signal (AgsChannel *channel
,);
guint sizevoid ags_channel_set_devout (AgsChannel *channel
,);
GObject *devoutvoid ags_channel_set_link (AgsChannel *channel
,AgsChannel *link
,);
GError **errorvoid ags_channel_set_recycling (AgsChannel *channel
,AgsRecycling *first_recycling
,AgsRecycling *last_recycling
,,
gboolean update);
gboolean destroy_oldvoid ags_channel_tillrecycling_cancel (AgsChannel *channel
,AgsRecallID *recall_id
);
AgsChannel is the entry point to the entire audio tree and its nested recycling tree.
Every channel has its own AgsRecallID. As modifying link a new AgsRecyclingContainer is indicated, since it acts as a kind of recall id tree context.
struct AgsChannel { GObject object; guint flags; GObject *audio; GObject *devout; AgsChannel *prev; AgsChannel *prev_pad; AgsChannel *next; AgsChannel *next_pad; guint pad; guint audio_channel; guint line; char *note; gpointer devout_play; // GObject *recycling_container; // contains child recycling GList *recall_id; // there may be several recall's running GList *container; GList *recall; GList *play; AgsChannel *link; AgsRecycling *first_recycling; AgsRecycling *last_recycling; GObject *recycling_thread; GList *pattern; AgsNotation *notation; GtkWidget *line_widget; gpointer file_data; };
struct AgsChannelClass { GObjectClass object; void (*recycling_changed)(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region); void (*done)(AgsChannel *channel, AgsRecallID *recall_id); };
typedef enum { AGS_CHANNEL_RECALL_ID_RUN_STAGE, AGS_CHANNEL_RECALL_ID_CANCEL, } AgsChannelRecallIDMode;
void ags_channel_add_recall (AgsChannel *channel
,,
GObject *recall);
gboolean play
Adds a recall.
|
an AgsChannel |
|
the AgsRecall |
|
TRUE |
Since 0.4
void ags_channel_add_recall_container (AgsChannel *channel
,);
GObject *recall_container
Adds a recall container.
|
an AgsChannel |
|
the AgsRecallContainer |
Since 0.4
void ags_channel_add_recall_id (AgsChannel *channel
,AgsRecallID *recall_id
);
Adds a recall id.
|
an AgsChannel |
|
the AgsRecallID |
Since 0.4
void ags_channel_cancel (AgsChannel *channel
,AgsRecallID *recall_id
);
Calls for every matching recall_id
ags_recall_cancel()
|
an AgsChannel |
|
and AgsRecallID |
Since 0.3
void ags_channel_done (AgsChannel *channel
,AgsRecallID *recall_id
);
Is emitted as playing channel is done.
|
an AgsChannel |
|
the current AgsRecallID |
Since 0.4
void ags_channel_duplicate_recall (AgsChannel *channel
,AgsRecallID *recall_id
);
Duplicate AgsRecall templates for use with ags_channel_recursive_play()
,
but ags_channel_recursive_play_init()
may call this function for you.
|
an AgsChannel that contains the AgsRecall templates |
|
if a AgsRecall that is dedicated to a playback should be duplicated |
|
if a AgsRecall that is dedicated to a sequencer should be duplicated |
|
if a AgsRecall that is dedicated to a notation should be duplicated |
|
the AgsRecallID the newly allocated AgsRecall objects belongs to |
Since 0.3
GList * ags_channel_find_port (AgsChannel *channel
);
Retrieve all ports of AgsChannel
|
an AgsChannel |
Returns : |
a |
Since 0.4
AgsRecall * ags_channel_find_recall (AgsChannel *channel
,,
char *effect);
char *name
AgsChannel * ags_channel_first (AgsChannel *channel
);
Iterates until the first AgsChannel was found.
|
an AgsChannel |
Returns : |
the first AgsChannel |
Since 0.3
AgsChannel * ags_channel_first_with_recycling (AgsChannel *channel
);
Iterates over pads forwards as long as there is no AgsRecycling on the AgsChannel.
|
an AgsChannel |
Returns : |
the first channel with an AgsRecycling |
Since 0.3
void ags_channel_init_recall (AgsChannel *channel
,,
gint stageAgsRecallID *recall_id
);
Prepare AgsRecall objects to become runnning, ags_channel_recursive_play_init()
may call this function for you.
|
an AgsChannel that contains the recalls |
|
the |
Since 0.3
AgsChannel * ags_channel_last (AgsChannel *channel
);
Iterates until the last AgsChannel was found.
|
an AgsChannel |
Returns : |
the last AgsChannel |
Since 0.3
AgsChannel * ags_channel_last_with_recycling (AgsChannel *channel
);
Iterates over pads backwards as long as there is no AgsRecycling on the AgsChannel.
|
an AgsChannel |
Returns : |
the last channel with an AgsRecycling |
Since 0.3
AgsChannel * ags_channel_new (GObject *audio
);
Creates a AgsChannel, linking tree to audio
.
|
the AgsAudio |
Returns : |
a new AgsChannel |
Since 0.3
AgsChannel * ags_channel_nth (AgsChannel *channel
,);
guint nth
Iterates nth
times forward.
|
an AgsChannel |
|
the count to iterate |
Returns : |
the nth AgsChannel |
Since 0.3
AgsChannel * ags_channel_pad_first (AgsChannel *channel
);
Iterates until the first pad has been reached.
|
an AgsChannel |
Returns : |
the first AgsChannel with the same audio_channel as channel
|
Since 0.3
AgsChannel * ags_channel_pad_last (AgsChannel *channel
);
Iterates until the last pad has been reached.
|
an AgsChannel |
Returns : |
the last AgsChannel with the same audio_channel as channel
|
Since 0.3
AgsChannel * ags_channel_pad_nth (AgsChannel *channel
,);
guint nth
Iterates nth times.
|
an AgsChannel |
|
the count of pads to step |
Returns : |
the nth pad |
Since 0.3
void ags_channel_play (AgsChannel *channel
,AgsRecallID *recall_id
,);
gint stage
Play one single run of stage
step.
|
an AgsChannel |
|
appropriate AgsRecallID |
|
run_pre, run_inter or run_post |
Since 0.3
void ags_channel_recall_id_set (AgsChannel *output
,AgsRecallID *recall_id
,,
gboolean ommit_own_channel,
guint mode...
);
void ags_channel_recursive_play (AgsChannel *channel
,AgsRecallID *recall_id
,);
gint stage
Call recursively ags_channel_play()
and ags_audio_play()
|
an AgsChannel |
|
appropriate AgsRecallID |
|
run_pre, run_inter or run_post |
Since 0.3
AgsRecallID * ags_channel_recursive_play_init (AgsChannel *channel
,,
gint stage,
gboolean arrange_recall_id,
gboolean duplicate_templates,
gboolean playback,
gboolean sequencer,
gboolean notation,
gboolean resolve_dependenciesAgsRecallID *recall_id
);
Make the tree ready for a new AgsDevoutPlay.
|
the AgsChannel to prepare |
|
valid values for stage are: -1 for running all three stages, or the stages 0 through 2 to run
just the specified stage. With stage is meant the AgsRecall run_init_pre, AgsRecall run_init_inter
and AgsRecall run_init_post stages. |
|
TRUE |
|
TRUE |
|
TRUE AGS_RECALL_PLAYBACK |
|
TRUE AGS_RECALL_SEQUENCER |
|
TRUE AGS_RECALL_NOTATION |
|
TRUE |
|
the initial recall id or NULL |
Since 0.3
void ags_channel_recursive_play_threaded (AgsChannel *channel
,AgsRecallID *recall_id
,);
gint stage
Super-threaded version of play one single run of stage
step.
|
an AgsChannel |
|
appropriate AgsRecallID |
|
run_pre, run_inter or run_post |
Since 0.4
void ags_channel_recursive_reset_recall_ids (AgsChannel *channel
,AgsChannel *link
,AgsChannel *old_channel_link
,AgsChannel *old_link_link
);
Called by ags_channel_set_link()
to handle running AgsAudio objects correctly.
This function destroys AgsRecall objects which were uneeded because they became
invalid due to unlinking. By the way it destroys the uneeded AgsRecallID objects, too.
Additionally it creates AgsRecall and AgsRecallID objects to prepare becoming a
running object (AgsAudio or AgsChannel).
By the clean up the invalid AgsRecall objects will be removed.
Once the clean up has done ags_channel_recursive_play_init()
will be called for every
playing instance that was found.
|
an AgsChannel that was linked with link
|
|
an AgsChannel that was linked with channel
|
|
the old link of channel
|
|
the old link of link
|
Since 0.4
void ags_channel_recursive_reset_recycling_container (AgsChannel *channel
,AgsRecyclingContainer *old_recycling_container
,AgsRecyclingContainer *recycling_container
);
Resets the recycling container context.
|
the channel to reset |
|
the old recycling container context |
|
the new recycling container context |
Since 0.4
void ags_channel_recycling_changed (AgsChannel *channel
,AgsRecycling *old_start_region
,AgsRecycling *old_end_region
,AgsRecycling *new_start_region
,AgsRecycling *new_end_region
,AgsRecycling *old_start_changed_region
,AgsRecycling *old_end_changed_region
,AgsRecycling *new_start_changed_region
,AgsRecycling *new_end_changed_region
);
Modify recycling.
|
the object recycling changed |
|
first recycling |
|
last recycling |
|
new first recycling |
|
new last recycling |
|
modified link recycling start |
|
modified link recyclig end |
|
replacing link recycling start |
|
replacing link recycling end |
Since 0.3
void ags_channel_remove (AgsChannel *channel
,AgsRecallID *recall_id
);
Calls for every matching recall_id
ags_recall_remove()
|
an AgsChannel |
|
and AgsRecallID |
Since 0.3
void ags_channel_remove_recall (AgsChannel *channel
,,
GObject *recall);
gboolean play
Removes a recall.
|
an AgsChannel |
|
the AgsRecall |
|
TRUE |
Since 0.4
void ags_channel_remove_recall_container (AgsChannel *channel
,);
GObject *recall_container
Removes a recall container.
|
an AgsChannel |
|
the AgsRecallContainer |
Since 0.4
void ags_channel_remove_recall_id (AgsChannel *channel
,AgsRecallID *recall_id
);
Removes a recall id.
|
an AgsChannel |
|
the AgsRecallID |
Since 0.4
void ags_channel_resolve_recall (AgsChannel *channel
,AgsRecallID *recall_id
);
Resolve step of initialization.
|
an AgsChannel |
|
appropriate AgsRecallID |
Since 0.4
void ags_channel_safe_resize_audio_signal (AgsChannel *channel
,);
guint size
Resize audio data.
|
an AgsChannel |
|
new frame count length |
Since 0.4
void ags_channel_set_devout (AgsChannel *channel
,);
GObject *devout
Sets devout.
|
an AgsChannel |
|
an AgsDevout |
Since 0.4
void ags_channel_set_link (AgsChannel *channel
,AgsChannel *link
,);
GError **error
Change the linking of AgsChannel objects.
|
an AgsChannel to link |
|
an other AgsChannel to link with |
|
you may retrieve a AGS_CHANNEL_ERROR_LOOP_IN_LINK error |
Since 0.3
void ags_channel_set_recycling (AgsChannel *channel
,AgsRecycling *first_recycling
,AgsRecycling *last_recycling
,,
gboolean update);
gboolean destroy_old
Called by ags_channel_set_link()
to handle outdated AgsRecycling references.
|
the channel to reset |
|
the recycling to set for channel->first_recycling |
|
the recycling to set for channel->last_recycling |
|
reset allthough the AgsRecyclings are still the same |
|
destroy old AgsRecyclings |
Since 0.3
void ags_channel_tillrecycling_cancel (AgsChannel *channel
,AgsRecallID *recall_id
);
Traverses the tree down and up and calls ags_channel_cancel()
for corresponding
recall_id
.
|
an AgsChannel |
|
an AgsRecallID |
Since 0.4