|
|
@ -827,19 +827,77 @@ void handleSystemExclusive(byte * sysex, uint len) |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET - 63 + sysex[4]] = sysex[5]; // set function parameter
|
|
|
|
switch (sysex[4]) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
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] = MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_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] = MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_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]); |
|
|
|
|
|
|
|
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]); |
|
|
|
|
|
|
|
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]); |
|
|
|
|
|
|
|
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(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_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(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_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(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_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(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_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(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_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(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_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(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_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(MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_AT_ASSIGN]); |
|
|
|
MicroDexed[instance_id]->controllers.masterTune = (MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MASTER_TUNE] / 10 * 0x4000 << 11) * (1.0 / 12); |
|
|
|
break; |
|
|
|
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]); |
|
|
|
default: |
|
|
|
|
|
|
|
MicroDexed[instance_id]->data[DEXED_GLOBAL_PARAMETER_OFFSET - 63 + sysex[4]] = sysex[5]; // set function parameter
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
MicroDexed[instance_id]->controllers.refresh(); |
|
|
|
MicroDexed[instance_id]->controllers.refresh(); |
|
|
|
data_index = DEXED_GLOBAL_PARAMETER_OFFSET - 63 + sysex[4]; |
|
|
|
data_index = DEXED_GLOBAL_PARAMETER_OFFSET - 63 + sysex[4]; |
|
|
|
} |
|
|
|
} |
|
|
|