|
|
@ -268,6 +268,7 @@ int16_t _midi_bpm = -1; |
|
|
|
elapsedMillis midi_bpm_timer; |
|
|
|
elapsedMillis midi_bpm_timer; |
|
|
|
elapsedMillis long_button_pressed; |
|
|
|
elapsedMillis long_button_pressed; |
|
|
|
elapsedMillis control_rate; |
|
|
|
elapsedMillis control_rate; |
|
|
|
|
|
|
|
elapsedMillis sequencer_timer; |
|
|
|
uint8_t active_voices[NUM_DEXED]; |
|
|
|
uint8_t active_voices[NUM_DEXED]; |
|
|
|
uint8_t midi_voices[NUM_DEXED]; |
|
|
|
uint8_t midi_voices[NUM_DEXED]; |
|
|
|
#ifdef SHOW_CPU_LOAD_MSEC |
|
|
|
#ifdef SHOW_CPU_LOAD_MSEC |
|
|
@ -288,7 +289,16 @@ char g_voice_name[NUM_DEXED][VOICE_NAME_LEN]; |
|
|
|
char g_bank_name[NUM_DEXED][BANK_NAME_LEN]; |
|
|
|
char g_bank_name[NUM_DEXED][BANK_NAME_LEN]; |
|
|
|
char receive_bank_filename[FILENAME_LEN]; |
|
|
|
char receive_bank_filename[FILENAME_LEN]; |
|
|
|
uint8_t selected_instance_id = 0; |
|
|
|
uint8_t selected_instance_id = 0; |
|
|
|
|
|
|
|
uint8_t seqsteptimer = 0; |
|
|
|
|
|
|
|
uint32_t seqtimer_old = 0; |
|
|
|
|
|
|
|
bool seq_running = false; |
|
|
|
|
|
|
|
uint8_t seq_note_in;
|
|
|
|
|
|
|
|
//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 |
|
|
|
#ifdef TEENSY4 |
|
|
|
#if NUM_DEXED>1 |
|
|
|
#if NUM_DEXED>1 |
|
|
|
int8_t midi_decay[NUM_DEXED] = { -1, -1}; |
|
|
|
int8_t midi_decay[NUM_DEXED] = { -1, -1}; |
|
|
@ -316,10 +326,6 @@ extern uint8_t drum_type[NUM_DRUMS]; |
|
|
|
extern drum_config_t drum_config[NUM_DRUMCONFIG]; |
|
|
|
extern drum_config_t drum_config[NUM_DRUMCONFIG]; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
uint8_t seqdata[3][16]; |
|
|
|
|
|
|
|
uint8_t seqsteptimer; |
|
|
|
|
|
|
|
bool seq_running; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
extern LCDMenuLib2 LCDML; |
|
|
|
extern LCDMenuLib2 LCDML; |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -603,6 +609,53 @@ void loop() |
|
|
|
ENCODER[ENC_L].update(); |
|
|
|
ENCODER[ENC_L].update(); |
|
|
|
ENCODER[ENC_R].update(); |
|
|
|
ENCODER[ENC_R].update(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (seq_running) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sequencer_timer > seqtimer_old + 125) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
seqtimer_old = sequencer_timer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_sequencer)) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//write to sequencer if in sequencer menu (step recording and live recording)
|
|
|
|
|
|
|
|
if (seq_note_in>0){ |
|
|
|
|
|
|
|
seqdata[active_seq_track][seqsteptimer]=seq_note_in; |
|
|
|
|
|
|
|
seq_note_in=0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
lcd.setCursor(seqsteptimer, 1); |
|
|
|
|
|
|
|
lcd.print("X"); |
|
|
|
|
|
|
|
if (seqsteptimer == 0) { |
|
|
|
|
|
|
|
lcd.setCursor(15, 1); |
|
|
|
|
|
|
|
lcd.print(seq_find_shortname(15)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
lcd.setCursor(seqsteptimer - 1, 1); |
|
|
|
|
|
|
|
lcd.print(seq_find_shortname(seqsteptimer - 1)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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 |
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
LCDML.loop(); |
|
|
|
LCDML.loop(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|