Skip to content

Instantly share code, notes, and snippets.

@orymate
Created September 19, 2010 21:51
Show Gist options
  • Save orymate/587149 to your computer and use it in GitHub Desktop.
Save orymate/587149 to your computer and use it in GitHub Desktop.
#!/bin/bash
trap 'killall speaker-test; exit' INT
cat <<A
usage: 'j': +10Hz
'k': -10Hz
'J': -100Hz
'K': +100Hz
A
F=200
while read -n1 A
do
killall speaker-test
case "$A" in
j) let F+=10
;;
J) let F+=100
;;
k) let F-=10
;;
K) let F-=100
;;
*) break
esac
speaker-test -f$F -t sine &
sleep .1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment