Skip to content

Improve track selector with per-track mute and solo - #35

Merged
agourlay merged 5 commits into
agourlay:masterfrom
kot13:feature/track-dropdown-mute-solo
Nov 17, 2026
Merged

agourlay merged 5 commits into
agourlay:masterfrom
kot13:feature/track-dropdown-mute-solo

Conversation

@kot13

@kot13 kot13 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace the track pick_list with a custom dropdown: right-aligned wider menu, layout matching the stock control so the toolbar still fits.
  • Add Solo and Mute on each track row so you can change which tracks play without switching the tablature view.
  • Support multiple tracks in solo via a solo bitmask (same model as mute); toolbar S/M still apply to the selected track.

Test plan

  • Open a multi-track GP file; all transport/playback controls stay visible in the toolbar.
  • Open the track menu; verify right alignment, width, and S/M on every row.
  • Solo two tracks from the menu; both audible, others silent.
  • Mute a soloed track; it stays silent.
  • Switch tablature track; solo/mute state unchanged.
  • Toolbar S and M toggle solo/mute for the current track.

Павел Муркин and others added 3 commits November 10, 2026 18:35
Store solo state in a track bitmask like mute so several instruments can
be soloed while keeping another track selected for tablature and toolbar
actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
These build artifacts were not part of the track menu work.

Co-authored-by: Cursor <cursoragent@cursor.com>
@agourlay agourlay self-assigned this Nov 11, 2026
@agourlay

Copy link
Copy Markdown
Owner

Thanks again for the contribution!

I will look into it in the coming days.

agourlay and others added 2 commits November 17, 2026 15:28
- the track menu scrolls when it has more tracks than fit, instead of
  drawing unreachable rows past its bounds
- the toolbar solo button reflects the current track, like mute
- track names are clipped and never wrap
- Ctrl/Cmd + wheel on the picker cycles tracks, like the stock pick_list
- the picker reads solo/mute straight from the audio player
- drop the unused menu tree, is_solo_active and a stale comment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the custom TrackPicker widget, with its manual drawing and hit
testing, by stock iced widgets: the picker is a button styled like the
pick list, and the menu a scrollable column of track buttons with solo
and mute toggles, floated over the tablature right under the toolbar.

The app now owns whether the menu is open: it closes on track
selection, a click outside, Escape, loading a song or fullscreen.
The menu toggles are grey when off and highlighted when on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@agourlay

Copy link
Copy Markdown
Owner

Thanks for this, multi-track solo plus per-track mute/solo in the menu is a nice improvement. I pushed two commits on top of your branch:

f9fc67c: fixes on the custom widget

  • The menu was capped to the space below the toolbar but still drew every row, so on songs with many tracks (or a short window) the last tracks were drawn off the menu and couldn't be clicked. It now scrolls.
  • The toolbar S button lit up when any track was soloed, but clicking it toggled the current track. With track 2 soloed from the menu while viewing track 0, it showed as active and clicking it added track 0 instead of disabling solo. It now reflects the current track, like M does, and is_solo_active went away.
  • Long track names wrapped into the next row; they're now clipped on one line.
  • The view no longer builds two Vec<bool> indexed by position; the menu reads solo/mute straight from the audio player.
  • Small cleanups: unused menu tree, a stale comment, missing newline in .gitignore.

0e46541: rebuilt the menu from stock iced widgets
The custom TrackPicker was ~700 lines of manual drawing and hit testing, which is a lot to maintain for a list of rows with two buttons. It's replaced by src/ui/application/track_menu.rs (~150 lines):

  • The picker is a plain button styled with the stock pick_list style, so it still matches the tempo picker. It has a fixed width so the toolbar doesn't shift between track names.
  • The menu is a scrollable column of track buttons with S/M toggles, layered over the tablature and right-aligned under the picker. Hover, clipping, scrolling and tooltips now come from iced.
  • The app owns the open state: it closes on track selection, a click outside, Escape, loading a song or going fullscreen.
  • Menu toggles are grey when off and highlighted when on, so a long track list reads at a glance.

One behavior dropped compared to the stock pick list: Ctrl/Cmd + wheel on the picker no longer cycles tracks.

The solo/mute semantics are unchanged from your version: mute wins, then solo excludes the rest.

@agourlay
agourlay merged commit eba2ec8 into agourlay:master Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants