[music-dsp] Filter Envelopes in Polyphonic VA synths

David Olofson david at gardena.net
Sun Apr 21 18:56:13 EDT 2002


On Friday 19 April 2002 02.17, xk wrote:
> >   I have re-written loops in assembler, only to discover they run
> > slower!, the compiler was smarter than I was!
>
> It happend to me too! The only success I've had in asm was an
> implementation of pow(x, y) with no error checking and the
> limitation that x > 0. But it is way faster that the default.

Right. I look at the compiler generated asm occasionally, and every 
now and then I go "Wow! It really *saw* that shortcut!". And 
compilers most probably won't become more stupid over time...

There was a time when asm was needed for serious speed, but I think 
it's long gone now, in most areas. (Compilers do have some 
"problems" though, especially with fixed point maths, SIMD extensions 
and "precision shortcuts".)


> > The biggest speed improvement was when I implemented code to
> > detect voices that had 'died out' and stop all processing on
> > those voices.
>
> Me too. But it complicate's the handling of the envelope, and it
> introduces one more if at least.

In my engine, it's actually the envelope that "kills" a voice in it's 
final state. :-) Not sure it will stay that way - but it works great 
as long as the amplitude envelope is the "master envelope". (In fact, 
there's only one envelope right now, but this will still work as long 
as it's the amplitude envelope that does the voice killing.) No sync 
issues and no extra code to test for the "kill voice" conditions.


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`---------------------------> http://www.linuxdj.com/maia/ -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`-------------------------------------> http://olofson.net -'

dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/




More information about the music-dsp mailing list