From: "Peter P." <peterparker@fastmail.com>
To: sox-users@lists.sourceforge.net
Subject: Re: normalize across multiple files in one go?
Date: Thu, 1 Dec 2016 19:50:27 +0100 [thread overview]
Message-ID: <20161201185027.oz5hch6xb2lzopgu@fastmail.com> (raw)
In-Reply-To: <20161201000114.GA25817@dcvr.yhbt.net>
* Eric Wong <normalperson@yhbt.net> [2016-12-01 01:04]:
> "Peter P." <peterparker@fastmail.com> wrote:
> > Hi,
> >
> > didn't find an answer in the mailing list archives nor the web.
> > I am trying to normalize multiple files while keeping their relative
> > levels intact. Is there a way to do this with SoX in one call?
> >
> > How could it be done with multiple calls (eg. analyze first, then raise
> > gain of all files)?
>
> Yes, I do what fmiser said for 2),
>
> assumes no shell-unsafe chars in filenames:
>
> # subtract some from the $PK value if you want a level below 0 dBFS
> PK=$(sox $INPUT_FILES -n stats 2>&1 | awk '/^Pk lev dB/ {print($4 * -1)}')
>
> for i in $INPUT_FILES
> do
> sox $i normalized-$i gain $PK
> done
Thank you Eric (and fmiser), this is a nice solution and works great!
cheers, P
------------------------------------------------------------------------------
prev parent reply other threads:[~2016-12-01 18:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 10:17 normalize across multiple files in one go? Peter P.
2016-11-30 16:22 ` Graff, David E
2016-11-30 23:25 ` fmiser
2016-12-01 0:01 ` Eric Wong
2016-12-01 18:50 ` Peter P. [this message]
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=20161201185027.oz5hch6xb2lzopgu@fastmail.com \
--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).