|
|
|
@ -268,6 +268,7 @@ int16_t _midi_bpm = -1; |
|
|
|
|
elapsedMillis midi_bpm_timer; |
|
|
|
|
elapsedMillis long_button_pressed; |
|
|
|
|
elapsedMillis control_rate; |
|
|
|
|
elapsedMillis sequencer_timer; |
|
|
|
|
uint8_t active_voices[NUM_DEXED]; |
|
|
|
|
uint8_t midi_voices[NUM_DEXED]; |
|
|
|
|
#ifdef SHOW_CPU_LOAD_MSEC |
|
|
|
@ -288,7 +289,15 @@ char g_voice_name[NUM_DEXED][VOICE_NAME_LEN]; |
|
|
|
|
char g_bank_name[NUM_DEXED][BANK_NAME_LEN]; |
|
|
|
|
char receive_bank_filename[FILENAME_LEN]; |
|
|
|
|
uint8_t selected_instance_id = 0; |
|
|
|
|
|
|
|
|
|
uint8_t seqsteptimer = 0; |
|
|
|
|
uint32_t seqtimer_old = 0; |
|
|
|
|
bool seq_running = false; |
|
|
|
|
//uint8_t seqdata[1][16]={48,48,54,48,49,54,54,48,54,54,48,54,49,54,54,54};
|
|
|
|
|
//uint8_t seqdata[1][16]={72,72,78,72,75,78,78,72,78,78,72,78,75,78,78,78};
|
|
|
|
|
uint8_t seqdata[3][16] = {72, 72, 0, 72, 75, 0, 0, 72, 0, 0, 72, 0, 75, 0, 0, 0, |
|
|
|
|
73, 73, 0, 73, 0, 0, 73, 73, 0, 0, 73, 73, 0, 0, 0, 0, |
|
|
|
|
78, 0, 0, 78, 0, 0, 78, 0, 78, 78, 0, 0, 0, 0, 0, 0 |
|
|
|
|
}; |
|
|
|
|
#ifdef TEENSY4 |
|
|
|
|
#if NUM_DEXED>1 |
|
|
|
|
int8_t midi_decay[NUM_DEXED] = { -1, -1}; |
|
|
|
@ -316,10 +325,6 @@ extern uint8_t drum_type[NUM_DRUMS]; |
|
|
|
|
extern drum_config_t drum_config[NUM_DRUMCONFIG]; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
uint8_t seqdata[3][16]; |
|
|
|
|
uint8_t seqsteptimer; |
|
|
|
|
bool seq_running; |
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
|
extern LCDMenuLib2 LCDML; |
|
|
|
|
#endif |
|
|
|
@ -603,6 +608,29 @@ void loop() |
|
|
|
|
ENCODER[ENC_L].update(); |
|
|
|
|
ENCODER[ENC_R].update(); |
|
|
|
|
|
|
|
|
|
if (seq_running) { |
|
|
|
|
|
|
|
|
|
if (sequencer_timer > seqtimer_old + 125) |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
seqtimer_old = sequencer_timer; |
|
|
|
|
if (seqdata[0][seqsteptimer] > 0) { |
|
|
|
|
handleNoteOn(DRUM_MIDI_CHANNEL, seqdata[0][seqsteptimer] , 99); |
|
|
|
|
} |
|
|
|
|
if (seqdata[1][seqsteptimer] > 0) { |
|
|
|
|
handleNoteOn(DRUM_MIDI_CHANNEL, seqdata[1][seqsteptimer] , 99); |
|
|
|
|
} |
|
|
|
|
if (seqdata[2][seqsteptimer] > 0) { |
|
|
|
|
handleNoteOn(DRUM_MIDI_CHANNEL, seqdata[2][seqsteptimer] , 99); |
|
|
|
|
} |
|
|
|
|
seqsteptimer++; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (seqsteptimer > 15)seqsteptimer = 0; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
|
LCDML.loop(); |
|
|
|
|
#endif |
|
|
|
|