[sdiy] Soft ADSR ways?

Matthew Smith matt at smiffytech.com
Mon Feb 14 04:09:02 CET 2011


Quoth Magnus Danielson at 14/02/11 12:48...
...
> y(n+1) = y(n) + x*b
> 
> where x is the target level, b is a speed factor and y is the 
> instantaneous value.

As someone who has serious problems with maths (I'm taking the digital 
approach because I *can* do Boolean Algebra - to a degree) I need to get 
my head around this - especially if it means I get lose the lookup table!

So, let's see If I understand this correctly, using the attack phase as 
an example:

x is target level - this being the number (going into the DAC) I reach 
at the end of the attack phase?  If so, can I assign: x = 255 ?

y is instantaneous value - I guess this is the result I want to get out 
of the end, the number to push into the DAC.

b - speed factor - what is this?

n - where does this come from?

I have been working on the basis that my attack phase y values will be 
going from  0 to 255 in 255 increments of 1. These increments would be t 
(whatever time units) long.

t would be 1/256 * the 8-bit ADC value from the attack pot, with 
real-world values ranging between 0 seconds and how ever many seconds I 
decide is suitable for an attack time. (Any suggestions for a maximum 
attack time would be welcome!)

I now need to understand how b and n fit into this model OR if we are 
talking about a totally different way of doing it.  Whatever happens, I 
know that delay between increments will still be between 0 and 255 * 
maximum attack time. (I think!)



-- 
Matthew Smith

Blog: www.smiffysplace.com  Business: www.smiffytech.com
www.linkedin.com/in/smiffy  www.flickr.com/photos/msmiffy
twitter.com/smiffy



More information about the Synth-diy mailing list