W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2014

Re: DynamicsCompressorNode no automatic make up gain

From: Paul Adenot <paul@paul.cx>
Date: Mon, 07 Jul 2014 19:00:15 +0200
Message-Id: <1404752415.26386.138949809.5DD49427@webmail.messagingengine.com>
To: public-audio@w3.org
On Mon, Jul 7, 2014, at 06:23 PM, Raymond Toy wrote:




On Thu, Jul 3, 2014 at 7:18 PM, Robin Reumers
<[1]robinreumers@gmail.com> wrote:

Hi all,

For educational purposes, I used the DynamicsCompressorNode to
teach compression. However, the DynamicsCompressorNode in the
Web Audio API uses some sort of automatic make up gain, so it’s
not just compressing above a threshold, but actually taking the
soft parts up.


I don't quite understand what this make-up gain is, but
originally the DynamicsCompressor node had an emphasis and
de-emphasis filters for high freuqencies that would cause the
compressed audio to have a gain applied.  See the discussion
at [2]http://lists.w3.org/Archives/Public/public-audio/2014JanM
ar/0010.html.



Make-up gain is a feature present in most hardware and software
dynamic compression unit, that adds a gain stage after the
compression stage, to bring the level back to where is was,
often within a window.



This can be useful (and this behaviour is most of the time
configurable using an on/off switch), because sometimes, the
input signal is simply too loud, and you want to harmonize the
levels, but you don't want the gain stage afterwards, because
you intend to have another mixing stage where you bring the
level up independently of the input level.



In other occasions, you just want to harmonize the levels, so
the make up gain is an easy way to do that, because it tracks
the input level automatically. Think of a singer that just did
a voice track, but at some point in the performance, she moved
a bit further from the microphone: you just apply a compressor
with make up gain, and you've got your levels right (the
reality is often more complex than that, but that's the idea).



We could implement that either by having a `makeUpGain`
property that would default to true.
We should be able to implement make up gain using the
`reduction` AudioParam, but I'd have to check to make this this
is appropriate (in terms of windowing, etc.).



That reminds me of the issue where we can't implement
side-chaining, but I was planning write a proposal to the group
when I'll write the spec text for the DynamicCompressorNode.



In any case, I agree this is something we need, especially now
that we have more and more complex applications that use real
instruments audio tracks, recorded live in the browser (like
this year's Google I/O conference). It could certainly be
useful for WebRTC as well, as it would make it dead easy to
write some custom Web Audio API code that would harmonize
levels.



Any thoughts?



Paul.

References

1. mailto:robinreumers@gmail.com
2. http://lists.w3.org/Archives/Public/public-audio/2014JanMar/0010.html
Received on Monday, 7 July 2014 17:00:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:14 UTC