|
From: Steve H. <S.W...@ec...> - 2004-01-01 15:28:15
|
On Tue, Dec 30, 2003 at 02:19:10PM -0300, Juan Linietsky wrote: > First, considering that a segment size is between 50 and 100 samples, > updating the values between segments and ramping linearly inbetween (being the > enveloped curved or not) will make absolutely NO audible difference than > using a lowpass (I've implemented this several times, and I composed a few > hundred of songs with the code :), and considering that this is the most > critical part of the whole app, I have to say that i'm against adding more > code in there. The segments are too small already, much smaller than the > delta times between envelope points. I think 50-100 samples is too few - for fast attachs it definatly wont be enough. I think 32 is quite a common value. > I also read somewhere in the thread that updating every a few (4) samples > would be a good idea, but I have to remind you that adding any > kind of conditional inside the critical loop reduces the performance > enormously in modern procesors, I believe this is because it stalls > the instruction pipeline. You can roll it in with the loop termination condition, but I'd agree that 4 is too often. Someone could benchmark it to find where theres a sweet spot. This would be a good candidate for SIMD instruction optimisation, to run 4 enevelopes at once. - Steve |