Phase 36: add studio mixer channel strips and refresh screenshots

This commit is contained in:
Johannes Findeisen 2026-10-28 11:23:25 +01:00
commit 2d5bcb6401
22 changed files with 667 additions and 142 deletions

View file

@ -1,10 +1,53 @@
# Mixer, automation and undo
# Studio mixer
Phase 8 provides one selectable channel strip per project track. Open Mixer
(Ctrl+2), select a track, and set Gain, Pan, Mute and Solo. Changes stop transport;
Play prepares independent audio/MIDI snapshots with the accepted settings.
No edit changes a plan that the callback is using. Editing is blocked while
recording. Graph edits retain their existing live publication behavior.
Open **View / Mixer** (Ctrl+2) to see a channel strip for every track and bus.
The horizontal scrollbar reveals additional channels; the master output monitor
stays pinned on the right. The bank supports the full 64-track/bus project limit.
Channel order follows the sequencer, and colors match the track headers.
Each strip offers:
- A name button that selects its track for automation below the bank.
- **Mute** and **Solo** switches using the existing inclusive track/bus solo rules.
- A flat **Pan** knob: left -1, center 0, right +1. Drag to turn it;
double-click to center. The text shows direction and percentage.
- An output dropdown for **Master** or a project bus. Bus outputs stay at Master;
nested bus routing remains unsupported. **Add bus** creates a new bus strip.
- A vertical level fader, displayed in dB. Zero dB is unity gain. The upper limit
is approximately +12.04 dB (linear gain 4); the -60 dB bottom position is silence.
- Independent stereo sample-peak meters, numeric dBFS readouts and sticky clip
indications. **Reset peaks** clears all strip and master clip latches.
Changing a fader or knob commits on release, so a completed gesture is one undo
step. The existing preparation guard stops playback before model edits and
rejects changes while recording. Failed edits restore the displayed model values.
Selections are UI state and create no undo step. Track IDs keep controls attached
to the correct channel after reordering, undo, deletion or project replacement.
The top Track selector provides another way to select automation targets; the
bank scrolls to reveal the selection. M/S toggle the selected track's mute/solo,
Left/Right adjust its linear gain, Shift+Left/Right adjust pan, and Up/Down select
adjacent tracks. The existing automation controls below the bank retain Gain/Pan,
First tick and Linear/Hold interpolation. Click to add a point and right-click
near a point to remove it.
Faders and knobs display **static** mix values. Automation replaces those values
during playback; the controls are not motorized automation displays. Automation
values retain their existing linear gain and pan units. Existing project files
store mix values and automation without a format change. Very small nonzero
gains display at the fader floor; pan/mute/solo edits preserve their actual value.
Moving the fader to its bottom explicitly sets silence.
Meters use the backend's consumed peak snapshot for every track and bus,
including offscreen channels. Track taps are after track controls and before the
bus, bus taps follow bus controls, and the master follows the modular graph and
transport envelope. Missing taps decay to silence. Displays use instant attack,
20 dB/s release and sticky clipping at a linear sample peak of 1 or more.
Numeric displays have a -90 dBFS floor, channel bars a -60 dBFS floor; master
bars cover -90 to +6 dBFS. These are sample-peak meters, not loudness or true-peak
meters. The master strip is an output monitor, not a new gain control.
## Engine mixing behavior
Gain is a linear multiplier from 0 to 4. Pan ranges from -1 (left) to +1 (right):
center has unity on both sides and moving away attenuates the opposite side
@ -62,11 +105,11 @@ The backend retains interval sample-peak maxima until one serialized control
reader consumes them with `xtc_backend_read_meters`. The GUI polls about every
100 ms. Atomic channels are independent (not a simultaneous waveform snapshot);
peaks are quantized to 0.000001 linear and capped at 1000. Legacy backend status
peaks remain last-block linear values. GUI bars display 20*log10(peak) dBFS, floor
-90, instantaneous attack and 20 dB/second release, with a +6 display ceiling.
peaks remain last-block linear values. GUI readouts display 20*log10(peak) dBFS, floor -90, with instantaneous
attack and 20 dB/second release. Channel bars cover -60 to +6 dBFS; master
bars cover -90 to +6 dBFS.
Each channel latches red CLIP at linear peak >=1 (0 dBFS) until Reset peaks.
Reset is session state, not an audio edit. Selection changes reset selected-strip
history. These are sample-peak meters, not RMS, LUFS or true-peak measurements.
Reset is session state, not an audio edit. Selection changes preserve every strip's meter history. These are sample-peak meters, not RMS, LUFS or true-peak measurements.
There is no limiter; summed levels can exceed unity.
## Mix buses and gain staging (Phase 24)
@ -134,6 +177,11 @@ events, use mixer keys and exercise undo/redo, failed installation rollback,
branching, save/reopen and history reset. Live JACK MIDI acceptance verifies
saved/reopened hard-right playback and stereo peaks using only software clients.
A native Xvfb mouse smoke check covers sliders and automation drawing.
Phase 36 adds checks for independent strip callbacks/meters, fader gestures, pan
centering, failed-edit restoration, routing, undo/reload, duplicate names and
stable IDs across reorder/removal. A 64-channel GUI session verifies scrolling
and minimum/large layouts. Screenshots include live JACK meters and a bus strip.
Physical stereo devices, listening quality, realtime endurance and high-density
project performance remain unverified; no new dependency was introduced.

