"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 ------------------------------------------------------------------------------ _______________________________________________ Sox-users mailing list Sox-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/sox-users