|
|
@ -319,7 +319,7 @@ void setup() |
|
|
|
Serial.print(F("/")); |
|
|
|
Serial.print(F("/")); |
|
|
|
Serial.print(bank_name[instance_id]); |
|
|
|
Serial.print(bank_name[instance_id]); |
|
|
|
Serial.println(F("]")); |
|
|
|
Serial.println(F("]")); |
|
|
|
for (uint8_t n = 0; n < MAX_VOICES; n++) |
|
|
|
for (uint8_t n = 0; n < MAX_VOICES - 1; n++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (n < 10) |
|
|
|
if (n < 10) |
|
|
|
Serial.print(F(" ")); |
|
|
|
Serial.print(F(" ")); |
|
|
@ -584,7 +584,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
|
|
|
|
|
|
|
switch (inCtrl) { |
|
|
|
switch (inCtrl) { |
|
|
|
case 0: |
|
|
|
case 0: |
|
|
|
if (inValue < MAX_BANKS) |
|
|
|
if (inValue < MAX_BANKS - 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.dexed[instance_id].bank = inValue; |
|
|
|
configuration.dexed[instance_id].bank = inValue; |
|
|
|
} |
|
|
|
} |
|
|
@ -618,7 +618,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(F("VOLUME CC")); |
|
|
|
Serial.println(F("VOLUME CC")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
configuration.dexed[instance_id].loudness = map(inValue, 0, 0x7f,LOUDNESS_MIN, LOUDNESS_MAX); |
|
|
|
configuration.dexed[instance_id].loudness = map(inValue, 0, 0x7f, LOUDNESS_MIN, LOUDNESS_MAX); |
|
|
|
MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].loudness, LOUDNESS_MIN, LOUDNESS_MAX, 0.0, 1.0); |
|
|
|
MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].loudness, LOUDNESS_MIN, LOUDNESS_MAX, 0.0, 1.0); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 10: // Pan
|
|
|
|
case 10: // Pan
|
|
|
@ -722,7 +722,7 @@ void handleProgramChange(byte inChannel, byte inProgram) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (checkMidiChannel(inChannel, instance_id)) |
|
|
|
if (checkMidiChannel(inChannel, instance_id)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (inProgram < MAX_VOICES) |
|
|
|
if (inProgram < MAX_VOICES - 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
@ -1181,8 +1181,8 @@ void check_configuration(void) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.dexed[instance_id].midi_channel = constrain(configuration.dexed[instance_id].midi_channel, MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); |
|
|
|
configuration.dexed[instance_id].midi_channel = constrain(configuration.dexed[instance_id].midi_channel, MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); |
|
|
|
configuration.dexed[instance_id].bank = constrain(configuration.dexed[instance_id].bank, 0, MAX_BANKS); |
|
|
|
configuration.dexed[instance_id].bank = constrain(configuration.dexed[instance_id].bank, 0, MAX_BANKS - 1); |
|
|
|
configuration.dexed[instance_id].voice = constrain(configuration.dexed[instance_id].voice, 0, MAX_VOICES); |
|
|
|
configuration.dexed[instance_id].voice = constrain(configuration.dexed[instance_id].voice, 0, MAX_VOICES - 1); |
|
|
|
configuration.dexed[instance_id].reverb_send = constrain(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX); |
|
|
|
configuration.dexed[instance_id].reverb_send = constrain(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX); |
|
|
|
configuration.dexed[instance_id].chorus_send = constrain(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX); |
|
|
|
configuration.dexed[instance_id].chorus_send = constrain(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX); |
|
|
|
configuration.dexed[instance_id].delay_send = constrain(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX); |
|
|
|
configuration.dexed[instance_id].delay_send = constrain(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX); |
|
|
|