Compressors/Limiters
You are Unregistered, please register to gain Full access.    
Advertisements


Modular software & programming MaxMSP, Reaktor, Pure Data, Jeskola BUZZ, and other modular programs. Any questions relating to these programs (patching, favorite ensembles) should be posted in this forum.

Reply
Thread Tools
Old 14-06-2011, 11:30 PM   #1
GhostAddict
Granular Poster
GhostAddict is currently spamming hard
Los Angeles
Posts: 51
MC Status: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Compressors/Limiters

The math behind compressors/limiters.
I want to make a multiband compressor like the one in FLstudio for use in my plugins.
Does anyone have any idea the math behind compressors.
I understand the basic function of threshold,compression, gain, and the standard knobs on a compressor. but im interested in the math.
like thershold at -6db with compression of 3/1 and gain of 2 times would look like
(input*2)
if input>-6db
then input-(-6db)=x
x*1/3
input+x

Is this close to how it should look like?

Advertisements


------------------
GhostAddict is offline   Thanks Reply With Quote
Old 17-06-2011, 09:11 AM   #2
Gotthavok
Soundwave Mangler
Gotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MCGotthavok is a savage MC
Gotthavok's Avatar
Edmonton
Age: 32
Posts: 181
MC Status: 526855
Thanks: 3
Thanked 3 Times in 3 Posts
Re: Compressors/Limiters

i'd suggest chatting up the plugin developers @ Smartelectronix for that kind of info
Gotthavok is offline   Thanks Reply With Quote
Old 14-11-2011, 08:26 PM   #3
DJWreck
Regular Freak
DJWreck is currently spamming hard
Posts: 13
MC Status: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Compressors/Limiters

I'm not a coder by any means but have studied maths and engineering a bit.

I think you are treating it as a linear function with the quick example given but dB is a logarithmic expression so all the calulations have to be dealt with in a non-linear way. dB measurements are measured using a logarithmic system against a reference which changes depending on which system is being used.


eg. SPL - sound pressure level is caluculated using:

SPL = 20* log (Prms/Pref)

log is base 10, Prms is the pressure (Pa) of the measured sound & Pref is the reference pressure (Pa) which is 20 uPa

This is only an example, there are other systems of expression, like sound power level where powers are replaced by Watts. The *20 is replaced by *10 and the reference is 10E-12 W.

Sound power level = 10 * log (Prms/Pref)

using the above mentioned power reference, Prms is again the measured power of the signal.

If you convert from dB to a power or pressure type linear value, you can then add and subtract them together/from each other.

This is because human hearing does not work in a linear way. A sound that is played twice as loud in terms of power is not perceived to be twice as loud. This would limit our dynamic range of hearing, loud sounds would be crippling and we wouldn't hear quiet sounds well. Instead dBs are used as they closer repsresent how our ear/brain system compares sound levels.

It's been a few years since I studied all this, treat it as a guide and not as gospel.

Hope it helps and good luck.




Quote:
Originally Posted by GhostAddict View Post
The math behind compressors/limiters.
I want to make a multiband compressor like the one in FLstudio for use in my plugins.
Does anyone have any idea the math behind compressors.
I understand the basic function of threshold,compression, gain, and the standard knobs on a compressor. but im interested in the math.
like thershold at -6db with compression of 3/1 and gain of 2 times would look like
(input*2)
if input>-6db
then input-(-6db)=x
x*1/3
input+x

Is this close to how it should look like?

Advertisements

DJWreck is offline   Thanks Reply With Quote
Reply


Thread Tools

Forum Jump


All times are GMT +1. The time now is 02:41 PM.


Electronic Music Forums

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.