|
|
|
@ -70,6 +70,7 @@ extern char receive_bank_filename[FILENAME_LEN]; |
|
|
|
|
extern void eeprom_update(void); |
|
|
|
|
|
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#include "midinotes.h" |
|
|
|
|
#include "drums.h" |
|
|
|
|
extern void get_sd_performance_name_json(uint8_t number); |
|
|
|
|
extern bool save_sd_performance_json(uint8_t p); |
|
|
|
@ -3980,399 +3981,59 @@ void UI_handle_OP(uint8_t param) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_midi_channel(uint8_t param) { |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
display.setCursor(0, 0); |
|
|
|
|
display.print(F("MIDI Channel")); |
|
|
|
|
} |
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) |
|
|
|
|
drum_midi_channel = constrain(drum_midi_channel + ENCODER[ENC_R].speed(), MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); |
|
|
|
|
else if (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) |
|
|
|
|
drum_midi_channel = constrain(drum_midi_channel - ENCODER[ENC_R].speed(), MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); |
|
|
|
|
|
|
|
|
|
display.setCursor(0, 1); |
|
|
|
|
if (drum_midi_channel == 0) { |
|
|
|
|
display.print(F("[OMNI]")); |
|
|
|
|
} else { |
|
|
|
|
display_int(drum_midi_channel, 4, false, true, false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drums_main_volume(uint8_t param) { |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
|
display_bar_int("Drum Main Vol", configuration.drums.drum_main_vol, 1.0, DRUMS_MAIN_VOL_MIN, DRUMS_MAIN_VOL_MAX, 3, false, false, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) { |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
configuration.drums.drum_main_vol = constrain(configuration.drums.drum_main_vol + ENCODER[ENC_R].speed(), DRUMS_MAIN_VOL_MIN, DRUMS_MAIN_VOL_MAX); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
configuration.drums.drum_main_vol = constrain(configuration.drums.drum_main_vol - ENCODER[ENC_R].speed(), DRUMS_MAIN_VOL_MIN, DRUMS_MAIN_VOL_MAX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
display_bar_int("Drum Main Vol", configuration.drums.drum_main_vol, 1.0, DRUMS_MAIN_VOL_MIN, DRUMS_MAIN_VOL_MAX, 3, false, false, false); |
|
|
|
|
|
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_DRUMS, mapfloat(configuration.drums.drum_main_vol, DRUMS_MAIN_VOL_MIN, DRUMS_MAIN_VOL_MAX, 0.0, VOL_MAX_FLOAT)); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_DRUMS, mapfloat(configuration.drums.drum_main_vol, DRUMS_MAIN_VOL_MIN, DRUMS_MAIN_VOL_MAX, 0.0, VOL_MAX_FLOAT)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
lcd_special_chars(SCROLLBAR); |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void _UI_func_drum_pitch_display(bool mode) { |
|
|
|
|
char temp1[10]; |
|
|
|
|
char temp2[10]; |
|
|
|
|
|
|
|
|
|
memset(temp1, 0, sizeof(temp1)); |
|
|
|
|
memset(temp2, 0, sizeof(temp2)); |
|
|
|
|
|
|
|
|
|
if (mode == false) { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR("[%02d]"), activesample + 1); |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR(" %02d "), abs(configuration.drums.drum_pitch[activesample])); |
|
|
|
|
} else { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR(" %02d "), activesample + 1); |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR("[%02d]"), abs(configuration.drums.drum_pitch[activesample])); |
|
|
|
|
} |
|
|
|
|
display.show(1, 0, 4, temp1); |
|
|
|
|
display.show(1, 4, 8, basename(drum_config[activesample].name)); |
|
|
|
|
display.show(1, 12, 4, temp2); |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_pitch(uint8_t param) { |
|
|
|
|
static bool mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
display.setCursor(0, 0); |
|
|
|
|
display.print("Drum Pitch"); |
|
|
|
|
_UI_func_drum_pitch_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) { |
|
|
|
|
mode = !mode; |
|
|
|
|
} else if (LCDML.BT_checkDown()) { |
|
|
|
|
if (mode == false) |
|
|
|
|
activesample = (activesample + ENCODER[ENC_R].speed()) % (NUM_DRUMSET_CONFIG - 1); |
|
|
|
|
else |
|
|
|
|
configuration.drums.drum_pitch[activesample] = constrain(++configuration.drums.drum_pitch[activesample], DRUMS_PITCH_MIN, DRUMS_PITCH_MAX); |
|
|
|
|
} else if (LCDML.BT_checkUp()) { |
|
|
|
|
if (mode == false) { |
|
|
|
|
uint8_t temp_encoder = ENCODER[ENC_R].speed(); |
|
|
|
|
if (activesample - temp_encoder < 0) |
|
|
|
|
activesample = NUM_DRUMSET_CONFIG - (abs(activesample - temp_encoder)) - 1; |
|
|
|
|
else |
|
|
|
|
activesample -= temp_encoder; |
|
|
|
|
} else |
|
|
|
|
configuration.drums.drum_pitch[activesample] = constrain(--configuration.drums.drum_pitch[activesample], DRUMS_PITCH_MIN, DRUMS_PITCH_MAX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Display and set values
|
|
|
|
|
_UI_func_drum_pitch_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void _UI_func_drum_volume_display(bool mode) { |
|
|
|
|
char temp1[10]; |
|
|
|
|
char temp2[10]; |
|
|
|
|
|
|
|
|
|
memset(temp1, 0, sizeof(temp1)); |
|
|
|
|
memset(temp2, 0, sizeof(temp2)); |
|
|
|
|
|
|
|
|
|
if (mode == false) { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR("[%02d]"), activesample + 1); |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR(" %02d "), configuration.drums.drum_vol[activesample]); |
|
|
|
|
} else { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR(" %02d "), activesample + 1); |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR("[%02d]"), configuration.drums.drum_vol[activesample]); |
|
|
|
|
} |
|
|
|
|
display.show(1, 0, 4, temp1); |
|
|
|
|
display.show(1, 4, 8, basename(drum_config[activesample].name)); |
|
|
|
|
display.show(1, 12, 4, temp2); |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_volume(uint8_t param) { |
|
|
|
|
static bool mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
display.setCursor(0, 0); |
|
|
|
|
display.print("Drum Volume"); |
|
|
|
|
_UI_func_drum_volume_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) { |
|
|
|
|
mode = !mode; |
|
|
|
|
} else if (LCDML.BT_checkDown()) { |
|
|
|
|
if (mode == false) |
|
|
|
|
activesample = (activesample + ENCODER[ENC_R].speed()) % (NUM_DRUMSET_CONFIG - 1); |
|
|
|
|
else |
|
|
|
|
configuration.drums.drum_vol[activesample] = constrain(++configuration.drums.drum_vol[activesample], DRUMS_VOL_MIN, DRUMS_VOL_MAX); |
|
|
|
|
} else if (LCDML.BT_checkUp()) { |
|
|
|
|
if (mode == false) { |
|
|
|
|
uint8_t temp_encoder = ENCODER[ENC_R].speed(); |
|
|
|
|
if (activesample - temp_encoder < 0) |
|
|
|
|
activesample = NUM_DRUMSET_CONFIG - (abs(activesample - temp_encoder)) - 1; |
|
|
|
|
else |
|
|
|
|
activesample -= temp_encoder; |
|
|
|
|
} else { |
|
|
|
|
if (configuration.drums.drum_vol[activesample] > DRUMS_VOL_MIN) |
|
|
|
|
configuration.drums.drum_vol[activesample]--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Display and set values
|
|
|
|
|
_UI_func_drum_volume_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void _UI_func_drum_pan_display(bool mode) { |
|
|
|
|
char temp1[10]; |
|
|
|
|
char temp2[10]; |
|
|
|
|
|
|
|
|
|
memset(temp1, 0, sizeof(temp1)); |
|
|
|
|
memset(temp2, 0, sizeof(temp2)); |
|
|
|
|
if (configuration.drums.drum_pan[activesample] > 25) |
|
|
|
|
display.show(0, 14, 4, ">>"); |
|
|
|
|
else if (configuration.drums.drum_pan[activesample] > 10) |
|
|
|
|
display.show(0, 14, 4, " >"); |
|
|
|
|
else if (configuration.drums.drum_pan[activesample] > 0) |
|
|
|
|
display.show(0, 14, 4, "=>"); |
|
|
|
|
else if (configuration.drums.drum_pan[activesample] < -25) |
|
|
|
|
display.show(0, 14, 4, "<<"); |
|
|
|
|
else if (configuration.drums.drum_pan[activesample] < -10) |
|
|
|
|
display.show(0, 14, 4, "< "); |
|
|
|
|
else if (configuration.drums.drum_pan[activesample] < 0) |
|
|
|
|
display.show(0, 14, 4, "<="); |
|
|
|
|
else |
|
|
|
|
display.show(0, 14, 4, "=="); |
|
|
|
|
if (mode == false) { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR("[%02d]"), activesample + 1); |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR(" %02d "), abs(configuration.drums.drum_pan[activesample])); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR(" %02d "), activesample + 1); |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR("[%02d]"), abs(configuration.drums.drum_pan[activesample])); |
|
|
|
|
} |
|
|
|
|
display.show(1, 0, 4, temp1); |
|
|
|
|
display.show(1, 4, 8, basename(drum_config[activesample].name)); |
|
|
|
|
display.show(1, 12, 4, temp2); |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_pan(uint8_t param) { |
|
|
|
|
static bool mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
display.setCursor(0, 0); |
|
|
|
|
display.print("Drum Panorama"); |
|
|
|
|
_UI_func_drum_pan_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) { |
|
|
|
|
mode = !mode; |
|
|
|
|
} else if (LCDML.BT_checkDown()) { |
|
|
|
|
if (mode == false) |
|
|
|
|
activesample = (activesample + ENCODER[ENC_R].speed()) % (NUM_DRUMSET_CONFIG - 1); |
|
|
|
|
else |
|
|
|
|
configuration.drums.drum_pan[activesample] = constrain(++configuration.drums.drum_pan[activesample], DRUMS_PANORAMA_MIN, DRUMS_PANORAMA_MAX); |
|
|
|
|
} else if (LCDML.BT_checkUp()) { |
|
|
|
|
if (mode == false) { |
|
|
|
|
uint8_t temp_encoder = ENCODER[ENC_R].speed(); |
|
|
|
|
if (activesample - temp_encoder < 0) |
|
|
|
|
activesample = NUM_DRUMSET_CONFIG - (abs(activesample - temp_encoder)) - 1; |
|
|
|
|
else |
|
|
|
|
activesample -= temp_encoder; |
|
|
|
|
} else { |
|
|
|
|
configuration.drums.drum_pan[activesample] = constrain(--configuration.drums.drum_pan[activesample], DRUMS_PANORAMA_MIN, DRUMS_PANORAMA_MAX); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Display and set values
|
|
|
|
|
_UI_func_drum_pan_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void _UI_func_drum_reverb_send_display(bool mode) { |
|
|
|
|
char temp1[10]; |
|
|
|
|
char temp2[10]; |
|
|
|
|
|
|
|
|
|
memset(temp1, 0, sizeof(temp1)); |
|
|
|
|
memset(temp2, 0, sizeof(temp2)); |
|
|
|
|
|
|
|
|
|
if (mode == false) { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR("[%02d]"), activesample + 1); |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR(" %02d "), configuration.drums.drum_reverb_send[activesample]); |
|
|
|
|
} else { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR(" %02d "), activesample + 1); |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR("[%02d]"), configuration.drums.drum_reverb_send[activesample]); |
|
|
|
|
} |
|
|
|
|
display.show(1, 0, 4, temp1); |
|
|
|
|
display.show(1, 4, 8, basename(drum_config[activesample].name)); |
|
|
|
|
display.show(1, 12, 4, temp2); |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_reverb_send(uint8_t param) { |
|
|
|
|
static bool mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
display.setCursor(0, 0); |
|
|
|
|
display.print("Drum RevSend"); |
|
|
|
|
_UI_func_drum_reverb_send_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) { |
|
|
|
|
mode = !mode; |
|
|
|
|
} else if (LCDML.BT_checkDown()) { |
|
|
|
|
if (mode == false) |
|
|
|
|
activesample = (activesample + ENCODER[ENC_R].speed()) % (NUM_DRUMSET_CONFIG - 1); |
|
|
|
|
else |
|
|
|
|
configuration.drums.drum_reverb_send[activesample] = constrain(++configuration.drums.drum_reverb_send[activesample], DRUMS_REVERB_SEND_MIN, DRUMS_REVERB_SEND_MAX); |
|
|
|
|
} else if (LCDML.BT_checkUp()) { |
|
|
|
|
if (mode == false) { |
|
|
|
|
uint8_t temp_encoder = ENCODER[ENC_R].speed(); |
|
|
|
|
if (activesample - temp_encoder < 0) |
|
|
|
|
activesample = NUM_DRUMSET_CONFIG - (abs(activesample - temp_encoder)) - 1; |
|
|
|
|
else |
|
|
|
|
activesample -= temp_encoder; |
|
|
|
|
} else { |
|
|
|
|
if (configuration.drums.drum_reverb_send[activesample] > DRUMS_REVERB_SEND_MIN) |
|
|
|
|
configuration.drums.drum_reverb_send[activesample]--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Display and set values
|
|
|
|
|
_UI_func_drum_reverb_send_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool _get_midi_note(uint8_t note) { |
|
|
|
|
for (uint8_t i = DRUMS_MIDI_NOTE_MIN; i <= DRUMS_MIDI_NOTE_MAX; i++) { |
|
|
|
|
if (configuration.drums.drum_midi_note[activesample] == i) |
|
|
|
|
if (drum_config[activesample].midinote == i) |
|
|
|
|
return (true); |
|
|
|
|
} |
|
|
|
|
return (false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void _UI_func_drum_midi_note_display(bool mode) { |
|
|
|
|
char temp1[10]; |
|
|
|
|
char temp2[10]; |
|
|
|
|
char note_name[4]; |
|
|
|
|
|
|
|
|
|
memset(temp1, 0, sizeof(temp1)); |
|
|
|
|
memset(temp2, 0, sizeof(temp2)); |
|
|
|
|
|
|
|
|
|
getNoteName(note_name, configuration.drums.drum_midi_note[activesample]); |
|
|
|
|
|
|
|
|
|
if (mode == false) { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR("[%02d]"), activesample + 1); |
|
|
|
|
if (_get_midi_note(configuration.drums.drum_midi_note[activesample]) == true) |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR(" %-3s*"), note_name); |
|
|
|
|
else |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR(" %-3s "), note_name); |
|
|
|
|
} else { |
|
|
|
|
snprintf_P(temp1, sizeof(temp1), PSTR(" %02d "), activesample + 1); |
|
|
|
|
if (_get_midi_note(configuration.drums.drum_midi_note[activesample]) == true) |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR("<%-3s>"), note_name); |
|
|
|
|
else |
|
|
|
|
snprintf_P(temp2, sizeof(temp2), PSTR(" %-3s*"), note_name); |
|
|
|
|
} |
|
|
|
|
display.show(1, 0, 4, temp1); |
|
|
|
|
display.show(1, 4, 7, basename(drum_config[activesample].name)); |
|
|
|
|
display.show(1, 11, 5, temp2); |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_midi_note(uint8_t param) { |
|
|
|
|
static bool mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
display.setCursor(0, 0); |
|
|
|
|
display.print("Drum MIDI Note"); |
|
|
|
|
_UI_func_drum_midi_note_display(mode); |
|
|
|
|
midi_learn_mode = true; //configuration.drums.drum_midi_note[activesample];
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) { |
|
|
|
|
mode = !mode; |
|
|
|
|
} else if (LCDML.BT_checkDown()) { |
|
|
|
|
if (mode == false) |
|
|
|
|
activesample = (activesample + ENCODER[ENC_R].speed()) % (NUM_DRUMSET_CONFIG - 1); |
|
|
|
|
else |
|
|
|
|
configuration.drums.drum_midi_note[activesample] = constrain(++configuration.drums.drum_midi_note[activesample], DRUMS_MIDI_NOTE_MIN, DRUMS_MIDI_NOTE_MAX); |
|
|
|
|
} else if (LCDML.BT_checkUp()) { |
|
|
|
|
if (mode == false) { |
|
|
|
|
uint8_t temp_encoder = ENCODER[ENC_R].speed(); |
|
|
|
|
if (activesample - temp_encoder < 0) |
|
|
|
|
activesample = NUM_DRUMSET_CONFIG - (abs(activesample - temp_encoder)) - 1; |
|
|
|
|
else |
|
|
|
|
activesample -= temp_encoder; |
|
|
|
|
} else { |
|
|
|
|
configuration.drums.drum_midi_note[activesample] = constrain(--configuration.drums.drum_midi_note[activesample], DRUMS_MIDI_NOTE_MIN, DRUMS_MIDI_NOTE_MAX); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Display and set values
|
|
|
|
|
_UI_func_drum_midi_note_display(mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
midi_learn_mode = false; |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_save_performance(uint8_t param) { |
|
|
|
|