Last active
December 9, 2015 17:58
-
-
Save henriquegogo/852665 to your computer and use it in GitHub Desktop.
Electronic Drums with Shell Script + 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
#!/usr/bin/env sh | |
options='--multi-thread -q' | |
while read -n 1 -s key | |
do | |
case $key in | |
0) echo "Kick "; play $options kick.wav &;; | |
4 | 5) play $options hat.wav &;; | |
1 | 2) echo "Snare "; play $options snare.wav &;; | |
q | e | x) echo "Exit"; exit;; | |
*) echo "Unknown key";; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment