Fix for Volume-CC (MIDI-CC#7).

pull/32/head
Holger Wirtz 5 years ago
parent 8c6657618d
commit 4a7cde77e2
  1. 13
      MicroDexed.ino

@ -688,12 +688,13 @@ 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].sound_intensity = map(inValue, 0, 0x7f, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX); //configuration.dexed[instance_id].sound_intensity = map(inValue, 0, 0x7f, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX);
#ifdef USE_FX /*#ifdef USE_FX
MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX); MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX);
#else #else*/
dexed_level[instance_id]->gain(pseudo_log_curve(mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX)));
#endif dexed_level[instance_id]->gain(pseudo_log_curve(mapfloat(map(inValue, 0, 0x7f, 0, configuration.dexed[instance_id].sound_intensity), SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_AMP_MAX)));
//#endif
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_sound_intensity)) if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_sound_intensity))
{ {
LCDML.OTHER_updateFunc(); LCDML.OTHER_updateFunc();

Loading…
Cancel
Save