Top | ![]() |
![]() |
![]() |
![]() |
An instance of this class can translate a musical note to a frequency, while taking a specific tuning into account. It also provides conversion betwen notes as numbers and strings.
GstBtToneConversion *
gstbt_tone_conversion_new (GstBtToneConversionTuning tuning
);
Create a new instance of a note to frequency translator, that will use the
given tuning
.
gdouble gstbt_tone_conversion_translate_from_string (GstBtToneConversion *self
,gchar *note
);
Converts the string representation of a musical note such as 'C-3' or 'd#4' to a frequency in Hz.
gdouble gstbt_tone_conversion_translate_from_number (GstBtToneConversion *self
,guint note
);
Converts the musical note number to a frequency in Hz.
guint
gstbt_tone_conversion_note_string_2_number
(const gchar *note
);
Converts the string representation of a musical note such as 'C-3' or 'd#4' to a note number.
const gchar *
gstbt_tone_conversion_note_number_2_string
(guint note
);
Converts the numerical number of a note to a string. A value of 1
for note
represents 'c-0'. The highest supported value is 'b-9' (or 'h-9')
which is 1+(9*16)+11 (1 octave has 12 tones, 4 are left unused for easy
coding).
Supported tuning types. see http://en.wikipedia.org/wiki/Musical_tuning
“tuning”
property“tuning” GstBtToneConversionTuning
Harmonic tuning schema.
Owner: GstBtToneConversion
Flags: Read / Write
Default value: GSTBT_TONE_CONVERSION_EQUAL_TEMPERAMENT