Top |
AgsAudio * | audio | Read / Write |
gpointer | buffer | Read / Write |
guint | buffer-size | Read / Write |
guint | format | Read / Write |
guint | line | Read / Write |
guint | samplerate | Read / Write |
AgsTimestamp * | timestamp | Read / Write |
#define | AGS_WAVE_DEFAULT_BPM |
#define | AGS_WAVE_TICS_PER_BEAT |
#define | AGS_WAVE_MINIMUM_BUFFER_LENGTH |
#define | AGS_WAVE_DEFAULT_BUFFER_LENGTH |
#define | AGS_WAVE_DEFAULT_LENGTH |
#define | AGS_WAVE_DEFAULT_JIFFIE |
#define | AGS_WAVE_DEFAULT_DURATION |
#define | AGS_WAVE_DEFAULT_OFFSET |
#define | AGS_WAVE_CLIPBOARD_VERSION |
#define | AGS_WAVE_CLIPBOARD_TYPE |
#define | AGS_WAVE_CLIPBOARD_FORMAT |
#define | AGS_WAVE_CLIPBOARD_XML_TYPE |
#define | AGS_WAVE_CLIPBOARD_BASE64_TYPE |
#define | AGS_WAVE_CLIPBOARD_MAX_SIZE |
enum | AgsWaveFlags |
AgsWave acts as a container of AgsBuffer. The timestamp
property tells the
engine what the first x offset of AgsBuffer applies.
You can lookup AgsBuffer by start x offet with ags_wave_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_WAVE_DEFAULT_BUFFER_LENGTH * samplerate;
Use ags_wave_add_buffer()
to add AgsBuffer to AgsWave and
ags_wave_remove_buffer()
to remove it again.
In order to copy or cut accelerations you select them first by calling ags_wave_add_region_to_selection()
.
GRecMutex *
ags_wave_get_obj_mutex (AgsWave *wave
);
Get object mutex.
Since: 3.1.0
gboolean ags_wave_test_flags (AgsWave *wave
,AgsWaveFlags flags
);
Test flags
to be set on wave
.
Since: 3.0.0
void ags_wave_set_flags (AgsWave *wave
,AgsWaveFlags flags
);
Set flags
on wave
.
Since: 3.0.0
void ags_wave_unset_flags (AgsWave *wave
,AgsWaveFlags flags
);
Unset flags
on wave
.
Since: 3.0.0
GList * ags_wave_find_near_timestamp (GList *wave
,guint line
,AgsTimestamp *timestamp
);
Retrieve appropriate wave for timestamp.
wave |
the GList containing AgsWave. |
[element-type AgsAudio.Wave][transfer none] |
line |
the matching audio channel |
|
timestamp |
the matching AgsTimestamp, or |
Since: 3.0.0
gint ags_wave_sort_func (gconstpointer a
,gconstpointer b
);
Compare a
and b
.
Since: 3.0.0
void ags_wave_set_audio (AgsWave *wave
,GObject *audio
);
Set audio.
Since: 3.1.0
guint
ags_wave_get_samplerate (AgsWave *wave
);
Gets samplerate.
Since: 3.1.0
void ags_wave_set_samplerate (AgsWave *wave
,guint samplerate
);
Set samplerate.
Since: 3.0.0
guint
ags_wave_get_buffer_size (AgsWave *wave
);
Gets buffer size.
Since: 3.1.0
void ags_wave_set_buffer_size (AgsWave *wave
,guint buffer_size
);
Set buffer size.
Since: 3.0.0
AgsSoundcardFormat
ags_wave_get_format (AgsWave *wave
);
Gets format.
Since: 3.1.0
void ags_wave_set_format (AgsWave *wave
,AgsSoundcardFormat format
);
Set format.
Since: 3.0.0
AgsTimestamp *
ags_wave_get_timestamp (AgsWave *wave
);
Get timestamp.
Since: 3.1.0
void ags_wave_set_timestamp (AgsWave *wave
,AgsTimestamp *timestamp
);
Set timestamp.
Since: 3.1.0
void ags_wave_set_buffer (AgsWave *wave
,GList *buffer
);
Set buffer by replacing existing.
Since: 3.1.0
GList * ags_wave_add (GList *wave
,AgsWave *new_wave
);
Add new_wave
sorted to wave
Since: 3.0.0
void ags_wave_add_buffer (AgsWave *wave
,AgsBuffer *buffer
,gboolean use_selection_list
);
Add buffer
to wave
.
Since: 3.0.0
void ags_wave_remove_buffer (AgsWave *wave
,AgsBuffer *buffer
,gboolean use_selection_list
);
Removes buffer
from wave
.
Since: 3.0.0
GList *
ags_wave_get_selection (AgsWave *wave
);
Retrieve selection.
Since: 3.0.0
gboolean ags_wave_is_buffer_selected (AgsWave *wave
,AgsBuffer *buffer
);
Check selection for buffer.
Since: 3.0.0
AgsBuffer * ags_wave_find_point (AgsWave *wave
,guint64 x
,gboolean use_selection_list
);
Find buffers by offset.
Since: 3.0.0
AgsBuffer * ags_wave_find_exact_point (AgsWave *wave
,guint64 x
,gboolean use_selection_list
);
Find buffers by offset.
Since: 3.14.6
GList * ags_wave_find_region (AgsWave *wave
,guint64 x0
,guint64 x1
,gboolean use_selection_list
);
Find buffers by offset and region.
wave |
the AgsWave |
|
x0 |
x start offset |
|
x1 |
x end offset |
|
use_selection_list |
if |
Since: 3.0.0
void
ags_wave_free_selection (AgsWave *wave
);
Clear selection.
Since: 3.0.0
void
ags_wave_free_all_selection (GList *wave
);
Clear all selection of wave
.
Since: 3.14.10
void ags_wave_add_region_to_selection (AgsWave *wave
,guint64 x0
,guint64 x1
,gboolean replace_current_selection
);
Add buffer within region to selection.
wave |
the AgsWave |
|
x0 |
x start offset |
|
x1 |
x end offset |
|
replace_current_selection |
if |
Since: 3.0.0
void ags_wave_remove_region_from_selection (AgsWave *wave
,guint64 x0
,guint64 x1
);
Remove buffers within region of selection.
Since: 3.0.0
void
ags_wave_add_all_to_selection (AgsWave *wave
);
Select all buffer to selection.
Since: 3.0.0
xmlNode *
ags_wave_copy_selection (AgsWave *wave
);
Copy selection to clipboard.
Since: 3.0.0
xmlNode *
ags_wave_cut_selection (AgsWave *wave
);
Cut selection to clipboard.
Since: 3.0.0
gchar *
ags_wave_copy_selection_as_base64 (AgsWave *wave
);
Copy selection to clipboard.
Since: 6.16.0
gchar *
ags_wave_cut_selection_as_base64 (AgsWave *wave
);
Cut selection to clipboard.
Since: 6.16.0
void ags_wave_insert_from_clipboard (AgsWave *wave
,xmlNode *wave_node
,gboolean reset_x_offset
,guint64 x_offset
,gdouble delay
,guint attack
);
Paste previously copied buffers.
wave |
the AgsWave |
|
wave_node |
the clipboard XML data |
|
reset_x_offset |
if |
|
x_offset |
region start cursor offset |
|
delay |
the delay to be used |
|
attack |
the attack to be used |
Since: 3.0.0
void ags_wave_insert_from_clipboard_extended (AgsWave *wave
,xmlNode *wave_node
,gboolean reset_x_offset
,guint64 x_offset
,gdouble delay
,guint attack
,gboolean match_line
,gboolean do_replace
);
Paste previously copied buffers.
wave |
the AgsWave |
|
wave_node |
the clipboard XML data |
|
reset_x_offset |
if |
|
x_offset |
region start cursor offset |
|
delay |
the delay to be used |
|
attack |
the attack to be used |
|
match_line |
only paste if channel matches |
|
do_replace |
if |
Since: 3.0.0
void ags_wave_insert_base64_from_clipboard (AgsWave *wave
,gchar *wave_base64
,gboolean reset_x_offset
,guint64 x_offset
,gdouble delay
,guint attack
);
Paste previously copied buffers.
wave |
the AgsWave |
|
wave_base64 |
the clipboard base64 data |
|
reset_x_offset |
if |
|
x_offset |
region start cursor offset |
|
delay |
the delay to be used |
|
attack |
the attack to be used |
Since: 6.16.0
void ags_wave_insert_base64_from_clipboard_extended (AgsWave *wave
,gchar *wave_base64
,gboolean reset_x_offset
,guint64 x_offset
,gdouble delay
,guint attack
,gboolean match_line
,gboolean do_replace
);
Paste previously copied buffers.
wave |
the AgsWave |
|
wave_base64 |
the clipboard base64 data |
|
reset_x_offset |
if |
|
x_offset |
region start cursor offset |
|
delay |
the delay to be used |
|
attack |
the attack to be used |
|
match_line |
only paste if channel matches |
|
do_replace |
if |
Since: 6.16.0
#define AGS_WAVE_DEFAULT_LENGTH ((60 * AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_WAVE_DEFAULT_BPM / 4) * 16 * 16 * 1200 / AGS_WAVE_TICS_PER_BEAT)
#define AGS_WAVE_DEFAULT_JIFFIE (60.0 / AGS_WAVE_DEFAULT_BPM / AGS_WAVE_TICS_PER_BEAT)
#define AGS_WAVE_DEFAULT_DURATION (AGS_WAVE_DEFAULT_LENGTH * AGS_WAVE_DEFAULT_JIFFIE * AGS_USEC_PER_SEC)
#define AGS_WAVE_DEFAULT_OFFSET (AGS_WAVE_DEFAULT_BUFFER_LENGTH * AGS_SOUNDCARD_DEFAULT_SAMPLERATE)
Enum values to control the behavior or indicate internal state of AgsWave by enable/disable as flags.
“audio”
property“audio” AgsAudio *
The assigned AgsAudio
Owner: AgsWave
Flags: Read / Write
Since: 3.0.0
“buffer”
property “buffer” gpointer
The assigned AgsBuffer
[transfer full]
Owner: AgsWave
Flags: Read / Write
Since: 3.0.0
“buffer-size”
property “buffer-size” guint
The audio buffer's buffer size.
Owner: AgsWave
Flags: Read / Write
Default value: 1024
Since: 3.0.0
“format”
property “format” guint
The audio buffer's format.
Owner: AgsWave
Flags: Read / Write
Default value: 16
Since: 3.0.0
“line”
property “line” guint
The wave's line.
Owner: AgsWave
Flags: Read / Write
Default value: 0
Since: 3.0.0
“samplerate”
property “samplerate” guint
The audio buffer's samplerate.
Owner: AgsWave
Flags: Read / Write
Default value: 48000
Since: 3.0.0