|
|
@@ -135,6 +135,7 @@ DistrhoPluginNekobi::DistrhoPluginNekobi() |
|
|
|
fParams.decay = 75.0f;
|
|
|
|
fParams.accent = 25.0f;
|
|
|
|
fParams.volume = 75.0f;
|
|
|
|
fParams.bypass = false;
|
|
|
|
|
|
|
|
// Internal stuff
|
|
|
|
fSynth.waveform = 0.0f;
|
|
|
@@ -232,6 +233,9 @@ void DistrhoPluginNekobi::initParameter(uint32_t index, Parameter& parameter) |
|
|
|
parameter.ranges.min = 0.0f;
|
|
|
|
parameter.ranges.max = 100.0f;
|
|
|
|
break;
|
|
|
|
case paramBypass:
|
|
|
|
parameter.initDesignation(kParameterDesignationBypass);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
@@ -258,6 +262,8 @@ float DistrhoPluginNekobi::getParameterValue(uint32_t index) const |
|
|
|
return fParams.accent;
|
|
|
|
case paramVolume:
|
|
|
|
return fParams.volume;
|
|
|
|
case paramBypass:
|
|
|
|
return fParams.bypass ? 1.0f : 0.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0.0f;
|
|
|
@@ -307,6 +313,14 @@ void DistrhoPluginNekobi::setParameterValue(uint32_t index, float value) |
|
|
|
fSynth.volume = value/100.0f;
|
|
|
|
DISTRHO_SAFE_ASSERT(fSynth.volume >= 0.0f && fSynth.volume <= 1.0f);
|
|
|
|
break;
|
|
|
|
case paramBypass: {
|
|
|
|
const bool bypass = (value > 0.5f);
|
|
|
|
if (fParams.bypass != bypass)
|
|
|
|
{
|
|
|
|
fParams.bypass = bypass;
|
|
|
|
nekobee_synth_all_voices_off(&fSynth);
|
|
|
|
}
|
|
|
|
} break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
@@ -342,6 +356,10 @@ void DistrhoPluginNekobi::run(const float**, float** outputs, uint32_t frames, c |
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ignore midi input if bypassed
|
|
|
|
if (fParams.bypass)
|
|
|
|
midiEventCount = 0;
|
|
|
|
|
|
|
|
while (framesDone < frames)
|
|
|
|
{
|
|
|
|
if (fSynth.nugget_remains == 0)
|
|
|
|