Re: compression

Jeremy Nicoll - ml sox users <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
On 2017-12-06 22:39, Glenn English wrote:
> I want to compress some audio -- the quiet parts are too quiet for a 
> road trip.
> 
> AFAICT, there are 2 compression effects: compand and contast.
> 
> Compand doesn't seem to have a ratio param. Contrast isn't explained
> in much detail, and it doesn't have much at all in the way of params
> anyway.
> 
> Can anyone explain to me how to get sox to do a simple compression
> with an adjustable compression ratio?

The manual has a specific example of the use of compand, for making 
music
suitable for listening to in a car.  I'd have thought you could start by
trying the example, then tweaking the settings to suit your music.

In the description of the parameters in that example, it says "sounds in
the range −60dB to 0dB (maximum volume) will be boosted so that the 60dB
dynamic range of the original music will be compressed 3-to-1 into a 
20dB
range".  I presume that the 3:1 ratio and those quoted 60dB & 20dB 
values
correspond to the "-60" and "-20" parameters in the example.

I guess you might need to use the stat/stats effects to discover the
dynamic range of a piece of music first, to work out eg the values of
the overall gain, if any, to be applied.


As is often the case in sox documentation, it requires a very careful
look at the required and optional parms for the effect, with the 
example,
to see which parts have been provided.  I found for example when I first
looked at this that I (wrongly) thought that where the description shows
that attack1,decay1 might be followed by  attack2,decay2  and on the 
line
below shows that  in-dB1,out-dB1 might be followed by in-dB2,out-dB2 
that
those two sets of optional second instances of parameters were connected
ie if you had multiple sets of attach,delay, you needed multiple sets of
in&out dBs.

They're not.  Moreover, in the example the 'transfer function' is given
as: 6:−70,−60,−20  and it took me a while to realise that that 
corresponds
to: [soft-knee-dB:]in-dB1[,out-dB1]{,in-dB2,out-dB2}   with out-dB1 (as 
it
says it can be) omitted.  I think the example would have been easier to
understand if it was coded as: 6:−70,-70,−60,−20 (which is what I think
it actually means).   I may well be wrong!

-- 
Jeremy Nicoll - my opinions are my own

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sox-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.