cleanup envelopeGenerator initialization

This commit is contained in:
2025-12-26 15:37:20 -06:00
parent cbd60e2701
commit d0bf55faf7
3 changed files with 26 additions and 24 deletions

View File

@@ -72,6 +72,7 @@ void Synth::process(float* out, uint32_t nFrames, uint32_t sampleRate) {
for(auto& p : params_) p.update(); // TODO: profile this
// process all envelopes
// should be easy enough if all the envelopes are in an array to loop over them
gainEnvelope_.set(getParam(ParamId::Osc1VolumeEnvA), getParam(ParamId::Osc1VolumeEnvD), getParam(ParamId::Osc1VolumeEnvS), getParam(ParamId::Osc1VolumeEnvR));
float gain = gainEnvelope_.process();
// TODO: envelope is shared between all notes so this sequence involves a note change but only one envelope attack: