second chip works, stop mark introduces

This commit is contained in:
2024-04-09 18:37:53 +02:00
parent 8f777c9ac4
commit 3769b3eb05
5 changed files with 76 additions and 73 deletions

View File

@ -14,6 +14,7 @@ typedef enum {
e_L_1_16 = 4,
e_L_1_32 = 5,
e_L_LengthEnd = 6,
e_L_StopMark = 253,
e_L_EndMark = 254,
e_L_SyncMark = 255,
} t_noteLength;
@ -33,11 +34,13 @@ typedef enum {
e_HoldTone,
e_StaccatoBreak,
e_HoldStaccatoBreak,
e_SeparateTone
e_SeparateTone,
e_Terminate
} t_sequencerState;
typedef struct {
uint16_t idx;
uint8_t chip;
uint16_t lengthCnt;
t_sequencerState state;
uint8_t amplitude;
@ -47,6 +50,7 @@ typedef struct {
#define SEQUENCER_PERIOD 4 // ms
#define NUM_OF_CHANNELS 3
typedef struct {
uint8_t taskId;
uint8_t numOfMelodies;
bool firstRun;
uint8_t pace; // quarter notes per minute