Top |
Functions
Properties
|
attack | Read / Write |
|
decay | Read / Write |
frequency | Read / Write | |
|
note-name | Read / Write |
|
ratio | Read / Write |
|
release | Read / Write |
rt-attack | Read / Write | |
rt-offset | Read / Write | |
stream-attack | Read / Write | |
stream-delay | Read / Write | |
stream-frame-count | Read / Write | |
|
sustain | Read / Write |
x0 | Read / Write | |
x1 | Read / Write | |
y | Read / Write |
Description
AgsNote represents a tone. The note object contains envelope information by
specifying attack
, decay
, sustain
, release
and ratio
properties as
The real field of AgsComplex is the magnitude of the envelope and the imag
field the relative offset. Raised by ratio
real field amount.
Functions
ags_note_get_obj_mutex ()
GRecMutex * ags_note_get_obj_mutex (AgsNote *note
);
Get object mutex.
Since:
ags_note_test_flags ()
gboolean ags_note_test_flags (AgsNote *note
,);
guint flags
Test flags
to be set on note
.
Since:
ags_note_set_flags ()
void ags_note_set_flags (AgsNote *note
,);
guint flags
Set flags
on note
.
Since:
ags_note_unset_flags ()
void ags_note_unset_flags (AgsNote *note
,);
guint flags
Unset flags
on note
.
Since:
ags_note_sort_func ()
gint ags_note_sort_func (,
gconstpointer a);
gconstpointer b
Sort notes.
Since:
ags_note_get_is_minor ()
gboolean ags_note_get_is_minor (AgsNote *note
);
Gets is minor.
Since:
ags_note_set_is_minor ()
void ags_note_set_is_minor (AgsNote *note
,);
gboolean is_minor
Sets is minor.
Since:
ags_note_get_sharp_flats ()
guint ags_note_get_sharp_flats (AgsNote *note
);
Gets sharp flats.
Since:
ags_note_set_sharp_flats ()
void ags_note_set_sharp_flats (AgsNote *note
,);
guint sharp_flats
Sets sharp flats.
Since:
ags_note_get_rt_offset ()
guint64 ags_note_get_rt_offset (AgsNote *note
);
Gets rt-offset.
Since:
ags_note_set_rt_offset ()
void ags_note_set_rt_offset (AgsNote *note
,);
guint64 rt_offset
Sets rt-offset.
Since:
ags_note_get_rt_attack ()
guint ags_note_get_rt_attack (AgsNote *note
);
Gets rt-attack.
Since:
ags_note_set_rt_attack ()
void ags_note_set_rt_attack (AgsNote *note
,);
guint rt_attack
Sets rt-attack.
Since:
ags_note_set_attack ()
void ags_note_set_attack (AgsNote *note
,);
AgsComplex *attack
Sets attack.
Since:
ags_note_get_sustain ()
AgsComplex * ags_note_get_sustain (AgsNote *note
);
Gets sustain.
Since:
ags_note_set_sustain ()
void ags_note_set_sustain (AgsNote *note
,);
AgsComplex *sustain
Sets sustain.
Since:
ags_note_set_decay ()
void ags_note_set_decay (AgsNote *note
,);
AgsComplex *decay
Sets decay.
Since:
ags_note_get_release ()
AgsComplex * ags_note_get_release (AgsNote *note
);
Gets release.
Since:
ags_note_set_release ()
void ags_note_set_release (AgsNote *note
,);
AgsComplex *release
Sets release.
Since:
ags_note_set_ratio ()
void ags_note_set_ratio (AgsNote *note
,);
AgsComplex *ratio
Sets ratio.
Since:
ags_note_find_prev ()
GList * ags_note_find_prev (,
GList *note,
guint x0);
guint y
Find prev note having the same y offset.
Parameters
note |
the |
[element-type AgsAudio.Note][transfer none] |
x0 |
x offset |
|
y |
y offset |
Returns
the matching entry as x0
, else NULL
[element-type AgsAudio.Note][transfer none]
Since:
ags_note_find_next ()
GList * ags_note_find_next (,
GList *note,
guint x0);
guint y
Find next note having the same y offset.
Parameters
note |
the |
[element-type AgsAudio.Note][transfer none] |
x0 |
x offset |
|
y |
y offset |
Returns
the matching entry as x0
, else NULL
[element-type AgsAudio.Note][transfer none]
Since:
ags_note_length_to_smf_delta_time ()
glong ags_note_length_to_smf_delta_time (,
guint note_length,
gdouble bpm,
gdouble delay_factor,
glong nn,
glong dd,
glong cc,
glong bb);
glong tempo
Convert note length to SMF delta-time.
Parameters
note_length |
the note length to convert |
|
bpm |
the source bpm |
|
delay_factor |
the source delay factor |
|
nn |
numerator |
|
dd |
denominator |
|
cc |
clocks |
|
bb |
beats |
|
tempo |
tempo |
Since:
ags_note_smf_delta_time_to_length ()
guint ags_note_smf_delta_time_to_length (,
glong delta_time,
glong nn,
glong dd,
glong cc,
glong bb,
glong tempo,
gdouble bpm);
gdouble delay_factor
Convert SMF delta-time to note length.
Parameters
delta_time |
delta-time |
|
nn |
numerator |
|
dd |
denominator |
|
cc |
clocks |
|
bb |
beats |
|
tempo |
tempo |
|
bpm |
the target bpm |
|
delay_factor |
the target delay factor |
Since:
ags_note_to_raw_midi ()
guchar * ags_note_to_raw_midi (AgsNote *note
,,
gdouble bpm,
gdouble delay_factor);
guint *buffer_length
Convert note
to raw MIDI and set the buffer length of returned bytes
in the array as buffer_length
.
Parameters
note |
the AgsNote |
|
bpm |
the bpm to use |
|
delay_factor |
the segmentation delay factor |
|
buffer_length |
the length of the returned buffer |
Since:
ags_note_to_raw_midi_extended ()
guchar * ags_note_to_raw_midi_extended (AgsNote *note
,,
gdouble bpm,
gdouble delay_factor,
glong nn,
glong dd,
glong cc,
glong bb,
glong tempo);
guint *buffer_length
Convert note
to raw-midi.
Parameters
note |
the AgsNote |
|
bpm |
the source bpm |
|
delay_factor |
the source delay factor |
|
nn |
numerator |
|
dd |
denominator |
|
cc |
clocks |
|
bb |
beats |
|
tempo |
tempo |
|
buffer_length |
the return location of buffer length |
Since:
ags_note_to_seq_event ()
snd_seq_event_t * ags_note_to_seq_event (AgsNote *note
,,
gdouble bpm,
gdouble delay_factor);
guint *n_events
Convert note
to ALSA sequencer events and set the number of events
in the array as n_events
.
Parameters
note |
the AgsNote |
|
bpm |
the bpm to use |
|
delay_factor |
the segmentation delay factor |
|
n_events |
the count of events |
Since:
ags_note_to_seq_event_extended ()
snd_seq_event_t * ags_note_to_seq_event_extended (AgsNote *note
,,
gdouble bpm,
gdouble delay_factor,
glong nn,
glong dd,
glong cc,
glong bb,
glong tempo);
guint *n_events
Convert note
to raw-midi.
Parameters
note |
the AgsNote |
|
bpm |
the source bpm |
|
delay_factor |
the source delay factor |
|
nn |
numerator |
|
dd |
denominator |
|
cc |
clocks |
|
bb |
beats |
|
tempo |
tempo |
|
n_events |
the return location of event count |
Since:
ags_note_from_raw_midi ()
GList * ags_note_from_raw_midi (,
guchar *raw_midi,
gdouble bpm,
gdouble delay_factor);
guint length
Parse raw_midi
data and convert to AgsNote.
Parameters
raw_midi |
the data array |
|
bpm |
the bpm to use |
|
delay_factor |
the segmentation delay factor |
|
length |
the length of the array |
Since:
ags_note_from_raw_midi_extended ()
GList * ags_note_from_raw_midi_extended (,
guchar *raw_midi,
glong nn,
glong dd,
glong cc,
glong bb,
glong tempo,
gdouble bpm,
gdouble delay_factor);
guint length
Parse raw_midi
data and convert to AgsNote.
Parameters
raw_midi |
the data array |
|
nn |
numerator |
|
dd |
denominator |
|
cc |
clocks |
|
bb |
beats |
|
tempo |
tempo |
|
bpm |
the bpm to use |
|
delay_factor |
the segmentation delay factor |
|
length |
the length of the array |
Since:
ags_note_from_seq_event ()
GList * ags_note_from_seq_event (,
snd_seq_event_t *event,
gdouble bpm,
gdouble delay_factor);
guint n_events
Convert ALSA sequencer data event
to AgsNote.
Parameters
event |
ALSA sequencer events as array. |
[type gpointer][transfer none] |
bpm |
the bpm to use |
|
delay_factor |
the segmentation delay factor |
|
n_events |
the arrays length |
Since:
ags_note_from_seq_event_extended ()
GList * ags_note_from_seq_event_extended (,
snd_seq_event_t *event,
glong nn,
glong dd,
glong cc,
glong bb,
glong tempo,
gdouble bpm,
gdouble delay_factor);
guint n_events
Parse raw_midi
data and convert to AgsNote.
Parameters
event |
the snd_seq_event_t struct array. |
[type gpointer][transfer none] |
nn |
numerator |
|
dd |
denominator |
|
cc |
clocks |
|
bb |
beats |
|
tempo |
tempo |
|
bpm |
the bpm to use |
|
delay_factor |
the segmentation delay factor |
|
n_events |
the count snd_seq_event_t structs |
Since:
ags_note_new_with_offset ()
AgsNote * ags_note_new_with_offset (,
guint x0,
guint x1,
guint y,
gdouble stream_delay);
gdouble stream_attack
Creates a new instance of AgsNote
Since:
AGS_IS_NOTE_CLASS()
#define AGS_IS_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_NOTE))
AGS_NOTE_CLASS()
#define AGS_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTE, AgsNoteClass))
AGS_NOTE_GET_CLASS()
#define AGS_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_NOTE, AgsNoteClass))
Types and Values
enum AgsNoteFlags
Enum values to control the behavior or indicate internal state of AgsNote by enable/disable as flags.
Property Details
The “attack”
property
“attack”AgsComplex *
Envelope attack.
Owner: AgsNote
Flags: Read / Write
Since:
The “decay”
property
“decay”AgsComplex *
Envelope decay.
Owner: AgsNote
Flags: Read / Write
Since:
The “frequency”
property
“frequency”double
The note's frequency.
Owner: AgsNote
Flags: Read / Write
Allowed values: >= 0
Default value: 0
Since:
The “note-name”
property
“note-name”char *
The note's name.
Owner: AgsNote
Flags: Read / Write
Default value: NULL
Since:
The “ratio”
property
“ratio”AgsComplex *
Envelope ratio.
Owner: AgsNote
Flags: Read / Write
Since:
The “release”
property
“release”AgsComplex *
Envelope release.
Owner: AgsNote
Flags: Read / Write
Since:
The “rt-attack”
property
“rt-attack”guint
Note realtime attack.
Owner: AgsNote
Flags: Read / Write
Default value: 0
Since:
The “rt-offset”
property
“rt-offset”guint64
Note realtime offset.
Owner: AgsNote
Flags: Read / Write
Default value: 0
Since:
The “stream-attack”
property
“stream-attack”double
The stream's attack.
Owner: AgsNote
Flags: Read / Write
Allowed values: >= 0
Default value: 0
Since:
The “stream-delay”
property
“stream-delay”double
The stream's delay.
Owner: AgsNote
Flags: Read / Write
Allowed values: >= 0
Default value: 0
Since:
The “stream-frame-count”
property
“stream-frame-count”guint64
The stream's frame count.
Owner: AgsNote
Flags: Read / Write
Default value: 0
Since:
The “sustain”
property
“sustain”AgsComplex *
Envelope sustain.
Owner: AgsNote
Flags: Read / Write
Since:
The “x0”
property
“x0”guint
Note offset x0.
Owner: AgsNote
Flags: Read / Write
Default value: 0
Since:
The “x1”
property
“x1”guint
Note offset x1.
Owner: AgsNote
Flags: Read / Write
Default value: 0
Since: