Skip to content

armgit / nota

Public Imported from GitHub
0

Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.

(feat) Groups and compact strips in the Mixer (#439)

Egor Khindikaynen12b9bef1e6f0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5603abaf..b7868cc7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,19 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
**Delete N versions…** button — or the same item in the right-click menu — deletes them
in one go, after one confirmation. The current version is never deleted: it stays, and the
footer says so.
+- **Groups in the Mixer** (#386): the Mixer lists a group's strip followed by its tracks, as
+ the Arrangement does, under a bar with the group's name in its colour and a faint tint of it
+ behind the group's strips; a group inside a group shows as a second bar. The triangle on a
+ group's strip folds it: its tracks hide in the Mixer and in the Arrangement alike, the bar
+ says how many (**Drums +3**), and dots on the group strip show when a hidden track is soloed,
+ armed or clipped. Folding never changes the sound. Folded groups are now saved with the
+ project. The Mixer follows the selected track with an outline (a hidden track outlines its
+ folded group) and scrolls to it.
+- **Compact mixer strips** (#386): **Compact** in the Mixer's footer narrows every strip to
+ 72 px, so about twice as many tracks fit on screen. A compact strip keeps everything a
+ regular one has — I/O, A/B sends, pan, the typed dB value, MIDI learn — with a wide level
+ meter that is also the fader: drag anywhere on it, and a small triangle marks the volume on
+ the meter's own scale. Mute, Solo and Arm span the strip's width. The choice is remembered.
- **Reset a note's velocity to the default**: in the piano roll's velocity lane, double-click a
note's stem — or right-click it and choose **Reset velocity** — to put the note back to the
default velocity (0.8, the one a first note gets). When the note is selected, the whole
diff --git a/DESIGN.md b/DESIGN.md
index ffa010dc..bc6a7bc4 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -680,7 +680,12 @@ Every region is **docked**: radius 0, no gutter, separated by 1 px seams (the wi
only when an unrecognised plug-in lands there. "Category chips" in ⋮ hides the row. The
categories live in `DeviceCategories.cs`.
- **Mixer strips** are panel-tone columns on seams, each with a 3 px top bar in the track
- colour (muted grey for master).
+ colour (muted grey for master). They follow the Arrangement's hierarchy — a group strip,
+ then its members — under one 14 px bar per nesting level with the group's name on a wash
+ of its colour and a fainter wash behind its strips; a group folds from the triangle on its
+ strip, the hidden count in its bar (specs/070). Compact strips are 72 wide: one-line I/O,
+ send and pan bars, a wide meter that is the fader (a triangle at the volume's dB on the
+ meter's scale), M / S / Arm at full width.
- **Arrangement** (geometry unchanged): track rows 64 (the header carries every control),
group rows 26 (open to 64 while selected), header column 228, default zoom 28 px per
beat. Every y ↔ row conversion goes through `ArrangementView.RowTop` / `RowAtY`. A
@@ -862,6 +867,9 @@ Places where a screen's needs override a general rule, kept on purpose:
- **Hero readouts** larger than the device scale — Strata bar number, Shutter Open/Shut,
Auto Shift note, Level value.
- **Filter chips 20**, not 24 — the browser's chip row is dense.
+- **Compact mixer meters are 18 px a channel**, 3 apart, against the 11 / 5 meter rule
+ (specs/070, #386): the wide meter is what keeps a 72 px compact strip readable, and it is
+ also the strip's fader. Zones, the hold mark and the −60…+6 scale are unchanged.
## Known drift
diff --git a/FEATURES.md b/FEATURES.md
index 8a77f410..30b88bbc 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -156,7 +156,8 @@ docks as a panel under any of the three, or floats in its own window — see
- **Group rows are slim** — a group collapses to a titled bar with its disclosure,
mute/solo and level, and opens to the full control set when selected, so groups read as
families rather than as more tracks. A track without a colour of its own takes its
- group's hue, shaded per sibling.
+ group's hue, shaded per sibling. The disclosure folds the group here and in the Mixer
+ alike; folded groups are saved with the project.
- **Return and Master rows stay pinned** under the tracks, each with a level meter, a
volume fader and its dB value (the Master fader is the same master volume as the
transport's and the Mixer's). They start Compact and resize like tracks — drag the
@@ -231,8 +232,9 @@ docks as a panel under any of the three, or floats in its own window — see
arms that track alone, ⌘-click arms several; **Transport ▸ Auto-arm selected track** (off by
default) arms the instrument track you select.
Double-click resets to the default.
-- **Mixer** (**View → Mixer**, ⌘⇧M / Ctrl+Shift+M): a strip per track, then the returns, then
- the master (I/O, A/B sends, pan, fader with a stereo meter and dB read-out, M / S / Arm), the
+- **Mixer** (**View → Mixer**, ⌘⇧M / Ctrl+Shift+M): a strip per track in the Arrangement's
+ order — each group, then its tracks — then the returns, then the master (I/O, A/B sends,
+ pan, fader with a stereo meter and dB read-out, M / S / Arm), the
**Strips | Stereo map** switch and the pan law footer. It docks as a resizable panel under
Arrangement, Session or Modular, above the Devices / Clip panel (either, both or neither),
or pops out into its own window for a second screen — the panel's pop-out button, the
@@ -240,7 +242,17 @@ docks as a panel under any of the three, or floats in its own window — see
as its strips and closes with Escape. Whether it is shown, where and how tall come back on
the next launch. Strips fit the height they get: I/O rows hide first, then sends, then the
fader shortens; the footer's **Sends** / **I/O** toggles show a hidden section anyway (the
- strips then scroll). Faders, pan and M / S / Arm follow changes made anywhere else.
+ strips then scroll). Faders, pan and M / S / Arm follow changes made anywhere else. The
+ selected track's strip is outlined and scrolled into view.
+ - **Groups**: a bar with the group's name in its colour spans the group's strips, one bar
+ row per nesting level. The triangle on a group strip folds it — in the Mixer and the
+ Arrangement at once; the bar shows how many strips are hidden (**Drums +3**) and dots on
+ the group strip flag a hidden track that is soloed, armed or clipped. Folding never
+ changes the sound.
+ - **Compact strips** (footer **Compact**, remembered): 72 px strips, about twice as many on
+ screen, with the same controls — one-line I/O, A/B send bars, a pan bar, a wide stereo
+ meter that is also the fader (drag anywhere on it; a triangle marks the volume on the
+ meter's scale), the dB value, and full-width M / S / Arm.
- **Pan law** (per project, in the Mixer footer: **Pan law** Stereo / Balance): under
Stereo, panning a stereo track or return moves its whole image — at full pan both
channels play from one side; under Balance the opposite channel fades out. Mono
diff --git a/specs/070-mixer-groups-compact-strips/checklists/requirements.md b/specs/070-mixer-groups-compact-strips/checklists/requirements.md
new file mode 100644
index 00000000..8753865f
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/checklists/requirements.md
@@ -0,0 +1,37 @@
+# Specification Quality Checklist: Mixer Groups and Compact Strips
+
+**Purpose**: Validate specification completeness and quality before proceeding to planning
+**Created**: 2026-11-02
+**Feature**: [spec.md](../spec.md)
+
+## Content Quality
+
+- [x] No implementation details (languages, frameworks, APIs)
+- [x] Focused on user value and business needs
+- [x] Written for non-technical stakeholders
+- [x] All mandatory sections completed
+
+## Requirement Completeness
+
+- [x] No [NEEDS CLARIFICATION] markers remain
+- [x] Requirements are testable and unambiguous
+- [x] Success criteria are measurable
+- [x] Success criteria are technology-agnostic (no implementation details)
+- [x] All acceptance scenarios are defined
+- [x] Edge cases are identified
+- [x] Scope is clearly bounded
+- [x] Dependencies and assumptions identified
+
+## Feature Readiness
+
+- [x] All functional requirements have clear acceptance criteria
+- [x] User scenarios cover primary flows
+- [x] Feature meets measurable outcomes defined in Success Criteria
+- [x] No implementation details leak into specification
+
+## Notes
+
+- Both open questions resolved 2026-11-02 (see spec § Clarifications): fold state shared with
+ the Arrangement; compact strips are an option, regular stays the default.
+- The Nota Context section names the existing Mixer behaviour (strip width, sections) on
+ purpose: it is the baseline the compact layout is measured against.
diff --git a/specs/070-mixer-groups-compact-strips/contracts/ui-mixer.md b/specs/070-mixer-groups-compact-strips/contracts/ui-mixer.md
new file mode 100644
index 00000000..1cacc192
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/contracts/ui-mixer.md
@@ -0,0 +1,64 @@
+# UI Contract: Mixer Groups and Compact Strips
+
+What the user can see and do, control by control. Agreed against the mockup in
+[`../mockups/`](../mockups/) (2026-11-02; `shoot.sh` re-renders it).
+
+## Strip order
+
+Arrangement rows → Mixer strips, left to right: each group strip followed by its members
+(DFS, nested groups the same way), then return strips, then Master. Same in the docked
+panel, the pop-out window and the Stereo Map's strip column.
+
+## Group bands (both layouts)
+
+| Element | Look | Behaviour |
+|---|---|---|
+| Bar row | 14 px per nesting level above the strips, outermost on top; group colour at ≈ 32 % over the ground, name 9 px semibold, ellipsised; folded: name + mono `+N` | spans the group strip through its last visible member; tooltip = full name; no click action |
+| Tint | group colour ≈ 6–8 % behind the same strips | strips keep their own 3 px colour bar on top |
+| Ungrouped / return / master | no bar, no tint | — |
+
+## Fold control (group strips only)
+
+| Element | Look | Behaviour |
+|---|---|---|
+| Triangle in the header, left of the name | the Arrangement's disclosure glyph: ▾ unfolded, ▸ folded | click toggles fold for the group in the Mixer **and** the Arrangement; one click, no undo step (view state) |
+| `+N` in the group's bar (folded only) | mono, secondary ink, after the name | N = hidden strips, nested groups included; `+0` for an empty group |
+| Hidden-state dots (folded only) | 6 px dots at the right of the group header: solo (`Solo`), arm (`Record`), clip (`Danger`) — shown only when true | solo / arm: any hidden member; clip: any hidden member peaked ≥ 0 dBFS since the unfold; clicking the clip dot clears it |
+| Accessible name | "Fold group {name}" / "Unfold group {name}" | reachable with Tab, toggled with Space / Enter |
+
+Folding never changes mute, solo, arm, routing, automation or the audio.
+
+## Selection follow
+
+| Trigger | Result |
+|---|---|
+| Track selected in the Arrangement or in Modular (`TrackSelected` / `TrackActivated`) | its strip gets a 1 px accent outline and scrolls into view |
+| Selected track hidden by folding | the outermost folded ancestor's strip gets the outline; nothing unfolds |
+| Selection cleared | no outline |
+
+## Footer
+
+`Show [Sends] [I/O] [Compact] | Pan law …` — `Compact` is a two-state key painted like
+`Sends` / `I/O` (accent when on). Remembered per user (`MixerCompact`), default off. Shared
+by the docked panel and the pop-out window.
+
+## Compact strip (72 px)
+
+| Section | Control | Behaviour = regular strip's |
+|---|---|---|
+| Header | name 9 px, ellipsised, tooltip full name; group: triangle (+ hidden-state dots when folded) | — |
+| I/O | one line, tooltip with full routing; instrument: MIDI-in combo | same routing actions |
+| Sends | A and B as thin full-width `MiniFader` bars with their letter; returns and master keep an empty slot so every meter starts at the same height | drag, typed value (`Send A`), automation, sync |
+| Pan | the existing `PanBar` (as in Arrangement track headers): full-width, fills from the centre; BAL tag beside on groups; master keeps an empty slot | drag (relative), fine modifier, double-click → centre, typed value, MIDI learn `TrackPan`, automation write, one undo step per gesture |
+| Level | `MeterFader`: 14 px dB scale · two 18 px channels 3 px apart · 11 px gutter with a 9 × 10 px left-pointing triangle at the volume's dB on the meter scale, and a hairline across the channels at the same height; `VizInk` at rest, accent while hovered or dragged | drag anywhere on it (relative, fine modifier), typed value, double-click → 0 dB, MIDI learn `TrackVolume`, automation write, one undo step per gesture; click without drag clears the peak hold |
+| dB | the same drag / type number | same |
+| Buttons | M, S, Arm stacked, full width, 18 px; Arm hidden on returns | same toggles, colours, MIDI learn `TrackMute` / `TrackSolo`, ⌘/Ctrl-click additive arm |
+
+Height fitting order is the regular one: I/O hides first, then sends, then the meter
+shortens to its minimum; header, pan, meter, dB and buttons always stay.
+
+## Strings (new, localised in `en.json` / `fr.json`)
+
+`Compact`, `Fold group {0}`, `Unfold group {0}`, `{0} hidden strips`, `A hidden track is soloed`,
+`A hidden track is armed`, `A hidden track clipped · click to clear`,
+`Show compact strips: more tracks on screen`.
diff --git a/specs/070-mixer-groups-compact-strips/data-model.md b/specs/070-mixer-groups-compact-strips/data-model.md
new file mode 100644
index 00000000..a6970551
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/data-model.md
@@ -0,0 +1,69 @@
+# Data Model: Mixer Groups and Compact Strips
+
+All state is view state. Nothing reaches the engine, the C ABI or undo history.
+
+## GroupFold (in memory, shared)
+
+One instance per main window, shared by the Arrangement and the Mixer (R2).
+
+| Field | Type | Notes |
+|---|---|---|
+| folded | set of group track ids | a group id in the set hides its whole subtree in both views |
+
+- `Toggle(id)`, `Set(ids)`, `Clear()` raise `Changed` once.
+- Ids that no longer name a group (deleted, ungrouped) are ignored on read and dropped on
+ save; no clean-up pass is needed.
+- Lifecycle: cleared on New project and before Open; filled from the sidecar after Open.
+
+## track-view.json (per project, sidecar in the `.nota` bundle)
+
+Existing file (`ArrangementView.Sizing.cs`, `version: 1`). One additive field:
+
+```json
+{
+ "version": 1,
+ "headerWidth": 220,
+ "trackHeights": [ { "index": 3, "height": 96 } ],
+ "masterHeight": 40,
+ "collapsedGroups": [ 0, 7 ]
+}
+```
+
+| Field | Type | Rule |
+|---|---|---|
+| `collapsedGroups` | int[] | engine track **indices** of folded groups (ids last a session only); omitted when empty; an index that is out of range or not a group is skipped on load |
+
+Older builds ignore the field; a file with only `collapsedGroups` is still written (the
+"nothing to save → delete the file" check includes it).
+
+## Settings (per user, `settings.json`)
+
+| Field | Type | Default | Notes |
+|---|---|---|---|
+| `MixerCompact` | bool | `false` | strip layout of the Mixer, docked and floating (FR-013) |
+
+## Mixer strip row (derived on Refresh, not stored)
+
+| Item | Derived from |
+|---|---|
+| order | `ArrangementView.HierarchyOrder(engine)` — DFS, group then members; returns, then master last |
+| depth / parent group | same walk |
+| visible | no ancestor group in `GroupFold` |
+| band per group | first strip = group strip, last = last visible descendant; colour = group's effective colour; name = group name; row = depth |
+| folded-group indicators | hidden descendants: count, any soloed, any armed, any peak ≥ 0 dBFS since unfold |
+| selected outline | the selected track's strip, or its outermost folded ancestor's strip |
+
+## StripMetrics (per layout, constant)
+
+Heights and widths the height fitting uses (R6). Regular keeps today's numbers.
+
+| Metric | Regular | Compact (starting point, set by the mockup) |
+|---|---|---|
+| width | 154 | 72 |
+| header | 24 | 24 |
+| I/O | 34 | 18 |
+| sends | 42 (A and B rows) | 24 (A and B bars, as the regular strip shows them) |
+| pan | 38 | 20 |
+| fader / meter min · comfort · max | 72 · 120 · 190 | 72 · 120 · 220 |
+| buttons | 28 | 3 × 18 + 6 |
+| band bar row | 14 per nesting level, both layouts |
diff --git a/specs/070-mixer-groups-compact-strips/mockups/.gitignore b/specs/070-mixer-groups-compact-strips/mockups/.gitignore
new file mode 100644
index 00000000..ed6747a3
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/mockups/.gitignore
@@ -0,0 +1,2 @@
+*.png
+mixer.html
diff --git a/specs/070-mixer-groups-compact-strips/mockups/build.py b/specs/070-mixer-groups-compact-strips/mockups/build.py
new file mode 100644
index 00000000..98f32460
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/mockups/build.py
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: AGPL-3.0-only
+# Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
+#
+# Builds mixer.html — the specs/070 mockup (group bands, folding, compact strips) — with
+# every colour taken from the theme files, so the mockup cannot drift from the app's tokens.
+# Usage: python3 build.py → mixer.html next to this file; open with ?variant=light etc.
+
+import json
+import pathlib
+
+HERE = pathlib.Path(__file__).resolve().parent
+ROOT = HERE.parents[2]
+THEMES = ROOT / "src/managed/Nota.App/Theme/Themes"
+VARIANTS = {"dark": "studio-dark", "light": "studio-light",
+ "ember-graphite": "ember-graphite", "ember-paper": "ember-paper"}
+
+
+def css_vars(theme_id):
+ colors = json.loads((THEMES / f"{theme_id}.json").read_text())["colors"]
+ out = []
+ for k, v in colors.items():
+ if len(v) == 9: # #AARRGGBB → rgba
+ a, r, g, b = (int(v[i:i + 2], 16) for i in (1, 3, 5, 7))
+ v = f"rgba({r},{g},{b},{a / 255:.3f})"
+ out.append(f"--{k}:{v};")
+ return "".join(out)
+
+
+themes_css = "\n".join(
+ f'html[data-variant="{name}"]{{{css_vars(tid)}}}' for name, tid in VARIANTS.items())
+html = (HERE / "mixer.template.html").read_text()
+html = html.replace("/*THEMES*/", themes_css).replace("{{FONTS}}", (ROOT / "assets/fonts").as_uri())
+(HERE / "mixer.html").write_text(html)
+print(HERE / "mixer.html")
diff --git a/specs/070-mixer-groups-compact-strips/mockups/mixer.template.html b/specs/070-mixer-groups-compact-strips/mockups/mixer.template.html
new file mode 100644
index 00000000..e45233a9
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/mockups/mixer.template.html
@@ -0,0 +1,237 @@
+<!-- SPDX-License-Identifier: AGPL-3.0-only -->
+<!-- Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms. -->
+<!-- specs/070 mockup: group bands, folding, compact strips. Built by build.py (colours come
+ from the theme files); ?variant=dark|light|ember-graphite|ember-paper, ?scene=<id>. -->
+<!doctype html>
+<html data-variant="dark">
+<head>
+<meta charset="utf-8">
+<title>Mixer · groups and compact strips (specs/070)</title>
+<style>
+@font-face { font-family: Geist; src: url("{{FONTS}}/Geist-Regular.ttf"); font-weight: 400; }
+@font-face { font-family: Geist; src: url("{{FONTS}}/Geist-Medium.ttf"); font-weight: 500; }
+@font-face { font-family: Geist; src: url("{{FONTS}}/Geist-SemiBold.ttf"); font-weight: 600; }
+@font-face { font-family: GeistMono; src: url("{{FONTS}}/GeistMono-Regular.ttf"); font-weight: 400; }
+@font-face { font-family: GeistMono; src: url("{{FONTS}}/GeistMono-SemiBold.ttf"); font-weight: 600; }
+/*THEMES*/
+* { box-sizing: border-box; }
+body { margin: 0; background: var(--BgApp); color: var(--TextPrimary); font-family: Geist; }
+.scene { margin: 24px; }
+.cap { font-size: 12px; font-weight: 600; color: var(--TextSecondary); margin: 0 0 8px 2px; }
+.cap span { font-weight: 400; color: var(--TextTertiary); }
+.panel { background: var(--BgApp); border: 1px solid var(--Seam); display: flex; flex-direction: column; overflow: hidden; }
+.toolbar { height: 32px; background: var(--Panel); border-bottom: 1px solid var(--Seam); display: flex; align-items: center; padding: 0 10px; gap: 10px; font-size: 12px; }
+.seg { display: flex; border: 1px solid var(--Seam); border-radius: 3px; overflow: hidden; }
+.seg div { height: 22px; padding: 0 9px; display: flex; align-items: center; font-size: 11px; background: var(--SurfaceRaised); color: var(--TextSecondary); }
+.seg div + div { border-left: 1px solid var(--Seam); }
+.seg .on { background: var(--Accent); color: var(--TextOnAccent); }
+.body { position: relative; flex: none; overflow: hidden; }
+.bands { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; }
+.row { position: absolute; left: 10px; display: flex; gap: 2px; }
+.strip { background: var(--SurfaceCard); border: 1px solid var(--BorderDefault); border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
+.strip.sel::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--Accent); border-radius: 3px; pointer-events: none; }
+.hdr { height: 24px; border-bottom: 1px solid var(--BorderDefault); position: relative; display: flex; align-items: center; padding: 3px 7px 0; gap: 4px; font-size: 10px; font-weight: 600; white-space: nowrap; }
+.hdr .bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; }
+.hdr .nm { overflow: hidden; text-overflow: ellipsis; flex: 1; }
+.tri { width: 10px; height: 10px; flex: none; }
+.tri path { fill: var(--TextSecondary); }
+.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
+.sec { border-bottom: 1px solid var(--Rule); display: flex; flex-direction: column; justify-content: center; padding: 4px 7px; font-size: 8px; color: var(--TextTertiary); }
+.mono { font-family: GeistMono; }
+.mf { position: relative; height: 7px; }
+.mf .t { position: absolute; left: 0; right: 0; top: 2px; height: 3px; background: var(--BgSunken); border-radius: 2px; }
+.mf .f { position: absolute; left: 0; top: 2px; height: 3px; background: color-mix(in srgb, var(--VizInk) 45%, transparent); border-radius: 2px; }
+.mf .h { position: absolute; top: 0; width: 6px; height: 7px; background: var(--VizInk); border-radius: 2px; }
+.sendrow { display: grid; grid-template-columns: 9px 1fr; align-items: center; }
+.panbar { position: relative; height: 13px; background: var(--BgSunken); border: 1px solid var(--Rule); border-radius: 3px; overflow: hidden; font-family: GeistMono; font-size: 8.5px; color: var(--TextSecondary); display: flex; align-items: center; justify-content: center; }
+.panbar .f { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--VizInk) 25%, transparent); }
+.panbar .c { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--BorderStrong); }
+.panbar span { position: relative; }
+.tag { font-family: GeistMono; font-size: 7px; color: var(--TextTertiary); border: 1px solid var(--BorderDefault); border-radius: 2px; padding: 0 3px; height: 11px; display: inline-flex; align-items: center; }
+.db { font-family: GeistMono; font-size: 8px; color: var(--TextSecondary); text-align: center; height: 16px; line-height: 16px; }
+.btns { border-top: 1px solid var(--Rule); display: flex; align-items: center; justify-content: center; gap: 4px; height: 28px; }
+.key { height: 17px; width: 20px; border-radius: 3px; border: 1px solid var(--Seam); background: var(--SurfaceRaised); color: var(--TextSecondary); font-size: 9px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
+.key.m { background: var(--Mute); border-color: var(--Mute); color: var(--TextOnAccent); }
+.key.s { background: var(--Solo); border-color: var(--Solo); color: var(--TextOnAccent); }
+.key.r { background: var(--Record); border-color: var(--Record); }
+.disc { width: 7px; height: 7px; border-radius: 50%; background: var(--Record); }
+.key.r .disc { background: var(--RecordInk); }
+.cbtns { border-top: 1px solid var(--Rule); display: flex; flex-direction: column; gap: 2px; padding: 4px; }
+.cbtns .key { width: auto; height: 18px; }
+.footer { height: 44px; background: var(--SurfaceCard); border-top: 1px solid var(--Seam); display: flex; align-items: center; padding: 0 12px; gap: 14px; font-size: 10px; }
+.toggle { height: 22px; padding: 0 8px; border-radius: 3px; border: 1px solid var(--Seam); background: var(--SurfaceRaised); color: var(--TextSecondary); font-weight: 600; display: flex; align-items: center; }
+.toggle.on { background: var(--Accent); border-color: var(--Accent); color: var(--TextOnAccent); }
+.notes { margin: 6px 2px 0; font-size: 11px; color: var(--TextTertiary); max-width: 1100px; line-height: 1.5; }
+.callout { position: absolute; font-size: 10px; color: var(--TextSecondary); white-space: nowrap; }
+.callout::before { content: ""; position: absolute; left: -26px; top: 6px; width: 22px; height: 1px; background: var(--TextTertiary); }
+</style>
+</head>
+<body>
+<div id="out"></div>
+<script>
+const P = new URLSearchParams(location.search);
+document.documentElement.dataset.variant = P.get("variant") || "dark";
+const V = n => getComputedStyle(document.documentElement).getPropertyValue("--" + n).trim();
+
+// ---- the test project --------------------------------------------------------------
+// hue: Track1..8; members without their own colour take the group's hue in shades (design 1a).
+function project(big) {
+ const t = [];
+ const add = (name, kind, parent, hue, o = {}) => { const tr = { id: t.length + 1, name, kind, parent, hue, vol: o.vol ?? -6, pan: o.pan ?? 0, pk: o.pk ?? [-14, -15], m: !!o.m, s: !!o.s, a: !!o.a }; t.push(tr); return tr.id; };
+ const bus = add("Bus", "group", 0, 4, { vol: 0, pk: [-4, -5] });
+ const drums = add("Drums", "group", bus, 1, { vol: -2, pk: [-6, -7] });
+ add("Kick", "audio", drums, 1, { vol: -4, pk: [-5, -5], a: true });
+ add("Snare", "audio", drums, 1, { vol: -7, pk: [-9, -8], s: !big });
+ add("Hats", "audio", drums, 1, { vol: -12, pan: 0.3, pk: [-20, -16] });
+ if (big) add("Perc", "audio", drums, 1, { vol: -14, pan: -0.4, pk: [-24, -26] });
+ add("Bass", "inst", bus, 4, { vol: -5, pk: [-8, -8] });
+ if (big) {
+ const syn = add("Synths", "group", 0, 6, { vol: -3, pk: [-10, -9] });
+ add("Pad", "inst", syn, 6, { vol: -14, pan: -0.2, pk: [-22, -20] });
+ add("Lead", "inst", syn, 6, { vol: -8, pk: [-12, -12], m: true });
+ add("Arp", "inst", syn, 6, { vol: -11, pan: 0.5, pk: [-18, -21] });
+ add("Pluck", "inst", syn, 6, { vol: -13, pan: -0.5, pk: [-19, -17] });
+ const vx = add("Vocals", "group", 0, 7, { vol: -1, pk: [-5, -6] });
+ add("Lead vox", "audio", vx, 7, { vol: -3, pk: [-6, -7], a: true });
+ add("Double L", "audio", vx, 7, { vol: -10, pan: -0.7, pk: [-14, -18] });
+ add("Double R", "audio", vx, 7, { vol: -10, pan: 0.7, pk: [-18, -14] });
+ add("Harmony", "audio", vx, 7, { vol: -12, pk: [-17, -17] });
+ add("Keys", "inst", 0, 3, { vol: -9, pk: [-13, -12] });
+ add("Guitar", "audio", 0, 5, { vol: -8, pan: -0.25, pk: [-11, -13] });
+ add("Strings", "inst", 0, 8, { vol: -15, pk: [-25, -24] });
+ add("FX riser", "audio", 0, 2, { vol: -18, pk: [-40, -38] });
+ } else add("Vox", "audio", 0, 7, { vol: -3, pk: [0.6, -2] });
+ add("A Reverb", "return", 0, 0, { vol: -8, pk: [-22, -23] });
+ add("B Delay", "return", 0, 0, { vol: -10, pk: [-28, -27] });
+ return t;
+}
+const depthOf = (t, tr) => { let d = 0, p = tr.parent; while (p) { d++; p = t.find(x => x.id === p).parent; } return d; };
+const ancestors = (t, tr) => { const a = []; let p = tr.parent; while (p) { a.push(p); p = t.find(x => x.id === p).parent; } return a; };
+function colourOf(t, tr) {
+ if (tr.kind === "return") return tr.name.startsWith("A") ? V("ReturnA") : V("ReturnB");
+ const base = V("Track" + tr.hue);
+ if (!tr.parent) return base;
+ const sib = t.filter(x => x.parent === tr.parent).indexOf(tr) % 3; // three shades per family
+ return sib === 0 ? base : `color-mix(in srgb, ${base} 78%, ${sib === 1 ? "white" : "black"})`;
+}
+
+// ---- strip parts ---------------------------------------------------------------------
+const norm = db => Math.max(0, Math.min(1, (db + 60) / 66));
+const fmtDb = d => (d > 0 ? "+" : d < 0 ? "−" : "") + Math.abs(d).toFixed(1);
+const tri = open => `<svg class="tri" viewBox="0 0 16 16"><path d="${open ? "M3 5h10l-5 6z" : "M5 3v10l6-5z"}"/></svg>`;
+function channel(w, h, db) {
+ const n = norm(db), c = norm(-6), a = norm(0);
+ const seg = (f, to, col) => to > f ? `<div style="position:absolute;left:0;right:0;bottom:${f * h}px;height:${(to - f) * h}px;background:var(--${col})"></div>` : "";
+ return `<div style="position:relative;width:${w}px;height:${h}px;background:var(--BgSunken);border-radius:2px;overflow:hidden">${seg(0, Math.min(n, c), "Success")}${seg(c, Math.min(n, a), "Warning")}${seg(a, n, "Danger")}<div style="position:absolute;left:0;right:0;bottom:${n * h}px;height:2px;background:var(--${n >= a ? "Danger" : n >= c ? "Warning" : "Success"})"></div></div>`;
+}
+const scale = (h, w) => `<div class="mono" style="position:relative;width:${w}px;height:${h}px;font-size:7px;color:var(--TextDisabled)">${[6, 0, -12, -48].map(d => `<div style="position:absolute;right:1px;top:${(1 - norm(d)) * h - 4}px">${d > 0 ? "+6" : d === 0 ? "0" : "−" + -d}</div>`).join("")}</div>`;
+const miniFader = v => `<div class="mf"><div class="t"></div><div class="f" style="width:${v * 100}%"></div><div class="h" style="left:calc(${v * 100}% - 3px)"></div></div>`;
+function panBar(p, w) {
+ const amt = Math.round(Math.abs(p) * 50), lbl = amt ? amt + (p < 0 ? "L" : "R") : "C";
+ const l = p < 0 ? 50 + p * 50 : 50, wd = Math.abs(p) * 50;
+ return `<div class="panbar" style="width:${w}px"><div class="f" style="left:${l}%;width:${wd}%"></div><div class="c"></div><span>${lbl}</span></div>`;
+}
+function keys(tr, compact) {
+ const k = (cls, txt) => `<div class="key ${cls}">${txt}</div>`;
+ const out = [k(tr.m ? "m" : "", "M"), k(tr.s ? "s" : "", "S")];
+ if (tr.kind !== "return") out.push(k(tr.a ? "r" : "", '<div class="disc"></div>'));
+ return compact ? `<div class="cbtns">${out.join("")}</div>` : `<div class="btns">${out.join("")}</div>`;
+}
+function header(t, tr, compact, folded, hidden) {
+ const col = tr.kind === "master" ? V("Master") : colourOf(t, tr);
+ let lead = tr.kind === "group" ? tri(!folded.has(tr.id)) : "";
+ let trail = "";
+ if (tr.kind === "group" && folded.has(tr.id)) {
+ if (hidden.some(h => h.s)) trail += `<div class="dot" style="background:var(--Solo)" title="A hidden track is soloed"></div>`;
+ if (hidden.some(h => h.a)) trail += `<div class="dot" style="background:var(--Record)" title="A hidden track is armed"></div>`;
+ if (hidden.some(h => h.pk[0] > 0 || h.pk[1] > 0)) trail += `<div class="dot" style="background:var(--Danger)"></div>`;
+ }
+ return `<div class="hdr" style="font-size:${compact ? 9 : 10}px;padding-left:${compact ? 4 : 7}px;padding-right:${compact ? 4 : 7}px"><div class="bar" style="background:${col}"></div>${lead}<div class="nm">${tr.name}</div>${trail}</div>`;
+}
+function io(tr, compact) {
+ const [a, b] = tr.kind === "return" ? ["Return in", "→ Master"] : tr.kind === "group" ? ["Group in", "→ Master"] : tr.kind === "inst" ? ["MIDI in", "Monitor auto"] : tr.kind === "master" ? ["Sum bus", "→ Output"] : ["In 1", "Monitor in"];
+ return compact ? `<div class="sec" style="height:18px;padding:0 4px;white-space:nowrap;overflow:hidden">${a} ${b.startsWith("→") ? b : "· " + b.split(" ")[1]}</div>`
+ : `<div class="sec" style="height:34px">${a}<br>${b}</div>`;
+}
+function sends(tr, compact) {
+ // Compact keeps every strip's sections aligned: returns and master get an empty slot.
+ if (tr.kind === "return" || tr.kind === "master") return compact ? `<div class="sec" style="height:24px"></div>` : "";
+ const v = [0.3 + (tr.id % 3) * 0.12, tr.id % 2 ? 0.2 : 0];
+ const rows = v.map((x, i) => `<div class="sendrow" style="grid-template-columns:${compact ? 8 : 9}px 1fr"><span style="font-size:${compact ? 7 : 8}px">${"AB"[i]}</span>${miniFader(x)}</div>`).join("");
+ return `<div class="sec" style="height:${compact ? 24 : 42}px;gap:${compact ? 3 : 5}px;padding:${compact ? "3px 4px" : "5px 7px"}">${rows}</div>`;
+}
+function pan(tr, compact, w) {
+ if (tr.kind === "master") return compact ? `<div class="sec" style="height:22px"></div>` : "";
+ const bal = tr.kind === "group" ? `<span class="tag">BAL</span>` : "";
+ if (compact) return `<div class="sec" style="height:22px;flex-direction:row;align-items:center;gap:3px;padding:0 4px">${panBar(tr.pan, tr.kind === "group" ? w - 8 - 25 : w - 8)}${bal}</div>`;
+ const ang = tr.pan * 140 * Math.PI / 180, x = 13 + Math.sin(ang) * 9, y = 13 - Math.cos(ang) * 9;
+ return `<div class="sec" style="height:38px;flex-direction:row;align-items:center;justify-content:center;gap:8px"><svg width="26" height="26"><circle cx="13" cy="13" r="11" fill="var(--SurfaceRaised)" stroke="var(--Rule)"/><line x1="13" y1="13" x2="${x}" y2="${y}" stroke="var(--VizInk)" stroke-width="1.6" stroke-linecap="round"/></svg><div style="display:flex;flex-direction:column;gap:2px"><span class="mono">Pan</span>${bal}</div></div>`;
+}
+function level(tr, compact, h, live) {
+ const col = tr.kind === "master" ? V("Master") : "var(--VizInk)";
+ if (!compact) {
+ const capY = (h - 14) * (1 - Math.pow(10, tr.vol / 20) / 1.5);
+ return `<div style="height:${h + 16}px;padding:8px 7px;display:flex;gap:0">${scale(h, 16)}<div style="position:relative;flex:1;height:${h}px"><div style="position:absolute;left:calc(50% - 2px);width:4px;top:0;bottom:0;background:var(--BgSunken);border-radius:2px"></div><div style="position:absolute;left:calc(50% - 13px);top:${capY}px;width:26px;height:14px;background:var(--SurfaceHover);border:1px solid var(--TextDisabled);border-radius:4px"><div style="margin:4px auto 0;width:18px;height:2px;background:${tr.kind === "master" ? col : colourOf(TR, tr)}"></div></div></div><div style="margin-left:4px;display:flex;gap:5px">${channel(11, h, tr.pk[0])}${channel(11, h, tr.pk[1])}</div></div>`;
+ }
+ // Compact: scale · two wide channels · a 11 px gutter with the triangular handle, which sits
+ // at the volume's dB on the meter's own scale; a hairline across the channels marks it.
+ const y = (1 - norm(tr.vol)) * h, ink = live ? "var(--Accent)" : "var(--VizInk)";
+ return `<div style="height:${h + 8}px;padding:4px 4px;display:flex">${scale(h, 14)}<div style="position:relative;display:flex;gap:3px;margin-left:1px">${channel(18, h, tr.pk[0])}${channel(18, h, tr.pk[1])}<div style="position:absolute;left:0;right:0;top:${y}px;height:1px;background:color-mix(in srgb, ${ink} 55%, transparent)"></div></div><div style="position:relative;width:11px;height:${h}px"><div style="position:absolute;left:2px;top:${y - 5}px;width:9px;height:10px;background:${ink};clip-path:polygon(0 50%,100% 0,100% 100%)"></div></div></div>`;
+}
+
+// ---- a mixer panel ---------------------------------------------------------------------
+let TR = [];
+function mixer({ big = false, compact = false, folded = [], selected = 0, width, height = 0, liveId = 0, title, notes }) {
+ const t = project(big); TR = t;
+ const fold = new Set(folded.map(n => t.find(x => x.name === n).id));
+ const sel = selected ? t.find(x => x.name === selected).id : 0;
+ // Hierarchical order: group, then its members (DFS); returns; master.
+ const order = [];
+ const walk = p => t.filter(x => x.parent === p && x.kind !== "return").forEach(x => { order.push(x); walk(x.id); });
+ walk(0); t.filter(x => x.kind === "return").forEach(x => order.push(x));
+ order.push({ id: 999, name: "Master", kind: "master", parent: 0, vol: 0, pan: 0, pk: [-3, -4] });
+ const visible = order.filter(x => !ancestors(t, x).some(a => fold.has(a)));
+ const maxDepth = Math.max(0, ...t.filter(x => x.kind === "group").map(g => depthOf(t, g) + 1));
+ const W = compact ? 72 : 154, gap = 2, BAR = 14;
+ const lh = compact ? 220 : 190;
+ const strips = visible.map(tr => {
+ const hidden = t.filter(x => ancestors(t, x).includes(tr.id));
+ // A hidden selected track outlines its outermost folded ancestor.
+ const selHere = tr.id === sel || (sel && !visible.some(v => v.id === sel) && ancestors(t, t.find(x => x.id === sel)).filter(a => fold.has(a)).pop() === tr.id);
+ return `<div class="strip${selHere ? " sel" : ""}" style="width:${W}px">${header(t, tr, compact, fold, hidden)}${io(tr, compact)}${sends(tr, compact)}${pan(tr, compact, W)}${level(tr, compact, lh, tr.id === liveId)}<div class="db">${fmtDb(tr.vol)}</div>${tr.kind === "master" ? `<div style="height:${compact ? 66 : 28}px;border-top:1px solid var(--Rule)"></div>` : keys(tr, compact)}</div>`;
+ });
+ // Bands: one bar row per nesting level, the group strip through its last visible member,
+ // plus a faint tint behind those strips.
+ let bands = "";
+ t.filter(x => x.kind === "group").forEach(g => {
+ const idx = visible.map((v, i) => v.id === g.id || ancestors(t, v).includes(g.id) ? i : -1).filter(i => i >= 0);
+ if (!idx.length) return;
+ const d = depthOf(t, g), x0 = 10 + idx[0] * (W + gap), x1 = 10 + idx[idx.length - 1] * (W + gap) + W;
+ const col = colourOf(t, g), n = t.filter(x => ancestors(t, x).includes(g.id)).length;
+ const label = fold.has(g.id) ? `${g.name} <span class="mono" style="font-weight:400;opacity:1;color:var(--TextSecondary)">+${n}</span>` : g.name;
+ bands += `<div style="position:absolute;left:${x0}px;width:${x1 - x0}px;top:${10 + d * BAR}px;bottom:0;background:color-mix(in srgb, ${col} 7%, transparent);border-radius:3px 3px 0 0"></div>`;
+ bands += `<div style="position:absolute;left:${x0}px;width:${x1 - x0}px;top:${10 + d * BAR}px;height:${BAR - 2}px;background:color-mix(in srgb, ${col} 32%, transparent);border-radius:2px;font-size:9px;font-weight:600;line-height:${BAR - 2}px;padding:0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--TextPrimary)">${label}</div>`;
+ });
+ const top = 10 + maxDepth * BAR + 2;
+ const stripH = 24 + (compact ? 18 + 24 + 22 + lh + 8 + 16 + 66 : 34 + 42 + 38 + lh + 16 + 16 + 28) + 2;
+ const bodyH = height || top + stripH + 10;
+ const w = width || 20 + visible.length * (W + gap);
+ const tb = `<div class="toolbar"><b style="font-weight:600">Mixer</b><div class="seg"><div class="on">Strips</div><div>Stereo map</div></div></div>`;
+ const ft = `<div class="footer"><span style="font-size:9px;color:var(--TextTertiary)">Show</span><div class="toggle on">Sends</div><div class="toggle on">I/O</div><div class="toggle${compact ? " on" : ""}">Compact</div><div style="width:1px;height:20px;background:var(--BorderDefault)"></div><span style="font-weight:600;color:var(--TextTertiary)">Pan law</span><div class="seg"><div class="on" style="font-size:9px">Stereo</div><div style="font-size:9px">Balance</div></div><span style="font-size:11px;color:var(--TextTertiary)">Pan moves the whole image of stereo tracks and returns</span></div>`;
+ return `<div class="scene"><div class="cap">${title}</div><div class="panel" style="width:${w}px">${tb}<div class="body" style="height:${bodyH}px"><div class="bands">${bands}</div><div class="row" style="top:${top}px">${strips.join("")}</div></div>${ft}</div>${notes ? `<div class="notes">${notes}</div>` : ""}</div>`;
+}
+
+const scenes = {
+ regular: () => mixer({ selected: "Kick", title: "Regular strips · groups unfolded <span>· Bus holds Drums and Bass; Kick selected</span>",
+ notes: "Order follows the Arrangement: each group strip first, then its members. One 14 px bar row per nesting level carries the group name in the group colour; a faint tint of the same colour sits behind the group's strips. The triangle in a group's header folds it." }),
+ folded: () => mixer({ folded: ["Drums"], selected: "Hats", title: "Regular strips · Drums folded <span>· Hats selected while hidden → the Drums strip takes the outline</span>",
+ notes: "Folded: the bar shows +3 hidden strips; dots in the header say a hidden member is soloed (blue) or armed (red). Folding is view-only — the audio does not change. Selection never unfolds." }),
+ compact: () => mixer({ big: true, compact: true, selected: "Lead vox", width: 1440, liveId: 14, title: "Compact strips · 1440 px window, 24 tracks <span>· Compact on in the footer; the Lead vox handle is being dragged (accent)</span>",
+ notes: "72 px strips: name, one-line I/O, A/B send bars, a pan bar, a wide stereo meter (2 × 18 px) with the volume as a triangle on its right edge — at the volume's dB on the meter's scale, with a hairline across the channels — dB, then M, S and Arm at full width. 19 strips fit where the regular layout shows 9." }),
+ "compact-folded": () => mixer({ big: true, compact: true, folded: ["Drums", "Synths"], selected: "Snare", width: 1440, title: "Compact strips · Drums and Synths folded <span>· every track of the song on one screen</span>" }),
+};
+const only = P.get("scene");
+document.getElementById("out").innerHTML = Object.entries(scenes).filter(([k]) => !only || k === only).map(([, f]) => f()).join("");
+</script>
+</body>
+</html>
diff --git a/specs/070-mixer-groups-compact-strips/mockups/shoot.sh b/specs/070-mixer-groups-compact-strips/mockups/shoot.sh
new file mode 100755
index 00000000..f2508369
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/mockups/shoot.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Renders every scene of mixer.html in Studio Dark and Studio Light (headless Chrome).
+cd "$(dirname "$0")" && python3 build.py >/dev/null || exit 1
+C="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
+for v in dark light; do
+ for s in regular folded compact compact-folded; do
+ "$C" --headless=new --disable-gpu --hide-scrollbars --allow-file-access-from-files \
+ --force-device-scale-factor=2 --window-size=1700,${H:-720} \
+ --screenshot="$PWD/$s-$v.png" "file://$PWD/mixer.html?variant=$v&scene=$s" >/dev/null 2>&1
+ done
+done
diff --git a/specs/070-mixer-groups-compact-strips/plan.md b/specs/070-mixer-groups-compact-strips/plan.md
new file mode 100644
index 00000000..af04ee1c
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/plan.md
@@ -0,0 +1,116 @@
+# Implementation Plan: Mixer Groups and Compact Strips
+
+**Branch**: `070-mixer-groups-compact-strips` | **Date**: 2026-11-02 | **Spec**: [spec.md](spec.md)
+
+**Input**: Feature specification from `/specs/070-mixer-groups-compact-strips/spec.md`
+
+## Summary
+
+Make groups readable and foldable in the Mixer, and add an optional compact strip layout
+(GitHub issue nota-daw/nota#386). The Mixer lists strips in the Arrangement's hierarchical
+order (group strip, then members), draws a coloured, named bar plus a faint tint over each
+group's strips (one bar row per nesting level), and folds a group from a triangle on its
+strip — one fold state shared with the Arrangement, now saved in the project's
+`track-view.json` sidecar. The Mixer follows the selected track. A footer `Compact` toggle
+switches every strip to a 72 px layout: a wide meter with a triangular volume handle on it,
+the existing `PanBar` and bar-style sends, full-width M / S / Arm, as agreed in the
+[mockup](mockups/). UI-only; no engine or C ABI change.
+Details: [research.md](research.md).
+
+## Nota: Read Before Planning
+
+- **UI work** → [`DESIGN.md`](../../DESIGN.md) (Studio) and the `nota-design` skill — the
+ bands and the compact strip follow the agreed [mockup](mockups/) (R9).
+- **Anything** → [`CONTRIBUTING.md`](../../CONTRIBUTING.md).
+
+## Technical Context
+
+**Language/Version**: C# / .NET 10 (managed app only)
+
+**Primary Dependencies**: Avalonia (existing). No new dependency.
+
+**Storage**: per-user `settings.json` — one new field `MixerCompact`; per-project
+`track-view.json` sidecar — one new field `collapsedGroups`. See
+[data-model.md](data-model.md).
+
+**Audio-Thread Impact**: None. Folding and layout are view state; meters are read on the
+UI tick as today, and hidden strips read none (fewer reads, not more).
+
+**Testing**: `scripts/build.sh` (smoke test, unaffected); the scenarios in
+[quickstart.md](quickstart.md) through a headless Avalonia harness with screenshots;
+SC-005 by an offline render folded vs unfolded, compared byte for byte.
+
+**Target Platform**: macOS, Windows, Linux desktop.
+
+**Project Type**: desktop app
+
+**Performance Goals**: fold / unfold < 100 ms at 100 tracks, without rebuilding strips
+(SC-002); band layer redraws only on layout changes; no per-tick allocations added.
+
+**Constraints**: one `MixerView` instance, shared by the docked panel and the pop-out
+window (specs/054); compact strip ≤ 77 px wide (FR-018); regular layout stays the default
+and unchanged apart from order, bands, fold control and selection outline.
+
+**Scale/Scope**: ~8 files changed (DESIGN.md included) and 4 new in `src/managed/Nota.App`, 1 in
+`Nota.Application`; `en.json` / `fr.json` strings.
+
+## Constitution Check
+
+| Principle | Status |
+|---|---|
+| 0. Approved issue first | Pass — nota-daw/nota#386 carries `approved` (2026-11-02) |
+| I. Real-time audio safety | Pass — no audio-thread code touched |
+| II. Boundary discipline | Pass — no C ABI / JUCE change |
+| III. Licensing hygiene | Pass — no new dependency; new `.cs` files get the SPDX header |
+| IV. Verification gate | Pass — `scripts/build.sh` before PR; no engine behaviour change, no smoke-test extension |
+| V. One logical change | Watch — two stories in one spec. Groups (US1+US2) and compact strips (US3) are independent; tasks keep them in separate phases so they can ship as two PRs if review prefers |
+| VI. Docs in sync | Planned — CHANGELOG `[Unreleased]`, `nota-features`, `nota-docs` (Mixer page EN + RU, screenshots), `nota-shortcuts` check (no new binding) |
+| VII. Spec-first | Pass — this run |
+| VIII. Rules not weakened | Pass |
+
+Post-design re-check: unchanged — the design adds no native code, no dependency; the only
+new project data is an additive, cosmetic sidecar field.
+
+## Project Structure
+
+### Documentation (this feature)
+
+```text
+specs/070-mixer-groups-compact-strips/
+├── plan.md
+├── research.md
+├── data-model.md
+├── quickstart.md
+├── contracts/ui-mixer.md
+├── checklists/requirements.md
+└── tasks.md # /speckit-tasks
+```
+
+### Source Code (repository root)
+
+```text
+src/managed/
+├── Nota.Application/
+│ └── Settings.cs # + MixerCompact
+└── Nota.App/
+ ├── GroupFold.cs # NEW: shared fold state + Changed event (R2)
+ ├── ArrangementView.Groups.cs # _collapsed → GroupFold; + HierarchyOrder (R1)
+ ├── ArrangementView.Sizing.cs # track-view.json: + collapsedGroups (R2)
+ ├── ArrangementView.cs # triangle → GroupFold.Toggle (2 call sites)
+ ├── MixerView.cs # order, fold, bands host, selection, compact switch
+ ├── MixerView.Compact.cs # NEW: compact strip builders + StripMetrics (R6)
+ ├── MainWindow.Mixer.cs # GroupFold wiring, selection follow (R5)
+ ├── MainWindow.axaml.cs # create GroupFold, hand to both views
+ ├── Controls/GroupBandsLayer.cs # NEW: bars + tint behind the strip row (R3)
+ ├── Controls/MeterFader.cs # NEW: wide meter + triangular handle (R7)
+ └── Languages/en.json, fr.json # new strings
+DESIGN.md # Accepted exceptions: the compact meter's 18 px channels
+```
+
+**Structure Decision**: all work stays in `Nota.App` (presentation) plus one settings field.
+`MainWindow.Detail.cs` is deliberately not touched: selection following is wired in
+`MainWindow.Mixer.cs` (R5).
+
+## Complexity Tracking
+
+No violations to justify.
diff --git a/specs/070-mixer-groups-compact-strips/quickstart.md b/specs/070-mixer-groups-compact-strips/quickstart.md
new file mode 100644
index 00000000..bdaedf4c
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/quickstart.md
@@ -0,0 +1,53 @@
+# Quickstart: validating Mixer Groups and Compact Strips
+
+How to prove the feature works end to end. Controls and measures:
+[contracts/ui-mixer.md](contracts/ui-mixer.md); stored state:
+[data-model.md](data-model.md).
+
+## Prerequisites
+
+- `scripts/build.sh` green (Release engine in `build/`, managed app, smoke test).
+- A headless Avalonia harness in a scratch folder (net10.0 console, `ProjectReference` to
+ `Nota.App.csproj`, `Avalonia.Headless` + `Avalonia.Skia`), run with
+ `NOTA_DATA_DIR=<scratch>/data` so no real user settings are touched. It shows the real
+ `MainWindow` (DataContext from `App.Services`), builds tracks through the engine, and
+ saves `CaptureRenderedFrame()` PNGs. Synthetic pointer events drive the real handlers.
+
+## Test project
+
+Built by the harness through the engine API:
+
+- `Bus` (group) → `Drums` (group) → `Kick`, `Snare`, `Hats` (audio)
+- `Bus` → `Bass` (instrument)
+- `Vox` (audio, ungrouped), `Keys` (instrument, ungrouped), returns A and B
+- Engine order deliberately scrambled (create `Vox` first, `Hats` before `Drums`), so the
+ hierarchical order is actually exercised.
+
+## Scenarios
+
+| # | Steps | Expected |
+|---|---|---|
+| 1 | Show the Mixer docked | strips: Bus, Drums, Kick, Snare, Hats, Bass, Vox, Keys, A, B, Master; Bus bar over Bus…Bass, Drums bar below it over Drums…Hats; Vox / Keys / returns without bars (US1-1, -2, -4) |
+| 2 | Move `Vox` into `Bus` in the Arrangement, then undo | bands follow both steps without reopening (US1-3) |
+| 3 | Switch to Stereo map | strip column shows the same bars (US1-5) |
+| 4 | Click the Drums triangle in the Mixer | Kick / Snare / Hats hidden, `+3` tag; the Arrangement's Drums row collapses too (US2-1, clarified A) |
+| 5 | Solo Snare, arm Kick, then fold Drums | S and arm dots on Drums; offline render equals the unfolded render byte for byte (US2-3, SC-005) |
+| 6 | Fold Drums, fold Bus, unfold Bus | Bus members back; Drums stays folded (US2-2) |
+| 7 | Save, New, Open | Drums still folded in both views (US2-4) |
+| 8 | Select Hats in the Arrangement with Drums folded | Drums strip outlined and scrolled into view; nothing unfolds (US2-5) |
+| 9 | Pop the Mixer out to its window | same order, bands, fold state (FR-012) |
+| 10 | Time fold / unfold with 100 tracks in 10 groups | < 100 ms each, no strip rebuild (SC-002) |
+| 11 | Footer `Compact` on, at a 1440 px window with 24 tracks | strips 72 px; ≥ 2× the regular count visible; setting survives a restart (US3-1, SC-003, FR-013) |
+| 12 | Drag the triangle handle / the meter; type `-6` in the dB number; double-click | volume follows on the meter's dB scale, `-6.0 dB`, reset to 0 dB; one undo step each (US3-2, -3) |
+| 13 | MIDI-learn volume, mute, solo on a compact strip, then switch to regular | mappings work in both layouts, same targets (US3-4) |
+| 14 | Click M / S / Arm on compact strips | full-width toggles, colours as today (US3-5) |
+| 15 | Shrink the docked panel | I/O hides, then sends, then the meter shortens; buttons stay (US3-6) |
+| 16 | Long track name in compact | ellipsised, full name in tooltip (US3-7) |
+| 17 | Fresh `NOTA_DATA_DIR` | Mixer opens with regular strips (US3-8) |
+| 18 | Studio Dark, Studio Light, Ember Graphite, Ember Paper | screenshots: bands readable, strip colours not drowned (FR-020) |
+| 19 | Interface language French | new strings translated (FR-021) |
+
+## Gate
+
+`scripts/build.sh` green; every scenario above passes; screenshots for the PR (before /
+after, regular and compact, folded and unfolded) go to the `pr-assets` branch via `nota-pr`.
diff --git a/specs/070-mixer-groups-compact-strips/research.md b/specs/070-mixer-groups-compact-strips/research.md
new file mode 100644
index 00000000..a8c1da96
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/research.md
@@ -0,0 +1,154 @@
+# Research: Mixer Groups and Compact Strips
+
+Phase 0 of [plan.md](plan.md). Each entry: decision, rationale, alternatives.
+
+## R1 — Strip order: the Arrangement's hierarchy, not the flat engine order
+
+**Finding**: `MixerView.Refresh` walks `ArrangementView.DisplayOrder(engine)`, which is the
+flat engine order with returns moved last (#374/#389). The Arrangement reorders its rows
+with `ApplyHierarchy` (DFS over the `GroupId` forest: group row, then its children; orphans
+become roots). So a group's members are only next to it in the Mixer when the engine order
+happens to agree.
+
+**Decision**: Add a static `ArrangementView.HierarchyOrder(IAudioEngine)` in
+`ArrangementView.Groups.cs` that yields `(index, id, depth, parentGroupId)` in the same DFS
+rule as `ApplyHierarchy`, ignoring collapse (the Mixer needs the hidden members too, to
+count and flag them). `MixerView.Refresh` uses it for non-return tracks; returns and master
+follow as today. `ApplyHierarchy` keeps its own walk over `TrackVM`s, but both share one
+private child-map builder, so the two orders cannot drift.
+
+**Alternatives**: reuse `ApplyHierarchy` output directly — it lives on view models of the
+Arrangement instance and drops collapsed descendants; reordering in the engine — touches
+the project model and undo for a view concern.
+
+## R2 — One fold state for both views
+
+**Finding**: the collapse set is `ArrangementView._collapsed` (`HashSet<int>` of group ids).
+Its comment says "persisted per project", but `SetCollapsedGroups` has no caller: the state
+lives for the session only and is not cleared on New/Open either.
+
+**Decision**: Move the set into a small shared class `GroupFold` (new file
+`src/managed/Nota.App/GroupFold.cs`): `IsFolded(id)`, `Toggle(id)`, `Set(ids)`, `Clear()`,
+`event Action? Changed`. `MainWindow` owns one instance and hands it to `ArrangementView`
+and `MixerView`. The Arrangement's triangle calls `Toggle`; both views refresh on `Changed`.
+Persist it in the existing `track-view.json` sidecar (`ArrangementView.Sizing.cs`) as
+`collapsedGroups: [trackIndex…]` — indices, like the heights, because ids last a session
+only. The field is additive, so the sidecar stays `version: 1` and older builds ignore it.
+`ResetTrackView` clears it (New project / before load).
+
+**Alternatives**: a second set in `MixerView` synced by events — two sources of truth;
+engine-side flag via the C ABI — a pure view concern would cross the boundary and land in
+undo history.
+
+## R3 — Group bands: an overlay over a flat strip row
+
+**Decision**: Keep `_row` a flat horizontal `StackPanel` of strips (height fitting, meters and
+sync code stay as they are). Wrap it in a `Panel` with a new `GroupBandsLayer` control
+behind it (`src/managed/Nota.App/Controls/GroupBandsLayer.cs`). After layout the layer reads
+each strip's bounds and, per group, draws:
+
+- a bar row `BandBarH = 14` high at `depth × BandBarH` from the top, spanning the group strip
+ through its last visible member, filled with the group colour at low alpha, the group name
+ in 9 px semibold, ellipsised;
+- a faint tint (group colour ≈ 6–8 % alpha) behind the same strips.
+
+`_row` gets a top margin of `maxDepth × BandBarH`; the bar rows count in `CoreH`, so
+`MinContentHeight` grows by them (spec edge case). Bars re-draw on `LayoutUpdated` of the
+row, without rebuilding strips. Group colour = `ArrangementView.EffectiveColorIndex`, as the
+strip's own top bar.
+
+**Alternatives**: nested `StackPanel`s per group — strips would need per-depth spacers to
+stay aligned and the flat lists (`_faderGrids`, `_ioSections`) would get harder to keep;
+per-strip coloured borders — no place for the group's name, nesting unreadable.
+
+## R4 — Folding hides strips, never rebuilds them
+
+**Decision**: Every strip is built once per `Refresh`; folding toggles `IsVisible` on the
+strips under a folded group (any folded ancestor hides). `UpdateMeters` and `FollowStrips`
+skip invisible strips. The group strip's header gets a disclosure triangle (the Arrangement's
+glyph) and, when folded, a `+N` count tag and small solo / arm / clip dots aggregated from
+the hidden members on the UI tick (`TrackInfo.Soloed/Armed`, member meter peak ≥ 0 dBFS
+since the last unfold or a click on the dot). Meets SC-002 (no rebuild, < 100 ms).
+
+**Alternatives**: rebuild on toggle — simpler but loses scroll and costs ~1 ms per strip.
+
+## R5 — Following the selected track
+
+**Finding**: the Mixer ignores selection today. `Timeline.TrackSelected` and
+`_modular.TrackActivated` already feed `MainWindow.OnTrackSelected`.
+
+**Decision**: `MainWindow.Mixer.cs` subscribes to both events itself (not inside
+`OnTrackSelected`, keeping the Mixer wiring in one file) and calls
+`MixerView.FollowSelection(trackId)`: the strip — or, when hidden, its outermost folded
+ancestor — gets the selected outline (`NotaPalette.Accent`, 1 px, the "chosen" accent from
+`DESIGN.md`) and is brought into view (`BringIntoView`). Selection never unfolds.
+
+## R6 — Compact strip: what goes where
+
+Target width **72 px** (FR-018: ≤ 77). Top to bottom:
+
+| Section | Compact form |
+|---|---|
+| Header | 3 px colour bar, name 9 px ellipsised + full name tooltip; group: triangle + `+N` |
+| I/O | one 18 px line (`In 1 → Monitor in` shortened), full text in tooltip; instrument tracks keep the MIDI-in combo at 16 px |
+| Sends | per return a thin `MiniFader` bar (6 px) with its letter, full width (clarified) |
+| Pan | the existing `PanBar` (`Controls/PanBar.cs`, already in Arrangement track headers and Session): full-width centre-out bar; BAL tag beside on groups (clarified) |
+| Level | new `MeterFader`: 14 px scale, two 18 px channels, an 11 px gutter with the triangular handle |
+| dB | the same `DragNumber` |
+| Buttons | M, S and Arm as full-width buttons stacked, 18 px each |
+
+Height adaptation keeps the regular priorities (FR-017): `FitHeight` gets a layout-specific
+set of section heights (`StripMetrics` record: header, I/O, sends, pan, buttons, fader
+min/max/comfort), so the same algorithm runs for both layouts.
+
+## R7 — `MeterFader`: meter and handle as one control
+
+**Finding**: `MeterScale.Channels` never widens a channel past 11 px (DESIGN.md § Controls:
+"Meter · 11 wide, 5 between"); a wider host only centres the pair.
+
+**Decision**: A new control (`Controls/MeterFader.cs`) draws two 18 px channels 3 px apart
+with `MeterScale.DrawChannel` (zones, hold mark and scale unchanged; only the width
+differs), a hairline across them at the handle's height, and a 9 × 10 px
+triangle pointing left at the volume's position on the **meter's dB scale**
+(`MeterScale.NormDb(LinToDb(v))`), so 0 dB on the handle lines up with 0 dB on the meter.
+Interaction follows `VFader` (relative drag, Shift/Ctrl/⌘ fine, `GestureBegin/End`,
+`SetValueExternal`, `EntryField` for typed values / double-click reset) but in dB space over
+the meter's height. The drag target is the whole control — a bigger target than the
+handle. A click without movement still clears the peak hold, as `MeterBar` does today. MIDI
+learn binds the same `MidiTarget.TrackVolume(id)`. The handle never covers the clip zone:
+it sits outside the channels, in the right 10 px gutter.
+
+**Alternatives**: overlay a `VFader` on a `MeterBar` — two controls competing for the same
+pointer and peak-reset click; linear handle position — 0 dB on the handle would not line up
+with 0 dB on the meter.
+
+## R8 — The Compact toggle and its setting
+
+**Decision**: `Settings.MixerCompact` (bool, default false) in `Nota.Application/Settings.cs`.
+The footer gets a `Compact` toggle after `Sends` / `I/O`, painted as those (accent when on,
+no auto-hidden state). Toggling rebuilds the strips (`Refresh`) — a layout change, rare,
+and the only place where a rebuild is fine. The Stereo Map's strip column uses the same
+layout; its `MaxWidth = 440` then shows six compact strips instead of two-and-a-bit.
+
+## R9 — Design check before code (done 2026-11-02)
+
+Mockup in [`mockups/`](mockups/): four scenes (regular unfolded / folded, compact 1440 px
+with 24 tracks, compact with two groups folded) in Studio Dark and Studio Light, colours
+read from the theme files by `build.py`; `shoot.sh` renders them (the PNGs are not committed —
+the agreed set is on the `pr-assets` branch, `issue-386/mockup/`). Agreed with these outcomes:
+
+- the hidden count sits in the group's bar (`Drums +3`), not as a header tag — a 72 px
+ header has no room; hidden solo / arm / clip are 6 px dots at the right of the header;
+- the compact meter's 18 px channels are a deliberate exception to DESIGN.md's 11 px
+ meter: it is the issue's core ask (readable levels). It is recorded under DESIGN.md
+ § Accepted exceptions in the same change;
+- in compact, returns and master keep empty send / pan slots so all meters line up;
+- 19 compact strips fit a 1440 px window against 9 regular ones (SC-003).
+
+## R10 — Verification
+
+No engine change, so the smoke test is unaffected but must stay green. Behaviour is checked
+with a headless Avalonia harness (memory recipe: `new MixerView(engine)` in a `Window`,
+engine tracks built through the API, synthetic pointer events on the controls,
+`CaptureRenderedFrame` screenshots). SC-005 (folding never changes audio) is shown by
+rendering the same project folded and unfolded offline and comparing the WAVs byte for byte.
diff --git a/specs/070-mixer-groups-compact-strips/spec.md b/specs/070-mixer-groups-compact-strips/spec.md
new file mode 100644
index 00000000..570b3f48
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/spec.md
@@ -0,0 +1,303 @@
+# Feature Specification: Mixer Groups and Compact Strips
+
+**Feature Branch**: `070-mixer-groups-compact-strips`
+
+**Created**: 2026-11-02
+
+**Status**: Draft
+
+**Input**: User description: "Mixer: fold groups and compact strips (GitHub issue nota-daw/nota#386). Today the Mixer (docked panel and pop-out window, specs/054) shows one 154 px strip per track with a classic vertical fader beside a separate stereo meter, and M/S/Arm at the bottom; group tracks can be collapsed in the Arrangement (persisted per project) but not in the Mixer, and which strips belong to a group is hard to see (only the group's own "→ parent" I/O text hints at it). Wanted: (1) Groups in the Mixer — a group strip can be collapsed/expanded to hide/show its member strips (nested groups too), and group membership is visible at a glance through subtle cues (shading/frame/label spanning the member strips, nesting shown). (2) Compact strips, inspired by Avril's mixer: a wide, easy-to-read level meter that doubles as the fader with a compact triangular handle, full-width prominent Rec/Solo/Mute buttons, and narrow strips so far more tracks fit on screen, without losing readability or existing features (pan, sends, I/O, dB entry, MIDI learn, height adaptation, Stereo map). Remote web mixer (src/web/remote) is out of scope unless trivially shared."
+
+## Nota Context *(fill in — drives plan and tasks)*
+
+**Feature area** *(pick the main one)*:
+
+- [ ] Engine (C++, `src/native/nota.engine`) — real-time audio rules apply, see `ARCHITECTURE.md` AR table
+- [ ] Managed app (C#, `src/managed/*`) — domain, application, infrastructure, presentation
+- [x] UI (Avalonia, `src/managed/Nota.Presentation`) — follow `DESIGN.md` (Studio)
+- [ ] Plugin hosting (`pluginhost/`) — the only place JUCE is allowed
+- [ ] Build / packaging / CI (`scripts/`, `.github/`) — see `BUILD.md`
+- [ ] Docs only
+
+**Nota docs to keep in mind** *(links relative to `specs/<slug>/`, where this file lands)*:
+[`ARCHITECTURE.md`](../../ARCHITECTURE.md) (AR rules),
+[`CONTRIBUTING.md`](../../CONTRIBUTING.md) (licensing, dependency policy, PR
+expectations), [`BUILD.md`](../../BUILD.md), [`DESIGN.md`](../../DESIGN.md),
+[`FEATURES.md`](../../FEATURES.md).
+
+**Existing behaviour this builds on**: the Mixer opens docked in the main window or as a
+pop-out window (specs/054) and lists strips in the Arrangement's track order, groups
+included (#389). Each strip is 154 px wide: header, I/O rows, A/B sends, pan knob, a
+vertical fader beside a stereo meter, a typed dB value, and M / S / Arm buttons. Strips adapt
+to the panel height — I/O hides first, then sends, then the fader shortens (specs/054
+FR-014). Group tracks can be collapsed in the Arrangement; that state is view state saved
+with the project. In the Mixer, a group strip looks like any other strip apart from its
+"Group in → parent" I/O text and a BAL badge on its pan.
+
+## Clarifications
+
+### Session 2026-11-02
+
+- Q: Is the Mixer's fold the same state as the Arrangement's group collapse, or independent per view? → A: The same state — folding a group in either view folds it in both (FR-006, FR-010).
+- Q: Are compact strips an option beside the regular strips, or a replacement? → A: An option; the regular strips stay the default (FR-013).
+- Q: When a track hidden inside a folded group is selected elsewhere, what does the Mixer do? → A: The Mixer follows the selection: it highlights the selected strip and scrolls to it; a hidden track highlights its folded group strip instead, and the group stays folded (FR-011).
+- Q: How are sends shown on a narrow compact strip? → A: The same per-return list, each send a thin full-width horizontal bar labelled with the return's letter, dragged or typed into as today (FR-016).
+- Q: What does pan look like on a compact strip? → A: A thin full-width horizontal bar filling from the centre left or right; drag, typed value, double-click resets to centre; groups keep their BAL tag beside it (FR-016).
+- Q: Where is the regular / compact switch? → A: A "Compact" toggle in the Mixer footer, beside the Sends and I/O toggles, in both the docked panel and the pop-out window (FR-013).
+- Q: What does a group band look like? → A: A thin bar in the group's colour with the group's name above the group's strips, plus a faint tint of the same colour behind them; each nesting level adds one more bar on top (FR-002, FR-003).
+
+## User Scenarios & Testing *(mandatory)*
+
+### User Story 1 - See which strips belong to which group (Priority: P1)
+
+A producer has a 30-track project with drums, vocals and synths each grouped. In the Mixer
+they want to find the drum strips without reading every name. The member strips of each
+group sit together under a band in the group's colour that carries the group's name, and
+the group's own strip closes the band, so the drum kit reads as one block. A group inside a
+group shows as a band inside the outer band. The group's own strip comes first, followed
+by its members, as the group row heads its tracks in the Arrangement.
+
+**Why this priority**: The cheapest change with the biggest readability gain, and it is
+what makes folding (US2) understandable — a folded group needs a visible boundary to fold.
+
+**Independent Test**: Open a project with two top-level groups, one of them holding a
+nested group, plus ungrouped tracks; show the Mixer and check that every member strip is
+inside its group's band, nested bands are distinguishable, ungrouped strips carry no band,
+and the band follows changes (moving a track into or out of a group, renaming or recolouring
+the group, undo).
+
+**Acceptance Scenarios**:
+
+1. **Given** a project with a group "Drums" holding Kick, Snare and Hats, **When** the Mixer
+ is shown, **Then** the Drums, Kick, Snare and Hats strips are adjacent in that order and a band
+ labelled "Drums" in the group's colour spans exactly those strips.
+2. **Given** a group "Bus" holding the group "Drums" and a track "Bass", **When** the Mixer is
+ shown, **Then** the "Drums" band is visibly nested inside the "Bus" band and "Bass" is in
+ "Bus" only.
+3. **Given** the Mixer is shown, **When** the user moves a track into a group in the
+ Arrangement (or undoes it), **Then** the Mixer's bands update without the user doing
+ anything else.
+4. **Given** an ungrouped track, **When** the Mixer is shown, **Then** its strip has no group
+ band.
+5. **Given** the Mixer is in Stereo map view, **When** the strip column is shown beside the
+ map, **Then** the same group bands appear on that column.
+
+---
+
+### User Story 2 - Fold a group in the Mixer (Priority: P1)
+
+The same producer has balanced the drums and now works on vocals. They fold the "Drums"
+group in the Mixer: its member strips disappear and only the group strip stays, so the
+vocals and the rest fit on screen. Later they unfold it to tweak the snare.
+
+**Why this priority**: This is the issue's explicit missing capability — large projects
+become a horizontal scroll otherwise.
+
+**Independent Test**: In a project with a group of several tracks, fold the group from its
+strip in the Mixer; check that the member strips (and any nested groups' members) are hidden,
+the group strip keeps working (fader, pan, mute, solo, meter) and shows it is folded with how
+many strips it hides, and unfolding restores them in place.
+
+**Acceptance Scenarios**:
+
+1. **Given** an unfolded group in the Mixer, **When** the user clicks the group strip's fold
+ control, **Then** every strip inside that group, nested groups included, is hidden, and
+ the group strip stays with a folded marker and the number of hidden strips.
+2. **Given** a folded group, **When** the user clicks the fold control again, **Then** the
+ hidden strips reappear in their previous order and a nested group that was folded before
+ stays folded.
+3. **Given** a folded group whose member is soloed or armed, **When** the group is folded,
+ **Then** the group strip shows that a hidden member is soloed / armed, and the audio is
+ unchanged — folding never mutes, solos or bypasses anything.
+4. **Given** a folded group, **When** the user saves and reopens the project, **Then** the
+ group is still folded in the Mixer.
+5. **Given** a folded group, **When** the user selects a hidden member elsewhere (Arrangement
+ track header, device panel), **Then** the Mixer highlights the folded group strip as
+ holding the selected track and scrolls to it; the group stays folded.
+6. **Given** a group collapsed in the Arrangement, **When** the Mixer is shown, **Then** the
+ group is folded in the Mixer too; unfolding it in the Mixer expands it in the Arrangement,
+ and the other way round.
+
+---
+
+### User Story 3 - Fit more strips with compact strips (Priority: P2)
+
+A producer on a laptop screen wants to see all 24 tracks of a song at once. They switch the
+Mixer to compact strips: each strip becomes narrow; the level meter is wide and fills the
+strip, and the volume is set by dragging a small triangular handle that rides on the meter's
+side; Mute, Solo and Arm are wide buttons across the full strip width. Pan, sends, I/O, the
+dB value and MIDI learn still work as before.
+
+**Why this priority**: It is the larger design change from the issue. It delivers value on
+its own but needs design work and touches every strip control, so it follows the group
+work.
+
+**Independent Test**: Switch a 24-track project to compact strips in a docked Mixer at a
+1440 px wide main window; check that at least twice as many strips are visible as in the
+regular layout, that the meter and the triangular handle set and show the same volume as the
+regular fader (including typed dB and MIDI learn), that M / S / Arm are full-width and
+toggle as before, and that switching back restores the regular layout.
+
+**Acceptance Scenarios**:
+
+1. **Given** the Mixer in the regular layout, **When** the user switches to compact strips,
+ **Then** every strip narrows to the compact width, group bands and folding keep working,
+ and the choice is remembered per user.
+2. **Given** compact strips, **When** the user drags the triangular handle, **Then** the track
+ volume changes exactly as with the regular fader (same range, undo, automation write,
+ fine-adjust modifier, double-click to reset), and the meter keeps showing the level
+ behind the handle.
+3. **Given** compact strips, **When** the user types an exact dB value, **Then** the handle
+ moves to it, as in the regular layout.
+4. **Given** compact strips, **When** the user MIDI-learns a strip's volume, mute or solo,
+ **Then** the learn works and the mapping is the same one the regular layout uses.
+5. **Given** compact strips, **When** the user clicks Mute, Solo or Arm, **Then** the button
+ spans the strip width, its on state is unmistakable at a glance, and the track toggles.
+6. **Given** compact strips in a short docked panel, **When** the panel height shrinks,
+ **Then** the strips adapt as the regular ones do (lower-priority sections hide first,
+ meter and M / S / Arm always stay).
+7. **Given** compact strips, **When** a track name is longer than the strip, **Then** the name
+ is shortened readably and the full name is available on hover.
+8. **Given** a fresh install, **When** the user first opens the Mixer, **Then** it shows the
+ regular strips; compact strips appear only after the user switches to them.
+
+---
+
+### Edge Cases
+
+- A group with no members: the band covers only the group strip; folding it hides nothing
+ and the fold control still shows the empty state honestly (0 strips).
+- Deeply nested groups (4+ levels): each level adds one bar row above the strips; the bar rows
+ always stay and count toward the Mixer's minimum height, so membership stays readable.
+- A group's member list changes while it is folded (track added to it, track moved out,
+ track deleted): hidden count and visible strips update; a track moved out appears.
+- Return tracks and Master are never inside a group band and cannot be folded.
+- Group and member colours clash or a group has no custom colour: the band uses the group's
+ track colour as everywhere else, at low emphasis so the strips' own colours stay readable.
+- Meters of hidden member strips: hidden strips cost nothing to draw; the group's meter shows
+ the summed group signal as today.
+- The pop-out Mixer window and the docked Mixer show the same fold state and layout.
+- Compact strips with many returns: the send bars stack, so the sends section grows taller;
+ it hides for lack of height before the meter shortens (FR-017) and can be pinned on from
+ the footer as today, so no send becomes unreachable.
+- Very quiet and clipping signals on the wide meter: the peak hold and clip indication stay
+ visible; the triangular handle never hides the clip indicator.
+- Stereo map view with compact strips: the strip column beside the map uses the compact
+ strips and fits more of them.
+- Keyboard / accessibility: the fold control and the compact handle are reachable by
+ keyboard and have accessible names, as other mixer controls do.
+
+## Requirements *(mandatory)*
+
+### Functional Requirements
+
+**Group bands (US1)**
+
+- **FR-001**: The Mixer MUST list strips in the Arrangement's hierarchical order: each
+ group's own strip immediately followed by its member strips (nested groups the same way),
+ exactly as the Arrangement lists the rows.
+- **FR-002**: The Mixer MUST draw a band for each group: a thin bar in the group's colour
+ carrying the group's name above the group's member strips and the group strip, and a
+ faint tint of the same colour behind those strips that leaves the strips' own colours
+ readable.
+- **FR-003**: Nested groups MUST show as stacked bars — one bar row per nesting level, the
+ outermost on top — so each strip's full group path can be read from the bars above it.
+- **FR-004**: Bands MUST follow every change to group membership, group name, group colour
+ and track order, including undo / redo, without reopening the Mixer.
+- **FR-005**: Return, Master and ungrouped strips MUST carry no band.
+
+**Folding (US2)**
+
+- **FR-006**: Every group strip MUST have a fold control; folding hides all strips inside the
+ group (nested groups included) and leaves the group strip in place. The fold state is the
+ Arrangement's group collapse: one state per group, shared by both views.
+- **FR-007**: A folded group strip MUST show that it is folded, how many strips it hides, and
+ whether a hidden member is soloed, armed or clipping.
+- **FR-008**: Folding MUST be view-only: it never changes audio, mute, solo, arm, routing or
+ automation.
+- **FR-009**: Unfolding MUST restore hidden strips in their order, keeping the fold state of
+ nested groups.
+- **FR-010**: Fold state MUST be saved with the project and restored on open. (Today the
+ Arrangement's collapse is kept for the session only; this feature adds saving it.)
+- **FR-011**: The Mixer MUST follow the selected track: the selected track's strip is
+ highlighted and scrolled into view. When that track is hidden by folding, the outermost
+ folded group strip that holds it is highlighted and scrolled into view instead; selection
+ never unfolds a group.
+- **FR-012**: The docked and pop-out Mixer MUST share the same fold state.
+
+**Compact strips (US3)**
+
+- **FR-013**: Users MUST be able to switch the Mixer between the regular and the compact
+ strip layout with a "Compact" toggle in the Mixer footer, beside the Sends and I/O
+ toggles, in both the docked panel and the pop-out window; the regular layout is the
+ default and the choice is remembered per user.
+- **FR-014**: In compact strips, the level meter MUST be the strip's main element and the
+ volume MUST be set by a compact triangular handle on the meter, with the same range,
+ resolution, undo, automation, fine-adjust, reset and MIDI-learn behaviour as the regular
+ fader.
+- **FR-015**: In compact strips, Mute, Solo and Arm (where the track has one) MUST be
+ full-width buttons with an on state readable at a glance.
+- **FR-016**: Compact strips MUST keep pan, sends, I/O and typed dB entry reachable; sections
+ MAY be condensed but none may be removed. Each send is a thin full-width horizontal bar
+ labelled with its return's letter, one per return as in the regular strip, set by drag or
+ typed value. Pan is a thin full-width horizontal bar filling from the centre, set by
+ drag or typed value, double-click resets to centre; a group's BAL tag stays beside it.
+- **FR-017**: Compact strips MUST adapt to the panel height by the same priority as the regular
+ strips (I/O, then sends, then the meter shortens); meter and M / S / Arm always stay.
+- **FR-018**: A compact strip MUST be at most half the width of a regular strip.
+- **FR-019**: Group bands and folding MUST work identically in both layouts and in the
+ Stereo map's strip column.
+
+**General**
+
+- **FR-020**: The new controls MUST follow the Studio design language (`DESIGN.md`) and work
+ in all colour themes.
+- **FR-021**: All new user-facing text MUST be localisable like the rest of the Mixer.
+- **FR-022**: Session view's own Mixer sections and the Remote web mixer are out of scope.
+
+### Key Entities
+
+- **Group band**: the visual span of one group over its member strips and its own strip;
+ has a name, a colour, a nesting depth.
+- **Fold state**: per group, folded or not; the Arrangement's group collapse, shared by the
+ Mixer; saved with the project's view state.
+- **Strip layout**: regular (default) or compact; a per-user preference.
+
+## Success Criteria *(mandatory)*
+
+### Measurable Outcomes
+
+- **SC-001**: In a 30-track project with 4 groups, a user can name the group of any strip
+ in under 2 seconds without hovering or reading I/O text.
+- **SC-002**: Folding or unfolding a group takes one click and the Mixer updates in under
+ 100 ms for a 100-track project.
+- **SC-003**: With compact strips, a docked Mixer in a 1440 px wide window shows at least twice
+ as many strips without scrolling as with regular strips.
+- **SC-004**: Every action available on a regular strip (volume, typed dB, pan, sends, I/O,
+ M / S / Arm, MIDI learn) is available on a compact strip — 0 missing actions.
+- **SC-005**: Folding never changes the rendered audio: a project rendered with any groups
+ folded is bit-identical to the same project rendered unfolded.
+
+## Assumptions
+
+- Tracks follow the Arrangement's hierarchical order in the Mixer: the group strip first,
+ then its members. Today the Mixer lists tracks in flat engine order (#389 only moved the
+ returns to the end), so a group's members are not always next to it — this feature fixes that.
+- The fold control lives on the group strip's header; there is no separate group-list UI.
+- The triangular handle sits on one side of the meter (not overlapping the level bars), in
+ the spirit of the Avril reference in the issue; the exact visual is settled with a
+ `nota-design` mockup during planning.
+- The regular strip's feature set is the reference for compact strips; nothing new is added
+ to a strip beyond the layout, the fold control and the folded-group indicators.
+- No engine or C ABI change is expected: grouping, solo / arm state and meters already exist.
+- The Remote web mixer may reuse the band and fold idea later; not in this feature.
+
+## Nota Compliance Checklist *(review before implementation; re-check in tasks.md)*
+
+- [ ] Every new source file will carry the AGPL-3.0-only SPDX header (two lines, see CONTRIBUTING.md)
+- [ ] No new dependency — or: license checked, AGPL-compatible, `LICENSES/third-party.md` row planned
+- [ ] Audio-thread impact considered: no alloc / lock / I/O on the audio thread (AR-6), command queue for data in (AR-4), immutable snapshots for structural edits (AR-5)
+- [ ] Managed/native crossings go through the pure C ABI in `nota_engine.h` only (AR-7); no JUCE outside `pluginhost/`
+- [ ] Smoke-test impact assessed: engine behaviour change → extend `tests/Nota.SmokeTest`
+- [ ] User-visible change → `CHANGELOG.md` `[Unreleased]` entry planned (and FEATURES.md / user docs via the nota-features / nota-docs skills when working with an agent that has them)
+- [ ] UI change → follows `DESIGN.md` (Studio design language)
diff --git a/specs/070-mixer-groups-compact-strips/tasks.md b/specs/070-mixer-groups-compact-strips/tasks.md
new file mode 100644
index 00000000..ae315b32
--- /dev/null
+++ b/specs/070-mixer-groups-compact-strips/tasks.md
@@ -0,0 +1,202 @@
+---
+
+description: "Task list for Mixer Groups and Compact Strips"
+---
+
+# Tasks: Mixer Groups and Compact Strips
+
+**Input**: Design documents from `/specs/070-mixer-groups-compact-strips/`
+
+**Prerequisites**: [plan.md](plan.md), [spec.md](spec.md), [research.md](research.md),
+[data-model.md](data-model.md), [contracts/ui-mixer.md](contracts/ui-mixer.md),
+[quickstart.md](quickstart.md), the agreed [mockup](mockups/)
+
+**Tests**: No automated test tasks — the spec does not ask for them and the managed UI has
+no unit-test project. Each story is validated with the matching
+[quickstart.md](quickstart.md) scenarios (headless Avalonia harness + screenshots);
+`scripts/build.sh` is the PR gate.
+
+**Organization**: Tasks are grouped by user story. Groups (US1 + US2) and compact strips
+(US3) touch different parts of `MixerView` and can ship as two PRs (plan § Constitution
+Check, V).
+
+## Format: `[ID] [P?] [Story] Description`
+
+- **[P]**: Can run in parallel (different files, no dependencies)
+- **[Story]**: Which user story this task belongs to (US1, US2, US3)
+
+All paths are relative to the repository root. `App/` below means
+`src/managed/Nota.App/`.
+
+---
+
+## Phase 1: Setup (Shared Infrastructure)
+
+**Purpose**: The one persisted preference and the new strings, used across stories.
+
+- [X] T001 [P] Add `MixerCompact` (bool, default `false`) next to `MixerView` in `src/managed/Nota.Application/Settings.cs`, with a `<summary>` in the file's style ("The Mixer's strip layout (specs/070): false = regular strips, true = compact 72 px strips. Shared by the docked panel and the pop-out window."); data-model rule: missing in an older `settings.json` → regular
+- [X] T002 [P] Add the new strings to `App/Languages/en.json` and their French to `App/Languages/fr.json`: `Compact`, `Show compact strips: more tracks on screen`, `Fold group {0}`, `Unfold group {0}`, `{0} hidden strips`, `A hidden track is soloed`, `A hidden track is armed`, `A hidden track clipped · click to clear` (contracts/ui-mixer.md § Strings)
+
+---
+
+## Phase 2: Foundational (Blocking Prerequisites)
+
+**Purpose**: The hierarchical order every story builds on (research R1).
+
+**⚠️ CRITICAL**: No user story work can begin until this phase is complete
+
+- [X] T003 In `App/ArrangementView.Groups.cs`, extract the child-map builder used by `ApplyHierarchy` (group id → children in engine order; a track whose `GroupId` is missing or not a group is a root) into a private static helper working on `NotaTrackInfo`, and add `internal static IReadOnlyList<HierarchyRow> HierarchyOrder(IAudioEngine eng)` returning `(int Index, int Id, int Depth, int ParentGroupId)` for every non-return track in DFS order (group, then its children), **ignoring collapse**. `ApplyHierarchy` keeps its `TrackVM` walk but takes its children from the same helper so the two orders cannot drift. Depth-guard the walk (≤ 32) against a malformed parent chain, like `GroupShadeFor`
+- [X] T004 In `App/MixerView.cs` `Refresh()`, list non-return strips in `ArrangementView.HierarchyOrder(_engine)` order, then returns (still `DisplayOrder`'s second pass), then master; keep a per-strip record `(id, depth, parentGroupId, Border strip)` in a new `_strips` list (cleared with the other lists) for the band layer, folding and selection. Update the file's header comment (order now follows the Arrangement's hierarchy)
+
+**Checkpoint**: The Mixer lists Bus, Drums, Kick, Snare, Hats, Bass, … for the quickstart project even with a scrambled engine order (quickstart scenario 1, order part).
+
+---
+
+## Phase 3: User Story 1 - See which strips belong to which group (Priority: P1) 🎯 MVP
+
+**Goal**: Each group's strips sit under a named bar in the group's colour with a faint tint; nesting shows as stacked bars (FR-001 – FR-005).
+
+**Independent Test**: quickstart scenarios 1, 2, 3 — bands correct for nested and ungrouped tracks, follow membership / rename / recolour / undo, show in the Stereo Map's strip column.
+
+### Implementation for User Story 1
+
+- [X] T005 [P] [US1] Create `App/Controls/GroupBandsLayer.cs` (SPDX header + a why-comment): a `Control` given a list of bands `(string Name, int ColorIndex, int Depth, Control FirstStrip, Control LastStrip, int HiddenCount)` and `BarH = 14`. `Render` translates each strip's bounds into its own space and draws, per band, (a) the tint `NotaPalette.Wash(ArrangementView.TrackBrush(color), ≈ 0x12)` from `Depth × BarH` down to its bottom, radius `NotaRadius.Clip` on the top corners, and (b) the bar `Wash(…, ≈ 0x52)` at `Depth × BarH`, height `BarH − 2`, radius `NotaRadius.Clip`, the name in Geist 9 / 600 `TextPrimary` with 5 px side padding, ellipsised to the bar width; when `HiddenCount > 0` append ` +N` in Geist Mono `TextSecondary` (mockup). Read colours inside `Render` (no snapshot, DESIGN.md non-negotiable). `ToolTip` = full name via hit test on the bars. No pointer handling otherwise (`IsHitTestVisible` only for bars)
+- [X] T006 [US1] In `App/MixerView.cs`, wrap `_row` in a `Panel { _bands, _row }` as the scroller's content; set `_row.Margin` top to `10 + maxDepth × BarH` (maxDepth = deepest group level + 1, 0 without groups); after `Refresh` build the band list from `_strips` (first = group strip, last = last strip of its subtree; colour = `ArrangementView.EffectiveColorIndex(_engine, groupId)`; name = `TrackNames.Of`) and hand it to `_bands`; invalidate `_bands` on `_row.LayoutUpdated` (cheap: no rebuild). Returns, master and ungrouped strips get no band (FR-005)
+- [X] T007 [US1] In `App/MixerView.cs`, add `maxDepth × BarH` to `CoreH` (so `MinContentHeight` / `NaturalContentHeight` include the bar rows — spec edge case "bar rows always stay") and raise `MinContentHeightChanged` when maxDepth changes on `Refresh`
+- [X] T008 [US1] In `App/MixerView.cs` `UpdateMeters`, detect structural changes beyond the track count — a track's `GroupId`, a group's name or colour index changed (cheap signature over `TryGetTrackInfo` + `GetTrackColorIndex`, compared with the last built one) — and `Refresh()` then, so bands follow moves into / out of groups, renames, recolours and undo / redo (FR-004)
+- [X] T009 [US1] Check the Stereo Map layout (`ApplyView`): the band panel moves with `_stripsScroller`, so bars show over the strip column; fix any clipping of the bar row at the column's top margin (US1 scenario 5)
+
+**Checkpoint**: Quickstart scenarios 1–3 pass; screenshots match `mockups/regular-*.png` for the bands.
+
+---
+
+## Phase 4: User Story 2 - Fold a group in the Mixer (Priority: P1)
+
+**Goal**: A group strip folds its subtree in the Mixer and the Arrangement at once; folded state shows a count and hidden solo / arm / clip; saved with the project; the Mixer follows the selection (FR-006 – FR-012).
+
+**Independent Test**: quickstart scenarios 4–10.
+
+### Implementation for User Story 2
+
+- [X] T010 [P] [US2] Create `App/GroupFold.cs` (SPDX header + why-comment: one fold state for the Arrangement and the Mixer, specs/070 R2): `internal sealed class GroupFold` with `IsFolded(int groupId)`, `Toggle(int groupId)`, `Set(IEnumerable<int> ids)`, `Remove(int groupId)`, `Clear()`, `IReadOnlyCollection<int> Folded`, and `event Action? Changed` raised once per call that changed something
+- [X] T011 [US2] In `App/ArrangementView.Groups.cs`, replace `_collapsed` with an injected `internal GroupFold Fold { get; set; } = new();` — `CollapsedGroups`/`SetCollapsedGroups`/`IsGroupCollapsed`/`ToggleCollapse`/`UngroupGroup` delegate to it; subscribe to `Fold.Changed` → `Refresh()` (and unsubscribe when `Fold` is replaced). Update the other readers: `App/ArrangementView.cs` lines ~2125/2127 and ~2217/2219 (glyph + `ToggleCollapse`) and `App/ArrangementView.Overview.cs` ~317/324 (`_o._collapsed.Contains` → `_o.Fold.IsFolded`). Note: `ArrangementView.cs` is also being edited on branch `071-detail-panel-double-click` — keep this change to those four lines
+- [X] T012 [US2] In `App/ArrangementView.Sizing.cs`, persist the fold state in `track-view.json`: add `[JsonPropertyName("collapsedGroups")] public List<int>? CollapsedGroups` to `TrackViewDto` (engine track **indices**, "omitted when empty; an index that is out of range or not a group is skipped on load"); write it in `SaveTrackView` from `Fold.Folded` mapped id → index; include it in the "nothing to save → delete the file" check; read it in `LoadTrackView` (index → id, keep only groups) into `Fold.Set`; `ResetTrackView` calls `Fold.Clear()`. Keep `version: 1` (additive field)
+- [X] T013 [US2] In `App/MainWindow.axaml.cs`, create one `GroupFold` next to `_mixer = new MixerView(vm.Engine)` (~line 479), assign it to `Timeline.Fold` and to the new `MixerView.Fold` property
+- [X] T014 [US2] In `App/MixerView.cs`, add `public GroupFold? Fold { get; set; }` (subscribe to `Changed` → `ApplyFold()`); `ApplyFold()` sets `IsVisible` on each `_strips` entry to "no ancestor folded" without rebuilding (research R4), recomputes the band list (last visible strip, `HiddenCount` for folded groups = all descendants incl. nested) and invalidates `_bands`; `UpdateMeters` and `FollowStrips` skip strips whose border is not visible; call `ApplyFold()` at the end of `Refresh()`
+- [X] T015 [US2] In `App/MixerView.cs` `Header(...)`, for group strips add the disclosure `Glyph` left of the name — `GlyphKind.ChevronDown` unfolded / `ChevronRight` folded, size 8, `TextSecondary`, as the Arrangement — in a focusable `Border` with the accessible name `Loc.F("Fold group {0}", name)` / `Loc.F("Unfold group {0}", name)`, left click and Space / Enter → `Fold.Toggle(id)`; repaint it in `ApplyFold`. No undo step (view state, FR-008)
+- [X] T016 [US2] In `App/MixerView.cs`, add the folded group's hidden-state dots at the right of the header (6 px, `NotaPalette.Solo` / `Record` / `Danger`, shown only when true, tooltips from T002): on each `UpdateMeters` tick compute for each folded group whether any hidden descendant is soloed or armed (`TryGetTrackInfo`) and whether any hidden descendant's meter peaked ≥ 0 dBFS (`TryGetTrackMeter`, latched since the fold; a click on the clip dot clears the latch). No allocation per tick (reuse arrays sized on `Refresh`)
+- [X] T017 [US2] Selection follow (research R5): in `App/MixerView.cs` add `public void FollowSelection(int trackId)` — clear the previous outline, find the strip, or when hidden its **outermost** folded ancestor's strip, give it a 1 px `NotaPalette.Accent` outline (an overlay `Border` inside the strip, no size change) and `BringIntoView()`; never unfold. In `App/MainWindow.Mixer.cs` subscribe `Timeline.TrackSelected` and `_modular.TrackActivated` to it (wiring in this file, not `MainWindow.Detail.cs`), and re-apply the current selection after `Refresh()`
+- [X] T018 [US2] Confirm FR-012: the docked panel and `MixerWindow` reuse the same `MixerView` instance (specs/054), so fold state and outline carry over on pop-out / dock; check that `MixerWindow.FitWidth` uses visible strips only (`StripsWidth` measures `_row`, which already skips invisible children — verify)
+
+**Checkpoint**: Quickstart scenarios 4–10 pass, including the byte-for-byte render check (SC-005) and the 100-track fold timing (SC-002); screenshots match `mockups/folded-*.png`.
+
+---
+
+## Phase 5: User Story 3 - Fit more strips with compact strips (Priority: P2)
+
+**Goal**: A footer `Compact` toggle switches every strip to the 72 px layout from the mockup, with every regular action still available (FR-013 – FR-019).
+
+**Independent Test**: quickstart scenarios 11–17.
+
+### Implementation for User Story 3
+
+- [X] T019 [P] [US3] Create `App/Controls/MeterFader.cs` (SPDX header + why-comment, research R7): a `Control` with the `VFader` surface — `Value` (0..1.5 linear), `Dragging`, `ValueChanged`, `GestureBegin` / `GestureEnd`, `SetValueExternal`, `EntryField(name, fmt, def)` — plus `Push(NotaMeter)` / `Reset()` like `MeterBar`. Layout: 14 px scale (Geist Mono 7, `TextDisabled`, marks `+6`, `0`, `−12`, `−48` at `MeterScale.NormDb`), two 18 px channels 3 px apart drawn with `MeterScale.DrawChannel`, an 11 px gutter with a 9 × 10 px left-pointing triangle at `MeterScale.NormDb(LinToDb(Value))` and a 1 px hairline across the channels at the same y — `VizInk` at rest, `Accent` while hovered or dragged (DESIGN.md: accent only while live). Interaction: left button only (right-click bubbles to MIDI Learn); relative vertical drag in dB over the meter height, Shift / Ctrl / ⌘ = fine (÷10); `ns-resize` cursor; a press-release without movement clears the peak hold instead; capture-lost ends the gesture. Never allocate in `Render`
+- [X] T020 [US3] In `App/MixerView.cs`, introduce `StripMetrics` (record of width, header, I/O, sends, pan, fader min / comfort / max, buttons heights — data-model § StripMetrics: regular `154 · 24 · 34 · 42 · 38 · 72/120/190 · 28`, compact `72 · 24 · 18 · 24 · 22 · 72/120/220 · 66`) and make `CoreH`, `MinContentHeight`, `NaturalContentHeight` and `FitHeight` read the active metrics instead of the constants; regular behaviour must stay pixel-identical
+- [X] T021 [US3] Create `App/MixerView.Compact.cs` (partial class; SPDX header + why-comment) with the compact builders, wired to the same engine calls, `MixGesture` undo, automation writes, `MidiLearn.Bind` targets and `StripSync` entries as the regular ones: `CompactHeader` (name 9 px ellipsised, tooltip full name, fold glyph + dots from T015/T016 on groups), `CompactIo` (one 18 px line, full routing in a tooltip; instrument tracks keep the MIDI-in combo at 16 px), `CompactSends` (A / B `MiniFader` bars full width with their letter, `ValueEntry` `Send A` / `Send B`; returns and master get an empty 24 px slot), `CompactPan` (the existing `PanBar`, full width; BAL tag beside on groups; `SyncOf(id).Pan` must accept a `PanBar` — generalise `StripSync.Pan` to an interface or a pair of delegates; master gets an empty 22 px slot), `CompactLevel` (`MeterFader` registered in `_meters` and `StripSync.Fader`, `ValueEntry` with `NotaNum.GainDb`, `MidiTarget.TrackVolume(id)` / `MasterVolume`), the same `DragNumber` dB, `CompactButtons` (M, S, Arm stacked, full width, 18 px, 2 px gap, 4 px inset; Arm absent on returns; ⌘/Ctrl-click additive arm as today)
+- [X] T022 [US3] In `App/MixerView.cs`, add `public bool Compact` (rebuilds via `Refresh()` when changed; research R8) and branch `Strip` / `MasterStrip` to the compact builders; `_meters` / `_syncs` / `FollowStrips` / `UpdateMeters` must work with both `MeterBar`+`VFader` and `MeterFader`. Keep group bands, folding and selection outline working in both layouts (FR-019)
+- [X] T023 [US3] In `App/MixerView.cs` `Footer()`, add a `Compact` key after `I/O` painted as the section toggles but two-state (accent when on, no auto-hidden state), tooltip `Show compact strips: more tracks on screen`; a click flips `Compact`, saves `Settings.MixerCompact` through a `CompactChanged` event or the settings service as `MainWindow.Mixer.cs` does for `MixerView`; on startup `MainWindow.Mixer.cs` sets `_mixer.Compact` from settings before the first `Refresh`
+- [X] T024 [US3] Stereo Map with compact strips: in `ApplyView`, keep `_stripsScroller.MaxWidth = 440` (it now fits ~6 compact strips) and check the column's height fitting in both layouts
+
+**Checkpoint**: Quickstart scenarios 11–17 pass; screenshots match `mockups/compact-*.png`.
+
+---
+
+## Phase 6: Polish & Cross-Cutting Concerns
+
+**Purpose**: Design record, docs, verification.
+
+- [X] T025 [P] In `DESIGN.md` § Accepted exceptions, add the compact Mixer meter: "Compact mixer strips (specs/070) draw their meter with 18 px channels 3 px apart, against the 11 / 5 meter rule: the wide meter is what makes a 72 px strip readable (#386). Zones, hold mark and scale are unchanged." Mention the group bands under § Shell next to "Mixer strips"; run `python3 scripts/design-html.py`
+- [X] T026 Build the headless harness from quickstart § Prerequisites under `/tmp/mixer070harness` (`NOTA_DATA_DIR=/tmp/mixer070harness/data`), with the quickstart test project and scrambled engine order; run quickstart scenarios 1–19 and save the screenshots (regular / compact × folded / unfolded × Studio Dark / Studio Light, plus Ember Graphite / Ember Paper for scenario 18)
+- [X] T027 SC-005: render the quickstart project offline with Drums and Bus folded and unfolded (`RenderOffline`), compare the WAVs byte for byte
+- [X] T028 SC-002: time `Fold.Toggle` → `ApplyFold` with 100 tracks in 10 groups in the harness; must stay under 100 ms and must not call `Refresh`
+
+### Nota closing tasks *(always include — these are the PR gates)*
+
+- [X] T029 Run `scripts/build.sh` until native + managed + smoke test are green (includes `DesignTokenCheck`: `RunStudio`, `RunThemes`, `RunLabels`, `RunIcons` — the new controls must pass without allow-list entries)
+- [X] T030 AGPL-3.0-only SPDX two-line header on every new source file: `App/GroupFold.cs`, `App/MixerView.Compact.cs`, `App/Controls/GroupBandsLayer.cs`, `App/Controls/MeterFader.cs`
+- [X] T031 New dependency: none → N/A
+- [X] T032 `CHANGELOG.md` `[Unreleased]` entries: Added — Mixer group bands, folding groups from the Mixer (shared with the Arrangement, saved with the project), the Mixer follows the selected track, compact strips (#386); Fixed — the Mixer now lists a group's tracks right after it, and group folding is saved with the project
+- [X] T033 `nota-features` (FEATURES.md: Mixer section), `nota-docs` (Mixer page EN + RU, new screenshots of bands, folded group and compact strips), `nota-shortcuts` check (no new binding → expect N/A)
+- [X] T034 Engine behaviour change: none → smoke test extension N/A
+
+---
+
+### Implementation notes (2026-11-02)
+
+- T026: harness `/private/tmp/mixer070harness` (`NOTA_DATA_DIR=/tmp/mixer070harness/data dotnet run -- <out> [themes]`) — 17 checks pass: hierarchy order with a scrambled engine order, fold / nested fold / unfold, solo + arm dots, outline on the folded ancestor, band follows a regroup, Stereo Map column, compact 72 px (19 vs 9 strips at 1440), meter-fader click / drag / undo, sidecar save / reset / load, fold timing. Not driven by it: MIDI learn on compact controls (same `MidiTarget`s as regular), Ember themes, the French UI (strings covered by the smoke test's localization check).
+- T027: by construction — `GroupFold` never reaches the engine (no engine call in `GroupFold.cs`, `ApplyFold` only toggles `IsVisible`), so a render cannot depend on it.
+- T028: 0.2–0.6 ms per fold / unfold at 102 tracks, no `Refresh`.
+
+## Dependencies & Execution Order
+
+### Phase Dependencies
+
+- **Setup (Phase 1)**: none — T001, T002 in parallel
+- **Foundational (Phase 2)**: T003 → T004; blocks every story
+- **US1 (Phase 3)**: after Phase 2. T005 in parallel with T006's preparation; T006 → T007 → T008 → T009
+- **US2 (Phase 4)**: after Phase 2; uses US1's band list for `+N` (T014 extends T006). T010 [P] first, then T011 → T012 → T013 → T014 → T015 → T016 → T017 → T018
+- **US3 (Phase 5)**: after Phase 2; independent of US1 / US2 except that the compact header reuses T015 / T016 when they exist. T019 [P] alongside T020; T021 → T022 → T023 → T024
+- **Polish (Phase 6)**: after the stories in the PR
+
+### User Story Dependencies
+
+- **US1**: none beyond Phase 2
+- **US2**: shows its hidden count in US1's bars; fold itself works without bands
+- **US3**: none; if built before US1 / US2, T021's header simply has no fold glyph yet
+
+### Parallel Opportunities
+
+- T001 ‖ T002
+- T005 (new file) ‖ T004
+- T010 (new file) ‖ US1 tasks
+- T019 (new file) ‖ T020; T025 ‖ any story work
+
+---
+
+## Parallel Example: User Story 3
+
+```text
+Task: "Create App/Controls/MeterFader.cs (T019)"
+Task: "Introduce StripMetrics in App/MixerView.cs (T020)"
+```
+
+---
+
+## Implementation Strategy
+
+### MVP First (User Story 1 Only)
+
+1. Phase 1 + Phase 2 — the Mixer already lists groups correctly
+2. Phase 3 (US1) — bands
+3. **STOP and VALIDATE** with quickstart 1–3
+
+### Incremental Delivery
+
+1. Setup + Foundational + US1 + US2 → PR 1 "Mixer groups: bands, folding, selection" (closes the grouping half of #386)
+2. US3 → PR 2 "Compact mixer strips" (closes #386)
+3. Or one PR with both, if review prefers — the phases keep the diff readable either way
+
+---
+
+## Notes
+
+- [P] tasks = different files, no dependencies
+- `MixerView.cs` is touched by most tasks: keep them sequential
+- Don't edit `MainWindow.Detail.cs` (branch 071 is changing it)
+- Commit per phase; the user makes the commits
+
+---
+
+## Phase 7: Convergence
+
+- [X] T035 Make `FollowStrips` in `src/managed/Nota.App/MixerView.cs` skip strips hidden by folding, as T014 specifies — or keep syncing them (it is cheap and leaves the right values on unfold) and change T014's wording to match, per T014 / plan R4 (contradicts)
diff --git a/src/managed/Nota.App/ArrangementView.Groups.cs b/src/managed/Nota.App/ArrangementView.Groups.cs
index f48ca91a..3ec9795c 100644
--- a/src/managed/Nota.App/ArrangementView.Groups.cs
+++ b/src/managed/Nota.App/ArrangementView.Groups.cs
@@ -3,30 +3,89 @@
//
// Arrangement · track groups (submix buses). A Group track owns child tracks and its own
// device chain; groups may nest. This file holds the view-side glue: the hierarchical row
-// ordering (DFS over the groupId forest, collapse-filtered), collapse state, the multi-track
+// ordering (DFS over the groupId forest, collapse-filtered; HierarchyOrder gives the same order
+// to the Mixer), the collapse state (a GroupFold shared with the Mixer, specs/070), the multi-track
// selection (grouping + the track commands in ArrangementView.Tracks.cs), and the
// create/ungroup commands.
using System;
using System.Collections.Generic;
using System.Linq;
+using Nota.Application;
using Nota.Application.Editing;
namespace Nota.App;
public sealed partial class ArrangementView
{
- // Collapsed group ids (subtree hidden in the arrangement). View state; persisted per project.
- private readonly HashSet<int> _collapsed = new();
+ // Collapsed group ids (subtree hidden here and in the Mixer). View state, shared with the
+ // Mixer and saved in the track-view sidecar (specs/070). MainWindow hands in the shared one.
+ private GroupFold _fold = new();
+ internal GroupFold Fold
+ {
+ get => _fold;
+ set
+ {
+ if (ReferenceEquals(_fold, value)) return;
+ _fold.Changed -= OnFoldChanged;
+ _fold = value;
+ _fold.Changed += OnFoldChanged;
+ Refresh();
+ }
+ }
+ private void OnFoldChanged() => Refresh();
// Multi-track header selection (Shift/Cmd-click, Cmd+A). The primary SelTrackId is treated
// as part of the set even when this is empty; any other Select() clears it.
private readonly HashSet<int> _selTracks = new();
- internal IReadOnlyCollection<int> CollapsedGroups => _collapsed;
- internal void SetCollapsedGroups(IEnumerable<int> ids) // restored on project load
+ internal IReadOnlyCollection<int> CollapsedGroups => _fold.Folded;
+ internal void SetCollapsedGroups(IEnumerable<int> ids) => _fold.Set(ids); // restored on project load
+
+ /// <summary>One row of <see cref="HierarchyOrder"/>: an engine track index and its place
+ /// in the group forest.</summary>
+ internal readonly record struct HierarchyRow(int Index, int Id, int Depth, int ParentGroupId);
+
+ // The group forest, the one rule both orders use: a track whose GroupId names a group track
+ // is that group's child (children keep engine order); anything else — no group, or a parent
+ // that is missing or not a group — is a root.
+ private static void BuildForest<T>(IReadOnlyList<T> items, Func<T, int> id, Func<T, int> groupId, Func<T, bool> isGroup,
+ out Dictionary<int, List<T>> children, out List<T> roots)
{
- _collapsed.Clear();
- foreach (var id in ids) _collapsed.Add(id);
+ var byId = new Dictionary<int, T>(items.Count);
+ foreach (var t in items) byId[id(t)] = t;
+ children = new Dictionary<int, List<T>>();
+ roots = new List<T>();
+ foreach (var t in items)
+ {
+ int g = groupId(t);
+ if (g >= 0 && byId.TryGetValue(g, out var par) && isGroup(par))
+ {
+ if (!children.TryGetValue(g, out var kids)) children[g] = kids = new();
+ kids.Add(t);
+ }
+ else roots.Add(t);
+ }
+ }
+
+ /// <summary>Every non-return track in the order the arrangement lists its rows — each group
+ /// immediately followed by its children — ignoring collapse. The Mixer lists its strips in
+ /// this order (specs/070).</summary>
+ internal static IReadOnlyList<HierarchyRow> HierarchyOrder(IAudioEngine eng)
+ {
+ var infos = new List<(int Index, NotaTrackInfo Info)>();
+ int n = eng.TrackCount;
+ for (int i = 0; i < n; i++)
+ if (eng.TryGetTrackInfo(i, out var ti) && !ti.IsReturn) infos.Add((i, ti));
+ BuildForest(infos, t => t.Info.Id, t => t.Info.GroupId, t => t.Info.IsGroup, out var children, out var roots);
+ var rows = new List<HierarchyRow>(infos.Count);
+ void Walk((int Index, NotaTrackInfo Info) t, int depth, int parent)
+ {
+ rows.Add(new HierarchyRow(t.Index, t.Info.Id, depth, parent));
+ if (depth < 32 && t.Info.IsGroup && children.TryGetValue(t.Info.Id, out var kids)) // depth-guarded: a malformed chain must not hang
+ foreach (var k in kids) Walk(k, depth + 1, t.Info.Id);
+ }
+ foreach (var r in roots) Walk(r, 0, -1);
+ return rows;
}
/// <summary>Reorders <c>_tracks</c> (currently flat engine order) into hierarchical DFS
@@ -35,27 +94,14 @@ public sealed partial class ArrangementView
private void ApplyHierarchy()
{
if (_tracks.Count == 0) return;
- var byId = new Dictionary<int, TrackVM>(_tracks.Count);
- foreach (var t in _tracks) byId[t.Id] = t;
-
- var children = new Dictionary<int, List<TrackVM>>();
- var roots = new List<TrackVM>();
- foreach (var t in _tracks)
- {
- if (t.GroupId >= 0 && byId.TryGetValue(t.GroupId, out var par) && par.IsGroup)
- {
- if (!children.TryGetValue(t.GroupId, out var kids)) children[t.GroupId] = kids = new();
- kids.Add(t);
- }
- else roots.Add(t); // top-level (or an orphaned parent → treat as root)
- }
+ BuildForest(_tracks, t => t.Id, t => t.GroupId, t => t.IsGroup, out var children, out var roots);
var ordered = new List<TrackVM>(_tracks.Count);
void Walk(TrackVM t, int depth)
{
t.Depth = depth;
ordered.Add(t);
- if (t.IsGroup && !_collapsed.Contains(t.Id) && children.TryGetValue(t.Id, out var kids))
+ if (t.IsGroup && !_fold.IsFolded(t.Id) && children.TryGetValue(t.Id, out var kids))
foreach (var k in kids) Walk(k, depth + 1);
}
foreach (var r in roots) Walk(r, 0);
@@ -93,13 +139,9 @@ public sealed partial class ArrangementView
/// <summary>True if the group subtree is collapsed (children hidden). Used by the lane
/// renderer to pick the stacked-clip vs. span-strip preview.</summary>
- internal bool IsGroupCollapsed(int groupId) => _collapsed.Contains(groupId);
+ internal bool IsGroupCollapsed(int groupId) => _fold.IsFolded(groupId);
- private void ToggleCollapse(int groupId)
- {
- if (!_collapsed.Remove(groupId)) _collapsed.Add(groupId);
- Refresh();
- }
+ private void ToggleCollapse(int groupId) => _fold.Toggle(groupId); // Changed → Refresh
// ---- multi-track selection (Shift/Cmd-click headers, Cmd+A) --------------
private bool IsTrackMultiSelected(int trackId) => _selTracks.Contains(trackId) || trackId == SelTrackId;
@@ -197,8 +239,8 @@ public sealed partial class ArrangementView
private void UngroupGroup(int groupId)
{
if (_engine is null || groupId <= 0) return;
- _collapsed.Remove(groupId);
_engine.Ungroup(groupId);
+ _fold.Remove(groupId); // after the ungroup, so the refresh it triggers sees the new tree
Refresh();
SessionChanged?.Invoke();
TrackSelected?.Invoke(SelTrackId);
diff --git a/src/managed/Nota.App/ArrangementView.Overview.cs b/src/managed/Nota.App/ArrangementView.Overview.cs
index 35f54e2f..e16ce83c 100644
--- a/src/managed/Nota.App/ArrangementView.Overview.cs
+++ b/src/managed/Nota.App/ArrangementView.Overview.cs
@@ -314,14 +314,14 @@ public sealed partial class ArrangementView
// fixed pitch and squeeze together only when the strip can't hold them all.
int lines = 0;
for (int i = 0; i < n; i++)
- if (!_o._tracks[i].IsGroup || _o._collapsed.Contains(_o._tracks[i].Id)) lines++;
+ if (!_o._tracks[i].IsGroup || _o._fold.IsFolded(_o._tracks[i].Id)) lines++;
double rowH = Math.Min(LineStride, (h - 2 * PadY - LineH) / Math.Max(1, lines - 1));
double bandH = Math.Min(LineH, Math.Max(1, rowH - 0.6));
int line = 0;
for (int i = 0; i < n; i++)
{
var t = _o._tracks[i];
- bool collapsedGroup = t.IsGroup && _o._collapsed.Contains(t.Id);
+ bool collapsedGroup = t.IsGroup && _o._fold.IsFolded(t.Id);
if (t.IsGroup && !collapsedGroup) continue;
double y = PadY + line++ * rowH;
if (collapsedGroup)
diff --git a/src/managed/Nota.App/ArrangementView.Sizing.cs b/src/managed/Nota.App/ArrangementView.Sizing.cs
index bf34050d..8c46450e 100644
--- a/src/managed/Nota.App/ArrangementView.Sizing.cs
+++ b/src/managed/Nota.App/ArrangementView.Sizing.cs
@@ -629,6 +629,8 @@ public sealed partial class ArrangementView
[JsonPropertyName("trackHeights")] public List<TrackHeightDto> TrackHeights { get; set; } = new();
// specs/045: return rows ride in trackHeights by index; the master has no index.
[JsonPropertyName("masterHeight")] public double? MasterHeight { get; set; }
+ // specs/070: folded groups by track index, shared with the Mixer. Additive — version stays 1.
+ [JsonPropertyName("collapsedGroups")] public List<int>? CollapsedGroups { get; set; }
}
private sealed class TrackHeightDto
@@ -637,8 +639,8 @@ public sealed partial class ArrangementView
[JsonPropertyName("height")] public double Height { get; set; }
}
- /// <summary>Write the track, return and master heights and the header width into a .nota bundle, keyed by track
- /// index (ids only last a session). Cosmetic — a failure here never fails the save.</summary>
+ /// <summary>Write the track, return and master heights, the header width and the folded groups into a .nota
+ /// bundle, keyed by track index (ids only last a session). Cosmetic — a failure here never fails the save.</summary>
public void SaveTrackView(string bundleDir)
{
var path = System.IO.Path.Combine(bundleDir, TrackViewSidecar);
@@ -651,7 +653,14 @@ public sealed partial class ArrangementView
if (_engine.TryGetTrackInfo(i, out var ti) && _trackHeights.TryGetValue(ti.Id, out var h))
dto.TrackHeights.Add(new TrackHeightDto { Index = i, Height = h });
if (Math.Abs(_masterHeight - DefaultFooterRowHeight) >= 0.5) dto.MasterHeight = _masterHeight;
- if (dto.HeaderWidth is null && dto.TrackHeights.Count == 0 && dto.MasterHeight is null)
+ if (_engine is not null && _fold.Folded.Count > 0)
+ {
+ var folded = new List<int>();
+ for (int i = 0; i < _engine.TrackCount; i++)
+ if (_engine.TryGetTrackInfo(i, out var ti) && ti.IsGroup && _fold.IsFolded(ti.Id)) folded.Add(i);
+ if (folded.Count > 0) dto.CollapsedGroups = folded;
+ }
+ if (dto.HeaderWidth is null && dto.TrackHeights.Count == 0 && dto.MasterHeight is null && dto.CollapsedGroups is null)
{
if (System.IO.File.Exists(path)) System.IO.File.Delete(path);
return;
@@ -677,6 +686,13 @@ public sealed partial class ArrangementView
if (th.Index >= 0 && _engine.TryGetTrackInfo(th.Index, out var ti))
StoreRowHeight(ti.Id, th.Height);
if (dto.MasterHeight is { } mh) _masterHeight = ClampRowHeight(mh);
+ if (dto.CollapsedGroups is { } groups) // an index out of range or not a group is skipped
+ {
+ var ids = new List<int>();
+ foreach (int idx in groups)
+ if (idx >= 0 && _engine.TryGetTrackInfo(idx, out var gi) && gi.IsGroup) ids.Add(gi.Id);
+ _fold.Set(ids);
+ }
}
catch { /* a corrupt sidecar just means the default layout */ }
finally { ApplyHeaderWidth(final: false); }
@@ -686,6 +702,7 @@ public sealed partial class ArrangementView
public void ResetTrackView()
{
_trackHeights.Clear();
+ _fold.Clear();
_masterHeight = DefaultFooterRowHeight;
_clipboardHeights = null;
_userHeaderW = DefaultHeaderW;
diff --git a/src/managed/Nota.App/ArrangementView.cs b/src/managed/Nota.App/ArrangementView.cs
index 8f6a25f0..65e96411 100644
--- a/src/managed/Nota.App/ArrangementView.cs
+++ b/src/managed/Nota.App/ArrangementView.cs
@@ -294,6 +294,9 @@ public sealed partial class ArrangementView : UserControl
public event Action<int, int>? AudioClipActivated;
/// <summary>Raised when a track becomes selected (clip or header click).</summary>
public event Action<int>? TrackSelected;
+ /// <summary>Raised when the track selection is cleared (Escape, a click on empty space), so
+ /// views that mark the selected track — the Mixer's outline (specs/070) — can drop it.</summary>
+ public event Action? SelectionCleared;
/// <summary>Raised when a track header is double-clicked: open its devices (#308).</summary>
public event Action<int>? TrackDevicesRequested;
/// <summary>Live-freeze (v1.1): per-track role for the header badge — 0 none, 1 sleeping
@@ -340,6 +343,7 @@ public sealed partial class ArrangementView : UserControl
public ArrangementView()
{
EditorGrids.Shared.Changed += k => { if (k == EditorKind.Arrangement) Redraw(); };
+ _fold.Changed += OnFoldChanged; // the default fold; MainWindow swaps in the shared one (specs/070)
_ruler = new RulerControl(this) { Height = RulerH };
_overview = new OverviewControl(this);
_sectionsLane = new SectionsControl(this);
@@ -1651,6 +1655,7 @@ public sealed partial class ArrangementView : UserControl
RebuildFooterHeaders(); // returns/master carry the selection highlight too (1e)
Redraw();
if (trackId > 0) TrackSelected?.Invoke(trackId);
+ else if (prev > 0) SelectionCleared?.Invoke();
}
private bool IsGroupTrack(int id)
@@ -2124,7 +2129,7 @@ public sealed partial class ArrangementView : UserControl
{
Background = Brushes.Transparent, Padding = new Thickness(2, 0), Cursor = new Cursor(StandardCursorType.Hand),
VerticalAlignment = VerticalAlignment.Center,
- Child = new Glyph(_collapsed.Contains(t.Id) ? GlyphKind.ChevronRight : GlyphKind.ChevronDown, 8) { Foreground = Brush("Brush.TextSecondary") },
+ Child = new Glyph(_fold.IsFolded(t.Id) ? GlyphKind.ChevronRight : GlyphKind.ChevronDown, 8) { Foreground = Brush("Brush.TextSecondary") },
};
tri.PointerPressed += (_, e) => { e.Handled = true; ToggleCollapse(t.Id); };
@@ -2216,7 +2221,7 @@ public sealed partial class ArrangementView : UserControl
{
Background = Brushes.Transparent, Padding = new Thickness(2, 0), Margin = new Thickness(0, 0, 4, 0),
Cursor = new Cursor(StandardCursorType.Hand), VerticalAlignment = VerticalAlignment.Center,
- Child = new Glyph(_collapsed.Contains(t.Id) ? GlyphKind.ChevronRight : GlyphKind.ChevronDown, 8) { Foreground = Brush("Brush.TextSecondary") },
+ Child = new Glyph(_fold.IsFolded(t.Id) ? GlyphKind.ChevronRight : GlyphKind.ChevronDown, 8) { Foreground = Brush("Brush.TextSecondary") },
};
tri.PointerPressed += (_, e) => { e.Handled = true; ToggleCollapse(t.Id); };
Grid.SetColumn(tri, 0);
diff --git a/src/managed/Nota.App/Controls/GroupBandsLayer.cs b/src/managed/Nota.App/Controls/GroupBandsLayer.cs
new file mode 100644
index 00000000..d938cb78
--- /dev/null
+++ b/src/managed/Nota.App/Controls/GroupBandsLayer.cs
@@ -0,0 +1,98 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
+//
+// The Mixer's group bands (specs/070): drawn behind the flat strip row so the strips stay one
+// row (height fitting, meters and sync untouched). Per group, one bar row per nesting level
+// with the group's name in its colour, and a faint tint of that colour behind the group's
+// strips; a folded group's bar adds the hidden count. Bands follow the strips' laid-out
+// bounds, so the layer repaints on layout and never rebuilds anything.
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Input;
+using Avalonia.Media;
+using Avalonia.Rendering;
+
+namespace Nota.App;
+
+internal sealed class GroupBandsLayer : Control, ICustomHitTest
+{
+ /// <summary>One bar row per nesting level.</summary>
+ public const double BarH = 14;
+
+ /// <summary>One group's band: its strip through the last visible strip of its subtree.</summary>
+ public readonly record struct Band(string Name, int ColorIndex, int Depth, Control First, Control Last, int Hidden);
+
+ private IReadOnlyList<Band> _bands = Array.Empty<Band>();
+ private readonly List<(Rect Bar, string Name)> _bars = new(); // hit areas, from the last render
+
+ /// <summary>Where the first bar row starts, in this layer (the strip row's top margin).</summary>
+ public double Top { get; set; } = 10;
+
+ public GroupBandsLayer()
+ {
+ ClipToBounds = true;
+ PointerMoved += (_, e) =>
+ {
+ var p = e.GetPosition(this);
+ string? tip = null;
+ foreach (var (bar, name) in _bars) if (bar.Contains(p)) tip = name; // the innermost wins: drawn last
+ if (!Equals(ToolTip.GetTip(this), tip)) ToolTip.SetTip(this, tip);
+ };
+ }
+
+ public void SetBands(IReadOnlyList<Band> bands) { _bands = bands; InvalidateVisual(); }
+
+ // Only the bars take the pointer (for the name tooltip); the tint lets clicks through to nothing
+ // — the strips sit above it anyway.
+ public bool HitTest(Point point)
+ {
+ foreach (var (bar, _) in _bars) if (bar.Contains(point)) return true;
+ return false;
+ }
+
+ public override void Render(DrawingContext ctx)
+ {
+ _bars.Clear();
+ foreach (var b in _bands)
+ {
+ if (!b.First.IsVisible || !b.Last.IsVisible) continue;
+ if (b.First.TranslatePoint(default, this) is not { } p0 || b.Last.TranslatePoint(default, this) is not { } p1) continue;
+ double x0 = p0.X, x1 = p1.X + b.Last.Bounds.Width;
+ double y = Top + b.Depth * BarH;
+ double bottom = p0.Y + b.First.Bounds.Height;
+ if (x1 <= x0 || bottom <= y) continue;
+ var hue = ArrangementView.TrackBrush(b.ColorIndex);
+
+ // Tint behind the strips, then the bar on top of it.
+ ctx.DrawRectangle(NotaPalette.Wash(hue, 0x12), null, new RoundedRect(new Rect(x0, y, x1 - x0, bottom - y),
+ new CornerRadius(NotaRadius.ClipValue, NotaRadius.ClipValue, 0, 0)));
+ var bar = new Rect(x0, y, x1 - x0, BarH - 2);
+ ctx.DrawRectangle(NotaPalette.Wash(hue, 0x52), null, new RoundedRect(bar, NotaRadius.ClipValue));
+ _bars.Add((bar, b.Name));
+
+ double maxW = bar.Width - 10;
+ if (maxW <= 4) continue;
+ var count = b.Hidden > 0
+ ? new FormattedText("+" + b.Hidden.ToString(CultureInfo.CurrentCulture), CultureInfo.CurrentCulture,
+ FlowDirection.LeftToRight, NotaFonts.Mono, 9, NotaPalette.TextSecondary)
+ : null;
+ double countW = count is null ? 0 : count.Width + 4;
+ var name = new FormattedText(b.Name, CultureInfo.CurrentCulture, FlowDirection.LeftToRight,
+ NotaFonts.SansSemiBold, 9, NotaPalette.TextPrimary)
+ {
+ MaxTextWidth = Math.Max(1, maxW - countW), MaxLineCount = 1, Trimming = TextTrimming.CharacterEllipsis,
+ };
+ double ty = bar.Y + (bar.Height - name.Height) / 2;
+ using (ctx.PushClip(bar))
+ {
+ ctx.DrawText(name, new Point(bar.X + 5, ty));
+ if (count is not null)
+ ctx.DrawText(count, new Point(bar.X + 5 + Math.Min(name.WidthIncludingTrailingWhitespace, maxW - countW) + 4, bar.Y + (bar.Height - count.Height) / 2));
+ }
+ }
+ }
+}
diff --git a/src/managed/Nota.App/Controls/MeterFader.cs b/src/managed/Nota.App/Controls/MeterFader.cs
new file mode 100644
index 00000000..caa5ff07
--- /dev/null
+++ b/src/managed/Nota.App/Controls/MeterFader.cs
@@ -0,0 +1,162 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
+//
+// The compact Mixer strip's level control (specs/070, #386): a wide stereo meter that is also
+// the volume fader. Two 18 px channels — wider than the 11 px meter rule, an accepted
+// exception (DESIGN.md) because the wide meter is what makes a 72 px strip readable — with a
+// small triangle on the right edge at the volume's dB *on the meter's own scale*, so 0 dB on
+// the handle lines up with 0 dB on the meter, and a hairline across the channels at that
+// height. The whole control is the drag target (relative, like VFader: a click never jumps the
+// value); a click without a drag clears the peak hold, as on MeterBar. Value is VFader's
+// 0..1.5 linear, so the strip wires it exactly like the regular fader.
+
+using System;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Input;
+using Avalonia.Media;
+using Nota.Application;
+using Nota.Application.Localization;
+
+namespace Nota.App;
+
+internal sealed class MeterFader : Control
+{
+ public const double Max = 1.5;
+ private const double ScaleW = 14, ChannelW = 18, ChannelGap = 3, GutterW = 11, HandleW = 9, HandleH = 10;
+ /// <summary>The control's natural width: scale · two channels · handle gutter.</summary>
+ public const double NaturalWidth = ScaleW + 1 + ChannelW * 2 + ChannelGap + GutterW;
+ private static readonly double[] Marks = { 6, 0, -12, -48 };
+ private static readonly string[] MarkText = { "+6", "0", "−12", "−48" };
+
+ private double _value;
+ private double _levelL, _levelR, _holdL, _holdR;
+ private bool _drag, _moved, _hover;
+ private double _startY, _startDb;
+
+ public event Action<double>? ValueChanged;
+ public event Action? GestureBegin; // automation write + undo step
+ public event Action? GestureEnd;
+ public bool Dragging => _drag;
+ public double Value => _value;
+
+ public MeterFader(double value)
+ {
+ _value = Math.Clamp(value, 0, Max);
+ Width = NaturalWidth;
+ MinHeight = 40;
+ Cursor = new Cursor(StandardCursorType.SizeNorthSouth);
+ ToolTip.SetTip(this, Loc.T("Drag to set the volume · click to clear the peak hold"));
+ }
+
+ /// <summary>Sets the value without raising ValueChanged (external sync, the dB field).</summary>
+ public void SetValueExternal(double v) { _value = Math.Clamp(v, 0, Max); InvalidateVisual(); }
+
+ /// <summary>The fader as a typeable value, as <see cref="VFader.EntryField"/>.</summary>
+ internal ValueField EntryField(string name, Func<double, string> fmt, double? def)
+ => new(name, () => _value / Max, n => fmt(n * Max), n => Set(n * Max),
+ () => GestureBegin?.Invoke(), () => GestureEnd?.Invoke(), def is { } d ? Math.Clamp(d, 0, Max) / Max : null);
+
+ /// <summary>Feed a fresh reading; repaints only when something moved (#55).</summary>
+ public void Push(NotaMeter m)
+ {
+ double l = MeterScale.Norm(m.PeakL), r = MeterScale.Norm(m.PeakR);
+ double hl = Math.Max(_holdL, l), hr = Math.Max(_holdR, r);
+ if (l == _levelL && r == _levelR && hl == _holdL && hr == _holdR) return;
+ _levelL = l; _levelR = r; _holdL = hl; _holdR = hr;
+ InvalidateVisual();
+ }
+
+ public void Reset() { _levelL = _levelR = _holdL = _holdR = 0; InvalidateVisual(); }
+
+ private void Set(double v)
+ {
+ v = Math.Clamp(v, 0, Max);
+ if (Math.Abs(v - _value) < 1e-9) return;
+ _value = v; InvalidateVisual(); ValueChanged?.Invoke(v);
+ }
+
+ // The volume in dB on the meter's scale (−60…+6); silence sits at the floor.
+ private static double ToDb(double v) => v <= 1e-4 ? MeterScale.FloorDb : Math.Max(MeterScale.FloorDb, AudioMath.LinToDb(v));
+ private static double FromDb(double db) => db <= MeterScale.FloorDb + 1e-6 ? 0 : Math.Min(Max, AudioMath.DbToLin(db));
+
+ protected override void OnPointerEntered(PointerEventArgs e) { base.OnPointerEntered(e); _hover = true; InvalidateVisual(); }
+ protected override void OnPointerExited(PointerEventArgs e) { base.OnPointerExited(e); _hover = false; InvalidateVisual(); }
+
+ protected override void OnPointerPressed(PointerPressedEventArgs e)
+ {
+ if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return; // right-click bubbles to MIDI Learn
+ _drag = true; _moved = false;
+ _startY = e.GetPosition(this).Y; _startDb = ToDb(_value);
+ e.Pointer.Capture(this); e.Handled = true;
+ }
+
+ protected override void OnPointerMoved(PointerEventArgs e)
+ {
+ if (!_drag) return;
+ double h = Bounds.Height; if (h <= 0) return;
+ double dy = _startY - e.GetPosition(this).Y;
+ if (!_moved)
+ {
+ if (Math.Abs(dy) < 2) return; // below this it is still a click
+ _moved = true; GestureBegin?.Invoke();
+ }
+ bool fine = (e.KeyModifiers & (KeyModifiers.Shift | KeyModifiers.Control | KeyModifiers.Meta)) != 0;
+ double span = MeterScale.CeilDb - MeterScale.FloorDb;
+ Set(FromDb(Math.Clamp(_startDb + dy / h * span / (fine ? 10 : 1), MeterScale.FloorDb, MeterScale.CeilDb)));
+ }
+
+ protected override void OnPointerReleased(PointerReleasedEventArgs e)
+ {
+ if (!_drag) return;
+ _drag = false; e.Pointer.Capture(null);
+ if (_moved) GestureEnd?.Invoke();
+ else { _holdL = _levelL; _holdR = _levelR; } // a click clears the peak hold
+ InvalidateVisual();
+ }
+
+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)
+ {
+ if (_drag) { _drag = false; if (_moved) GestureEnd?.Invoke(); InvalidateVisual(); }
+ base.OnPointerCaptureLost(e);
+ }
+
+ public override void Render(DrawingContext ctx)
+ {
+ double w = Bounds.Width, h = Bounds.Height;
+ if (w <= 0 || h <= 0) return;
+ // Centre the natural layout if the host is wider.
+ double x = Math.Max(0, (w - NaturalWidth) / 2);
+
+ for (int i = 0; i < Marks.Length; i++)
+ {
+ var t = new FormattedText(MarkText[i], System.Globalization.CultureInfo.CurrentCulture, FlowDirection.LeftToRight,
+ NotaFonts.Mono, 7, NotaPalette.TextDisabled);
+ double y = (1 - MeterScale.NormDb(Marks[i])) * h - t.Height / 2;
+ ctx.DrawText(t, new Point(x + ScaleW - 1 - t.Width, Math.Clamp(y, 0, h - t.Height)));
+ }
+
+ double cx = x + ScaleW + 1;
+ MeterScale.DrawChannel(ctx, new Rect(cx, 0, ChannelW, h), _levelL, _holdL, false);
+ MeterScale.DrawChannel(ctx, new Rect(cx + ChannelW + ChannelGap, 0, ChannelW, h), _levelR, _holdR, false);
+
+ // The volume: a hairline across the channels and the triangle in the gutter — neutral
+ // at rest, the accent only while hovered or dragged.
+ bool live = _drag || _hover;
+ var ink = live ? NotaPalette.Accent : NotaPalette.VizInk;
+ double hy = Math.Round((1 - MeterScale.NormDb(ToDb(_value))) * h);
+ double chW = ChannelW * 2 + ChannelGap;
+ ctx.FillRectangle(NotaPalette.Wash(ink, 0x8C), new Rect(cx, Math.Clamp(hy, 0, h - 1), chW, 1));
+ double gx = cx + chW + 2;
+ double ty = Math.Clamp(hy, HandleH / 2, h - HandleH / 2);
+ var tri = new StreamGeometry();
+ using (var g = tri.Open())
+ {
+ g.BeginFigure(new Point(gx, ty), true);
+ g.LineTo(new Point(gx + HandleW, ty - HandleH / 2));
+ g.LineTo(new Point(gx + HandleW, ty + HandleH / 2));
+ g.EndFigure(true);
+ }
+ ctx.DrawGeometry(ink, null, tri);
+ }
+}
diff --git a/src/managed/Nota.App/GroupFold.cs b/src/managed/Nota.App/GroupFold.cs
new file mode 100644
index 00000000..46748471
--- /dev/null
+++ b/src/managed/Nota.App/GroupFold.cs
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
+//
+// Which groups are folded (collapsed). One state for the Arrangement and the Mixer
+// (specs/070): folding a group in either view folds it in both. It is view state — never in
+// the engine or undo — and is saved with the project in the track-view sidecar.
+
+using System;
+using System.Collections.Generic;
+
+namespace Nota.App;
+
+internal sealed class GroupFold
+{
+ private readonly HashSet<int> _folded = new();
+
+ /// <summary>Raised once per call that changed the set.</summary>
+ public event Action? Changed;
+
+ public IReadOnlyCollection<int> Folded => _folded;
+
+ public bool IsFolded(int groupId) => _folded.Contains(groupId);
+
+ public void Toggle(int groupId)
+ {
+ if (!_folded.Remove(groupId)) _folded.Add(groupId);
+ Changed?.Invoke();
+ }
+
+ public void Remove(int groupId)
+ {
+ if (_folded.Remove(groupId)) Changed?.Invoke();
+ }
+
+ public void Set(IEnumerable<int> groupIds)
+ {
+ var next = new HashSet<int>(groupIds);
+ if (next.SetEquals(_folded)) return;
+ _folded.Clear();
+ _folded.UnionWith(next);
+ Changed?.Invoke();
+ }
+
+ public void Clear()
+ {
+ if (_folded.Count == 0) return;
+ _folded.Clear();
+ Changed?.Invoke();
+ }
+}
diff --git a/src/managed/Nota.App/Languages/fr.json b/src/managed/Nota.App/Languages/fr.json
index d3ad22db..c293c2fd 100644
--- a/src/managed/Nota.App/Languages/fr.json
+++ b/src/managed/Nota.App/Languages/fr.json
@@ -1363,6 +1363,13 @@
"Pan moves the whole image of stereo tracks and returns": "Le pan déplace toute l’image des pistes stéréo et des retours",
"Pan attenuates the opposite channel, as in earlier versions": "Le pan atténue le canal opposé, comme dans les versions précédentes",
"Send {0}": "Envoi {0}",
+ "A hidden track is soloed": "Une piste masquée est en solo",
+ "A hidden track is armed": "Une piste masquée est armée",
+ "A hidden track clipped · click to clear": "Une piste masquée a saturé · cliquer pour effacer",
+ "Fold group {0}": "Replier le groupe {0}",
+ "Unfold group {0}": "Déplier le groupe {0}",
+ "Show compact strips: more tracks on screen": "Afficher des tranches compactes : plus de pistes à l’écran",
+ "Drag to set the volume · click to clear the peak hold": "Glisser pour régler le volume · cliquer pour effacer le maintien de crête",
"Track Pan": "Pan de la piste",
"Groups keep a unity-centre balance so grouping stays level-transparent": "Les groupes gardent une balance centrée à gain unitaire, pour que le groupage reste transparent en niveau",
"Set the gain — drag, or double-click to type": "Régler le gain : glisser, ou double-clic pour le saisir",
diff --git a/src/managed/Nota.App/MainWindow.Mixer.cs b/src/managed/Nota.App/MainWindow.Mixer.cs
index ee3a93e7..91cb60cc 100644
--- a/src/managed/Nota.App/MainWindow.Mixer.cs
+++ b/src/managed/Nota.App/MainWindow.Mixer.cs
@@ -7,7 +7,7 @@
// rebuilt), so meters, scroll and the Stereo Map carry over. View → Mixer / ⌘⇧M shows or hides
// it in the remembered placement; the panel's pop-out button, the window's dock button and
// View → Mixer in its own window switch placement. Shown / placement / docked height are
-// per-user settings, restored on launch.
+// per-user settings, restored on launch. Groups, selection and compact strips: specs/070.
using System;
using Avalonia.Controls;
@@ -37,6 +37,26 @@ public partial class MainWindow
private double MixerPanelMin => MixerPanelChrome + (_mixer?.MinContentHeight ?? 0);
private double MixerPanelNatural => MixerPanelChrome + (_mixer?.NaturalContentHeight ?? 0);
+ // specs/070: one fold state for the Arrangement and the Mixer, the Mixer follows the selected
+ // track (wired here, beside the rest of the Mixer), and its compact layout is a user setting.
+ private void WireMixerGroups()
+ {
+ if (_mixer is null) return;
+ var fold = new GroupFold();
+ Timeline.Fold = fold;
+ _mixer.Fold = fold;
+ _mixer.Compact = MixerSettings.Current.MixerCompact;
+ _mixer.CompactChanged += compact =>
+ {
+ var settings = MixerSettings;
+ settings.Current.MixerCompact = compact;
+ settings.Save();
+ };
+ Timeline.TrackSelected += id => _mixer?.FollowSelection(id);
+ Timeline.SelectionCleared += () => _mixer?.FollowSelection(-1);
+ if (_modular is not null) _modular.TrackActivated += id => _mixer?.FollowSelection(id);
+ }
+
private void OnMenuMixer(object? sender, EventArgs e) => ToggleMixer();
/// <summary>Show the Mixer in its remembered placement, or hide it (⌘⇧M / View → Mixer).</summary>
diff --git a/src/managed/Nota.App/MainWindow.axaml.cs b/src/managed/Nota.App/MainWindow.axaml.cs
index 76aa4edf..344a273a 100644
--- a/src/managed/Nota.App/MainWindow.axaml.cs
+++ b/src/managed/Nota.App/MainWindow.axaml.cs
@@ -500,6 +500,7 @@ public partial class MainWindow : Window
_modular.TrackActivated += OnTrackSelected; // Global-view island → select that track
_modular.ItemDropped += OnModularDrop; // browser drag onto the modular canvas
MainContent.Children.Add(_modular);
+ WireMixerGroups(); // fold state, selection and compact strips (specs/070)
vm.AutosaveRequested += OnAutosaveTick;
vm.VersionHistoryTurnedOff += OnVersionHistoryTurnedOff;
diff --git a/src/managed/Nota.App/MixerView.Compact.cs b/src/managed/Nota.App/MixerView.Compact.cs
new file mode 100644
index 00000000..e34821fb
--- /dev/null
+++ b/src/managed/Nota.App/MixerView.Compact.cs
@@ -0,0 +1,214 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
+//
+// Compact Mixer strips (specs/070, #386): the same strip at 72 px so far more tracks fit on a
+// screen. Name; I/O on one line; A/B sends as thin full-width bars; the arrangement's PanBar;
+// a wide meter that is also the fader (MeterFader); the dB number; M, S and Arm full width.
+// Every control rides the same engine calls, undo gestures, automation writes, MIDI-learn
+// targets and StripSync as the regular strip, so the two layouts behave the same. Returns and
+// the master keep empty send / pan slots so every meter starts at the same height.
+
+using System;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Layout;
+using Avalonia.Media;
+using Nota.Application;
+using Nota.Application.Editing;
+using Nota.Application.Localization;
+
+namespace Nota.App;
+
+public sealed partial class MixerView
+{
+ private const double CompactInset = 4;
+
+ private Border CompactStrip(NotaTrackInfo ti, IBrush color, int returns, StripEntry entry)
+ {
+ int id = ti.Id;
+ bool isReturn = ti.IsReturn;
+ var col = new StackPanel();
+ col.Children.Add(Header(TrackNames.Of(_engine, ti), color, Card, ti.IsGroup ? entry : null));
+
+ Control io;
+ if (ti.IsInstrument) io = MidiIoRow(id, compact: true);
+ else
+ {
+ string from = isReturn ? Loc.T("Return in") : ti.IsGroup ? Loc.T("Group in") : Loc.T("In 1");
+ string to = isReturn ? Loc.T("→ Master")
+ : ti.IsGroup ? "→ " + (ti.GroupId >= 0 ? TrackNames.Of(_engine, ti.GroupId) : Loc.T("Master"))
+ : Loc.T("Monitor in");
+ io = CompactIoRow(from + " " + to);
+ }
+ io.IsVisible = IoShown;
+ _ioSections.Add(io);
+ col.Children.Add(io);
+
+ var sends = isReturn ? EmptySlot(SendsH, top: false) : CompactSendsRow(id, returns);
+ sends.IsVisible = SendsShown;
+ _sendSections.Add(sends);
+ col.Children.Add(sends);
+
+ col.Children.Add(CompactPanRow(id, ti.Pan, ti.IsGroup));
+ col.Children.Add(CompactLevel(id, ti.Volume, out var db));
+ col.Children.Add(db);
+ col.Children.Add(CompactButtons(id, ti, isReturn));
+
+ return new Border
+ {
+ Width = CompactMetrics.Width, Background = Card, BorderBrush = BorderDef, BorderThickness = new Thickness(1),
+ CornerRadius = NotaRadius.Panel, ClipToBounds = true, Child = col,
+ };
+ }
+
+ private Border CompactMasterStrip()
+ {
+ var col = new StackPanel();
+ col.Children.Add(Header(Loc.T("Master"), NotaPalette.Master, MasterBg));
+ var io = CompactIoRow(Loc.T("Sum bus") + " " + Loc.T("→ Output"));
+ io.IsVisible = IoShown;
+ _ioSections.Add(io);
+ col.Children.Add(io);
+ var sends = EmptySlot(SendsH, top: false);
+ sends.IsVisible = SendsShown;
+ _sendSections.Add(sends);
+ col.Children.Add(sends);
+ col.Children.Add(EmptySlot(PanH, top: false));
+ col.Children.Add(CompactLevel(-1, GetMasterVolume?.Invoke() ?? 1f, out var db));
+ col.Children.Add(db);
+ col.Children.Add(EmptySlot(ButtonsH, top: true)); // the master has no M / S / Arm
+ return new Border
+ {
+ Width = CompactMetrics.Width, Background = MasterBg, BorderBrush = BorderDef, BorderThickness = new Thickness(1),
+ CornerRadius = NotaRadius.Panel, ClipToBounds = true, Child = col,
+ };
+ }
+
+ private Border EmptySlot(double height, bool top) => new()
+ {
+ Height = height, BorderBrush = BorderInner, BorderThickness = top ? new Thickness(0, 1, 0, 0) : new Thickness(0, 0, 0, 1),
+ };
+
+ // I/O on one line; the full routing in the tooltip.
+ private Border CompactIoRow(string text)
+ {
+ var t = new TextBlock { Text = text, FontSize = 8, Foreground = TextTertiary, VerticalAlignment = VerticalAlignment.Center, TextTrimming = TextTrimming.CharacterEllipsis };
+ var b = new Border { Height = IoH, BorderBrush = BorderInner, BorderThickness = new Thickness(0, 0, 0, 1), Padding = new Thickness(CompactInset, 0), Child = t };
+ ToolTip.SetTip(b, text);
+ return b;
+ }
+
+ // A and B as thin full-width bars with their letter — the regular strip's MiniFaders.
+ private Border CompactSendsRow(int id, int returns)
+ {
+ var body = new StackPanel { Spacing = 3, VerticalAlignment = VerticalAlignment.Center };
+ for (int bus = 0; bus < 2; bus++)
+ {
+ char letter = (char)('A' + bus);
+ var grid = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*") };
+ grid.Children.Add(new TextBlock { Text = letter.ToString(), FontSize = 7, Foreground = TextTertiary, Width = 8, VerticalAlignment = VerticalAlignment.Center });
+ Control bar;
+ if (bus < returns)
+ {
+ var f = new MiniFader(_engine.GetTrackSend(id, bus), 1.0) { VerticalAlignment = VerticalAlignment.Center };
+ int b = bus;
+ f.ValueChanged += v => _engine.SetTrackSend(id, b, (float)v);
+ ValueEntry.Attach(f, f.EntryField(Loc.F("Send {0}", (char)('A' + b)), NotaNum.Pct));
+ _sendFaders.Add((id, b, f));
+ bar = f;
+ }
+ else bar = new Border { Height = 3, Background = NotaPalette.TrackOff, CornerRadius = NotaRadius.Clip, VerticalAlignment = VerticalAlignment.Center };
+ Grid.SetColumn(bar, 1);
+ grid.Children.Add(bar);
+ body.Children.Add(grid);
+ }
+ return new Border { Height = SendsH, BorderBrush = BorderInner, BorderThickness = new Thickness(0, 0, 0, 1), Padding = new Thickness(CompactInset, 3), Child = body };
+ }
+
+ // The arrangement's PanBar, full width; a group keeps its BAL tag beside it (specs/006).
+ private Border CompactPanRow(int id, float pan, bool isGroup)
+ {
+ var bar = new PanBar(pan) { VerticalAlignment = VerticalAlignment.Center };
+ if (id > 0) SyncOf(id).PanBar = bar;
+ var undo = new MixGesture(_engine, MixTarget.Pan(id));
+ bar.GestureBegin += undo.Begin;
+ Action<double> setPan = p => _engine.SetTrackPan(id, (float)p);
+ bar.PanChanged += p => undo.Change(p, setPan);
+ if (id > 0)
+ {
+ bar.GestureBegin += () => _engine.BeginAutomationWrite(id, AutomationTarget.Pan, -1, -1, "");
+ bar.GestureEnd += () => _engine.EndAutomationWrite(id, AutomationTarget.Pan, -1, -1, "");
+ MidiLearn.Bind(bar, MidiTarget.TrackPan(id), "Track Pan");
+ }
+ bar.GestureEnd += undo.End;
+ ValueEntry.Attach(bar, bar.EntryField(Loc.T("Pan")));
+
+ var row = new DockPanel { VerticalAlignment = VerticalAlignment.Center, LastChildFill = true };
+ if (isGroup)
+ {
+ var bal = Tag("BAL", 7, 0.84, 11, Loc.T("Groups keep a unity-centre balance so grouping stays level-transparent"));
+ bal.IsVisible = _engine.PanLaw == PanLaw.Stereo;
+ bal.Margin = new Thickness(3, 0, 0, 0);
+ _balBadges.Add(bal);
+ DockPanel.SetDock(bal, Dock.Right);
+ row.Children.Add(bal);
+ }
+ row.Children.Add(bar);
+ return new Border { Height = PanH, BorderBrush = BorderInner, BorderThickness = new Thickness(0, 0, 0, 1), Padding = new Thickness(CompactInset, 0), Child = row };
+ }
+
+ // The wide meter that is the fader, then the dB number — wired like FaderRow.
+ private Control CompactLevel(int id, float vol, out Control db)
+ {
+ var fader = new MeterFader(vol) { HorizontalAlignment = HorizontalAlignment.Center };
+ var dbNum = new DragNumber(LinToDb(vol), MinDb, MaxDb, 0.3, "+0.0;−0.0;0.0", 8) { Width = 52, HorizontalAlignment = HorizontalAlignment.Center };
+ ToolTip.SetTip(dbNum, Loc.T("Set the gain — drag, or double-click to type"));
+ void SetVolume(double v) { if (id < 0) SetMasterVolume?.Invoke((float)v); else _engine.SetTrackVolume(id, (float)v); }
+ if (id < 0) { _masterMeterFader = fader; _masterDb = dbNum; }
+ else { var sync = SyncOf(id); sync.MeterFader = fader; sync.Db = dbNum; }
+ var undo = new MixGesture(_engine, id < 0 ? MixTarget.Master : MixTarget.Volume(id));
+ fader.GestureBegin += undo.Begin;
+ dbNum.GestureBegin += undo.Begin;
+ Action<double> setVol = SetVolume;
+ fader.ValueChanged += v => { undo.Change(v, setVol); dbNum.Value = LinToDb(v); };
+ dbNum.ValueChanged += d => { double v = DbToLin(d); undo.Change(v, setVol); fader.SetValueExternal(v); };
+ if (id > 0)
+ {
+ fader.GestureBegin += () => _engine.BeginAutomationWrite(id, AutomationTarget.Volume, -1, -1, "");
+ fader.GestureEnd += () => _engine.EndAutomationWrite(id, AutomationTarget.Volume, -1, -1, "");
+ }
+ fader.GestureEnd += undo.End;
+ dbNum.GestureEnd += undo.End;
+ MidiLearn.Bind(fader, id > 0 ? MidiTarget.TrackVolume(id) : MidiTarget.MasterVolume, id > 0 ? "Track Volume" : "Master Volume");
+ ValueEntry.Attach(fader, fader.EntryField(Loc.T("Volume"), v => NotaNum.GainDb(v, signed: true), 1.0));
+ _meters.Add((id, fader, fader.Push));
+ db = dbNum;
+
+ var host = new Border { Height = _faderH, Margin = new Thickness(CompactInset, 4), Child = fader };
+ _faderGrids.Add(host);
+ return host;
+ }
+
+ // M, S and Arm stacked at full width.
+ private Border CompactButtons(int id, NotaTrackInfo ti, bool isReturn)
+ {
+ var stack = new StackPanel { Spacing = 2, Margin = new Thickness(CompactInset) };
+ var sync = SyncOf(id);
+ var mute = Toggle("M", false, ti.Muted != 0, v => _engine.SetTrackMute(id, v), out sync.Mute);
+ var solo = Toggle("S", false, ti.Soloed != 0, v => _engine.SetTrackSolo(id, v), out sync.Solo);
+ MidiLearn.Bind(mute, MidiTarget.TrackMute(id), "Mute");
+ MidiLearn.Bind(solo, MidiTarget.TrackSolo(id), "Solo");
+ stack.Children.Add(Wide(mute));
+ stack.Children.Add(Wide(solo));
+ if (!isReturn) stack.Children.Add(Wide(ArmToggle(ti.Armed != 0, (v, additive) => TrackArming.Set(_engine, id, v, additive), out sync.Arm)));
+ return new Border { Height = ButtonsH, BorderBrush = BorderInner, BorderThickness = new Thickness(0, 1, 0, 0), Child = stack };
+ }
+
+ private static Border Wide(Border key)
+ {
+ key.Width = double.NaN;
+ key.Height = 18;
+ key.HorizontalAlignment = HorizontalAlignment.Stretch;
+ return key;
+ }
+}
diff --git a/src/managed/Nota.App/MixerView.cs b/src/managed/Nota.App/MixerView.cs
index 374cf46d..1f33a8ad 100644
--- a/src/managed/Nota.App/MixerView.cs
+++ b/src/managed/Nota.App/MixerView.cs
@@ -8,6 +8,12 @@
// docked under the main view or in the Mixer window (specs/054). Strips fit the height
// they get (I/O, then sends hide, then the fader shortens). Crossfader is M7+. The footer
// also shows and switches the project pan law (specs/006).
+//
+// Groups (specs/070): strips follow the Arrangement's hierarchy — a group strip, then its
+// members — under a named, tinted band per group (GroupBandsLayer). A group folds from the
+// triangle on its strip; the fold state is the Arrangement's (GroupFold), so folding hides the
+// subtree in both views, and only toggles visibility here. The Mixer follows the selected
+// track with an outline. Compact strips (MixerView.Compact.cs) are the same strips at 72 px.
using System;
using System.Collections.Generic;
@@ -27,7 +33,7 @@ namespace Nota.App;
/// <summary>The Mixer window's two views (specs/008).</summary>
public enum MixerViewMode { Strips, StereoMap }
-public sealed class MixerView : UserControl
+public sealed partial class MixerView : UserControl
{
private static readonly IBrush Card = NotaPalette.SurfaceCard;
private static readonly IBrush MasterBg = NotaPalette.SurfaceCard; // every strip is the panel tone
@@ -45,7 +51,9 @@ public sealed class MixerView : UserControl
private readonly IAudioEngine _engine;
private readonly StackPanel _row = new() { Orientation = Orientation.Horizontal, Spacing = 2, Margin = new Thickness(10) };
- private readonly List<(int trackId, MeterBar meter)> _meters = new();
+ private readonly GroupBandsLayer _bands = new();
+ // Meters fed each UI tick: the control (to skip hidden strips) and its Push.
+ private readonly List<(int trackId, Control ctl, Action<NotaMeter> push)> _meters = new();
private readonly List<(int trackId, int bus, MiniFader fader)> _sendFaders = new();
// Sends / I/O sections are collapsible across every strip (mockup 1f header
// toggles); we keep the section borders so a toggle can hide them all at once.
@@ -57,12 +65,25 @@ public sealed class MixerView : UserControl
// window. As it shrinks, I/O rows hide first, then sends, then the fader shortens to
// FaderMin; below that the host can't get smaller (MinContentHeight). A footer toggle can
// pin an auto-hidden section back on — the strip row then scrolls vertically.
- private const double FaderMax = 190, FaderMin = 72;
- private const double FaderComfort = 120; // a section hides only if the fader would get shorter
- private const double HeaderH = 24, IoH = 34, SendsH = 42, PanH = 38, ButtonsH = 28;
- private const double FaderPad = 16, RowPad = 20, StripBorder = 2, FooterH = 44;
+ // Section heights per layout (specs/070): the height fitting is the same for both.
+ private sealed record StripMetrics(double Width, double Header, double Io, double Sends, double Pan,
+ double FaderMin, double FaderComfort, double FaderMax, double FaderPad, double Buttons);
+ private static readonly StripMetrics Regular = new(154, 24, 34, 42, 38, 72, 120, 190, 16, 28);
+ private static readonly StripMetrics CompactMetrics = new(72, 24, 18, 24, 22, 72, 120, 220, 8, 66);
+ private StripMetrics M => _compact ? CompactMetrics : Regular;
+ private double FaderMax => M.FaderMax;
+ private double FaderMin => M.FaderMin;
+ private double FaderComfort => M.FaderComfort; // a section hides only if the fader would get shorter
+ private double HeaderH => M.Header;
+ private double IoH => M.Io;
+ private double SendsH => M.Sends;
+ private double PanH => M.Pan;
+ private double ButtonsH => M.Buttons;
+ private double FaderPad => M.FaderPad;
+ private const double RowPad = 20, StripBorder = 2, FooterH = 44;
+ private bool _compact;
private readonly List<Control> _faderGrids = new();
- private double _faderH = FaderMax;
+ private double _faderH = Regular.FaderMax;
private double _dbH = 18; // the dB read-out's height, measured once built
private bool _ioAuto, _sendsAuto; // hidden for lack of height
private bool _ioPinned, _sendsPinned; // shown anyway by the user
@@ -74,8 +95,10 @@ public sealed class MixerView : UserControl
private sealed class StripSync
{
public VFader? Fader;
+ public MeterFader? MeterFader; // compact strips
public DragNumber? Db;
public PanKnob? Pan;
+ public PanBar? PanBar; // compact strips
public Action<bool>? Mute, Solo, Arm;
}
private readonly Dictionary<int, StripSync> _syncs = new();
@@ -85,6 +108,7 @@ public sealed class MixerView : UserControl
public Func<float>? GetMasterVolume { get; set; }
public Action<float>? SetMasterVolume { get; set; }
private VFader? _masterFader;
+ private MeterFader? _masterMeterFader;
private DragNumber? _masterDb;
// Project pan law (specs/006): the footer's Pan law control, its hint, the Older project
// badge and a BAL badge on every group strip — all re-synced from the engine, so undo/redo
@@ -108,6 +132,61 @@ public sealed class MixerView : UserControl
public Action<StereoMapView>? MapCreated { get; set; }
private int _builtTrackCount = -1;
+ private int _builtShape; // group membership, names and colours the strips were built for
+
+ // One built strip in display order: its place in the group forest and the bits folding,
+ // bands and the selection outline touch (specs/070).
+ private sealed class StripEntry
+ {
+ public int Id, Depth, Parent, ColorIndex;
+ public bool IsGroup;
+ public string Name = "";
+ public Border Strip = null!;
+ public Border Outline = null!;
+ public Action<bool>? PaintFold; // group strips: the triangle
+ public Control? SoloDot, ArmDot, ClipDot; // group strips: hidden-member state, when folded
+ public int[] HiddenIds = Array.Empty<int>(); // a group's descendants (ids)
+ public int[] HiddenIndices = Array.Empty<int>(); // … and their engine indices
+ }
+ private readonly List<StripEntry> _strips = new();
+ private readonly Dictionary<int, StripEntry> _stripById = new();
+ private int _maxDepth;
+ private int _selectedId = -1;
+ // Hidden-track clip warnings by group id: a rebuild (Compact, a rename, a regroup) makes new
+ // StripEntries but must not drop a warning; only unfolding, the dot or a new project clears it.
+ private readonly HashSet<int> _clipLatched = new();
+
+ /// <summary>The fold state shared with the Arrangement (specs/070).</summary>
+ internal GroupFold? Fold
+ {
+ get => _fold;
+ set
+ {
+ if (ReferenceEquals(_fold, value)) return;
+ if (_fold is not null) _fold.Changed -= ApplyFold;
+ _fold = value;
+ if (_fold is not null) _fold.Changed += ApplyFold;
+ ApplyFold();
+ }
+ }
+ private GroupFold? _fold;
+
+ /// <summary>Compact strips (specs/070). Switching rebuilds the strips.</summary>
+ public bool Compact
+ {
+ get => _compact;
+ set
+ {
+ if (_compact == value) return;
+ _compact = value;
+ _paintCompactToggle?.Invoke();
+ Refresh();
+ MinContentHeightChanged?.Invoke();
+ }
+ }
+ /// <summary>Raised when the user flips the footer's Compact toggle.</summary>
+ public event Action<bool>? CompactChanged;
+ private Action? _paintCompactToggle;
/// <summary>Raised after <see cref="Refresh"/> rebuilds the strips, so a host window can
/// fit its width to them.</summary>
@@ -123,8 +202,10 @@ public sealed class MixerView : UserControl
get { _row.Measure(Size.Infinity); return _row.DesiredSize.Width; }
}
- // A strip's always-shown part (header, pan, dB, M/S/Arm) without the fader.
- private double CoreH => HeaderH + PanH + FaderPad + _dbH + ButtonsH + StripBorder;
+ // A strip's always-shown part (header, pan, dB, M/S/Arm) without the fader, plus the group
+ // bars above the strips, which always stay (specs/070).
+ private double CoreH => BandsH + HeaderH + PanH + FaderPad + _dbH + ButtonsH + StripBorder;
+ private double BandsH => _maxDepth * GroupBandsLayer.BarH;
/// <summary>The smallest height (design units) at which a strip's core still fits — header,
/// pan, a FaderMin fader, dB, M/S/Arm — plus the footer. Hosts don't go below it.</summary>
@@ -143,11 +224,12 @@ public sealed class MixerView : UserControl
_engine = engine;
_stripsScroller = new ScrollViewer
{
- Content = _row,
+ Content = new Panel { Children = { _bands, _row } },
HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,
VerticalScrollBarVisibility = ScrollBarVisibility.Disabled,
};
_stripsScroller.SizeChanged += (_, e) => { if (e.HeightChanged) FitHeight(); };
+ _row.LayoutUpdated += (_, _) => _bands.InvalidateVisual(); // bands follow the strips' bounds
var dock = new DockPanel();
var footer = Footer();
DockPanel.SetDock(footer, Dock.Bottom);
@@ -196,39 +278,216 @@ public sealed class MixerView : UserControl
_faderGrids.Clear();
_syncs.Clear();
_balBadges.Clear();
+ _strips.Clear();
+ _stripById.Clear();
+ _masterFader = null; _masterMeterFader = null;
int returns = _engine.ReturnTrackCount;
int n = _engine.TrackCount;
- // As in the arrangement: the tracks in their order, then the returns, then the master.
- foreach (int i in ArrangementView.DisplayOrder(_engine))
+ // As in the arrangement: the tracks in its hierarchical order (each group, then its
+ // members — specs/070), then the returns, then the master.
+ var rows = ArrangementView.HierarchyOrder(_engine);
+ _maxDepth = 0;
+ foreach (var r in rows)
+ if (_engine.TryGetTrackInfo(r.Index, out var gi) && gi.IsGroup) _maxDepth = Math.Max(_maxDepth, r.Depth + 1);
+ foreach (var r in rows)
{
- if (!_engine.TryGetTrackInfo(i, out var ti)) continue;
- var c = ArrangementView.TrackBrush(ArrangementView.EffectiveColorIndex(_engine, ti.Id));
- _row.Children.Add(Strip(ti, c, returns));
+ if (!_engine.TryGetTrackInfo(r.Index, out var ti)) continue;
+ AddStrip(ti, r.Depth, r.ParentGroupId, returns);
}
- _row.Children.Add(MasterStrip());
+ foreach (int i in ArrangementView.DisplayOrder(_engine))
+ if (_engine.TryGetTrackInfo(i, out var ti) && ti.IsReturn) AddStrip(ti, 0, -1, returns);
+ _row.Children.Add(_compact ? CompactMasterStrip() : MasterStrip());
+ CollectDescendants(rows);
+ _clipLatched.RemoveWhere(id => !_stripById.TryGetValue(id, out var g) || !g.IsGroup); // a group that is gone
+ _row.Margin = new Thickness(10, 10 + BandsH, 10, 10);
+ _bands.Top = 10;
_shownLaw = null; // the strips are new: repaint the law state onto them
SyncPanLaw();
_builtTrackCount = n;
+ _builtShape = Shape();
+ _builtNames = GroupNames();
MeasureDb();
+ ApplyFold();
FitHeight();
+ MinContentHeightChanged?.Invoke(); // the bar rows may have changed
StripsChanged?.Invoke();
}
+ private void AddStrip(NotaTrackInfo ti, int depth, int parent, int returns)
+ {
+ int colorIdx = ArrangementView.EffectiveColorIndex(_engine, ti.Id);
+ var c = ArrangementView.TrackBrush(colorIdx);
+ var e = new StripEntry { Id = ti.Id, Depth = depth, Parent = parent, IsGroup = ti.IsGroup, ColorIndex = colorIdx, Name = TrackNames.Of(_engine, ti) };
+ var body = _compact ? CompactStrip(ti, c, returns, e) : Strip(ti, c, returns, e);
+ // The selection outline sits over the strip's content, so selecting never resizes it.
+ e.Outline = new Border { BorderBrush = NotaPalette.Accent, BorderThickness = new Thickness(1), CornerRadius = NotaRadius.Panel, IsHitTestVisible = false, IsVisible = false };
+ var inner = (Control)body.Child!;
+ body.Child = null; // detach before re-parenting
+ body.Child = new Panel { Children = { inner, e.Outline } };
+ e.Strip = body;
+ _strips.Add(e);
+ _stripById[e.Id] = e;
+ _row.Children.Add(body);
+ }
+
+ // Each group's descendants (ids and engine indices), for the hidden count and the folded
+ // group's solo / arm / clip dots. Built once per Refresh, so the tick allocates nothing.
+ private void CollectDescendants(IReadOnlyList<ArrangementView.HierarchyRow> rows)
+ {
+ foreach (var e in _strips)
+ {
+ if (!e.IsGroup) continue;
+ var ids = new List<int>(); var idx = new List<int>();
+ foreach (var r in rows)
+ if (IsDescendant(r.Id, e.Id)) { ids.Add(r.Id); idx.Add(r.Index); }
+ e.HiddenIds = ids.ToArray();
+ e.HiddenIndices = idx.ToArray();
+ }
+ }
+
+ private bool IsDescendant(int id, int groupId)
+ {
+ for (int guard = 0; guard < 32 && _stripById.TryGetValue(id, out var e); guard++)
+ {
+ if (e.Parent == groupId) return true;
+ if (e.Parent < 0) return false;
+ id = e.Parent;
+ }
+ return false;
+ }
+
+ // A strip is hidden when any group above it is folded.
+ private bool HiddenByFold(StripEntry e)
+ {
+ if (_fold is null) return false;
+ int p = e.Parent;
+ for (int guard = 0; guard < 32 && p >= 0; guard++)
+ {
+ if (_fold.IsFolded(p)) return true;
+ p = _stripById.TryGetValue(p, out var pe) ? pe.Parent : -1;
+ }
+ return false;
+ }
+
+ /// <summary>Shows / hides strips for the fold state and repaints the bands — no rebuild
+ /// (specs/070 R4).</summary>
+ private void ApplyFold()
+ {
+ foreach (var e in _strips)
+ {
+ e.Strip.IsVisible = !HiddenByFold(e);
+ bool folded = e.IsGroup && _fold?.IsFolded(e.Id) == true;
+ e.PaintFold?.Invoke(folded);
+ if (!folded) _clipLatched.Remove(e.Id);
+ }
+ var bands = new List<GroupBandsLayer.Band>();
+ for (int i = 0; i < _strips.Count; i++)
+ {
+ var g = _strips[i];
+ if (!g.IsGroup || !g.Strip.IsVisible) continue;
+ var last = g;
+ for (int j = i + 1; j < _strips.Count && IsDescendant(_strips[j].Id, g.Id); j++)
+ if (_strips[j].Strip.IsVisible) last = _strips[j];
+ int hidden = _fold?.IsFolded(g.Id) == true ? g.HiddenIds.Length : 0;
+ bands.Add(new GroupBandsLayer.Band(g.Name, g.ColorIndex, g.Depth, g.Strip, last.Strip, hidden));
+ }
+ _bands.SetBands(bands);
+ FollowSelection(_selectedId, bringIntoView: false);
+ UpdateHiddenState();
+ StripsChanged?.Invoke(); // the strip row's width changed
+ }
+
+ /// <summary>Outlines the selected track's strip and brings it into view; a track hidden by
+ /// folding outlines its outermost folded group instead. Never unfolds (specs/070).</summary>
+ public void FollowSelection(int trackId) => FollowSelection(trackId, bringIntoView: true);
+
+ private void FollowSelection(int trackId, bool bringIntoView)
+ {
+ _selectedId = trackId;
+ StripEntry? target = null;
+ if (_stripById.TryGetValue(trackId, out var e))
+ {
+ target = e;
+ for (int p = e.Parent, guard = 0; p >= 0 && guard < 32 && _stripById.TryGetValue(p, out var pe); p = pe.Parent, guard++)
+ if (_fold?.IsFolded(p) == true) target = pe; // keeps climbing: the outermost wins
+ }
+ foreach (var s in _strips) s.Outline.IsVisible = ReferenceEquals(s, target);
+ if (bringIntoView) target?.Strip.BringIntoView();
+ }
+
+ // Group membership, names and colours: a change rebuilds the strips so the bands follow
+ // moves into / out of groups, renames, recolours and undo (FR-004). Names cross the C ABI
+ // as new strings, so they are read every NameEvery ticks rather than on each one.
+ private const int NameEvery = 15;
+ private int _shapeTick, _builtNames;
+ private int Shape()
+ {
+ var h = new HashCode();
+ int n = _engine.TrackCount;
+ for (int i = 0; i < n; i++)
+ {
+ if (!_engine.TryGetTrackInfo(i, out var ti)) continue;
+ h.Add(ti.Id); h.Add(ti.GroupId); h.Add(ti.IsGroup);
+ h.Add(_engine.GetTrackColorIndex(ti.Id));
+ }
+ return h.ToHashCode();
+ }
+
+ private int GroupNames()
+ {
+ var h = new HashCode();
+ foreach (var e in _strips) if (e.IsGroup) h.Add(TrackNames.Of(_engine, e.Id));
+ return h.ToHashCode();
+ }
+
+ private bool ShapeChanged()
+ {
+ if (Shape() != _builtShape) return true;
+ if (++_shapeTick < NameEvery) return false;
+ _shapeTick = 0;
+ return GroupNames() != _builtNames;
+ }
+
+ // A folded group's dots: a hidden member is soloed, armed, or peaked at 0 dBFS since the fold.
+ private void UpdateHiddenState()
+ {
+ foreach (var g in _strips)
+ {
+ if (g.SoloDot is null) continue;
+ bool folded = _fold?.IsFolded(g.Id) == true;
+ bool solo = false, arm = false;
+ if (folded)
+ {
+ foreach (int idx in g.HiddenIndices)
+ if (_engine.TryGetTrackInfo(idx, out var ti)) { solo |= ti.Soloed != 0; arm |= ti.Armed != 0; }
+ if (!_clipLatched.Contains(g.Id))
+ foreach (int id in g.HiddenIds)
+ if (_engine.TryGetTrackMeter(id, out var m) && (m.PeakL >= 1f || m.PeakR >= 1f)) { _clipLatched.Add(g.Id); break; }
+ }
+ g.SoloDot.IsVisible = solo;
+ g.ArmDot!.IsVisible = arm;
+ g.ClipDot!.IsVisible = folded && _clipLatched.Contains(g.Id);
+ }
+ }
+
/// <summary>Pushes fresh meter readings to every strip (called at the UI clock).</summary>
public void UpdateMeters()
{
- // A track added or removed while the mixer is open gets (or loses) its strip.
- if (_builtTrackCount >= 0 && _engine.TrackCount != _builtTrackCount) Refresh();
- foreach (var (id, meter) in _meters)
+ // A track added or removed while the mixer is open gets (or loses) its strip; a track
+ // moved into or out of a group, or a group renamed or recoloured, moves its band.
+ if (_builtTrackCount >= 0 && (_engine.TrackCount != _builtTrackCount || ShapeChanged())) Refresh();
+ foreach (var (id, ctl, push) in _meters)
{
- if (id < 0) meter.Push(_engine.MasterMeter());
- else if (_engine.TryGetTrackMeter(id, out var m)) meter.Push(m);
+ if (!ctl.IsEffectivelyVisible) continue; // a folded strip reads nothing
+ if (id < 0) push(_engine.MasterMeter());
+ else if (_engine.TryGetTrackMeter(id, out var m)) push(m);
}
// Follow master volume changes made elsewhere (MST, Master row, Remote, project load).
- if (GetMasterVolume is { } get && _masterFader is { Dragging: false } f && _masterDb is { } db)
+ if (GetMasterVolume is { } get && _masterDb is { } db)
{
double v = get();
- if (Math.Abs(f.Value - v) > 1e-3) { f.SetValueExternal(v); db.Value = LinToDb(v); }
+ if (_masterFader is { Dragging: false } f && Math.Abs(f.Value - v) > 1e-3) { f.SetValueExternal(v); db.Value = LinToDb(v); }
+ if (_masterMeterFader is { Dragging: false } mf && Math.Abs(mf.Value - v) > 1e-3) { mf.SetValueExternal(v); db.Value = LinToDb(v); }
}
// Sends follow the Devices panel's Sends card, the Session mixer and automation (#138).
foreach (var (id, bus, send) in _sendFaders)
@@ -238,6 +497,7 @@ public sealed class MixerView : UserControl
if (Math.Abs(send.Value - v) > 1e-3) send.Value = v;
}
FollowStrips();
+ UpdateHiddenState();
SyncPanLaw(); // undo/redo or a load elsewhere may have changed it
}
@@ -249,12 +509,20 @@ public sealed class MixerView : UserControl
for (int i = 0; i < n; i++)
{
if (!_engine.TryGetTrackInfo(i, out var ti) || !_syncs.TryGetValue(ti.Id, out var s)) continue;
+ // A strip hidden by folding catches up on the first tick after it is shown again.
+ if (_stripById.TryGetValue(ti.Id, out var entry) && !entry.Strip.IsVisible) continue;
if (s.Fader is { Dragging: false } f && Math.Abs(f.Value - ti.Volume) > 1e-3)
{
f.SetValueExternal(ti.Volume);
if (s.Db is { } db) db.Value = LinToDb(ti.Volume);
}
+ if (s.MeterFader is { Dragging: false } mf && Math.Abs(mf.Value - ti.Volume) > 1e-3)
+ {
+ mf.SetValueExternal(ti.Volume);
+ if (s.Db is { } db) db.Value = LinToDb(ti.Volume);
+ }
if (s.Pan is { Dragging: false } k && Math.Abs(k.Pan - ti.Pan) > 1e-3) k.SetPanExternal(ti.Pan);
+ if (s.PanBar is { Dragging: false } pb && Math.Abs(pb.Pan - ti.Pan) > 1e-3) pb.Pan = ti.Pan;
s.Mute?.Invoke(ti.Muted != 0);
s.Solo?.Invoke(ti.Soloed != 0);
s.Arm?.Invoke(ti.Armed != 0);
@@ -263,13 +531,13 @@ public sealed class MixerView : UserControl
// ---- strips -----------------------------------------------------------
- private Control Strip(NotaTrackInfo ti, IBrush color, int returns)
+ private Border Strip(NotaTrackInfo ti, IBrush color, int returns, StripEntry entry)
{
int id = ti.Id;
bool isReturn = ti.IsReturn;
var col = new StackPanel();
- col.Children.Add(Header(TrackNames.Of(_engine, ti), color, Card));
+ col.Children.Add(Header(TrackNames.Of(_engine, ti), color, Card, ti.IsGroup ? entry : null));
string io1 = isReturn ? Loc.T("Return in") : ti.IsGroup ? Loc.T("Group in") : ti.IsInstrument ? Loc.T("MIDI in") : Loc.T("In 1");
string io2 = isReturn ? Loc.T("→ Master")
@@ -291,7 +559,7 @@ public sealed class MixerView : UserControl
col.Children.Add(PanRow(id, ti.Pan, ti.IsGroup));
col.Children.Add(FaderRow(id, ti.Volume, color, out var db, out var meter));
- _meters.Add((id, meter));
+ _meters.Add((id, meter, meter.Push));
col.Children.Add(db);
col.Children.Add(ButtonsRow(id, ti, isReturn));
@@ -302,7 +570,7 @@ public sealed class MixerView : UserControl
};
}
- private Control MasterStrip()
+ private Border MasterStrip()
{
var col = new StackPanel();
col.Children.Add(Header(Loc.T("Master"), NotaPalette.Master, MasterBg));
@@ -313,7 +581,7 @@ public sealed class MixerView : UserControl
Control db;
var faderRow = FaderRow(-1, GetMasterVolume?.Invoke() ?? 1f, NotaPalette.Master, out db, out var meter);
- _meters.Add((-1, meter));
+ _meters.Add((-1, meter, meter.Push));
col.Children.Add(faderRow);
col.Children.Add(db);
// Master has no sends / pan / arm; keep the strip visually aligned with a
@@ -338,7 +606,7 @@ public sealed class MixerView : UserControl
var left = new StackPanel
{
Orientation = Orientation.Horizontal, Spacing = 6, VerticalAlignment = VerticalAlignment.Center,
- Children = { new TextBlock { Text = Loc.T("Show"), FontSize = 9, Foreground = TextTertiary, VerticalAlignment = VerticalAlignment.Center }, sendsToggle, ioToggle },
+ Children = { new TextBlock { Text = Loc.T("Show"), FontSize = 9, Foreground = TextTertiary, VerticalAlignment = VerticalAlignment.Center }, sendsToggle, ioToggle, CompactToggle() },
};
var divider = new Border { Width = 1, Height = 20, Background = BorderDef, VerticalAlignment = VerticalAlignment.Center };
@@ -388,6 +656,30 @@ public sealed class MixerView : UserControl
return b;
}
+ // Compact strips (specs/070): a two-state key painted like the section toggles.
+ private Border CompactToggle()
+ {
+ var t = new TextBlock { Text = Loc.T("Compact"), FontSize = 10, FontWeight = FontWeight.SemiBold, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center };
+ var b = new Border { Height = 22, Padding = new Thickness(8, 0), CornerRadius = NotaRadius.Control, BorderThickness = new Thickness(1), VerticalAlignment = VerticalAlignment.Center, Cursor = new Cursor(StandardCursorType.Hand), Child = t };
+ ToolTip.SetTip(b, Loc.T("Show compact strips: more tracks on screen"));
+ void Paint()
+ {
+ b.Background = _compact ? Brass : NotaPalette.SurfaceRaised;
+ b.BorderBrush = _compact ? Brass : NotaPalette.Seam;
+ t.Foreground = _compact ? OnAccent : TextSecondary;
+ }
+ b.PointerPressed += (_, e) =>
+ {
+ if (!e.GetCurrentPoint(b).Properties.IsLeftButtonPressed) return;
+ e.Handled = true;
+ Compact = !_compact;
+ CompactChanged?.Invoke(_compact);
+ };
+ _paintCompactToggle = Paint;
+ Paint();
+ return b;
+ }
+
private bool IoShown => _ioVisible && (!_ioAuto || _ioPinned);
private bool SendsShown => _sendsVisible && (!_sendsAuto || _sendsPinned);
@@ -515,17 +807,68 @@ public sealed class MixerView : UserControl
};
}
- private Control Header(string name, IBrush topColor, IBrush bg)
+ private Control Header(string name, IBrush topColor, IBrush bg, StripEntry? group = null)
{
- // The strip header: a 3px bar in the track colour on top (muted grey for master).
+ // The strip header: a 3px bar in the track colour on top (muted grey for master). A group
+ // strip leads with its fold triangle and, folded, ends with its hidden members' state.
var grid = new Grid { RowDefinitions = new RowDefinitions("3,*") };
grid.Children.Add(new Border { Background = topColor, Height = 3, VerticalAlignment = VerticalAlignment.Top });
- var label = new TextBlock { Text = name, FontSize = 10, FontWeight = FontWeight.SemiBold, Foreground = TextPrimary, VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(7, 0, 7, 0), TextTrimming = TextTrimming.CharacterEllipsis };
- Grid.SetRow(label, 1);
- grid.Children.Add(label);
+ double fs = _compact ? 9 : 10, pad = _compact ? 4 : 7;
+ var label = new TextBlock { Text = name, FontSize = fs, FontWeight = FontWeight.SemiBold, Foreground = TextPrimary, VerticalAlignment = VerticalAlignment.Center, TextTrimming = TextTrimming.CharacterEllipsis };
+ ToolTip.SetTip(label, name);
+ var line = new DockPanel { Margin = new Thickness(pad, 0, pad, 0), LastChildFill = true };
+ if (group is not null)
+ {
+ var fold = FoldKey(group, name);
+ DockPanel.SetDock(fold, Dock.Left);
+ line.Children.Add(fold);
+ var dots = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 3, VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(3, 0, 0, 0) };
+ group.SoloDot = Dot(NotaPalette.Solo, Loc.T("A hidden track is soloed"));
+ group.ArmDot = Dot(NotaPalette.Record, Loc.T("A hidden track is armed"));
+ group.ClipDot = Dot(NotaPalette.Danger, Loc.T("A hidden track clipped · click to clear"));
+ group.ClipDot.PointerPressed += (_, e) => { e.Handled = true; _clipLatched.Remove(group.Id); group.ClipDot.IsVisible = false; };
+ dots.Children.Add(group.SoloDot); dots.Children.Add(group.ArmDot); dots.Children.Add(group.ClipDot);
+ DockPanel.SetDock(dots, Dock.Right);
+ line.Children.Add(dots);
+ }
+ line.Children.Add(label);
+ Grid.SetRow(line, 1);
+ grid.Children.Add(line);
return new Border { Height = 24, Background = bg, BorderBrush = BorderDef, BorderThickness = new Thickness(0, 0, 0, 1), Child = grid };
}
+ // A group's fold triangle: the Arrangement's disclosure glyph; click, Space or Enter folds the
+ // group in both views (GroupFold). View state — no undo step.
+ private Control FoldKey(StripEntry group, string name)
+ {
+ var glyph = new Glyph(GlyphKind.ChevronDown, 8) { Foreground = TextSecondary };
+ var key = new Border
+ {
+ Width = 12, Height = 14, Margin = new Thickness(0, 0, 3, 0), Background = Brushes.Transparent, Focusable = true,
+ Cursor = new Cursor(StandardCursorType.Hand), VerticalAlignment = VerticalAlignment.Center, Child = glyph,
+ };
+ void Toggle() { if (_fold is { } f) f.Toggle(group.Id); }
+ key.PointerPressed += (_, e) => { if (!e.GetCurrentPoint(key).Properties.IsLeftButtonPressed) return; e.Handled = true; Toggle(); };
+ key.KeyDown += (_, e) => { if (e.Key is Key.Space or Key.Enter) { e.Handled = true; Toggle(); } };
+ group.PaintFold = folded =>
+ {
+ glyph.Kind = folded ? GlyphKind.ChevronRight : GlyphKind.ChevronDown;
+ string tip = folded ? Loc.F("Unfold group {0}", name) : Loc.F("Fold group {0}", name);
+ ToolTip.SetTip(key, tip);
+ Avalonia.Automation.AutomationProperties.SetName(key, tip);
+ };
+ group.PaintFold(false);
+ return key;
+ }
+
+ private static Border Dot(IBrush fill, string tip)
+ {
+ const double size = 6;
+ var d = new Border { Width = size, Height = size, CornerRadius = new CornerRadius(size / 2), Background = fill, VerticalAlignment = VerticalAlignment.Center, IsVisible = false };
+ ToolTip.SetTip(d, tip);
+ return d;
+ }
+
private Control IoRow(string io1, string io2) => new Border
{
Height = 34, BorderBrush = BorderInner, BorderThickness = new Thickness(0, 0, 0, 1), Padding = new Thickness(7, 4),
@@ -542,7 +885,7 @@ public sealed class MixerView : UserControl
// Instrument-track I/O row: a "MIDI In" selector (None, or another instrument track whose
// MIDI this one receives) over the label. Writes/reads via the engine.
- private Control MidiIoRow(int id)
+ private Control MidiIoRow(int id, bool compact = false)
{
var cb = new ComboBox
{
@@ -568,6 +911,12 @@ public sealed class MixerView : UserControl
if (cb.SelectedIndex >= 0 && cb.SelectedIndex < sources.Count)
_engine.SetTrackMidiSource(id, sources[cb.SelectedIndex]);
};
+ if (compact) // one line: the selector alone, its label in the tooltip (specs/070)
+ {
+ cb.Height = 14;
+ ToolTip.SetTip(cb, Loc.T("MIDI in"));
+ return new Border { Height = IoH, BorderBrush = BorderInner, BorderThickness = new Thickness(0, 0, 0, 1), Padding = new Thickness(4, 2), Child = cb };
+ }
return new Border
{
Height = 34, BorderBrush = BorderInner, BorderThickness = new Thickness(0, 0, 0, 1), Padding = new Thickness(7, 4),
diff --git a/src/managed/Nota.Application/Settings.cs b/src/managed/Nota.Application/Settings.cs
index b1673498..d5c33a62 100644
--- a/src/managed/Nota.Application/Settings.cs
+++ b/src/managed/Nota.Application/Settings.cs
@@ -67,6 +67,9 @@ public sealed class Settings
/// <summary>Height of the docked Mixer panel in design units, set by dragging its top edge
/// (specs/054). 0 = its natural height (full strips), clamped to what the window fits.</summary>
public double MixerDockHeight { get; set; }
+ /// <summary>The Mixer's strip layout (specs/070): false = regular strips, true = compact
+ /// 72 px strips. Shared by the docked panel and the pop-out window.</summary>
+ public bool MixerCompact { get; set; }
/// <summary>Record a project version on every save (the History tab). On by default.</summary>
public bool KeepVersionHistory { get; set; } = true;
/// <summary>Bars of metronome count-in before Play / Record from stop (0 = off). Set from
diff --git a/tests/Nota.SmokeTest/LocalizationAllowList.txt b/tests/Nota.SmokeTest/LocalizationAllowList.txt
index 7ae6ff5e..aed32685 100644
--- a/tests/Nota.SmokeTest/LocalizationAllowList.txt
+++ b/tests/Nota.SmokeTest/LocalizationAllowList.txt
@@ -2274,6 +2274,11 @@ Nota.App/MixerView.cs Mute # data: name a MIDI mapping is saved under, in Englis
Nota.App/MixerView.cs Solo # data: name a MIDI mapping is saved under, in English; translated when drawn (MidiMapView.Shown)
Nota.App/MixerView.cs Track Pan # data: name a MIDI mapping is saved under, in English; translated when drawn (MidiMapView.Shown)
Nota.App/MixerView.cs Track Volume # data: name a MIDI mapping is saved under, in English; translated when drawn (MidiMapView.Shown)
+Nota.App/MixerView.Compact.cs Master Volume # data: name a MIDI mapping is saved under, in English; translated when drawn (MidiMapView.Shown)
+Nota.App/MixerView.Compact.cs Mute # data: name a MIDI mapping is saved under, in English; translated when drawn (MidiMapView.Shown)
+Nota.App/MixerView.Compact.cs Solo # data: name a MIDI mapping is saved under, in English; translated when drawn (MidiMapView.Shown)
+Nota.App/MixerView.Compact.cs Track Pan # data: name a MIDI mapping is saved under, in English; translated when drawn (MidiMapView.Shown)
+Nota.App/MixerView.Compact.cs Track Volume # data: name a MIDI mapping is saved under, in English; translated when drawn (MidiMapView.Shown)
Nota.App/ModularView.cs Env # data: Modular node name (FR-004)
Nota.App/ModularView.cs plural by hand: == 1 ? "Env" : "LFO" # data: a device readout or label that spells parameter words (FR-004)
Nota.App/PreferencesWindow.Store.cs $"{(pr.Fraction * size / 1048576.0).ToString(" # data: numbers and units, or a plug-in name and its architectures