Add retrigger to step lfo

This commit is contained in:
Roland Rabien 2023-09-28 08:16:31 -07:00
commit 4dd62bf66f
7 changed files with 10 additions and 6 deletions

View file

@ -407,6 +407,8 @@ public:
g->setParams (prs.beat, prs.length, prs.level, prs.enable);
addControl (g, 0, 0, 4, 1);
addControl (new gin::SVGPluginButton (prs.retrig, gin::Assets::retrigger));
setSize (112, 163);
}

View file

@ -232,7 +232,8 @@ void WavetableAudioProcessor::StepLFOParams::setup (WavetableAudioProcessor& p)
enable = p.addIntParam (id + "enable", nm + "Enable", "Enable", "", { 0.0, 1.0, 1.0, 1.0 }, 0.0f, 0.0f, enableTextFunction);
beat = p.addIntParam (id + "beat", nm + "Beat", "Beat", "", { 0.0, float (notes.size() - 1), 1.0, 1.0 }, 13.0, 0.0f, durationTextFunction);
length = p.addIntParam (id + "length", nm + "Length", "Length", "", { 2.0, 32.0, 1.0, 1.0f }, 8.0f, 0.0f);
length = p.addIntParam (id + "length", nm + "Length", "Length", "", { 2.0, 32.0, 1.0, 1.0f }, 8.0f, 0.0f);
retrig = p.addIntParam (id + "retrig", nm + "Retrig", "Retrig", "", { 0.0, 1.0, 1.0, 1.0 }, 1.0, 0.0f, enableTextFunction);
for (int i = 0; i < Cfg::numStepLFOSteps; i++)
{

View file

@ -119,7 +119,7 @@ public:
{
StepLFOParams() = default;
gin::Parameter::Ptr enable, beat, length;
gin::Parameter::Ptr enable, beat, length, retrig;
gin::Parameter::Ptr level[Cfg::numStepLFOSteps] = { nullptr };
void setup (WavetableAudioProcessor& p);

View file

@ -65,7 +65,7 @@ void WavetableVoice::noteStarted()
l.noteOn (proc.lfoParams[idx++].retrig->getBoolValue() ? -1 : rng.nextFloat());
modStepLFO.reset();
modStepLFO.noteOn();
modStepLFO.noteOn (proc.stepLfoParams.retrig->getBoolValue() ? -1 : rng.nextFloat());
adsr.reset();
adsr.noteOn();