diff options
author | Anthony Wang | 2022-10-03 18:12:57 -0400 |
---|---|---|
committer | Anthony Wang | 2022-10-03 18:12:57 -0400 |
commit | 80e92d1cab560f77900f66a002e54ccc9a59d424 (patch) | |
tree | 29492fd37df366c5913f52611caa95b50d7f66c4 /beepemu-sox | |
parent | ef083f3740516570e64112ed0aa6bb8220a88604 (diff) |
Commit all testing programs
Diffstat (limited to 'beepemu-sox')
-rwxr-xr-x | beepemu-sox | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/beepemu-sox b/beepemu-sox new file mode 100755 index 0000000..6fb9487 --- /dev/null +++ b/beepemu-sox @@ -0,0 +1,26 @@ +#!/usr/bin/python + +import os +import sys +import time + +i = 1 +f = 0 +l = 0 +while i < len(sys.argv): + if sys.argv[i] == '-f': + i += 1 + f = float(sys.argv[i]) + elif sys.argv[i] == '-l': + i += 1 + l = float(sys.argv[i])/1000 + elif sys.argv[i] == '-D': + i += 1 + time.sleep(float(sys.argv[i])/1000) + if f != 0 and l != 0: + print(f, l) + os.system(f'play -n synth {l} sawtooth {f} &') + time.sleep(l) + f = 0 + l = 0 + i += 1 |