Functionality!

This commit is contained in:
2025-01-30 03:01:47 -06:00
parent 89ef7dfcd7
commit 89b00907f6

View File

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