[PD] Help with compressor/limiter abstraction

Frank Barknecht fbar at footils.org
Wed Oct 15 18:03:16 CEST 2008

Roman Haefeli hat gesagt: // Roman Haefeli wrote:

> On Wed, 2008-10-15 at 17:24 +0200, Frank Barknecht wrote:
> > 
> > > I'm trying to build a pure-Pd compressor/limiter effect.
> >
> yo.. this really interests me. i will test and comment it soon (when
> i have little time). in the meanwhile i would like to ask: what is
> the idea of having two ratios (c1 and c2 are ratios, aren't they?)?
> and if both are ratios: how comes, that there is only one threshold?
> i may be misunderstanding the basic idea of it. 

Well, [compress~] is a bad name and will be changed: The abstraction I
posted is multi-purpose (like Zexy's [limiter~]) and can also be used
as a noise gate, a limiter or an expander. For this, two different
transfer functions for signals below or above the threshold are used. 

comp1 is the ratio of the compression curve above the threshold. It's
the slope of a staight line there as you may know from the usual
compressor diagrams that show input vs. output level.

comp2 is a bit more complicated: It describes the gain curve that is
applied to the signal if its below the threshold and follows a
x^(1/comp2) curve. If comp2 == 1 you get a straight line with a 1/1
ratio and no gain change for signals below the threshold. 

If comp2 is below 1 you get a parabolic curve, i.e. f(x) = x^2 for
comp2 = 0.5 This means that softer signals get attenuated more: a
noise gate. 

If comp2 is larger then 1 the curve is ...  what's it a sqrt-like
curve called in english? Well, for comp2==2, you get the sqrt-curve
exactly, so softer signals below the threshold get a gain that makes
them louder, until at the threshold point they get passed through
unchanged, after which the comp1-curve kicks in again.

I've read in the Csound book that this is called an expander.

 Frank Barknecht            Do You RjDj.me?          _ ______footils.org__

More information about the Pd-list mailing list