From 4a7cde77e249d2dcf51f4d19374dbc1dffa75683 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Wed, 20 May 2020 15:16:15 +0200 Subject: [PATCH] Fix for Volume-CC (MIDI-CC#7). --- MicroDexed.ino | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index fda6c18..cd67018 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -688,12 +688,13 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) #ifdef DEBUG Serial.println(F("VOLUME CC")); #endif - configuration.dexed[instance_id].sound_intensity = map(inValue, 0, 0x7f, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX); -#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); -#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 + //configuration.dexed[instance_id].sound_intensity = map(inValue, 0, 0x7f, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX); + /*#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); + #else*/ + + 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)) { LCDML.OTHER_updateFunc();