21 lines
510 B
Bash
Executable file
21 lines
510 B
Bash
Executable file
#!/bin/bash
|
|
|
|
|
|
## Usage example:
|
|
## ./make_drumkit.sh kick1.wav hihat1.wav snare3.wav tom1.wav tom2.wav cowbell.wav clap.wav
|
|
|
|
IDX=0
|
|
|
|
for i in $@; do
|
|
echo $i
|
|
sox $i -r 22050 -t u8 drumkit_$IDX.au || exit 1
|
|
#sox $i -t u8 drumkit_$IDX.au
|
|
|
|
xxd -i drumkit_$IDX.au drumkit_$IDX.c
|
|
# xxd -i drumkit_$IDX.au drumkit_tmp_$IDX.c
|
|
# cat drumkit_tmp_$IDX.c | sed -e "s/unsigned /const unsigned /g" >drumkit_$IDX.c
|
|
# rm drumkit_$IDX.au
|
|
IDX=`expr $IDX + 1`
|
|
done
|
|
|
|
#rm -f drumkit_tmp_* drumkit_*.au
|