[sdiy] software / firmware envelopes in C (or anything else)
Roman Sowa
modular at go2.pl
Thu Nov 6 12:31:30 CET 2025
W dniu 2025-11-06 o 11:45, Gordonjcp pisze:
>> Anyway, I do it exactly like in your equation. Target is changing between 0,
>> full scale and sustain level, depending on ADSR phase.
>
> Ah - you have to watch that!
no, I don't, because it works :)
>
> You've got to flip to the decay phase at somewhat less than full scale because the "RC network" charges asymptotically to the rail.
and I do, I didn't say at which point though. Target is at full scale,
attack trigger point is at half scale. TBH this is still not all I do
there, but for the sake of discussion this is enough.
>
>> All done in fixed point math, but 24 bits is a must, as 16-bit truncation
>> errors spoil the ends of decaying phases.
>
> Can't say I've noticed this.
Probably because you are neurotypical person. I feel sick if the
envelope doesn't decay within 16-bit 1LSB of the destination I want it
to go.
> The Juno 106 has roughly half its voice ROM full of such tables, just to make the controls work nicely ;-)
and to avoid complex, repeating calculations, given that every
instruction of processor time is precious.
More information about the Synth-diy
mailing list