Last active
February 14, 2024 21:49
-
-
Save SpotlightKid/e37dbb23dcf2ca44e1e74fda0b9e62d3 to your computer and use it in GitHub Desktop.
Run klick metronome and tap tempo with enter/return key
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
#!/bin/bash | |
# | |
# Run klick metronome and tap tempo with enter/return key | |
# | |
TEMPO="${1:-120}" | |
cleanup() { | |
stty echo | |
oscsend localhost 9001 /klick/metro/stop | |
echo "Stop." | |
exit | |
} | |
klick -o 9001 -s 2 -v 0.5 -P $TEMPO & | |
echo "Tap tempo with enter/return, Ctrl-C to quit." | |
sleep 0.2 | |
oscsend localhost 9001 /klick/metro/start | |
trap cleanup 2 | |
stty -echo | |
while true; do | |
read | |
oscsend localhost 9001 /klick/simple/tap | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment