Repository navigation
Conversation
set_midi_devices_change_mode gave the combined "in;out" device symbol to remove_port_from_connections, which matches against single JACK port names. A combined symbol never matches, so nothing was removed from self.connections and nothing was disconnected in JACK. mod-host tears those JACK edges down itself in effects_aggregated_midi_enable (steps 1 and 2), so after a switch to aggregated mode self.connections held edges that no longer existed. connect() then short-circuits on its "already exists" guard: the user drags a cable, gets HTTP true, and no connection is ever made. Switching back to separated mode does not clear it, so the cable can never be created again in that session. Split the symbol first, as set_midi_devices_separated already does for the same data. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Observed problem
The user does these steps:
At step 5 the cable does not appear. The web server sends the reply
true, but JACK does not make the connection. The user cannot make that cable again in the same session. A restart of mod-ui is necessary.Cause
self.connectionsis the record that mod-ui keeps of the JACK graph. Theconnect()method starts with this test:The test is correct only if the record agrees with JACK.
In
set_midi_devices_change_mode, the code gave the combined"in;out"device symbol toremove_port_from_connections:remove_port_from_connectionscompares the given name with single JACK port names. A combined symbol never agrees with a single name. Thus mod-ui removed no entry from the record.But mod-host removes these JACK connections. It does this in steps 1 and 2 of
effects_aggregated_midi_enable. After step 3 above, the record held a connection that JACK did not have. The test inconnect()then finds that entry and stops. mod-ui sendstrueto the browser, but mod-ui does not send the command to mod-host.Change
set_midi_devices_change_modedivides the combined symbol before it callsremove_port_from_connections. It gives each half to that method.set_midi_devices_separatedalready does this with the same data.Test results
The steps above were done on a pi-Stomp with a Roland EV-1-WL USB-MIDI device. The table shows the JACK connections of
system:midi_capture_6.mod-host:midi_in,effect_8:eventsmod-host:midi_in,effect_8:eventsmod-midi-merger:inmod-midi-merger:inmod-host:midi_inmod-host:midi_inmod-host:midi_in— no changemod-host:midi_in,effect_8:eventsScope
This change corrects the record only. It does not change the behavior that MOD intends. mod-host removes these JACK connections when the mode changes to aggregated. This change makes the record of mod-ui agree with that result. mod-ui does not make the cables again when the mode changes back to separated. This behavior does not change.
Upstream
This problem is also in upstream
mod-audio/mod-uiat master (commit0467c103), in the same method. No upstream issue reports this problem. This change can go to upstream.