Repository navigation
audio: a routing matrix of every port against the sound card - #2333
Draft
edumeneses wants to merge 3 commits into
Draft
edumeneses wants to merge 3 commits into
edumeneses wants to merge 3 commits into
Conversation
A mapped port's routing could only be edited one port at a time, in its
address dialog: a table of radio buttons where every channel had to go
somewhere, and where a virtual port showed an empty table.
- Audio::RoutingMatrix puts the channels of some ports in rows and the
sound card's channels in columns. A click connects or disconnects a
channel. Ctrl+click connects diagonally from that cell to the end of
the port, and Ctrl+Shift+click to the end of the list, as in Dante
Controller. From the keyboard, Space or Enter toggles the current cell,
Ctrl+Space and Ctrl+Shift+Space connect diagonally, and Delete
disconnects a channel. The context menu also disconnects a whole port,
or everything. A channel that goes nowhere, or past the card's last
channel, has its row dimmed and its tooltip says why. Connections use
the colour of audio ports.
- An "Audio routing" window shows every input port and every output port
against the card, in two matrices. It has buttons to add a port and to
disconnect everything. It opens from the button under the mixer's
Mapped section, from the context menu of the mixer's section tabs, and
from a mapped port's strip. Every gesture is one undo step
(Audio::ChangeRouting, made of UpdateAddressSettings).
- The port dialog uses the same matrix:
- A channel can now go nowhere: -1 in "audio-mapping". The engine gets
an index past every channel instead, which libossia already treats
as silence. A negative index would have read before its buffers.
- A new output port now maps channel by channel to the card, instead of
sending every channel to the card's first output.
- For a virtual port, the dialog explains what it is for instead of
showing an empty table.
- The dialog keeps the attributes it does not show, such as the port's
gain. Before, editing a port dropped the gain from what the document
saves, so the gain was lost at the next load or reconnection.
- addAudioPort moves from the mixer to the audio plugin, so the window
can use it too.
test_unit_audio_routing checks:
- the matrix gestures;
- that an unconnected channel reaches the engine as an index past every
channel;
- that a routing gesture spanning two ports is one undo step;
- that the dialog keeps a port's gain and its unconnected channels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lc7tYGHRn6TmaxMEfBTswW
A click, a Ctrl+click and a Ctrl+Shift+click sent to the viewport pick the toggle, the diagonal within the port and the diagonal across the ports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lc7tYGHRn6TmaxMEfBTswW
With the sound card set to fewer channels than a port is routed to, e.g. 64 outputs down to 2, the dialog disconnected those channels when it was confirmed, even to only rename the port. They now stay routed: the matrix shows them dimmed, as going nowhere, and they play again once the card has the channels back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lc7tYGHRn6TmaxMEfBTswW
This branch has not been deployed
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.
This is Edu's Claude assistant, opening this on Edu's behalf.
Stacked on #2302 (base
feature/mixer): it builds on the mixer's port strips and the in-place port edits. I'll retarget it tomasteronce #2302 is merged.What changes
A mapped port's routing could only be edited one port at a time, in its address dialog: a table of radio buttons where every channel had to go somewhere, and where a virtual port showed an empty table.
Audio routing window. Every input port and every output port against the sound card's channels, in two matrices, laid out like Dante Controller. It opens from three places:
The window has buttons to add an input or output port, and to disconnect everything. Every gesture is one undo step.
Gestures, in both the window and the port dialog:
A channel can go nowhere. It is stored as
-1inaudio-mapping. The engine gets an index past every channel instead, which libossia already treats as silence; a negative index would have read before its buffers. Rows of unconnected channels are dimmed. So are channels routed past the card's last channel, for example a dome session opened on a stereo laptop, and their tooltip says why.Port dialog:
Part of #1409: the toggled tiles that replace the radio buttons. Sending one channel to several card channels would need a libossia change, because
audio_mappingholds one card channel per port channel; that part is not done here. Related to #1073, for score's own ports only.Tests
test_unit_audio_routing(58 assertions) checks:test_unit_audio_port_editstill passes, and so do the mixer, audio, port and telemetry tests. The two that fail in this group fail on this branch's base too, in the same environment:explorer_editor_lookandscriptable_dynamic_ports.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lc7tYGHRn6TmaxMEfBTswW