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:
parent
ef083f3740
commit
80e92d1cab
5 changed files with 151 additions and 6 deletions
8
beepemu
8
beepemu
|
|
@ -1,9 +1,8 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import math
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
from pysinewave import SineWave
|
||||
|
||||
i = 1
|
||||
f = 0
|
||||
|
|
@ -20,11 +19,8 @@ while i < len(sys.argv):
|
|||
time.sleep(float(sys.argv[i])/1000)
|
||||
if f != 0 and l != 0:
|
||||
print(f, l)
|
||||
s = SineWave(pitch_per_second=1000)
|
||||
s.set_frequency(f)
|
||||
s.play()
|
||||
os.system(f'play -n synth {l} sawtooth {f} &')
|
||||
time.sleep(l)
|
||||
s.stop()
|
||||
f = 0
|
||||
l = 0
|
||||
i += 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue