[sdiy] Help with math, please

Tim Ressel madhun2001 at yahoo.com
Tue Aug 9 22:00:18 CEST 2011


Thanks everyone! I think Oliver's formula is what I need. I just did some spreadsheet simulation and it looks good.

Now the only question is: can I get away with 32-bit math or do I have to do floating point to make this work. I'll code it up tonight and see.

--TimR



----- Original Message -----
From: Olivier Gillet <ol.gillet at gmail.com>
To: Tim Ressel <madhun2001 at yahoo.com>
Cc: synthdiy diy <synth-diy at dropmix.xs4all.nl>
Sent: Tuesday, August 9, 2011 12:09 PM
Subject: Re: [sdiy] Help with math, please

accumulator += (target_value - accumulator) * Ts / RC

Where Ts is the sampling period (the interval between each sample) and
RC the required time constant (ie, for slow envelopes, you have a very
small k) ; under the restriction that RC is well above Ts to avoid
stepping.

You can look at it from both the "digital filter" and the "discrete
solution to the differential equation of the RC system" angles.




More information about the Synth-diy mailing list