mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 05:50:46 +02:00
Add retrigger to step lfo
This commit is contained in:
parent
e698e29a59
commit
4dd62bf66f
7 changed files with 10 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue