Skip to content

req: automagic stereo connections #400

Description

@quantifiable

what needs solved

Whenever you add a connection by dragging from connector A to B, you have to do it all over for the second connector (stereo).

how to eliminate an inconvenience

add an automagic stereo connection feature
while creating / dragging a connection, with the shift key as a modifier

  • as long as shift is held (momentary) or if it is hit (toggle)
  • automatically connect the other channel of the pair too when connection is made
  • maybe even display a second cable beside the dragged one at the cursor
    • fixed offset to the cursor
    • clearly distinguisable from the dragged connection (which is currently being edited)
      • color: dark yellow, striped? (before established it resembles a snake in color theme, then it's the usual grey)
      • maybe slightly shorter? a few px?

proposed "code"?

assuming 1+2 are a stereo pair (L and R)
code for which to connect could be something simple like

if (connector_drag_started % 2)
{
	connector_start_auto = connector_drag_started + 1;
}
else
{
	connector_start_auto = connector_drag_started - 1;
}

similar code for the end connector

  • better than just incrementing by one
    • imagine connecting the outputs 2 (R) and 3 (L aux) to inputs 1 (L) and 2 (R))
  • has a nice bug: if you start on channel 1 and end on channel 2, 1 and 2 get crossed over
    • sell it as a feature for easy channel swapping :)
  • this code also tells you which side of the cursor / connection start terminal to start the automatic cable on

thank you :)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions