Version 4 (modified by 14 years ago) ( diff ) | ,
---|
PlayNotes
Play simple music notes on the beeper.
void PlayNotes(const string& strNotes); void PlayNotes(const char* pszNotes);
Parameters
- strNotes - string containing notes to play
- pszNotes - character array pointer containing notes to play
Return Value
- void - does not return any value
Remarks
Any application that will use PlayNotes must call OpenBeeeper first.
The duration of note may be specified such as 8A as an eighth note, 4C and a quarter note. The octave may be specified after the note such as 8A5 to specify an eighth A note octave 5.
The available notes are limited to:
Octave 5 - A, B, C, D, E, F, G
Octave 6 - A, C, E, G
Octave 7 - C, D, E
Beeper Frequencies -
C5 = 523.25Hz
D5 = 587.33Hz
E5 = 659.26Hz
F5 = 698.46Hz
G5 = 783.99Hz
A5 = 880.00Hz
B5 = 987.77Hz
C6 = 1046.50Hz
E6 = 1318.50Hz
G6 = 1568.00Hz
A6 = 1760.00Hz
C7 = 2093.00Hz
D7 = 2349.30Hz
E7 = 2637.00Hz
Examples
string str = "A,B,C"; PlayNotes(str);
PlayNotes("A,B,C");