diff options
Diffstat (limited to 'software/tests')
-rwxr-xr-x | software/tests/dtmf/soxdtmftest.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/software/tests/dtmf/soxdtmftest.sh b/software/tests/dtmf/soxdtmftest.sh new file mode 100755 index 0000000..09bafda --- /dev/null +++ b/software/tests/dtmf/soxdtmftest.sh @@ -0,0 +1,25 @@ +#!/bin/zsh + +DURATION=5 +CMD="play -n synth $DURATION" +while true; do + read -k 1 DIGIT + case $DIGIT in + 1) ${=CMD} sin 697 sin 1209 & ;; + 2) ${=CMD} sin 697 sin 1336 & ;; + 3) ${=CMD} sin 697 sin 1477 & ;; + 4) ${=CMD} sin 770 sin 1209 & ;; + 5) ${=CMD} sin 770 sin 1336 & ;; + 6) ${=CMD} sin 770 sin 1477 & ;; + 7) ${=CMD} sin 852 sin 1209 & ;; + 8) ${=CMD} sin 852 sin 1336 & ;; + 9) ${=CMD} sin 852 sin 1477 & ;; + 0) ${=CMD} sin 941 sin 1336 & ;; + '*') ${=CMD} sin 941 sin 1209 & ;; + '#') ${=CMD} sin 941 sin 1477 & ;; + a) ${=CMD} sin 697 sin 1633 & ;; + b) ${=CMD} sin 770 sin 1633 & ;; + c) ${=CMD} sin 852 sin 1633 & ;; + d) ${=CMD} sin 941 sin 1633 & ;; + esac +done |