From 795256b870d91c75a36a95d6102481a272159dc3 Mon Sep 17 00:00:00 2001 From: bklronin Date: Sun, 30 Jun 2024 20:35:29 +0200 Subject: [PATCH] - Added audio confirmation via 3,5 jack --- ashost.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ashost.py b/ashost.py index 1eeeead..c9be065 100644 --- a/ashost.py +++ b/ashost.py @@ -38,6 +38,7 @@ def determine_host(devices_in: list) -> str: inports = [mido.open_input(device) for device in devices_in] print("Listening for messages...") + os.system(f'speaker-test -t sine -f 261 -l 1') try: while not master: for port in inports: @@ -79,6 +80,8 @@ def relay_midi_host_to_out(host_name, devices_out): print(f"Listening for messages on {host_name} and relaying to {devices_out}") recent_messages = [] + os.system(f'speaker-test -t sine -f 261 -l 1') + try: last_stop_time = 0 debounce_delay = 0.05 # 50 milliseconds debounce time @@ -155,9 +158,6 @@ def main_run(): # Play the beep sound with the calculated frequency os.system(f'speaker-test -t sine -f {frequency} -l 1') - # Add a small delay to separate the beeps - time.sleep(1) - # Listen for devices that send start and return the host name midi_host_in = determine_host(devices_in) print(midi_host_in)