From: Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk>
To: sox-users@lists.sourceforge.net
Subject: Re: compression
Date: Wed, 06 Dec 2017 23:29:16 +0000 [thread overview]
Message-ID: <4c8c3339a64a4d194d984a5b7e2ae68b@wingsandbeaks.org.uk> (raw)
In-Reply-To: <CAKS_MTuZ=-+BQHnWB_VMK1mCN4YAiUT82y_YcqTQOU_YkmRu=g@mail.gmail.com>
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
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
next prev parent reply other threads:[~2017-12-06 23:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 22:39 compression Glenn English
2017-12-06 23:29 ` Jeremy Nicoll - ml sox users [this message]
2017-12-06 23:33 ` compression Glenn English
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-users
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4c8c3339a64a4d194d984a5b7e2ae68b@wingsandbeaks.org.uk \
--to=sox-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).