sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* Process too soft/loud audio with sox
@ 2020-05-22 11:22 Francesco Ariis
  2020-05-22 12:24 ` Måns Rullgård
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Francesco Ariis @ 2020-05-22 11:22 UTC (permalink / raw)
  To: sox-users

Hello sox-users,
    I have an audio file which is at times too soft and at times too
loud. I would like to make the soft parts a little bit louder and the
loud parts a little bit softer.

Can sox do this?
-F


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Process too soft/loud audio with sox
  2020-05-22 11:22 Process too soft/loud audio with sox Francesco Ariis
@ 2020-05-22 12:24 ` Måns Rullgård
  2020-05-22 13:16 ` Jeff Learman
  2020-06-07  7:02 ` Eric Wong
  2 siblings, 0 replies; 6+ messages in thread
From: Måns Rullgård @ 2020-05-22 12:24 UTC (permalink / raw)
  To: Francesco Ariis; +Cc: sox-users

Francesco Ariis <fa-ml@ariis.it> writes:

> Hello sox-users,
>     I have an audio file which is at times too soft and at times too
> loud. I would like to make the soft parts a little bit louder and the
> loud parts a little bit softer.
>
> Can sox do this?

The 'compand' effect might do what you want.

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Process too soft/loud audio with sox
  2020-05-22 11:22 Process too soft/loud audio with sox Francesco Ariis
  2020-05-22 12:24 ` Måns Rullgård
@ 2020-05-22 13:16 ` Jeff Learman
  2020-05-24 12:04   ` Francesco Ariis
  2020-06-07  7:02 ` Eric Wong
  2 siblings, 1 reply; 6+ messages in thread
From: Jeff Learman @ 2020-05-22 13:16 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 1800 bytes --]

Yes, it can.  What you're looking for is called dynamic range compression.
That's done using the "compand" effect (which does either compression or
its inverse, expansion.)

First, though, I suggest you not make the loud parts quieter (unless your
source material is 32-bit float and the levels go over 0dBFS.  If you have
no idea what that means, then it's unlikely you have 32-bit float
material.)  So, configure the compand effect to make the material sound
good when you have your speaker volume set so the loudest parts are how you
like them, and make the softer parts louder.  Once that is done, if it's
still too loud for the rest of your music library, you can just reduce the
volume throughout that file.  So, two steps: 1) compress, 2) level-set to
match your playlist.

I haven't used the SoX compand processor and don't know the best settings
for your purpose.  However, this is from the Sox manual:
> The following example might be used to make a piece of music with both
quiet and loud passages suitable for listening to in a noisy environment
such as a moving vehicle:

   sox asz.wav asz-car.wav compand 0.3,1 6:−70,−60,−20 −5 −90 0.2


So that should be worth a try to start with!  See
http://sox.sourceforge.net/sox.html ad search for "compand" for more info.



On Fri, 22 May 2020 at 08:00, Francesco Ariis <fa-ml@ariis.it> wrote:

> Hello sox-users,
>     I have an audio file which is at times too soft and at times too
> loud. I would like to make the soft parts a little bit louder and the
> loud parts a little bit softer.
>
> Can sox do this?
> -F
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
>

[-- Attachment #1.2: Type: text/html, Size: 2517 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Process too soft/loud audio with sox
  2020-05-22 13:16 ` Jeff Learman
@ 2020-05-24 12:04   ` Francesco Ariis
  0 siblings, 0 replies; 6+ messages in thread
From: Francesco Ariis @ 2020-05-24 12:04 UTC (permalink / raw)
  To: sox-users

Hello Jeff.
Il 22 maggio 2020 alle 09:16 Jeff Learman ha scritto:
> Yes, it can.  What you're looking for is called dynamic range compression.
> That's done using the "compand" effect (which does either compression or
> its inverse, expansion.)
> 
> […]

I am grateful for your message. It was clear and «actionable» and
made me finally understand what compression is.
I messed around with the parameter from the suggested invocation and
found a sweet, usable spot.
Thanks again
-F



_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Process too soft/loud audio with sox
  2020-05-22 11:22 Process too soft/loud audio with sox Francesco Ariis
  2020-05-22 12:24 ` Måns Rullgård
  2020-05-22 13:16 ` Jeff Learman
@ 2020-06-07  7:02 ` Eric Wong
  2020-06-07  7:10   ` Eric Wong
  2 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2020-06-07  7:02 UTC (permalink / raw)
  To: sox-users

Francesco Ariis <fa-ml@ariis.it> wrote:
> Hello sox-users,
>     I have an audio file which is at times too soft and at times too
> loud. I would like to make the soft parts a little bit louder and the
> loud parts a little bit softer.
> 
> Can sox do this?

compand and mcompand can do it in sox natively.  They're a bit
tricky to learn but fmiser wrote some great posts:

https://sourceforge.net/p/sox/mailman/message/23427259/
https://public-inbox.org/sox-users/20090829011522.cf27e6ee.fmiser@gmail.com/

For simple cases or a final pass after compand/mcompand; I like
tap_limiter from the TAP-plugins LADSPA package:

	sox $IN $OUT ladspa -lr tap_limiter -4 3.5
	(limit to -4dB, add 3.5dB gain)

	http://tap-plugins.sourceforge.net/

I usually use compand or mcompand for recordings which need a
lot of correction.  tap_limiter is good for recordings which
only need a little correction, or after everything else (EQ,
compand/mcompand, etc...)


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Process too soft/loud audio with sox
  2020-06-07  7:02 ` Eric Wong
@ 2020-06-07  7:10   ` Eric Wong
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Wong @ 2020-06-07  7:10 UTC (permalink / raw)
  To: sox-users

Eric Wong <normalperson@yhbt.net> wrote:
> I usually use compand or mcompand for recordings which need a
> lot of correction.  tap_limiter is good for recordings which
> only need a little correction, or after everything else (EQ,
> compand/mcompand, etc...)

I also meant to add that compand/mcompand is better for
sustained peaks of too-high volume.  tap_limiter is better for
short-duration peaks (mic drops, claps, short-circuits, etc.)


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-06-07  7:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 11:22 Process too soft/loud audio with sox Francesco Ariis
2020-05-22 12:24 ` Måns Rullgård
2020-05-22 13:16 ` Jeff Learman
2020-05-24 12:04   ` Francesco Ariis
2020-06-07  7:02 ` Eric Wong
2020-06-07  7:10   ` Eric Wong

sox-users@lists.sourceforge.net unofficial mirror

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/sox-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 sox-users sox-users/ https://public-inbox.org/sox-users \
		sox-users@lists.sourceforge.net
	public-inbox-index sox-users

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.sox
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.sox
	nntp://news.gmane.io/gmane.comp.audio.sox
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/sox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git