Skip to content

Commit

Permalink
Env-LFO scaling works on finetine and pan nodes
Browse files Browse the repository at this point in the history
MOdulationOnlyNode had ignored lfoIsEnveloped basically

Closes #75
  • Loading branch information
baconpaul committed Jan 3, 2025
1 parent 5ef3f0b commit b2e50cb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dsp/matrix_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,15 @@ struct ModulationOnlyNode : EnvelopeSupport<Patch::ModulationOnlyNode>,
envProcess(true, false);
lfoProcess();

auto lfoLev = lfo.outputBlock[blockSize - 1];

if (lfoIsEnveloped)
{
lfoLev = lfoLev * env.outBlock0;
}

level = directMod + env.outBlock0 * (envD + edMod) * envAtten +
lfo.outputBlock[blockSize - 1] * (lfoD + ldMod) * lfoAtten;
lfoLev * (lfoD + ldMod) * lfoAtten;
}

float lfoAtten{0.f};
Expand Down

0 comments on commit b2e50cb

Please sign in to comment.