Re: normalize across multiple files in one go?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Eric Wong <normalperson@xxxxxxxx> [2016-12-01 01:04]:
> "Peter P." <peterparker@xxxxxxxxxxxx> 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

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



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux