up to three melodies will be played by one sequencer instance

This commit is contained in:
2024-03-29 12:41:44 +01:00
parent 97dc6ede70
commit 5a8323bddb
3 changed files with 69 additions and 73 deletions

View File

@ -37,14 +37,20 @@ typedef struct {
uint16_t idx;
uint8_t lengthCnt;
t_sequencerState state;
uint8_t pace;
uint8_t amplitude;
uint8_t channel;
const t_tone *tones;
} t_melody;
#define NUM_OF_CHANNELS 3
typedef struct {
uint8_t numOfMelodies;
uint8_t pace;
t_melody melodies[NUM_OF_CHANNELS];
} t_melodies;
void sequencerInit();
uint16_t sequencerPlayMelody(t_melody *melody);
uint16_t sequencerPlayMelodies(t_melodies *melodies);
#endif // _SEQUENCER_H_