Posted at

soxで全部の音をノーマライズ

More than 5 years have passed since last update.


soxをインストール

brew install sox


スクリプト


normalize.zsh

#!/bin/zsh

# NEED sox
# brew install sox

EXPORT_DIR=normalized

# input folder
function mkdir_ex() {
# create folder
if [ ! -d $1 ]
then
mkdir $1
fi
}
# normalize
function normalize() {
sox $1 $EXPORT_DIR/$1 norm -1
}

mkdir_ex $EXPORT_DIR

while [ "$1" != "" ]
do
normalize $1
shift
done



使い方


usage.zsh

./normalize.zsh *.aif