| Advanced Gtk+ Sequencer Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <ags/audio/ags_notation.h> #define AGS_NOTATION_DEFAULT_BPM #define AGS_NOTATION_DEFAULT_DURATION #define AGS_NOTATION_DEFAULT_JIFFIE #define AGS_NOTATION_DEFAULT_LENGTH #define AGS_NOTATION_MAXIMUM_NOTE_LENGTH #define AGS_NOTATION_MINIMUM_NOTE_LENGTH #define AGS_NOTATION_TICS_PER_BEAT struct AgsNotation; struct AgsNotationClass; enum AgsNotationFlags;void ags_notation_add_note (AgsNotation *notation,AgsNote *note,);gboolean use_selection_listvoid ags_notation_add_point_to_selection (AgsNotation *notation,,guint x,guint y);gboolean replace_current_selectionvoid ags_notation_add_region_to_selection (AgsNotation *notation,,guint x0,guint y0,guint x1,guint y1);gboolean replace_current_selectionxmlNodePtr ags_notation_copy_selection (AgsNotation *notation);xmlNodePtr ags_notation_cut_selection (AgsNotation *notation);GList * ags_notation_find_near_timestamp (,GList *notation,guint audio_channel); AgsNote * ags_notation_find_point (GObject *timestampAgsNotation *notation,,guint x,guint y);gboolean use_selection_listGList * ags_notation_find_region (AgsNotation *notation,,guint x0,guint y0,guint x1,guint y1);gboolean use_selection_listvoid ags_notation_free_selection (AgsNotation *notation);GList * ags_notation_get_current (AgsNotation *notation);GList * ags_notation_get_selection (AgsNotation *notation);void ags_notation_insert_from_clipboard (AgsNotation *notation,,xmlNodePtr content,gboolean reset_x_offset,guint x_offset,gboolean reset_y_offset);guint y_offsetgboolean ags_notation_is_note_selected (AgsNotation *notation,AgsNote *note); AgsNotation * ags_notation_new ();guint audio_channelgboolean ags_notation_remove_note_at_position (AgsNotation *notation,,guint x);guint yvoid ags_notation_remove_point_from_selection (AgsNotation *notation,,guint x);guint yvoid ags_notation_remove_region_from_selection (AgsNotation *notation,,guint x0,guint y0,guint x1);guint y1
#define AGS_NOTATION_DEFAULT_DURATION (AGS_NOTATION_DEFAULT_LENGTH * AGS_NOTATION_DEFAULT_JIFFIE * AGS_MICROSECONDS_PER_SECOND)
#define AGS_NOTATION_DEFAULT_JIFFIE (60.0 / AGS_NOTATION_DEFAULT_BPM / AGS_NOTATION_TICS_PER_BEAT)
#define AGS_NOTATION_DEFAULT_LENGTH (65535.0 / AGS_NOTATION_TICS_PER_BEAT - AGS_NOTATION_MAXIMUM_NOTE_LENGTH)
struct AgsNotation {
GObject object;
guint flags;
GObject *timestamp;
guint audio_channel;
GObject *audio;
gchar *key;
gdouble base_frequency;
gdouble tact;
gdouble bpm;
gdouble maximum_note_length;
GList *notes;
gdouble start_loop;
gdouble end_loop;
gdouble offset;
GList *selection;
GObject *port;
GList *current_notes;
GList *next_notes;
};
typedef enum {
AGS_NOTATION_STICKY = 1,
AGS_NOTATION_INDICATED_LENGTH = 1 << 1,
} AgsNotationFlags;
void ags_notation_add_note (AgsNotation *notation,AgsNote *note,);gboolean use_selection_list
Adds a note to notation.
|
an AgsNotation |
|
the AgsNote to add |
|
if TRUE |
Since 0.4
void ags_notation_add_point_to_selection (AgsNotation *notation,,guint x,guint y);gboolean replace_current_selection
Select notes at position.
|
an AgsNotation |
|
offset |
|
tone |
|
if TRUE |
Since 0.4
void ags_notation_add_region_to_selection (AgsNotation *notation,,guint x0,guint y0,guint x1,guint y1);gboolean replace_current_selection
Select notes within region.
|
an AgsNotation |
|
start offset |
|
start tone |
|
end offset |
|
end tone |
|
if TRUE |
Since 0.4
xmlNodePtr ags_notation_copy_selection (AgsNotation *notation);
Copy selection to clipboard.
|
an AgsNotation |
Returns : |
the selection as XML. |
Since 0.4
xmlNodePtr ags_notation_cut_selection (AgsNotation *notation);
Cut selection to clipboard.
|
an AgsNotation |
Returns : |
the selection as XML. |
Since 0.4
GList * ags_notation_find_near_timestamp (,GList *notation,guint audio_channel);GObject *timestamp
Retrieve appropriate notation for timestamp.
|
a |
|
the matching audio channel |
|
the matching timestamp |
Returns : |
Next match. |
Since 0.4
AgsNote * ags_notation_find_point (AgsNotation *notation,,guint x,guint y);gboolean use_selection_list
Find note by offset and tone.
|
an AgsNotation |
|
offset |
|
note |
|
if TRUE |
Returns : |
the matching note. |
Since 0.4
GList * ags_notation_find_region (AgsNotation *notation,,guint x0,guint y0,guint x1,guint y1);gboolean use_selection_list
Find notes by offset and tone region.
|
an AgsNotation |
|
start offset |
|
start tone |
|
end offset |
|
end tone |
|
_list if TRUE |
Returns : |
the matching notes as |
Since 0.4
void ags_notation_free_selection (AgsNotation *notation);
Clear selection.
|
an AgsNotation |
Since 0.4
GList * ags_notation_get_selection (AgsNotation *notation);
Retrieve selection.
|
the AgsNotation |
Returns : |
the selection. |
Since 0.4
void ags_notation_insert_from_clipboard (AgsNotation *notation,,xmlNodePtr content,gboolean reset_x_offset,guint x_offset,gboolean reset_y_offset);guint y_offset
Paste previously copied notes.
|
an AgsNotation |
|
the clipboard XML data |
|
if TRUEx_offset used as cursor |
|
region start cursor offset |
|
if TRUEy_offset used as cursor |
|
region start cursor tone |
Since 0.4
gboolean ags_notation_is_note_selected (AgsNotation *notation,AgsNote *note);
Check selection for note.
|
the AgsNotation |
|
the AgsNote to check for |
Returns : |
TRUE |
Since 0.4
AgsNotation * ags_notation_new (guint audio_channel);
Creates a AgsNotation, assigned to audio_channel.
|
the audio channel to be used |
Returns : |
a new AgsNotation |
Since 0.4
gboolean ags_notation_remove_note_at_position (AgsNotation *notation,,guint x);guint y
Removes one AgsNote of notation.
|
an AgsNotation |
|
offset |
|
note |
Returns : |
TRUE |
Since 0.4
void ags_notation_remove_point_from_selection (AgsNotation *notation,,guint x);guint y
Remove notes at position of selection.
|
an AgsNotation |
|
offset |
|
tone |
Since 0.4
void ags_notation_remove_region_from_selection (AgsNotation *notation,,guint x0,guint y0,guint x1);guint y1
Remove notes within region of selection.
|
an AgsNotation |
|
start offset |
|
start tone |
|
end offset |
|
end tone |
Since 0.4