Skip to content

Commit

Permalink
Start preparing for "system_midi:" ports, WIP
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Oct 27, 2023
1 parent be867a3 commit bfabb3e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mod/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -6729,9 +6729,12 @@ def get_midi_ports(self):
# Extra MIDI Outs
ports = get_jack_hardware_ports(False, True)
for port in ports:
if not port.startswith(("system:midi_", "nooice")):
if port.startswith("system_midi:"):
alias = port[12:].replace(" (in)","")
elif not port.startswith(("system:midi_", "nooice")):
continue
alias = get_jack_port_alias(port)
else:
alias = get_jack_port_alias(port)
if not alias:
continue
title = midi_port_alias_to_name(alias, True)
Expand All @@ -6740,9 +6743,12 @@ def get_midi_ports(self):
# Extra MIDI Ins
ports = get_jack_hardware_ports(False, False)
for port in ports:
if not port.startswith(("system:midi_", "nooice")):
if port.startswith("system_midi:"):
alias = port[12:].replace(" (out)","")
elif not port.startswith(("system:midi_", "nooice")):
continue
alias = get_jack_port_alias(port)
else:
alias = get_jack_port_alias(port)
if not alias:
continue
title = midi_port_alias_to_name(alias, True)
Expand Down

0 comments on commit bfabb3e

Please sign in to comment.