diff --git a/MEMLNaut-NISPS.ino b/MEMLNaut-NISPS.ino index da6ffe9..b50b9c0 100644 --- a/MEMLNaut-NISPS.ino +++ b/MEMLNaut-NISPS.ino @@ -1,6 +1,6 @@ //machine config -#define JOYSTICK_IS_4D true +#define JOYSTICK_IS_4D false #define MEMLNAUT_ANALOG_INPUTS 3 + (JOYSTICK_IS_4D ? 1 : 0) #define MEMLNAUT_INPUT_MODE InterfaceRL::INPUT_MODES::JOYSTICK diff --git a/modes/AudioApps/VerbFXAudioApp.hpp b/modes/AudioApps/VerbFXAudioApp.hpp index 5941cea..c2ccb07 100644 --- a/modes/AudioApps/VerbFXAudioApp.hpp +++ b/modes/AudioApps/VerbFXAudioApp.hpp @@ -42,6 +42,11 @@ public: }; queue_t controlMessageQueue; + queue_t wetdryQueue; + + void setWetDryQueued(float value) { + queue_try_add(&wetdryQueue, &value); + } bool enableFilterbank=true; bool enableReverb=true; @@ -72,6 +77,7 @@ public: voiceSpaces[0] = {"Default", voiceSpaceDefault}; currentVoiceSpace = voiceSpaces[0].mappingFunction; queue_init(&controlMessageQueue, sizeof(controlMessages), 1); + queue_init(&wetdryQueue, sizeof(float), 1); }; @@ -85,7 +91,7 @@ public: smoother.Process(neuralNetOutputs.data(), smoothParams.data()); //mapping - wetdry_mix_ = (smoothParams[0] * 0.9f) + 0.1f; + // wetdry_mix_ = (smoothParams[0] * 0.9f) + 0.1f; lp0fb = smoothParams[1] * 0.9f; lp0cutoff = (smoothParams[2] * 0.5f) + 0.05f; @@ -145,6 +151,7 @@ public: verbVsDelayLevel = smoothParams[43]; delayToVerbLevel = smoothParams[44] * 0.99f; + filterBankDelayXFade = smoothParams[45]; //XFADE @@ -219,7 +226,7 @@ public: // Mix dry - y = (y * wetdry_mix_) + (mix * (1.f - wetdry_mix_)); + y = sqrtf(y * wetdry_mix_) + sqrtf(mix * (1.f - wetdry_mix_)); stereosample_t ret { y, y }; @@ -257,7 +264,14 @@ public: break; } } + { + float v; + if (queue_try_remove(&wetdryQueue, &v)) wetdryKnobValue = v; + } currentVoiceSpace(params); + if (wetdryKnobValue >= 0.f) { + wetdry_mix_ = wetdryKnobValue; + } } @@ -310,6 +324,7 @@ protected: maxiDCBlocker dcb; float wetdry_mix_{0.5f}; + float wetdryKnobValue{0.5f}; // mapping float lp0fb{0}, lp0cutoff{0}; diff --git a/modes/MEMLNautModeVerbFX.hpp b/modes/MEMLNautModeVerbFX.hpp index 1f2461d..b61b671 100644 --- a/modes/MEMLNautModeVerbFX.hpp +++ b/modes/MEMLNautModeVerbFX.hpp @@ -29,6 +29,9 @@ public: void setupInterface() { interface.setup(kN_InputParams, VerbFXAudioApp<>::kN_Params); + interface.setRVX1Override([this](float value) { + audioAppVerbFX.setWetDryQueued(value); + }); interface.bindInterface(MEMLNAUT_INPUT_MODE, JOYSTICK_IS_4D); interface.setModeInfo("verbfx", "VerbFX"); interfacePtr = make_non_owning(interface); diff --git a/src/memllib b/src/memllib index c13bef1..3310e51 160000 --- a/src/memllib +++ b/src/memllib @@ -1 +1 @@ -Subproject commit c13bef19d89d045085f60fa24b7c1fe2d3832c8a +Subproject commit 3310e517ac6f412fd6391fa122890e4af695ddcb