[music-dsp] Beginner's compressor, take 2

Citizen Chunk citizenchunk at nyc.rr.com
Sun Dec 14 12:50:03 EST 2003


i have posted a new build of the compressor w/ RMS detection.

- Detection toggle switch still broken, but as long as it says "1", 
then it should be in RMS mode. just don't touch anything else.

- got rid of the function calls to RMS conversion and envelope 
detection within the process loop. perhaps that will speed things up?

- i still don't have a way of getting around all of the if / else 
structures in the process loop, so if anyone has any ideas for that, 
i'm all ears.

- i still don't even know if i'm implementing RMS conversion/detection 
properly

- stereo-linking: don't know if i've got this one either. what i'm 
currently doing is calculating both envelopes (left/right) and choosing 
the greater of the 2 before setting gain reduction. is that usually how 
it's done?


On Dec 14, 2003, at 12:38 PM, Robert Fehse wrote:

>
> avoid function calls per sample process .
> move all if's outside per sample process if possible.
> perhaps it is unneccessary to calculate envelope per sample.
>
> on a P4 1.7ghz i only get dropouts.
>
> robert
>
>
>> wow! i can't tell you how awesome it feels to see a screenshot of my
>> plugin on someone else's computer! it's like a real plugin ... well,
>> one that uses way too many CPU cycles anyway. what am i to do about
>> this? the whole time, i've been concentrating on just getting it to
>> work. optimizing was an afterthought. i mean, i've been a little
>> conscious of performance--like using log(x)/log(10) instead of
>> log10(x), exp(x) instead of pow(x,y) when possible, using pointers to
>> large data sometimes.
>>
>> perhaps it's the fact that it is simultaneously calculating peak and
>> RMS envelopes. any ideas?
>>
>> also, does anyone have a fix for the Detection switch? i basically 
>> just
>> need some sort of two pole switch--preferably one that transitions 
>> fast
>> (flip-flops quickly instead of making you drag the knob/fader past the
>> halfway point). i also can't seem to be able to work an if/else
>> statement into setParameterDisplay such that it displays "Peak" if 0,
>> and "RMS" if 1. any ideas?
>>
>> sorry about the CPU hog. i'm working on it.
>>
>>
>> On Dec 14, 2003, at 6:12 AM, David Ross wrote:
>>
>>> Hi Citizen Chunk,
>>>
>>> Just tested your latest compressor. Have a look at this image - - -
>>> www.david-e.de/live_screen.jpg
>>>
>>> 90% CPU usage.
>>>
>>> Cheers,
>>>
>>> David
>>>
>>> _________________________________________________________________
>>> Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile
>>>
>>> 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
>>> http://ceait.calarts.edu/mailman/listinfo/music-dsp
>>>
>>
>> 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
>> http://ceait.calarts.edu/mailman/listinfo/music-dsp
>>
>
> 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
> http://ceait.calarts.edu/mailman/listinfo/music-dsp
>




More information about the music-dsp mailing list