Re: [LAU] Normalize from command line?

From: Justin Smith <noisesmith@email-addr-hidden>
Date: Sat Apr 26 2008 - 02:03:04 EEST

On Fri, Apr 25, 2008 at 3:09 PM, Peter Plessas <plessas@email-addr-hidden> wrote:
> Dear List,
>
> does anyone know of an application (or script) to normalize audio-files
> from the command line? I have only come across "normalize-audio" which
> does compression across multiple files, but i haven't figured out how to
> raise the amplitude of a file to +/-1 without altering it's dynamics. I
> am sure this could be done using a two-pass sox script, but before i
> start writing my own, i wanted to know if a similar solution already exists.
>
> Thanks for any hints,
>
> Peter
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user@email-addr-hidden
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
>

this is a script I call 0db
-----------------------------------------------------------------------------------------------------------
#!/bin/sh
if [ $# -eq 1 ]; then {
o=`echo $1 | sed -e 's/\([^\.]*\)\(\.\)\(.*\)/\1_normalized.\3/'`
}; else {
o=$2
}; fi
sox -v $(sox $1 -n stat 2>&1 | grep Volume | sed -e 's/[^0-9]*\(.*\)/\1/') $1 $o
-------------------------------------------------------------------------------------------------------------

If you drag file.wav to its icon, it will create file_normalized.wav,
if you call it on the command line with one argument, it has the same
behaviour. If you call from the command line like so: '0db file.wav
new.wav' it will create new.wav, as you would expect.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Sat Apr 26 04:15:09 2008

This archive was generated by hypermail 2.1.8 : Sat Apr 26 2008 - 04:15:09 EEST