wet dry override
This commit is contained in:
parent
d5bb77d03e
commit
27a1e4e5b0
4 changed files with 22 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
//machine config
|
//machine config
|
||||||
|
|
||||||
#define JOYSTICK_IS_4D true
|
#define JOYSTICK_IS_4D false
|
||||||
#define MEMLNAUT_ANALOG_INPUTS 3 + (JOYSTICK_IS_4D ? 1 : 0)
|
#define MEMLNAUT_ANALOG_INPUTS 3 + (JOYSTICK_IS_4D ? 1 : 0)
|
||||||
#define MEMLNAUT_INPUT_MODE InterfaceRL::INPUT_MODES::JOYSTICK
|
#define MEMLNAUT_INPUT_MODE InterfaceRL::INPUT_MODES::JOYSTICK
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,11 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
queue_t controlMessageQueue;
|
queue_t controlMessageQueue;
|
||||||
|
queue_t wetdryQueue;
|
||||||
|
|
||||||
|
void setWetDryQueued(float value) {
|
||||||
|
queue_try_add(&wetdryQueue, &value);
|
||||||
|
}
|
||||||
|
|
||||||
bool enableFilterbank=true;
|
bool enableFilterbank=true;
|
||||||
bool enableReverb=true;
|
bool enableReverb=true;
|
||||||
|
|
@ -72,6 +77,7 @@ public:
|
||||||
voiceSpaces[0] = {"Default", voiceSpaceDefault};
|
voiceSpaces[0] = {"Default", voiceSpaceDefault};
|
||||||
currentVoiceSpace = voiceSpaces[0].mappingFunction;
|
currentVoiceSpace = voiceSpaces[0].mappingFunction;
|
||||||
queue_init(&controlMessageQueue, sizeof(controlMessages), 1);
|
queue_init(&controlMessageQueue, sizeof(controlMessages), 1);
|
||||||
|
queue_init(&wetdryQueue, sizeof(float), 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -85,7 +91,7 @@ public:
|
||||||
smoother.Process(neuralNetOutputs.data(), smoothParams.data());
|
smoother.Process(neuralNetOutputs.data(), smoothParams.data());
|
||||||
|
|
||||||
//mapping
|
//mapping
|
||||||
wetdry_mix_ = (smoothParams[0] * 0.9f) + 0.1f;
|
// wetdry_mix_ = (smoothParams[0] * 0.9f) + 0.1f;
|
||||||
|
|
||||||
lp0fb = smoothParams[1] * 0.9f;
|
lp0fb = smoothParams[1] * 0.9f;
|
||||||
lp0cutoff = (smoothParams[2] * 0.5f) + 0.05f;
|
lp0cutoff = (smoothParams[2] * 0.5f) + 0.05f;
|
||||||
|
|
@ -145,6 +151,7 @@ public:
|
||||||
|
|
||||||
verbVsDelayLevel = smoothParams[43];
|
verbVsDelayLevel = smoothParams[43];
|
||||||
delayToVerbLevel = smoothParams[44] * 0.99f;
|
delayToVerbLevel = smoothParams[44] * 0.99f;
|
||||||
|
|
||||||
filterBankDelayXFade = smoothParams[45];
|
filterBankDelayXFade = smoothParams[45];
|
||||||
|
|
||||||
//XFADE
|
//XFADE
|
||||||
|
|
@ -219,7 +226,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// Mix dry
|
// 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 };
|
stereosample_t ret { y, y };
|
||||||
|
|
@ -257,7 +264,14 @@ public:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
float v;
|
||||||
|
if (queue_try_remove(&wetdryQueue, &v)) wetdryKnobValue = v;
|
||||||
|
}
|
||||||
currentVoiceSpace(params);
|
currentVoiceSpace(params);
|
||||||
|
if (wetdryKnobValue >= 0.f) {
|
||||||
|
wetdry_mix_ = wetdryKnobValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -310,6 +324,7 @@ protected:
|
||||||
maxiDCBlocker dcb;
|
maxiDCBlocker dcb;
|
||||||
|
|
||||||
float wetdry_mix_{0.5f};
|
float wetdry_mix_{0.5f};
|
||||||
|
float wetdryKnobValue{0.5f};
|
||||||
|
|
||||||
// mapping
|
// mapping
|
||||||
float lp0fb{0}, lp0cutoff{0};
|
float lp0fb{0}, lp0cutoff{0};
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ public:
|
||||||
|
|
||||||
void setupInterface() {
|
void setupInterface() {
|
||||||
interface.setup(kN_InputParams, VerbFXAudioApp<>::kN_Params);
|
interface.setup(kN_InputParams, VerbFXAudioApp<>::kN_Params);
|
||||||
|
interface.setRVX1Override([this](float value) {
|
||||||
|
audioAppVerbFX.setWetDryQueued(value);
|
||||||
|
});
|
||||||
interface.bindInterface(MEMLNAUT_INPUT_MODE, JOYSTICK_IS_4D);
|
interface.bindInterface(MEMLNAUT_INPUT_MODE, JOYSTICK_IS_4D);
|
||||||
interface.setModeInfo("verbfx", "VerbFX");
|
interface.setModeInfo("verbfx", "VerbFX");
|
||||||
interfacePtr = make_non_owning(interface);
|
interfacePtr = make_non_owning(interface);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit c13bef19d89d045085f60fa24b7c1fe2d3832c8a
|
Subproject commit 3310e517ac6f412fd6391fa122890e4af695ddcb
|
||||||
Loading…
Reference in a new issue