|
From: <be...@ga...> - 2003-12-30 17:54:17
|
> > > > a lowpass filter with just a pole: > > y[i] = (x[i]-y[i])*c + y[i]; //x[i] is just a gate signal - 1 to turn > the env on, 0 to turn it off > > a linear segment: > > y[i] = y[i] + k; > > the lowpass filter costs you an extra add and multiply compared to a > linear segment, not much really. the trouble with the linear segment > method is that to approximate a log segment you have to do a fair number > of linear segments. it's the computation of a segments 'k' and how long > each segment must last to approximate the log shape that i believe will > make it more expensive when compared to the lowpass approach which does > the right shape in one segment with one coefficient. It depends what the user wants. For example do we want changing the enveloping information in real time ? Do other samplers permit this ? We could precompute dozen (or 100) of linear envelope segments resembling arbitrary curves and switch the tables in real time (at note-on time) without any overhead. > the only problem > with the lowpass approach is that it needs a tiny little bit of work to > guarantee that it is at maximum in a certain time, and to guarantee it > is off after a certain time. they are pretty trivial modifications > though. > another issue to consider is that the slower your attack time is, the > more segments you will need to use to approximate it without it sounding > bad. > so, i would say if you want a log envelope, use a real log evelope > generator, as it will make life much much easier. performance = 90% of life :-) I'm still not convinced if we should go the log route. Let's see what others say. cheers, Benno http://www.linuxsampler.org ------------------------------------------------- This mail sent through http://www.gardena.net |