Functionality!
This commit is contained in:
15
patapon.py
15
patapon.py
@@ -4,7 +4,11 @@ import subprocess
|
||||
import time
|
||||
|
||||
def ydotool(key):
|
||||
pass
|
||||
subprocess.run([
|
||||
"ydotool",
|
||||
"type",
|
||||
str(key)
|
||||
])
|
||||
|
||||
def main():
|
||||
# A list of all possible songs, expressed as their cardinal directions
|
||||
@@ -72,8 +76,13 @@ def main():
|
||||
while time.perf_counter() < synctime + lastbeat:
|
||||
pass
|
||||
lastbeat += beat_interval
|
||||
ydotool(key)
|
||||
print(drummapping.get(key, '-'))
|
||||
button = keymapping.get(key, '-')
|
||||
if button != '-':
|
||||
ydotool(button)
|
||||
print(drummapping.get(key, '-'), end="", flush=True)
|
||||
else:
|
||||
print(" ", end="", flush=True)
|
||||
remaining_iterations -= 1
|
||||
print(f"~ ({remaining_iterations} remaining)")
|
||||
|
||||
main()
|
||||
|
Reference in New Issue
Block a user