eachcue setLevel row 0 column 0 db theadjustment
repeat with i from 1 to audio input channels of eachcue
eachcue setLevel row i column 0 db theadjustment
end repeat
#!/bin/sh
# normalise audio files using ffmpeg batch process
# see https://ffmpeg.org/ffmpeg-filters.html#loudnorm
## Settings
# set the rate for output audio (eg 44100, 48000, 96000)
rate=44100
# set the integrated loudness target
# loudness target range is -70 to -5 (about -15dB is a good level, EBU is -23dB)
ilt=-15
## program usage
prog=`basename $0`
usage() { echo "$prog - normalise audio files\nUsage: $prog *.wav *.mp3"; exit 0; }
if [ $# -eq 0 ]; then usage; fi
## process input files
for input
do
# generate output file name, based in input name
outfile=${input/\.[a-z]*/_norm.wav}
# normalise the file using ffmpeg
ffmpeg -v error -i "$input" -af loudnorm=i=$ilt,aresample=$rate -ac 2 "$outfile" && echo $outfile
done