|
|
|
@ -412,7 +412,7 @@ void setup() |
|
|
|
|
// Filter
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
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].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, 1.0); |
|
|
|
|
MicroDexed[instance_id]->fx.Reso = mapfloat(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->fx.Cutoff = mapfloat(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
@ -618,8 +618,8 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("VOLUME CC")); |
|
|
|
|
#endif |
|
|
|
|
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); |
|
|
|
|
configuration.dexed[instance_id].sound_intensity = map(inValue, 0, 0x7f, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX); |
|
|
|
|
MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, 1.0); |
|
|
|
|
break; |
|
|
|
|
case 10: // Pan
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -816,8 +816,6 @@ void handleSystemExclusive(byte * sysex, uint len) |
|
|
|
|
sysex[4] &= 0x7f; |
|
|
|
|
sysex[5] &= 0x7f; |
|
|
|
|
|
|
|
|
|
uint8_t data_index = 0; |
|
|
|
|
|
|
|
|
|
if (((sysex[3] & 0x7c) >> 2) == 0) |
|
|
|
|
{ |
|
|
|
|
MicroDexed[instance_id]->notesOff(); |
|
|
|
@ -831,75 +829,61 @@ void handleSystemExclusive(byte * sysex, uint len) |
|
|
|
|
{ |
|
|
|
|
case 65: |
|
|
|
|
configuration.dexed[instance_id].pb_range = constrain(sysex[4], PB_RANGE_MIN, PB_RANGE_MAX); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_RANGE] = configuration.dexed[instance_id].pb_range; |
|
|
|
|
MicroDexed[instance_id]->controllers.values_[kControllerPitchRange] = MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_RANGE]; |
|
|
|
|
MicroDexed[instance_id]->controllers.values_[kControllerPitchRange] = configuration.dexed[instance_id].pb_range; |
|
|
|
|
break; |
|
|
|
|
case 66: |
|
|
|
|
configuration.dexed[instance_id].pb_step = constrain(sysex[4], PB_STEP_MIN, PB_STEP_MAX); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_STEP] = configuration.dexed[instance_id].pb_step; |
|
|
|
|
MicroDexed[instance_id]->controllers.values_[kControllerPitchStep] = MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_STEP]; |
|
|
|
|
MicroDexed[instance_id]->controllers.values_[kControllerPitchStep] = configuration.dexed[instance_id].pb_step; |
|
|
|
|
break; |
|
|
|
|
case 67: |
|
|
|
|
configuration.dexed[instance_id].portamento_mode = constrain(sysex[4], PORTAMENTO_MODE_MIN, PORTAMENTO_MODE_MAX); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_MODE] = configuration.dexed[instance_id].portamento_mode; |
|
|
|
|
MicroDexed[instance_id]->setPortamentoMode(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_MODE], MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_GLISSANDO], MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_TIME]); |
|
|
|
|
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time); |
|
|
|
|
break; |
|
|
|
|
case 68: |
|
|
|
|
configuration.dexed[instance_id].portamento_glissando = constrain(sysex[4], PORTAMENTO_GLISSANDO_MIN, PORTAMENTO_GLISSANDO_MAX); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_GLISSANDO] = configuration.dexed[instance_id].portamento_glissando; |
|
|
|
|
MicroDexed[instance_id]->setPortamentoMode(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_MODE], MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_GLISSANDO], MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_TIME]); |
|
|
|
|
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time); |
|
|
|
|
break; |
|
|
|
|
case 69: |
|
|
|
|
configuration.dexed[instance_id].portamento_time = constrain(sysex[4], PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_TIME] = configuration.dexed[instance_id].portamento_time; |
|
|
|
|
MicroDexed[instance_id]->setPortamentoMode(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_MODE], MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_GLISSANDO], MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_TIME]); |
|
|
|
|
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time); |
|
|
|
|
break; |
|
|
|
|
case 70: |
|
|
|
|
configuration.dexed[instance_id].mw_range = constrain(sysex[4], MW_RANGE_MIN, MW_RANGE_MIN); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_RANGE] = configuration.dexed[instance_id].mw_range; |
|
|
|
|
MicroDexed[instance_id]->controllers.wheel.setRange(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_RANGE]); |
|
|
|
|
MicroDexed[instance_id]->controllers.wheel.setRange(configuration.dexed[instance_id].mw_range); |
|
|
|
|
break; |
|
|
|
|
case 71: |
|
|
|
|
configuration.dexed[instance_id].mw_assign = constrain(sysex[4], MW_ASSIGN_MIN, MW_ASSIGN_MIN); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_ASSIGN] = configuration.dexed[instance_id].mw_assign; |
|
|
|
|
MicroDexed[instance_id]->controllers.wheel.setTarget(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_ASSIGN]); |
|
|
|
|
MicroDexed[instance_id]->controllers.wheel.setTarget(configuration.dexed[instance_id].mw_assign); |
|
|
|
|
break; |
|
|
|
|
case 72: |
|
|
|
|
configuration.dexed[instance_id].fc_range = constrain(sysex[4], FC_RANGE_MIN, FC_RANGE_MIN); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_RANGE] = configuration.dexed[instance_id].fc_range; |
|
|
|
|
MicroDexed[instance_id]->controllers.foot.setRange(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_RANGE]); |
|
|
|
|
MicroDexed[instance_id]->controllers.foot.setRange(configuration.dexed[instance_id].fc_range); |
|
|
|
|
break; |
|
|
|
|
case 73: |
|
|
|
|
configuration.dexed[instance_id].fc_assign = constrain(sysex[4], FC_ASSIGN_MIN, FC_ASSIGN_MIN); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_ASSIGN] = configuration.dexed[instance_id].fc_assign; |
|
|
|
|
MicroDexed[instance_id]->controllers.foot.setTarget(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_ASSIGN]); |
|
|
|
|
MicroDexed[instance_id]->controllers.foot.setTarget(configuration.dexed[instance_id].fc_assign); |
|
|
|
|
break; |
|
|
|
|
case 74: |
|
|
|
|
configuration.dexed[instance_id].bc_range = constrain(sysex[4], BC_RANGE_MIN, BC_RANGE_MIN); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_RANGE] = configuration.dexed[instance_id].bc_range; |
|
|
|
|
MicroDexed[instance_id]->controllers.breath.setRange(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_RANGE]); |
|
|
|
|
MicroDexed[instance_id]->controllers.breath.setRange(configuration.dexed[instance_id].bc_range); |
|
|
|
|
break; |
|
|
|
|
case 75: |
|
|
|
|
configuration.dexed[instance_id].bc_assign = constrain(sysex[4], BC_ASSIGN_MIN, BC_ASSIGN_MIN); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_ASSIGN] = configuration.dexed[instance_id].bc_assign; |
|
|
|
|
MicroDexed[instance_id]->controllers.breath.setTarget(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_ASSIGN]); |
|
|
|
|
MicroDexed[instance_id]->controllers.breath.setTarget(configuration.dexed[instance_id].bc_assign); |
|
|
|
|
break; |
|
|
|
|
case 76: |
|
|
|
|
configuration.dexed[instance_id].at_range = constrain(sysex[4], AT_RANGE_MIN, AT_RANGE_MIN); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_AT_RANGE] = configuration.dexed[instance_id].at_range; |
|
|
|
|
MicroDexed[instance_id]->controllers.at.setRange(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_AT_RANGE]); |
|
|
|
|
MicroDexed[instance_id]->controllers.at.setRange(configuration.dexed[instance_id].at_range); |
|
|
|
|
break; |
|
|
|
|
case 77: |
|
|
|
|
configuration.dexed[instance_id].at_assign = constrain(sysex[4], AT_ASSIGN_MIN, AT_ASSIGN_MIN); |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_AT_ASSIGN] = configuration.dexed[instance_id].at_assign; |
|
|
|
|
MicroDexed[instance_id]->controllers.at.setTarget(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_AT_ASSIGN]); |
|
|
|
|
MicroDexed[instance_id]->controllers.at.setTarget(configuration.dexed[instance_id].at_assign); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET - 63 + sysex[4]] = sysex[5]; // set function parameter
|
|
|
|
|
MicroDexed[instance_id]->data[sysex[4]] = sysex[5]; // set function parameter
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
MicroDexed[instance_id]->controllers.refresh(); |
|
|
|
|
data_index = DEXED_GLOBAL_PARAMETER_OFFSET - 63 + sysex[4]; |
|
|
|
|
} |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("SysEx")); |
|
|
|
@ -913,9 +897,7 @@ void handleSystemExclusive(byte * sysex, uint len) |
|
|
|
|
Serial.print(F(" function: ")); |
|
|
|
|
Serial.print(sysex[4], DEC); |
|
|
|
|
Serial.print(F(" = ")); |
|
|
|
|
Serial.print(sysex[5], DEC); |
|
|
|
|
Serial.print(F(", data_index = ")); |
|
|
|
|
Serial.println(data_index, DEC); |
|
|
|
|
Serial.println(sysex[5], DEC); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
@ -1110,7 +1092,7 @@ void set_volume(uint8_t v, int8_t p, uint8_t m) |
|
|
|
|
uint16_t tmp = v / 100.0 * 1023.0 + 0.5; |
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
tmp2 = mapfloat(configuration.pan, PANORAMA_MIN, PANORAMA_MAX, 0.0, 1.0); |
|
|
|
|
tmp2 = mapfloat(configuration.pan - 20, PANORAMA_MIN, PANORAMA_MAX, 0.0, 1.0); |
|
|
|
|
} |
|
|
|
|
float tmp3 = (float)(tmp * (tmp + 2)) / (float)(1 << 20); |
|
|
|
|
|
|
|
|
@ -1120,7 +1102,7 @@ void set_volume(uint8_t v, int8_t p, uint8_t m) |
|
|
|
|
Serial.print(F("[")); |
|
|
|
|
Serial.print(tmp3, 3); |
|
|
|
|
Serial.print(F("] PAN=")); |
|
|
|
|
Serial.print(p, DEC); |
|
|
|
|
Serial.print(p - 20, DEC); |
|
|
|
|
Serial.print(F("[")); |
|
|
|
|
Serial.print(tmp2, 3); |
|
|
|
|
Serial.print(F("] ")); |
|
|
|
@ -1144,20 +1126,20 @@ void set_volume(uint8_t v, int8_t p, uint8_t m) |
|
|
|
|
stereomono1.stereo(false); |
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
configuration.pan = 0.5; |
|
|
|
|
configuration.pan = PANORAMA_DEFAULT; |
|
|
|
|
} |
|
|
|
|
modchorus_inverter.gain(1.0); // stereo mode
|
|
|
|
|
break; |
|
|
|
|
case 2: // mono right
|
|
|
|
|
volume_l.gain(0.0); |
|
|
|
|
stereomono1.stereo(false); |
|
|
|
|
configuration.pan = 0.5; |
|
|
|
|
configuration.pan = PANORAMA_DEFAULT; |
|
|
|
|
modchorus_inverter.gain(1.0); // stereo mode
|
|
|
|
|
break; |
|
|
|
|
case 3: // mono left
|
|
|
|
|
volume_r.gain(0.0); |
|
|
|
|
stereomono1.stereo(false); |
|
|
|
|
configuration.pan = 0.5; |
|
|
|
|
configuration.pan = PANORAMA_DEFAULT; |
|
|
|
|
modchorus_inverter.gain(1.0); // stereo mode
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -1252,25 +1234,25 @@ void check_configuration(void) |
|
|
|
|
configuration.dexed[instance_id].delay_send = constrain(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX); |
|
|
|
|
configuration.dexed[instance_id].filter_cutoff = constrain(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX); |
|
|
|
|
configuration.dexed[instance_id].filter_resonance = constrain(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX); |
|
|
|
|
configuration.dexed[instance_id].loudness = constrain(configuration.dexed[instance_id].loudness, LOUDNESS_MIN, LOUDNESS_MAX); |
|
|
|
|
configuration.dexed[instance_id].sound_intensity = constrain(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX); |
|
|
|
|
configuration.dexed[instance_id].transpose = constrain(configuration.dexed[instance_id].transpose, TRANSPOSE_MIN, TRANSPOSE_MAX); |
|
|
|
|
configuration.dexed[instance_id].tune = constrain(configuration.dexed[instance_id].tune, TUNE_MIN, TUNE_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MASTER_TUNE] = configuration.dexed[instance_id].tune; |
|
|
|
|
configuration.dexed[instance_id].tune = constrain(configuration.dexed[instance_id].tune, TUNE_MIN, TUNE_MAX); |
|
|
|
|
configuration.dexed[instance_id].polyphony = constrain(configuration.dexed[instance_id].polyphony, POLYPHONY_MIN, POLYPHONY_MAX); |
|
|
|
|
configuration.dexed[instance_id].engine = constrain(configuration.dexed[instance_id].engine, ENGINE_MIN, ENGINE_MAX); |
|
|
|
|
configuration.dexed[instance_id].monopoly = constrain(configuration.dexed[instance_id].monopoly, MONOPOLY_MIN, MONOPOLY_MAX); |
|
|
|
|
configuration.dexed[instance_id].pb_range = constrain(configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_RANGE] = configuration.dexed[instance_id].pb_range; |
|
|
|
|
configuration.dexed[instance_id].pb_step = constrain(configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_STEP] = configuration.dexed[instance_id].pb_step; |
|
|
|
|
configuration.dexed[instance_id].mw_range = constrain(configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_RANGE] = configuration.dexed[instance_id].mw_range; |
|
|
|
|
configuration.dexed[instance_id].mw_assign = constrain(configuration.dexed[instance_id].mw_assign, MW_ASSIGN_MIN, MW_ASSIGN_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_ASSIGN] = configuration.dexed[instance_id].mw_assign; |
|
|
|
|
configuration.dexed[instance_id].fc_range = constrain(configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_RANGE] = configuration.dexed[instance_id].fc_range; |
|
|
|
|
configuration.dexed[instance_id].fc_assign = constrain(configuration.dexed[instance_id].fc_assign, FC_ASSIGN_MIN, FC_ASSIGN_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_ASSIGN] = configuration.dexed[instance_id].fc_assign; |
|
|
|
|
configuration.dexed[instance_id].bc_range = constrain(configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_RANGE] = configuration.dexed[instance_id].bc_range; |
|
|
|
|
configuration.dexed[instance_id].bc_assign = constrain(configuration.dexed[instance_id].bc_assign, BC_ASSIGN_MIN, BC_ASSIGN_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_ASSIGN] = configuration.dexed[instance_id].bc_assign; |
|
|
|
|
configuration.dexed[instance_id].at_range = constrain(configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_AT_RANGE] = configuration.dexed[instance_id].at_range; |
|
|
|
|
configuration.dexed[instance_id].at_assign = constrain(configuration.dexed[instance_id].at_assign, AT_ASSIGN_MIN, AT_ASSIGN_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_AT_ASSIGN] = configuration.dexed[instance_id].at_assign; |
|
|
|
|
configuration.dexed[instance_id].portamento_mode = constrain(configuration.dexed[instance_id].portamento_mode, PORTAMENTO_MODE_MIN, PORTAMENTO_MODE_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_MODE] = configuration.dexed[instance_id].portamento_mode; |
|
|
|
|
configuration.dexed[instance_id].portamento_glissando = constrain(configuration.dexed[instance_id].portamento_glissando, PORTAMENTO_GLISSANDO_MIN, PORTAMENTO_GLISSANDO_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_GLISSANDO] = configuration.dexed[instance_id].portamento_glissando; |
|
|
|
|
configuration.dexed[instance_id].portamento_time = constrain(configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX); MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_TIME] = configuration.dexed[instance_id].portamento_time; |
|
|
|
|
configuration.dexed[instance_id].pb_range = constrain(configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].pb_step = constrain(configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX); |
|
|
|
|
configuration.dexed[instance_id].mw_range = constrain(configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].mw_assign = constrain(configuration.dexed[instance_id].mw_assign, MW_ASSIGN_MIN, MW_ASSIGN_MAX); |
|
|
|
|
configuration.dexed[instance_id].fc_range = constrain(configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].fc_assign = constrain(configuration.dexed[instance_id].fc_assign, FC_ASSIGN_MIN, FC_ASSIGN_MAX); |
|
|
|
|
configuration.dexed[instance_id].bc_range = constrain(configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].bc_assign = constrain(configuration.dexed[instance_id].bc_assign, BC_ASSIGN_MIN, BC_ASSIGN_MAX); |
|
|
|
|
configuration.dexed[instance_id].at_range = constrain(configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].at_assign = constrain(configuration.dexed[instance_id].at_assign, AT_ASSIGN_MIN, AT_ASSIGN_MAX); |
|
|
|
|
configuration.dexed[instance_id].portamento_mode = constrain(configuration.dexed[instance_id].portamento_mode, PORTAMENTO_MODE_MIN, PORTAMENTO_MODE_MAX); |
|
|
|
|
configuration.dexed[instance_id].portamento_glissando = constrain(configuration.dexed[instance_id].portamento_glissando, PORTAMENTO_GLISSANDO_MIN, PORTAMENTO_GLISSANDO_MAX); |
|
|
|
|
configuration.dexed[instance_id].portamento_time = constrain(configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX); |
|
|
|
|
configuration.dexed[instance_id].op_enabled = constrain(configuration.dexed[instance_id].op_enabled, OP_ENABLED_MIN, OP_ENABLED_MAX); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1305,7 +1287,7 @@ void init_configuration(void) |
|
|
|
|
configuration.dexed[instance_id].delay_send = DELAY_SEND_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].filter_cutoff = FILTER_CUTOFF_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].filter_resonance = FILTER_RESONANCE_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].loudness = LOUDNESS_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].sound_intensity = SOUND_INTENSITY_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].transpose = TRANSPOSE_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].tune = TUNE_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT; |
|
|
|
@ -1445,7 +1427,7 @@ void show_configuration(void) |
|
|
|
|
Serial.print(F(" Delay Send ")); Serial.println(configuration.dexed[instance_id].delay_send, DEC); |
|
|
|
|
Serial.print(F(" Filter Cutoff ")); Serial.println(configuration.dexed[instance_id].filter_cutoff, DEC); |
|
|
|
|
Serial.print(F(" Filter Resonance ")); Serial.println(configuration.dexed[instance_id].filter_resonance, DEC); |
|
|
|
|
Serial.print(F(" Loudness ")); Serial.println(configuration.dexed[instance_id].loudness, DEC); |
|
|
|
|
Serial.print(F(" Loudness ")); Serial.println(configuration.dexed[instance_id].sound_intensity, DEC); |
|
|
|
|
Serial.print(F(" Transpose ")); Serial.println(configuration.dexed[instance_id].transpose, DEC); |
|
|
|
|
Serial.print(F(" Tune ")); Serial.println(configuration.dexed[instance_id].tune, DEC); |
|
|
|
|
Serial.print(F(" Polyphony ")); Serial.println(configuration.dexed[instance_id].polyphony, DEC); |
|
|
|
@ -1564,13 +1546,5 @@ void show_patch(uint8_t instance_id) |
|
|
|
|
Serial.print(voicename); |
|
|
|
|
Serial.println(F("]")); |
|
|
|
|
Serial.flush(); |
|
|
|
|
for (i = DEXED_GLOBAL_PARAMETER_OFFSET; i <= DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PORTAMENTO_TIME; i++) |
|
|
|
|
{ |
|
|
|
|
Serial.print(i, DEC); |
|
|
|
|
Serial.print(F(": ")); |
|
|
|
|
Serial.println(MicroDexed[instance_id]->data[i]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Serial.println(); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|