Created
November 7, 2015 01:26
-
-
Save kinoshita-lab/5109ac4b0eadbde45ead to your computer and use it in GitHub Desktop.
convert wav file to mozzi signed 8 bit
This file contains 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
#!/usr/bin/env sh | |
# | |
# you need sox http://sox.sourceforge.net/ | |
# and copy char2mozzi.py | |
wavfiles="*.wav" | |
for wavfile in ${wavfiles} | |
do | |
sox ${wavfile} -r 16384 -b 8 -e signed-integer ${wavfile%.wav}.raw | |
done | |
rawfiles="*.raw" | |
for rawfile in ${rawfiles} | |
do | |
./char2mozzi.py ${rawfile} ${rawfile%.raw}_int8.h ${rawfile%.raw} 16384 | |
done | |
rm *.raw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment