Re: [ecasound] Multiband dynamics processing

From: Joel Roth <joelz@email-addr-hidden>
Date: Wed Jul 18 2012 - 22:45:49 EEST

On Wed, Jul 18, 2012 at 09:21:37AM -0700, William Goldsmith wrote:
> Hi all,
> I'm wondering if anyone has put together a chain setup to do multiband
> compression/limiting, similar to the sox mcompand function? I know that
> ecasound contains all of the necessary bits & pieces, but I've never worked
> with the ecasound bandpass filters & don't want to reinvent anything if I
> don't have to.
> I'd love to replicate this sox command (with jack inputs/outputs, which is
> why I'm not using sox):
> play track1.wav gain -3 sinc 8000- 29 100 mcompand \
> "0.005,0.1 -47,-40,-34,-34,-17,-33" 100 \
> "0.003,0.05 -47,-40,-34,-34,-17,-33" 400 \
> "0.000625,0.0125 -47,-40,-34,-34,-15,-33" 1600 \
> "0.0001,0.025 -47,-40,-34,-34,-31,-31,-0,-30" 6400 \
> "0,0.025 -38,-31,-28,-28,-0,-25"

> Thanks for any suggestions or assistance

Hi Bill,

First of all, when you see how much work this is, you might
try to configure ALSA to feed it's output to JACK so that
you can use sox.

Second you'll probably be using some LADSPA plugins for this,
you might try the Linux Audio Users list if you don't get an
suitable answer here.

Finally, you might be able to use Nama's mastering mode
configuration as a starting point. Nama configures Ecasound
as a three-band compressor with a limiter on the output.

                                 +- Low -+
                                 | |
User tracks --- Master -- Eq ----+- Mid -+--- Boost -- output
                                 | |
                                 +- High +

The Eq track (i.e. chain) hosts an equalizer.

The Low, Mid and High tracks each apply a bandpass
filter, a compressor and a spatialiser.

The Boost track applies gain and a limiter.

Here are the LADSPA effects and parameters

    eq: Parametric1 1 0 0 40 1 0 0 200 1 0 0 600 1 0 0 3300 1 0
    low_pass: lowpass_iir 106 2
    mid_pass: bandpass_iir 520 800 2
    high_pass: highpass_iir 1030 2
    compressor: sc4 0 3 16 0 1 3.25 0
    spatialiser: matrixSpatialiser 0
    limiter: tap_limiter 0 0

Here are Julien Claassen's Notes

    Eq: All sections are initially off. You can turn them
    on as needed, one at a time.
    Bandpass: Default settings are courtesy of Fons
    Adriaensen, who says they will be within 1.5dB of
    flat settings.
    Compressor is turned off, with reasonable default values
    Spatialiser and limiter: both initially off so you can start out
    clean and slowly work your way from there.

Below is a typical chain setup, sans effects,
as generated by Nama.

Chain No. Track name Comment
   1 Master Default mix track
   3 brass Normal user track
   9 Eq
   10 Low
   11 Mid
   12 High
   13 Boost

# ecasound chainsetup file

# general

-z:mixmode,sum -G:jack,Nama,send -b:256 -z:db,100000 -z:nointbuf

# audio inputs

-a:1 -i:loop,Master_in
-a:10,11,12 -i:loop,Eq_out
-a:13 -i:loop,Boost_in
-a:3 -i:brass_12.wav
-a:9 -i:loop,Master_out

# post-input processing

-a:3 -chcopy:1,2

# audio outputs

-a:1 -o:loop,Master_out
-a:10,11,12 -o:loop,Boost_in
-a:13 -o:alsahw,Intel
-a:3 -o:loop,Master_in
-a:9 -o:loop,Eq_out
And here is the whole ball of wax, as saved
by cs-save-as

# ecasound chainsetup file

# general
-b:256 -r:50 -z:nointbuf -z:db,100000 -n:"/home/jroth/nama/untitled/Setup.ecs" -X -z:noxruns -z:nopsr -z:mixmode,sum

# audio inputs
-a:1 -f:f32_le,2,44100 -i:loop,Master_in
-a:10,11,12 -f:f32_le,2,44100 -i:loop,Eq_out
-a:13 -f:f32_le,2,44100 -i:loop,Boost_in
-a:3 -f:s16_le,1,44100 -i:/home/jroth/nama/untitled/.wav/brass_12.wav,
-a:9 -f:f32_le,2,44100 -i:loop,Master_out

# audio outputs
-a:1 -f:f32_le,2,44100 -o:loop,Master_out
-a:10,11,12 -f:f32_le,2,44100 -o:loop,Boost_in
-a:13 -f:s16_le,2,44100 -o:alsahw,0,0,0
-a:3 -f:f32_le,2,44100 -o:loop,Master_in
-a:9 -f:f32_le,2,44100 -o:loop,Eq_out

# chain operators and controllers
-a:1 -epp:50.00 -ea:100.00
-a:10 -eli:1891,9.90,2.00 -eli:1882,0.00,4.00,16.00,0.00,0.90,3.24,0.00,0.00,0.00 -eli:1422,0.00
-a:11 -eli:1892,9.90,9.90,2.00 -eli:1882,0.00,4.00,16.00,0.00,0.90,3.24,0.00,0.00,0.00 -eli:1422,0.00
-a:12 -eli:1890,9.90,2.00 -eli:1882,0.00,4.00,16.00,0.00,0.90,3.24,0.00,0.00,0.00 -eli:1422,0.00
-a:13 -eli:2145,0.00,0.00,551.00 -eli:2149,30.00,30.00,10.00,0.80,2106.00 -eli:1436,81.00,1.00,81.00,1.00,81.00,1.00,0.00,60.00,40.00,50.00,0.00 -eli:1776,6.00,1.00,0.00 -ea:100.00 -eli:2145,0.00,0.00,551.00
-a:9 -eli:1970,1.00,0.00,0.00,7.60,0.12,0.00,0.00,8.30,0.12,0.00,0.00,9.20,0.12,0.00,0.00,9.90,0.12,0.00

Hope that helps,


> -bg
> ---
> Bill Goldsmith
> Radio Paradise

Joel Roth
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
Ecasound-list mailing list
Received on Thu Jul 19 00:15:04 2012

This archive was generated by hypermail 2.1.8 : Thu Jul 19 2012 - 00:15:04 EEST