View file

@ -79,3 +79,9 @@ Phase 35 adds Edit / Preferences with an Apply button and `~/.xtc.conf` INI
persistence, configurable plugin search paths and a file library, plus sequencer
ruler loop selection and sample-boundary playback wrapping. See PREFERENCES.md
for settings, reconnect behavior and looping limits.
Phase 36 replaces the single-track mixer panel with a scrolling studio mixer:
vertical dB faders, flat pan knobs, mute/solo, routing and stereo meters on every
track and bus, plus a pinned master monitor. Selected-track automation remains
below the strips. No project format or engine changes. Screenshots are refreshed;
see MIXER.md and screenshots/README.md.

View file

@ -1013,6 +1013,31 @@ See [PREFERENCES.md](PREFERENCES.md) for configuration, workflow and limitations
---
## Phase 36 — Studio Mixer Overview
### Goal
Show every track and bus as a studio-style channel strip with direct level,
pan, routing and metering controls in the flat workspace.
### Tasks and acceptance criteria
- [x] Replace the single-track control panel with a horizontally scrolling bank of all tracks and buses.
- [x] Provide vertical dB faders, flat pan knobs, mute/solo switches and output routing per strip.
- [x] Show simultaneous stereo track/bus meters and keep the master output monitor visible while scrolling.
- [x] Retain selected-track gain/pan automation, interpolation, keyboard control and Add bus.
- [x] Preserve stable track identity, undo/redo, persistence and failure rollback across strip edits.
- [x] Verify empty/full sessions, reorder/remove, minimum/large layouts and independent meters.
- [x] Refresh the view screenshots and document mixer controls and metering limits.
- [x] Build and run GUI/core, live JACK, sanitizer and release checks.
### Implementation status
Implemented in the C++ FLTK GUI using the existing C mixer and backend snapshot
APIs. No audio callback, project format or dependency changes. The fixed master
strip monitors graph output; it does not introduce a separate master gain stage.
Faders edit static gain and do not chase automation. See [MIXER.md](MIXER.md)
and the updated [screenshots](../screenshots/README.md).
---
## Recommended Execution Order
Reorder the phases when the audit reveals a blocking dependency. Do not mark a phase complete merely because code exists: its acceptance criteria must be demonstrated by builds, tests, or documented manual verification.

View file

@ -99,3 +99,12 @@ Verification includes off-grid move/trim, snap Off, dropdown labels, double-clic
coincident notes, per-note slider/lane edits, invalid velocities, undo/reload and
instrument reuse/clear/reorder for all three fixture formats. Manual checks use
the original modern-session example and the flat sequencer/piano windows.
## Phase 36 studio mixer
The Mixer tab now presents all tracks and buses as channel strips with vertical
dB faders, flat pan knobs, mute/solo, output routing and stereo meters. Scroll
horizontally for larger projects; the master output monitor stays visible.
Select a channel name to edit its gain/pan automation below the bank. Existing
undo, keyboard controls and project persistence remain available. See
[MIXER.md](MIXER.md) for fader units, metering, automation and limits.