[music-dsp] simple compression algorithm

Robert Kukuchka the8bitdeity at thegsp.com
Wed Feb 2 19:37:00 EST 2005


- Agreed, I need to start thinking more like my Control Systems class a 
few years ago. I assume this averaging filter should be thought of as a 
"lag processor" no? So I setup my averaging filter to be about 300ms of 
averaging (to be specific I used a 4Hz rolloff). The only issue is that 
the RMS of the envelope is significantly lower than what it should be. 
Sure it's smoother (still a fair amount of ripple). Should I second a 
second averaging after the RMS calculation? I remember on a hardware 
compressor I worked on the envelope signal is vaguely looking like it 
was in the early stages of detection, but we got our envelope signal to 
be very smooth before hitting the VCA. I forget now what step I'm 
missing.
Cheers
~Rob
On Feb 2, 2005, at 11:02 AM, Citizen Chunk wrote:

>> The question I have is what sort of cutoff should I use for the
>> averaging filter? It should be fairly low frequency, no?
>
> hi Rob! the trick is to stop thinking in frequencies and start
> thinking in time constants. the time constant determines the "time to
> reach % of target," where that percent can be anything. it is usually
> 63% (RC time constant).
>
> if you prefer, you can of course think in frequencies, as it is
> essentially the same formula. (and yes, it would be a very low
> frequency.) but it doesn't really tell you anything about the time
> domain behavior.
>
> there is an algorithm in the musicdsp.org archives "Analysis" section
> called "Envelope Detector". have a look at that.
>
> == chunk
> --
> 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