|
|
@ -25,17 +25,13 @@ |
|
|
|
#ifndef _SEQUENCER_H |
|
|
|
#ifndef _SEQUENCER_H |
|
|
|
#define _SEQUENCER_H |
|
|
|
#define _SEQUENCER_H |
|
|
|
|
|
|
|
|
|
|
|
typedef struct sequencer_s { |
|
|
|
typedef struct sequencer_s |
|
|
|
|
|
|
|
{ |
|
|
|
float drums_volume; |
|
|
|
float drums_volume; |
|
|
|
uint8_t seq_active_track = 0; |
|
|
|
uint8_t seq_active_track = 0; |
|
|
|
uint8_t seq_menu; |
|
|
|
uint8_t seq_menu; |
|
|
|
#ifdef TEENSY4 |
|
|
|
|
|
|
|
bool seq_noteoffsent[NUM_SEQ_TRACKS] = {false, false, false, false, false, false}; |
|
|
|
bool seq_noteoffsent[NUM_SEQ_TRACKS] = {false, false, false, false, false, false}; |
|
|
|
uint8_t seq_inst_dexed[NUM_SEQ_TRACKS] = { 0, 0, 1, 1 , 1, 1 }; |
|
|
|
uint8_t seq_inst_dexed[NUM_SEQ_TRACKS] = { 0, 0, 1, 1 , 1, 1 }; |
|
|
|
#else |
|
|
|
|
|
|
|
bool seq_noteoffsent[NUM_SEQ_TRACKS] = {false, false}; |
|
|
|
|
|
|
|
uint8_t seq_inst_dexed[NUM_SEQ_TRACKS] = { 0, 0 }; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
uint8_t seq_step = 0; |
|
|
|
uint8_t seq_step = 0; |
|
|
|
bool seq_running = false; |
|
|
|
bool seq_running = false; |
|
|
|
bool seq_recording = false; |
|
|
|
bool seq_recording = false; |
|
|
@ -54,7 +50,7 @@ typedef struct sequencer_s { |
|
|
|
int seq_oct_shift = 0; |
|
|
|
int seq_oct_shift = 0; |
|
|
|
uint8_t arp_style = 0; // up, down, up&down, random
|
|
|
|
uint8_t arp_style = 0; // up, down, up&down, random
|
|
|
|
|
|
|
|
|
|
|
|
uint8_t seq_arps[6][23] = { |
|
|
|
const uint8_t seq_arps[6][23] = { |
|
|
|
{ 0, 4, 7, 12, 16, 19, 24, 28, 31, 36, 40, 43, 48, 52, 55, 60, 64, 67, 72, 76, 79, 84, 0}, //major
|
|
|
|
{ 0, 4, 7, 12, 16, 19, 24, 28, 31, 36, 40, 43, 48, 52, 55, 60, 64, 67, 72, 76, 79, 84, 0}, //major
|
|
|
|
{ 0, 3, 7, 12, 15, 19, 24, 27, 31, 36, 39, 43, 48, 51, 55, 60, 63, 67, 72, 75, 79, 84, 0}, //minor
|
|
|
|
{ 0, 3, 7, 12, 15, 19, 24, 27, 31, 36, 39, 43, 48, 51, 55, 60, 63, 67, 72, 75, 79, 84, 0}, //minor
|
|
|
|
{ 0, 4, 7, 10, 12, 16, 19, 22, 24, 28, 31, 34, 36, 40, 43, 46, 48, 52, 55, 58, 60, 64, 0}, //seventh
|
|
|
|
{ 0, 4, 7, 10, 12, 16, 19, 22, 24, 28, 31, 34, 36, 40, 43, 46, 48, 52, 55, 58, 60, 64, 0}, //seventh
|
|
|
@ -63,7 +59,7 @@ typedef struct sequencer_s { |
|
|
|
{ 0, 4, 7, 11, 12, 16, 19, 23, 24, 28, 31, 35, 36, 40, 43, 47, 48, 52, 55, 59, 60, 64, 0} //maj7
|
|
|
|
{ 0, 4, 7, 11, 12, 16, 19, 23, 24, 28, 31, 35, 36, 40, 43, 47, 48, 52, 55, 59, 60, 64, 0} //maj7
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
char seq_chord_names[7][4] = { |
|
|
|
const char seq_chord_names[7][4] = { |
|
|
|
{'M', 'a', 'j', ' '}, //major
|
|
|
|
{'M', 'a', 'j', ' '}, //major
|
|
|
|
{'M', 'i', 'n', ' '}, |
|
|
|
{'M', 'i', 'n', ' '}, |
|
|
|
{'s', 'e', 'v', ' '}, |
|
|
|
{'s', 'e', 'v', ' '}, |
|
|
@ -73,7 +69,7 @@ typedef struct sequencer_s { |
|
|
|
{ 'N', 'o', 'C', 'd'} |
|
|
|
{ 'N', 'o', 'C', 'd'} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
char arp_style_names[4][3] = { |
|
|
|
const char arp_style_names[4][3] = { |
|
|
|
{ 'u', 'p', ' '}, |
|
|
|
{ 'u', 'p', ' '}, |
|
|
|
{'d', 'w', 'n'}, |
|
|
|
{'d', 'w', 'n'}, |
|
|
|
{'u', '&', 'd'}, |
|
|
|
{'u', '&', 'd'}, |
|
|
@ -124,7 +120,6 @@ typedef struct sequencer_s { |
|
|
|
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } |
|
|
|
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } |
|
|
|
}; |
|
|
|
}; |
|
|
|
uint8_t seq_content_type[NUM_SEQ_PATTERN] = { 0, 0, 0, 0 , 0, 0, 0 , 0 , 0 , 0 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord or Arpeggio
|
|
|
|
uint8_t seq_content_type[NUM_SEQ_PATTERN] = { 0, 0, 0, 0 , 0, 0, 0 , 0 , 0 , 0 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord or Arpeggio
|
|
|
|
#ifdef TEENSY4 |
|
|
|
|
|
|
|
uint8_t seq_patternchain[4][NUM_SEQ_TRACKS] = { |
|
|
|
uint8_t seq_patternchain[4][NUM_SEQ_TRACKS] = { |
|
|
|
{ 0 , 2 , 6 , 9 , 99, 99 }, |
|
|
|
{ 0 , 2 , 6 , 9 , 99, 99 }, |
|
|
|
{ 1 , 2 , 5 , 8 , 99, 99 }, |
|
|
|
{ 1 , 2 , 5 , 8 , 99, 99 }, |
|
|
@ -132,15 +127,6 @@ typedef struct sequencer_s { |
|
|
|
{ 1 , 2 , 5 , 7 , 99, 99 } |
|
|
|
{ 1 , 2 , 5 , 7 , 99, 99 } |
|
|
|
}; |
|
|
|
}; |
|
|
|
uint8_t seq_track_type[NUM_SEQ_TRACKS] = { 0, 0, 1, 1, 1, 1 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp
|
|
|
|
uint8_t seq_track_type[NUM_SEQ_TRACKS] = { 0, 0, 1, 1, 1, 1 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp
|
|
|
|
#else |
|
|
|
|
|
|
|
uint8_t seq_patternchain[4][NUM_SEQ_TRACKS] = { |
|
|
|
|
|
|
|
{ 0 , 2 }, |
|
|
|
|
|
|
|
{ 1 , 2 }, |
|
|
|
|
|
|
|
{ 0 , 2 }, |
|
|
|
|
|
|
|
{ 1 , 2 }, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
uint8_t seq_track_type[NUM_SEQ_TRACKS] = { 0, 0 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
} sequencer_t; |
|
|
|
} sequencer_t; |
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|