- Added audio confirmation via 3,5 jack
This commit is contained in:
parent
f3e3c701b2
commit
58a5b4d07c
13
ashost.py
13
ashost.py
@ -145,9 +145,18 @@ def main_run():
|
||||
devices_out = remove_through_ports(devices_out)
|
||||
print("Available MIDI input devices:", devices_in)
|
||||
|
||||
base_frequency = 130 # Starting frequency in Hz
|
||||
increment = 50 # Frequency increment for each device
|
||||
|
||||
for i in range(len(devices_out)):
|
||||
#Try to communicate nr of devices via 3,5 output of raspi
|
||||
os.system(f'speaker-test -t sine -f 44{i*10} -l 1')
|
||||
# Calculate the frequency for the current device
|
||||
frequency = base_frequency + (i * increment)
|
||||
|
||||
# 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)
|
||||
|
Loading…
Reference in New Issue
Block a user