Last active
August 29, 2015 14:04
-
-
Save asus4/714b494aa4d3bdc9ac8b to your computer and use it in GitHub Desktop.
soxで全部の音をノーマライズ ref: http://qiita.com/asus4/items/0540445362e7eef3491f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install sox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./normalize.zsh *.aif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment