1
0
Fork 0
mirror of https://git.exozy.me/a/Never-Gonna-Give-Beep-Up synced 2026-03-04 03:11:35 +00:00

Commit all testing programs

This commit is contained in:
Anthony Wang 2022-10-03 18:12:57 -04:00
parent ef083f3740
commit 80e92d1cab
No known key found for this signature in database
GPG key ID: 42A5B952E6DD8D38
5 changed files with 151 additions and 6 deletions

26
beepemu-sox Executable file
View file

@ -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