|
PebbleOS
|
Data Structures | |
| struct | SpeakerNote |
| A single note in a sequence. More... | |
| struct | NoteSequenceState |
| Playback state of a note sequence. More... | |
Enumerations | |
| enum | SpeakerWaveform { SpeakerWaveformSine = 0 , SpeakerWaveformSquare , SpeakerWaveformTriangle , SpeakerWaveformSawtooth , SpeakerWaveformCount } |
| Waveform used to synthesize a note. More... | |
Functions | |
| void | note_seq_init (NoteSequenceState *s, const SpeakerNote *notes, uint32_t count, uint32_t sample_rate) |
| Initialize a note sequence player. | |
| uint32_t | note_seq_fill (NoteSequenceState *s, int16_t *out, uint32_t max_samples) |
| Fill an output buffer with synthesized PCM samples. | |
| void | note_seq_deinit (NoteSequenceState *s) |
| Clean up note sequence state. | |
| uint32_t | note_phase_inc (uint8_t midi_note, uint32_t sample_rate) |
| Compute the per-sample phase increment of a MIDI note. | |
| int16_t | note_synth_sample (uint8_t waveform, uint32_t phase_acc, uint32_t phase_inc, uint8_t velocity) |
| Synthesize one PCM sample of a waveform. | |
| uint32_t | note_midi_freq_x256 (uint8_t midi_note) |
| Get the frequency of a MIDI note. | |
| struct SpeakerNote |
| enum SpeakerWaveform |