@@ -641,6 +641,7 @@ def __init__ (
641641 self ._is_live : bool = False
642642 self ._running_patterns : typing .Dict [str , typing .Any ] = {}
643643 self ._input_device : typing .Optional [str ] = None
644+ self ._input_device_alias : typing .Optional [str ] = None
644645 self ._clock_follow : bool = False
645646 self ._clock_output : bool = False
646647 self ._cc_mappings : typing .List [typing .Dict [str , typing .Any ]] = []
@@ -1357,6 +1358,7 @@ def midi_input (self, device: str, clock_follow: bool = False, name: typing.Opti
13571358 if self ._input_device is None :
13581359 # First call: set primary input device (device 0)
13591360 self ._input_device = device
1361+ self ._input_device_alias = name
13601362 self ._clock_follow = clock_follow
13611363 else :
13621364 # Subsequent calls: register additional input devices
@@ -2470,6 +2472,8 @@ async def _run (self) -> None:
24702472 # Also register the primary input (device 0) if one was configured.
24712473 if self ._sequencer .input_device_name :
24722474 self ._input_device_names [self ._sequencer .input_device_name ] = 0
2475+ if self ._input_device_alias is not None :
2476+ self ._input_device_names [self ._input_device_alias ] = 0
24732477
24742478 for dev_name , alias , cf in self ._additional_inputs :
24752479 dev_idx = len (self ._sequencer ._input_devices ) # next index
0 commit comments