Mononormwavs
::::::::::::::
#!/bin/csh
#
# [gfc] Normalize the volume on all of the wav files in a directory.
# This works on stereo files, but
# both channels get normalized to the same level
#

foreach file (*.wav)
        set vol = `sox $file -e stat -v |& cat -`
        echo $file needs volume adjustment factor of $vol
        if ( "$vol" != "1.000" ) then
                echo adjusting $file
                sox -v $vol $file adjustedfile.wav
                mv -f adjustedfile.wav $file
        endif
end

exit
