![]() |
![]() |
![]() |
GStreamer Buzztard Reference Manual | ![]() |
---|---|---|---|---|
GstNote2Frequency; enum GstNote2FrequencyTuning; GstNote2Frequency* gst_note_2_frequency_new (GstNote2FrequencyTuning tuning); gdouble gst_note_2_frequency_translate_from_string (GstNote2Frequency *self, gchar *note); gdouble gst_note_2_frequency_translate_from_number (GstNote2Frequency *self, guint note);
An instance of this class can translate a musical note to a frequency, while taking a specific tuning into account.
typedef enum { /* 12 tones with equal distance (equal temperament) */ GST_NOTE_2_FREQUENCY_CROMATIC=0, /* @todo: add more */ } GstNote2FrequencyTuning;
Supported tuning types. see http://en.wikipedia.org/wiki/Musical_tuning
GstNote2Frequency* gst_note_2_frequency_new (GstNote2FrequencyTuning tuning);
Create a new instance of a note to frequency translator, that will use the
given tuning
.
tuning : |
the GstNote2FrequencyTuning to use |
Returns : | a new GstNote2Frequency translator |
gdouble gst_note_2_frequency_translate_from_string (GstNote2Frequency *self, gchar *note);
Converts the string representation of a musical note such as 'C-3' or 'd4' to a frequency in Hz.
self : |
a GstNote2Frequency |
note : |
a musical note in string representation |
Returns : | the frequency of the note or 0.0 in case of an error |
gdouble gst_note_2_frequency_translate_from_number (GstNote2Frequency *self, guint note);
Converts the numerical number of a note to a frequency in Hz. A value of 0
for note
represents 'c-0'. The highes supported value is 'b-9' (or 'h-9')
which is (10*12)-1.
self : |
a GstNote2Frequency |
note : |
a musical note as number |
Returns : | the frequency of the note or 0.0 in case of an error |
tuning
" property"tuning" GstNote2FrequencyTuning : Read / Write
selection frequency tuning table.
Default value: GST_NOTE_2_FREQUENCY_CROMATIC