[sdiy] Help with math, please
Tim Ressel
madhun2001 at yahoo.com
Wed Aug 10 08:07:10 CEST 2011
Yep, it work! I need to adjust some scaling factors, but it's making real nice expos.
Thanks to all who helped out!
--TimR
----- Original Message -----
From: Matthew Smith <matt at smiffytech.com>
To: Synth DIY <synth-diy at dropmix.xs4all.nl>
Cc:
Sent: Tuesday, August 9, 2011 3:45 PM
Subject: Re: [sdiy] Help with math, please
Quoth Tom Wiltshire at 10/08/11 07:23...
...
> For your envelope generator, you can use your linear value as an index
> into "exponential curve" lookup table and get the required value out
> quickly and easily. If necessary, interpolation can be used between
> table entries to prevent stepping and provide a piecewise-linear
> approximation to the required curve. As a side-benefit, this
> method works for arbitrary curves, so you can easily alter your
> alter your envelope generator to tweak the response,
> or provide responses which aren't available on standard envelopes.
I was about to say the second part of this until I re-read it properly and saw that Tom already had ;-)
From discussions earlier this year regarding my digital ADSR design, it became apparent that attack/decay/etcetera parts could be of any shape
required (including ones that would be hard to calculate on-the-fly with limited resources) using lookup tables (LUTs) - and that a shape can be used in both directions, simply by reading the table in reverse (decrementing the counter.)
Really no different from the way I am implementing my wavetable DCO design: a series of samples (whether waves or curves) of equal length are held in memory, one after the other. Selecting the appropriate wave/curve is just a matter of adding an index value to the address counter stepping through the memory. [My current DCO design uses the otherwise unused upper three most significant bits of an EPROM address. These are switched to select one of eight different waveforms.]
Cheers
M
-- Matthew Smith
Business: http://www.smiffytech.com
Blog: http://www.smiffysplace.com
Linkedin: http://www.linkedin.com/in/smiffy
Flickr: http://www.flickr.com/photos/msmiffy
Twitter: http://twitter.com/smiffy
_______________________________________________
Synth-diy mailing list
Synth-diy at dropmix.xs4all.nl
http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
More information about the Synth-diy
mailing list