wet dry override

This commit is contained in:
chriskiefer 2026-03-29 17:07:07 +01:00
parent d5bb77d03e
commit 27a1e4e5b0
4 changed files with 22 additions and 4 deletions

View file

@ -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

View file

@ -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};

View file

@ -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);

@ -1 +1 @@
Subproject commit c13bef19d89d045085f60fa24b7c1fe2d3832c8a
Subproject commit 3310e517ac6f412fd6391fa122890e4af695ddcb