![]() |
CHGame 0.3.0
Libraries for the CHGame handheld
|
A melody: one line of notes, easy to write by hand. More...
#include <chgame/Audio.h>
Public Attributes | |
| const uint8_t * | notes |
| (MIDI note, length) pairs. | |
| uint8_t | count |
| Number of pairs. | |
| uint8_t | unitMs |
| Milliseconds per length unit. | |
| uint8_t | gapMs |
| Silence at the end of each note, in milliseconds. | |
A melody: one line of notes, easy to write by hand.
(MIDI note, length) pairs: note 0 is a rest, a length counts units of unitMs, and each note is let go gapMs early so repeated notes stay apart. Middle C is 60; the piezo sings best from C6 (84) to C8 (108).
| const uint8_t* audio::Melody::notes |
(MIDI note, length) pairs.
| uint8_t audio::Melody::count |
Number of pairs.
| uint8_t audio::Melody::unitMs |
Milliseconds per length unit.
| uint8_t audio::Melody::gapMs |
Silence at the end of each note, in milliseconds.