Re: DynamicsCompressorNode

From: "Jean-Marc Valin" <jmvalin@mozilla.com>

> On 05/02/2013 05:22 PM, rbj@audioimagination.com wrote:

>> you can have compressors (more precisely "limiters") that look

>> ahead (so there is a built-in delay if it runs real-time) so that

>> when a spike is detected it can adjust the gain in a manner to

>> duck that spike, rather than clip it.

>

> Well, lookahead can be bad for several reasons. It not only adds delay

> to the audio chain, but any change in the gain will create artefacts

> (sound getting muted before an attack). For very short spikes, I think

> soft-clipping can actually do a better job. I have an implementation

> that can work with no added delay:

> https://git.xiph.org/?p=opus.git;a=blob;f=src/opus.c;hb=HEAD#l36

>

 
well, there are all sorts of algorithms, real-time algorithms that have some delay, sometimes as a consequence of the nature of the alg, a filter or a 'verb or a multitap delay or a pitch shifter, and sometimes as a consequence of buffering (i dunno if this public-audio system processes
samples in blocks or not).
 
if you consider the rise and hold times of an analog compressor, there is some mean delay in that also.  delay is something you budget for.  in a real-time audio processing system, some delay is not avoidable.
 
clipping has
artifacts, too.  sometimes the artifacts from limiting are preferable over the artifacts from clipping.  it depends.  i think that very skinny spikes might be better clipped, but there are other waveform peaks that might be better ducked.
 
r b-j
 

Received on Thursday, 2 May 2013 22:04:47 UTC