Skip to content

Instantly share code, notes, and snippets.

@asus4
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asus4/714b494aa4d3bdc9ac8b to your computer and use it in GitHub Desktop.
Save asus4/714b494aa4d3bdc9ac8b to your computer and use it in GitHub Desktop.
soxで全部の音をノーマライズ ref: http://qiita.com/asus4/items/0540445362e7eef3491f
#!/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
brew install sox
./normalize.zsh *.aif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment