| GPS04 Reference Manual | ||||
|---|---|---|---|---|
#include <PS04-bass-pitch.h> enum PS04BassPitch; enum PS04RelativeBassPitch; #define PS04_BASS_PITCH_MAX #define PS04_BASS_PITCH_MIN const char* ps04_bass_pitch_get_name (PS04BassPitch pitch); guint ps04_bass_pitch_get_octave (PS04BassPitch pitch); PS04RelativeBassPitch ps04_bass_pitch_get_relative_pitch (PS04BassPitch pitch); const char* ps04_relative_bass_pitch_get_name (PS04RelativeBassPitch rel_pitch);
The PS04BassPitch enumeration represents the pitch of a PS04BassNote, while the PS04RelativeBassPitch enumeration represents the pitch within the octave.
typedef enum
{
PS04_BASS_PITCH_C_1 = 0x4C,
PS04_BASS_PITCH_C_SHARP_1 = 0x4D,
PS04_BASS_PITCH_D_1 = 0x4E,
PS04_BASS_PITCH_D_SHARP_1 = 0x4F,
PS04_BASS_PITCH_E_1 = 0x50,
PS04_BASS_PITCH_B_1 = 0x57,
PS04_BASS_PITCH_D_2 = 0x5A,
PS04_BASS_PITCH_E_2 = 0x5C,
PS04_BASS_PITCH_F_2 = 0x5D,
PS04_BASS_PITCH_F_SHARP_2 = 0x5E,
PS04_BASS_PITCH_G_2 = 0x5F,
PS04_BASS_PITCH_G_SHARP_2 = 0x60,
PS04_BASS_PITCH_A_2 = 0x61,
PS04_BASS_PITCH_A_SHARP_2 = 0x62,
PS04_BASS_PITCH_B_2 = 0x63,
PS04_BASS_PITCH_C_3 = 0x64,
PS04_BASS_PITCH_C_SHARP_3 = 0x65,
PS04_BASS_PITCH_D_3 = 0x66,
PS04_BASS_PITCH_D_SHARP_3 = 0x67,
PS04_BASS_PITCH_E_3 = 0x68
} PS04BassPitch;
This enumeration represents the possible pitches of a PS04BassNote.
typedef enum
{
PS04_NOTE_C = 0,
PS04_NOTE_C_SHARP = 1,
PS04_NOTE_D = 2,
PS04_NOTE_D_SHARP = 3,
PS04_NOTE_E = 4,
PS04_NOTE_F = 5,
PS04_NOTE_F_SHARP = 6,
PS04_NOTE_G = 7,
PS04_NOTE_G_SHARP = 8,
PS04_NOTE_A = 9,
PS04_NOTE_A_SHARP = 10,
PS04_NOTE_B = 11
} PS04RelativeBassPitch;
This enumeration represents the possible pitch values within an octave.
#define PS04_BASS_PITCH_MAX PS04_BASS_PITCH_E_3
The maximum PS04BassPitch value.
#define PS04_BASS_PITCH_MIN PS04_BASS_PITCH_C_1
The minimum PS04BassPitch value.
const char* ps04_bass_pitch_get_name (PS04BassPitch pitch);
Gets the name of the pitch in "x-y" format, where x
is the note name (such as "E#") and y is the octave.
pitch : |
the pitch value. |
| Returns : | a statically allocated string. |
guint ps04_bass_pitch_get_octave (PS04BassPitch pitch);
Gets the octave of the pitch.
pitch : |
the pitch value. |
| Returns : | an octave number between 1 and 3. |
PS04RelativeBassPitch ps04_bass_pitch_get_relative_pitch (PS04BassPitch pitch);
Gets the relative pitch within the octave.
pitch : |
the pitch value. |
| Returns : | a PS04RelativeBassPitch value. |
const char* ps04_relative_bass_pitch_get_name
(PS04RelativeBassPitch rel_pitch);
Gets the name (such as "E#") of a relative pitch.
rel_pitch : |
the relative pitch. |
| Returns : | a string constant. |