Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
C# audioaudio-unitavaloniacpp20cross-platformdawdigital-audio-workstationdspjucelinux-audiomcp-servermidimusicmusic-productionpiano-rollplugin-hostsequencersynthesizervstvst3
(fix) Studio: bring over the review fixes the squash missed (#37)
Chris Laupama097af5d821e8
diff --git a/.agents/skills/nota-design/SKILL.md b/.agents/skills/nota-design/SKILL.mdindex 35533e31..0348b8d9 100644--- a/.agents/skills/nota-design/SKILL.md+++ b/.agents/skills/nota-design/SKILL.md@@ -1,95 +1,176 @@---name: nota-design-description: Nota's UI design language — "Ember Graphite", a dark-only warm-graphite palette with a brass accent, used across the Avalonia/C# desktop app. Use whenever building or restyling any Nota UI (windows, panels, controls, device cards, custom-drawn views like the piano roll / waveform / arrangement) so everything stays visually consistent. Points at the authoritative token files and the full guideline rather than restating values.+description: Nota's UI design language — "Studio", the design system of the sibling app Saine applied to Nota — neutral greys on dark 1px seams, one orange accent reserved for what is live or chosen, sentence-case labels, in colour themes (Studio Dark — the default — Studio Light, Ember Graphite, Ember Paper). Use whenever building or restyling any Nota UI (windows, panels, controls, device cards, custom-drawn views like the piano roll / waveform / arrangement) so everything stays visually consistent. Points at the authoritative token files and the full guideline rather than restating values.user-invocable: true----# Nota design language — Ember Graphite+# Nota design language — Studio-Warm graphite neutrals (hue ~40°) lit by a single **brass** accent `#D8A03D`.-Dark-only by intent: a DAW is used in dark rooms for long sessions.+Saine's design system (`../saine/DESIGN.md`) applied to Nota: neutral greys stepped in a+few exact tones (well · ground · panel · raised), flat panels butted against dark 1px+seams, small crisp type, and **one orange accent that appears only where something is+live or chosen**. Colour is a **theme**: one fixed look, dark or light, that gives every+token a value — Studio Dark (the default), Studio Light, Ember Graphite, Ember Paper. The+structure (layout, type, geometry, where the accent goes) is the same in every theme.+Preferences → Appearance picks a theme or Follow system (a dark-mode and a light-mode+theme); the switch is live. `DESIGN.md` is Saine's system as Nota implements it, plus the departures+the project accepted.## Read these first — do not work from memory| File | What it gives you ||---|---|-| `DESIGN.md` | **The guideline.** Rules, every token value, device-card conventions, the control kit, known drift. Start here. |-| `DESIGN.html` | The same thing rendered — swatches, live control specimens, card anatomy at true size. Open it when the question is "what should this look like". |-| `src/managed/Nota.App/Theme/NotaTheme.axaml` | **Definitive** source of colour, geometry and control styles. |-| `src/managed/Nota.App/Theme/NotaPalette.cs` | Mirror of the above for custom-drawn views. Kept in sync by hand. |-| `src/managed/Nota.App/DeviceCardKit.cs` | Palette aliases + atomic builders for device cards. |+| `DESIGN.md` | **The guideline.** Rules, colour themes and the readability bar, every Studio token value, elevation, type scales, number setting, controls and states, device cards, shell, the tests, accepted departures, known drift. Start here. |+| `DESIGN.html` | The same thing rendered — swatches, control specimens, a device card at true size, a theme toggle. Generated by `scripts/design-html.py`. |+| `src/managed/Nota.App/Theme/Themes/*.json` | **Definitive colour**: one file per theme, one value per token (incl. shadow colours and Fluent's accent ramp). |+| `src/managed/Nota.App/Theme/NotaTheme.axaml` | **Definitive** geometry, type classes, control styles. Holds no colour. |+| `Theme/NotaPalette.cs` · `NotaColourTheme.cs` · `NotaThemeService.cs` | The token slots (the catalogue) and helpers (`Wash`, `InkOn`, `Ink`, `Derived`) · loading and validating themes · applying a theme: slots re-tinted, the same brushes published as `Brush.*`, `Shadow.*` built. |+| `Theme/NotaGeometry.cs` · `NotaFonts.cs` · `NotaText.cs` · `NotaNum.cs` | Radii/sizes/spacing · Geist typefaces and type scale · sentence-case labels · number formatting. |+| `DeviceCardKit.cs`, `Controls/` | The shared controls and card builders; `Controls/NotaGraph.cs` for graph windows. |+| `tests/Nota.SmokeTest/DesignTokenCheck*.cs` | The guard tests (incl. `RunStudio`, `RunThemes`, `RunLabels`, `RunIcons`) and their ratchet lists (`*AllowList.txt`, which only shrink) — run the smoke test after any UI change. |+| `../saine/DESIGN.md` | The reference system, when a question is not settled by the files above. |If `DESIGN.md` / `DESIGN.html` disagree with the theme files, **the theme files win** andthe docs need fixing. Say so rather than propagating the drift.> This skill deliberately does **not** restate token values. An earlier version did, and-> it drifted a whole palette out of date — it still described a cool-slate scheme with a-> cyan accent long after the app moved to Ember Graphite. Read the files.+> it drifted a whole palette out of date. Read the files.## Non-negotiables-- **Never hardcode a colour or size in a view.** XAML: `{DynamicResource Brush.*}` /- `{StaticResource Radius.*}`. Custom-drawn C#: read from `NotaPalette` or `DeviceCardKit`.- (The card layer currently breaks this in ~628 places — do not add to it.)-- **One accent, spent sparingly.** Brass marks primary actions, selection, focus, active- state, and the time-domain data that is the point of a DAW. Everything else is neutral.- Green / amber / red are status only.-- **Flat fills.** No gradients, no textures, no background images, no glow.-- **Structure over shadows.** 1px `Brush.BorderDefault` lines separate panels. Shadows- only for floating layers.-- **No scale or bounce.** Motion is 100–240ms ease-out, opacity + ≤6px translate.-- **Mono means data.** Numbers that are read, compared or aligned use `Font.Mono`;- prose never does.-- **Sentence case, no emoji.** The only glyphs allowed as text are `·` and the transport- symbols already in use.--## Device cards — the two-colour rule--Cards are a fixed 260px tall (`DeviceCardKit.CardH`): header 26 · LIVE strip 34 · body 200.--- **Brass = the audio path.** Anything the signal passes through. On a knob: `Accent = true`.-- **Teal `#5B9E9C` = modulation and detection.** LFOs, envelopes, sidechain detectors,- followers. Pass as the knob's `ArcColor`; group behind a 2px teal left border with a- teal section label.-- **Output rail stays muted** — `Brush.BorderStrong`, not brass.--Full anatomy, frame specs and rail dimensions: see `DESIGN.md` § Device cards.+Most of these are enforced by `DesignTokenCheck`; the smoke test fails when one breaks.++- **No literals in views.** XAML: `{DynamicResource Brush.*}` / `{DynamicResource Shadow.*}`+ (a `StaticResource` cannot follow a theme change) and+ `{StaticResource Radius.*|Control.*|Space.*}`. C#: `NotaPalette` (a slot,+ `Wash(slot, alpha)`, `InkOn(fill)`, `Ink("#hex")` for a one-off device hue),+ `NotaRadius`, `NotaSize`, `NotaSpace`, `NotaFonts`, `NotaType`. No hex outside `Ink()`,+ no RGB typed as numbers, no `Colors.X` / `Brushes.X` except `Transparent`, no font+ family names, no `new BoxShadows` in a view.+- **Nothing may snapshot a colour.** `new SolidColorBrush(slot.Color)`, a+ `static readonly Color` or brush built from the palette, or a static array of palette+ colours freezes the view in one theme. Use the slot, `Wash`, `InkOn`, `Derived`, a+ property, or read `.Color` inside `Render`. Track colours:+ `ArrangementView.TrackBrush(index)`.+- **Accent = live or chosen, only.** Playing, selected, the playhead, the loop, a toggle+ that is on, a chosen segment, menu hover, the device power switch, and a value control+ *while hovered or dragged*. If it is orange and none of those, it is wrong. **Resting+ values are neutral `VizInk`** — knob arcs, fader and slider fills, value bars, graph+ curves, waveforms. A modulation arc keeps its source chroma. There is no second accent.+- **Semantic fills with derived ink.** Mute on = `Mute` (amber), solo on = `Solo` (blue),+ arm / record on = `Record` (red), solid, with `NotaPalette.InkOn(fill)` for the text or+ glyph — never a fixed label colour on a themed fill. Green is positive status and the+ meter's safe range. Graph chromas (viz ink · teal · rose · blue) live only inside graphs.+- **Seam between, rule within.** Panels meet on `Seam` and so do keys in a segmented+ group; items inside a panel are divided by `Rule` (separators, field edges, graph+ frames).+- **Flat docked, blur only floating.** No gradients, glow or textures. Depth is a tone+ step + a 1px seam + the `Shadow.Raised` top bevel on raised controls. Only a floating+ layer drawn in the main window (`Shadow.Popover`, `Shadow.Modal`) carries a blur; menus+ and popups get a seam ring only (Avalonia clips a popup's shadow at its window edge).+- **Radii 2 / 3 / 4.** `Radius.Clip`/`Badge` 2 for inner keys, rows, clips, menu items;+ `Control`/`Tile`/`Panel`/`Body`/`Pill` 3 for controls, cards, graph windows, popovers;+ `Modal` 4 for modals only; `Docked` 0; `Bar` 1 for bars inside a plot.+- **Geist for words, Geist Mono for every number a user reads.** Names are never mono.+ Nothing under 7 px.+- **Sentence case, no tracking — every label.** Menu items, command titles, palette+ headings, window titles, tooltips, buttons: "Save as…", "Export audio", "Recent". Capitals+ stay only on acronyms and units (`NotaText.Fixed`), "Nota …" product and device names,+ the view names (Arrangement, Session, Modular, Mixer), proper nouns, and a page after+ "Settings: ". Route labels through `NotaText.Label` (it sentence-cases caps literals and+ keeps acronyms and units: `LFO rate`, `Gain dB`). Never `ToUpperInvariant()` a label,+ never set `LetterSpacing`. `RunLabels` fails on an all-caps or Title Case literal;+ `LabelAllowList.txt` is for data only (preset, mode, proper names).+- **Opacity is not a state.** Disabled and muted take the next ink step; use+ `Inactive.Set` for a subtree. The only allowed `Opacity` is a drag ghost.+- **State changes colour only** — never size, border width or position. Hover and colour+ transitions 120 ms ease-out; meters, playhead and spectra are never animated.+- **Numbers are set, not printed.** The app installs a display culture (point decimal,+ U+2212 minus — typed literals too, `"−12"`, never `"-12"`). Put a thin space (` ` in+ source) before units, keep precision fixed (dB one decimal, tempo two, percent whole, Hz+ up to 999 then `3.2 k`) — use `NotaNum` helpers. Ranges take an en dash, closed between+ plain numbers (`1–127`), spaced when an endpoint has a space (`20 Hz – 20 kHz`).+- **Every icon is a `Glyph`.** `Controls/Glyph.cs` is the one icon set: path kinds on a+ 16-unit grid, scaled as a whole (never `Stretch.Uniform`); stroked parts take the shared+ pen (round caps and joins, `max(1.2, size × 1.5/16)`), filled parts the ink (transport+ shapes, the Arrangement / Session view keys, OS marks, `StarFilled`, carets, Snap). A+ missing icon is a new `GlyphKind` with a one-line comment, never a path in a view —+ `RunIcons` fails on `Geometry.Parse`, `Data="M…"` or a path string outside `Glyph.cs`.+ No unicode symbols (`■ ▶ ● ✓ ★ ▾`…) and no emoji as text. `·` separates meta; `→` in+ prose is fine.+- **Copy:** English. Labels one word where it fits, no vowel-dropped contractions+ (`Feedback`, not `Fdbk`; `Freq`/`Reso`/`Thresh` are allowed). Tooltips short and+ verb-first. Empty states are one Ink 5 line.++## Device cards++- **700 × 260** (`DeviceCardKit.CardH`; width exceptions are listed in `DESIGN.md`): panel+ body, radius 3, seam frame.+- **Header 22** (`BuildCardShell` in `DeviceChainView.Shell.cs` — every card uses it,+ racks, the generic instrument card, plug-ins and Sends included; never build a header of+ your own): a raised strip with the `Shadow.Raised` bevel, in fixed slots **name · preset ·+ badges · power**. The preset picker `‹ Name ⌄ ›` is centred in the header between two+ equal halves (name left, badges and power right), only when the device has presets; the badges — the+ type badge (mono, muted, sentence case) and the card's accessories (`HeaderExtra`: Learn,+ S / L) — right-aligned; the power switch (accent while on) last, its slot reserved even+ on a card that cannot be bypassed. A/B, move and delete go in the right-click menu.+- **Body:** inset 6; columns choice → work → output. **Sections are+ `DeviceCardKit.Section(body)`** — no fill, no frame, a 1 px `Rule` on a top or left edge+ facing a neighbouring section (found from the layout, or pass `SectionEdge`); never a+ framed `Border` box. Graph windows and wells keep their frames; chips, tiles, pads and+ readouts are not sections. Titled in `DeviceSection` (muted 600). Device text keeps the+ device scale (7.5–10.5 px) because the frame is kept.+- Values at rest neutral, the accent only for what is live or chosen; modulation shows its+ source chroma; graphs go through `NotaGraph` (well, rule frame, radius 3, `VizGrid`,+ `VizInk` primary curve, accent only on the active node, corner axis labels, no fills+ under curves).## Adding a control-Reuse the kit before writing anything new — `Knob`, `KnobCell`, `ValueBar`, `MiniFader`,-`VFader`, `PanKnob`, `DragNumber`, `MeterBar`, `ChipRow`, `Labeled`, `TextButton`,-`NaBadge`. The inventory with sizes is in `DESIGN.md` § Control kit.+Reuse before writing: `Knob` (sizes snap to 34/36/44), `DeviceCardKit.KnobCell` (53 tall),+`SwitchTrack` / `DeviceCardKit.Switch` (18 × 10), `DeviceCardKit.Segments`, `SliderTrack` /+`DeviceCardKit.SliderRow`, `MiniFader`, `PanBar`, `VFader`, `DragNumber`, `MeterBar` /+`StereoMeter` / `GrMeter`, `Glyph`, `NaBadge`. Sizes and specs: `DESIGN.md` § Controls.-If you do add one, it **must** match the shared interaction contract:+A new value control **must** match the interaction contract:-- Vertical drag, up increases, full range over ~140px+- Vertical drag, up increases, full range over ~140 px; Shift/Ctrl/⌘ for fine steps;+ `ns-resize`; a click never jumps the value; no horizontal drag- Double-click restores the default-- Left button only — right-click must bubble to the CV-modulate menu+- Left button only — right-click must bubble to the CV-modulate / MIDI Learn menu- `GestureBegin` / `GestureEnd` bracket `BeginAutomationWrite` / `EndAutomationWrite`- Register with `MidiLearn.Bind`- Live-follow refresher that **skips while dragging**-- Mono readout so width does not jump--## Visualisers--A device draws **the thing it does**, not a generic graph — and where possible draws it-for real (the reverb tail is an actual impulse response; amp harmonics come from pushing-a sine through the real waveshaper). Ground is `Brush.BgSunken` with a `#221F1A` inner-border. Families and existing views: `DESIGN.md` § Visualisers.+- Mono readout so width does not jump; the value is always visible, not only in a tooltip+- Its value drawn in `VizInk` at rest and the accent only while hovered or dragged## Applying it (Avalonia)-- `NotaTheme.axaml` is merged in `App.axaml`; the app runs `RequestedThemeVariant="Dark"`.-- Button classes: `primary`, `secondary` (default), `ghost`, `danger`. Transport chrome:- `tp-icon`, `tp-play`, `chip`, `seg`. Containers: `Border.Card`, `Border.Panel`,- `Border.well`.-- Text classes: `Heading`, `Caption`, `SectionLabel`, `Mono`.-- Custom-drawn views may cache token colours as fields, but the values must match the- theme exactly.--## When you change a colour--1. Edit `NotaTheme.axaml`.-2. Mirror it into `NotaPalette.cs` — nothing enforces this.-3. Update `DESIGN.md` **and** `DESIGN.html` so the docs stay true.+- `NotaTheme.axaml` is merged in `App.axaml`; `NotaThemeService` applies the colour theme+ (resolved from settings by `Nota.Application.Appearance`) to both layers. `NotaNum.Install()` runs in `App.Initialize`.+- Buttons: default (raised, seam border, bevel), `primary` (weight and one tone step —+ not colour), `ghost`, `cell` (a readout well), `chip`, `tp-icon`, `tp-play`; a+ `ToggleButton` that is checked is a solid accent key with derived ink.+ `ToggleButton.seg` inside `Border.segmented` (keys butted on 1px seams).+ Containers: `Border.Panel`, `Border.Card`, `Border.well`, `Border.transport`,+ `Border.console`. Fields: `TextBox.field`, `TextBox.search`.+- Text: shell `Title`, `Heading`, `Name`, `Caption`, `SectionLabel`, `CellLabel`,+ `Readout`, `Value`, `Eyebrow`; device `DeviceName`, `DeviceSection`, `RowLabel`,+ `KnobLabel`, `KnobValue`, `Axis`.+- Elevation: `BindResource(Border.BoxShadowProperty, "Shadow.Raised" | "Shadow.Sunken" |+ "Shadow.Popover" | "Shadow.Modal")` — never a literal.++## When you change a token++1. Change the value in each theme file in `Theme/Themes/` it should change in (both Studio+ themes at least). A **new** token is a `T(nameof(X))` slot in `NotaPalette`, a value in+ **every** theme file (the smoke test names a file that lacks it), and a `KeyMap` entry+ if XAML uses it.+2. Every theme must still pass the readability bar (`DESIGN.md` § Readability bar).+3. Run `python3 scripts/design-html.py` and update the table in `DESIGN.md`.+4. Check every theme — in the app and in `DESIGN.html` (`?variant=light`, `?variant=ember-paper`…).++## When you add a theme++Add `Theme/Themes/<id>.json` (every token; `kind` dark or light) and append the id to+`NotaThemes.BuiltInOrder`. Nothing else names a theme. Run the smoke test (`RunThemes`).diff --git a/.agents/skills/nota-instrument/SKILL.md b/.agents/skills/nota-instrument/SKILL.mdindex 6e4d45ff..4c522c80 100644--- a/.agents/skills/nota-instrument/SKILL.md+++ b/.agents/skills/nota-instrument/SKILL.md@@ -65,8 +65,14 @@ lighter path — see the end of this section.**`include/nota/nota_engine.h` (the `_nota_*` export list is a wildcard — no change).**Managed:** `NativeMethods.Tracks.cs` (`[LibraryImport]`), `NotaEngine.Tracks.cs`-(wrapper), `IAudioEngine.cs` (interface); `BrowserViewModel.cs` (instrument list,-`BuiltinKind=N`); `MainWindow.Browser.cs` + `MainWindow.Dnd.cs` (`N => Engine.Add…`);+(wrapper), `IAudioEngine.cs` (interface); `Nota.Application/Palette/BuiltinDeviceCatalog.cs`+(the one device list the browser and the command palette read: name, `Kind = N`, sub text **and+a semantic descriptor** — role, aliases, character, sound/source, genre, a one-line+description; the palette smoke test `--palette` fails without a role and aliases), and its+browser category in `Nota.Application/Palette/DeviceCategories.cs` (the category chip it is listed+under — Synths, Dynamics…; the `-- design: browser --` check fails until it has one);+`DeviceInsertService.CreateInstrumentTrack` in Nota.Presentation (`N => Engine.Add…` — the+one place drag & drop, the browser and the palette create the track);`ProjectService.cs` (`{ Kind: N }`) + `PresetService.cs` (`N =>`); rack/drum"add chain / add pad" menus in `DeviceCards/Rack/RackCardView.cs`(`AddChainButton`, `ShowAddPadMenu`).@@ -89,14 +95,16 @@ No track, no C ABI, no `Engine.h` method: effects are added generically byare **generic** through the base `Device` (by `builtinKind()` + params) — no`getState`/`setState`, no per-kind managed persist code.- **Managed:** `DeviceCardFactory` `[kind] = new NameDeviceBody()`; a- `BrowserViewModel.cs` FX entry (`Kind = BuiltinEffect, BuiltinKind = N`). The- browser add/drop path (`MainWindow.Browser.cs`/`.Dnd.cs`) is already generic.+ `BuiltinDeviceCatalog.cs` entry (`AudioEffect`, kind N, with its semantic descriptor —+ role, aliases, character, source, task) and its category in `DeviceCategories.cs`. The add/drop path (`DeviceInsertService`) is+ already generic. Factory presets get their descriptor from their folder and name+ (`PresetDescriptors`); a new folder whose name isn't vocabulary goes into its folder map.### MIDI effects (`grep -rn Arpeggiator` / `grep -rn MidiScale`)Mirror an existing `MidiDevice` (e.g. `Arpeggiator.h`) with `midiKind()`; register-in the engine's MIDI-device factory + `MidiDeviceCardFactory` `[kind]` + the MIDI-browser list. Params/persist/clone are generic like audio effects. Cards sit+in the engine's MIDI-device factory + `MidiDeviceCardFactory` `[kind]` + a `MidiEffect`+entry with its descriptor in `BuiltinDeviceCatalog.cs` (and its category in `DeviceCategories.cs`). Params/persist/clone are generic like audio effects. Cards sit**before** the instrument in the chain.## 3. Editor card architecture@@ -161,6 +169,12 @@ Follow the mockup language:shell header; the toggle writes `View` and calls `ctx.RequestRebuild()`. Per-card UIstate that should survive the rebuild (active tab, selected lane) lives in a static mapkeyed by (track, index), not in the singleton body.+ - Plumbing (instruments, Nota Synth is the reference): append a `"view"` plugin param to the+ DSP (its default in the constructor is the instrument's default size — Synth opens as S);+ `InstrumentView` (Nota.Application) finds/reads/writes it, and presets, A/B, the automation+ menu (by id) and the rack chain card (by the name "View") already skip it. The card implements+ `IInstrumentCard.WidthFor(engine, track)` + `HeaderAccessory(ctx)` with+ `MidiCardHeader.SizeToggle(ctx, isMini, setMini)`; the shell goes compact under 300px.- **Lay panels as a signal chain**: bordered titled sections left→right with `▸`arrows (Osc → Noise → Filter → Amp). Each panel = `Border` (SurfaceCard fill,1px border, radius 7) with a bold section title.diff --git a/DESIGN.html b/DESIGN.htmlindex 56c0a240..10e178c3 100644--- a/DESIGN.html+++ b/DESIGN.html@@ -63,8 +63,9 @@--accent-edge: #BF7D22;--accent-subtle: #4D3F2E;--record: #F06A6E;- --record-ink: #FFFFFF;+ --record-ink: #17181A;--success: #6CC673;+ --success-ink: #17181A;--success-dim: #3F8A45;--warning: #F2B53C;--danger: #F06A6E;@@ -154,6 +155,7 @@--record: #B3262C;--record-ink: #FFFFFF;--success: #22692B;+ --success-ink: #FFFFFF;--success-dim: #79B880;--warning: #7A4F00;--danger: #B3262C;@@ -241,8 +243,9 @@--accent-edge: #5E4A22;--accent-subtle: #241F17;--record: #BE563E;- --record-ink: #F4E3DC;+ --record-ink: #FFFFFF;--success: #58B368;+ --success-ink: #171613;--success-dim: #7FB069;--warning: #D9C34C;--danger: #C2554A;@@ -332,6 +335,7 @@--record: #B54A32;--record-ink: #FFF4EE;--success: #2C7A3E;+ --success-ink: #FFFBF2;--success-dim: #609548;--warning: #837010;--danger: #B13E33;@@ -602,7 +606,7 @@ ul.plain{margin:0;padding-left:18px;color:var(--text-secondary)} ul.plain li{mar<h3>Lines · seam and rule</h3><div class="swatches"><button class="sw" data-hex="{"dark": "#141517", "light": "#9DA0A6", "ember-graphite": "#0C0B09", "ember-paper": "#E0DAC9"}" title="Copy hex"><span class="sw__chip" style="background:var(--seam)"></span><span class="sw__name">Seam</span><code class="sw__key">Brush.Seam</code><span class="sw__hex mono"></span><span class="sw__use">Between panels, around controls, between keys</span></button><button class="sw" data-hex="{"dark": "#45484E", "light": "#B3B6BB", "ember-graphite": "#3A362D", "ember-paper": "#BDB5A0"}" title="Copy hex"><span class="sw__chip" style="background:var(--rule)"></span><span class="sw__name">Rule</span><code class="sw__key">Brush.Rule</code><span class="sw__hex mono"></span><span class="sw__use">Within a panel: separators, field edges, graph frame</span></button><button class="sw" data-hex="{"dark": "#BF7D22", "light": "#ECA54E", "ember-graphite": "#6B5326", "ember-paper": "#C9A254"}" title="Copy hex"><span class="sw__chip" style="background:var(--border-brass)"></span><span class="sw__name">Accent line</span><code class="sw__key">Brush.BorderBrass</code><span class="sw__hex mono"></span><span class="sw__use">An accent stroke where a fill is too heavy</span></button><button class="sw" data-hex="{"dark": "#2A2C30", "light": "#BDC0C4", "ember-graphite": "#1E1C18", "ember-paper": "#DED8C8"}" title="Copy hex"><span class="sw__chip" style="background:var(--grid-beat)"></span><span class="sw__name">Grid</span><code class="sw__key">Brush.GridBeat</code><span class="sw__hex mono"></span><span class="sw__use">Beat grid, zero axis</span></button><button class="sw" data-hex="{"dark": "#3A3C41", "light": "#ADB0B5", "ember-graphite": "#2A2721", "ember-paper": "#CFC8B4"}" title="Copy hex"><span class="sw__chip" style="background:var(--grid-bar)"></span><span class="sw__name">Grid bar</span><code class="sw__key">Brush.GridBar</code><span class="sw__hex mono"></span><span class="sw__use">Bar lines</span></button><button class="sw" data-hex="{"dark": "#2E2F32", "light": "#C0C3C6", "ember-graphite": "#232019", "ember-paper": "#DDD7C6"}" title="Copy hex"><span class="sw__chip" style="background:var(--viz-grid)"></span><span class="sw__name">Viz grid</span><code class="sw__key">Brush.VizGrid</code><span class="sw__hex mono"></span><span class="sw__use">Grid inside a graph window</span></button></div><h3>Ink · by importance</h3><div class="swatches"><button class="sw" data-hex="{"dark": "#F4F5F6", "light": "#0E0F11", "ember-graphite": "#F2EDE1", "ember-paper": "#1A150E"}" title="Copy hex"><span class="sw__chip" style="background:var(--text-heading)"></span><span class="sw__name">Ink 0</span><code class="sw__key">Brush.TextHeading</code><span class="sw__hex mono"></span><span class="sw__use">Modal and section titles</span></button><button class="sw" data-hex="{"dark": "#E8E9EB", "light": "#16171A", "ember-graphite": "#E9E4D8", "ember-paper": "#241F17"}" title="Copy hex"><span class="sw__chip" style="background:var(--text-primary)"></span><span class="sw__name">Primary</span><code class="sw__key">Brush.TextPrimary</code><span class="sw__hex mono"></span><span class="sw__use">Names, values, button text</span></button><button class="sw" data-hex="{"dark": "#D4D6DA", "light": "#282A2E", "ember-graphite": "#C7C0B0", "ember-paper": "#3E382C"}" title="Copy hex"><span class="sw__chip" style="background:var(--text-strong)"></span><span class="sw__name">Ink 2</span><code class="sw__key">Brush.TextStrong</code><span class="sw__hex mono"></span><span class="sw__use">Toggle-key text, transport glyphs</span></button><button class="sw" data-hex="{"dark": "#C0C4C9", "light": "#3A3D42", "ember-graphite": "#A39D8F", "ember-paper": "#5E5849"}" title="Copy hex"><span class="sw__chip" style="background:var(--text-secondary)"></span><span class="sw__name">Secondary</span><code class="sw__key">Brush.TextSecondary</code><span class="sw__hex mono"></span><span class="sw__use">Labels, idle icons, metadata</span></button><button class="sw" data-hex="{"dark": "#A4A9B0", "light": "#4F535A", "ember-graphite": "#8F897C", "ember-paper": "#625B50"}" title="Copy hex"><span class="sw__chip" style="background:var(--text-muted)"></span><span class="sw__name">Muted</span><code class="sw__key">Brush.TextMuted</code><span class="sw__hex mono"></span><span class="sw__use">Section labels, units, badges</span></button><button class="sw" data-hex="{"dark": "#92969D", "light": "#65696F", "ember-graphite": "#716D60", "ember-paper": "#7E786C"}" title="Copy hex"><span class="sw__chip" style="background:var(--text-tertiary)"></span><span class="sw__name">Ink 5</span><code class="sw__key">Brush.TextTertiary</code><span class="sw__hex mono"></span><span class="sw__use">Row tags, placeholders, empty states</span></button><button class="sw" data-hex="{"dark": "#82868C", "light": "#797C81", "ember-graphite": "#646054", "ember-paper": "#8D866F"}" title="Copy hex"><span class="sw__chip" style="background:var(--text-faint)"></span><span class="sw__name">Faint</span><code class="sw__key">Brush.TextFaint</code><span class="sw__hex mono"></span><span class="sw__use">Disabled controls; axis labels in graphs</span></button><button class="sw" data-hex="{"dark": "#D7D8DA", "light": "#252629", "ember-graphite": "#D8D3C8", "ember-paper": "#332E26"}" title="Copy hex"><span class="sw__chip" style="background:var(--viz-ink)"></span><span class="sw__name">Viz ink</span><code class="sw__key">Brush.VizInk</code><span class="sw__hex mono"></span><span class="sw__use">A value at rest: arcs, fills, curves</span></button><button class="sw" data-hex="{"dark": "#17181A", "light": "#17181A", "ember-graphite": "#171613", "ember-paper": "#FFFBF2"}" title="Copy hex"><span class="sw__chip" style="background:var(--text-on-accent)"></span><span class="sw__name">On accent</span><code class="sw__key">Brush.TextOnAccent</code><span class="sw__hex mono"></span><span class="sw__use">Text on the accent</span></button></div><h3>Accent · the only one</h3><div class="swatches"><button class="sw" data-hex="{"dark": "#FF9F1C", "light": "#EF8A0C", "ember-graphite": "#D8A03D", "ember-paper": "#AD7716"}" title="Copy hex"><span class="sw__chip" style="background:var(--accent)"></span><span class="sw__name">Accent</span><code class="sw__key">Brush.Accent</code><span class="sw__hex mono"></span><span class="sw__use">Playing, selected, playhead, loop, toggled on, live</span></button><button class="sw" data-hex="{"dark": "#FFB547", "light": "#C46A00", "ember-graphite": "#F0C060", "ember-paper": "#744D07"}" title="Copy hex"><span class="sw__chip" style="background:var(--accent-bright)"></span><span class="sw__name">Accent glow</span><code class="sw__key">Brush.AccentBright</code><span class="sw__hex mono"></span><span class="sw__use">The accent as a line or text</span></button><button class="sw" data-hex="{"dark": "#C77612", "light": "#D47800", "ember-graphite": "#B08536", "ember-paper": "#7A5008"}" title="Copy hex"><span class="sw__chip" style="background:var(--accent-deep)"></span><span class="sw__name">Pressed</span><code class="sw__key">Brush.AccentDeep</code><span class="sw__hex mono"></span><span class="sw__use">Pressed accent</span></button><button class="sw" data-hex="{"dark": "#C77612", "light": "#F7C27A", "ember-graphite": "#8A6B2E", "ember-paper": "#9C8034"}" title="Copy hex"><span class="sw__chip" style="background:var(--accent-dim)"></span><span class="sw__name">Accent dim</span><code class="sw__key">Brush.AccentDim</code><span class="sw__hex mono"></span><span class="sw__use">The soft accent</span></button></div>- <h3>Semantics</h3><div class="swatches"><button class="sw" data-hex="{"dark": "#F06A6E", "light": "#B3262C", "ember-graphite": "#BE563E", "ember-paper": "#B54A32"}" title="Copy hex"><span class="sw__chip" style="background:var(--record)"></span><span class="sw__name">Record</span><code class="sw__key">Brush.Record</code><span class="sw__hex mono"></span><span class="sw__use">Record and arm, solid when on</span></button><button class="sw" data-hex="{"dark": "#FFFFFF", "light": "#FFFFFF", "ember-graphite": "#F4E3DC", "ember-paper": "#FFF4EE"}" title="Copy hex"><span class="sw__chip" style="background:var(--record-ink)"></span><span class="sw__name">Record ink</span><code class="sw__key">Brush.RecordInk</code><span class="sw__hex mono"></span><span class="sw__use">Disc on an engaged record key</span></button><button class="sw" data-hex="{"dark": "#F06A6E", "light": "#B3262C", "ember-graphite": "#C2554A", "ember-paper": "#B13E33"}" title="Copy hex"><span class="sw__chip" style="background:var(--danger)"></span><span class="sw__name">Error</span><code class="sw__key">Brush.Danger</code><span class="sw__hex mono"></span><span class="sw__use">Overload, clipping, error text</span></button><button class="sw" data-hex="{"dark": "#F58F92", "light": "#9C1F24", "ember-graphite": "#E08A72", "ember-paper": "#A3391B"}" title="Copy hex"><span class="sw__chip" style="background:var(--danger-bright)"></span><span class="sw__name">Error light</span><code class="sw__key">Brush.DangerBright</code><span class="sw__hex mono"></span><span class="sw__use">Overload readout</span></button><button class="sw" data-hex="{"dark": "#F2B53C", "light": "#7A4F00", "ember-graphite": "#D9C34C", "ember-paper": "#837010"}" title="Copy hex"><span class="sw__chip" style="background:var(--mute)"></span><span class="sw__name">Mute</span><code class="sw__key">Brush.Mute</code><span class="sw__hex mono"></span><span class="sw__use">Mute on — amber</span></button><button class="sw" data-hex="{"dark": "#6A9FD8", "light": "#3F78B8", "ember-graphite": "#6D8FB5", "ember-paper": "#3E6288"}" title="Copy hex"><span class="sw__chip" style="background:var(--solo)"></span><span class="sw__name">Solo</span><code class="sw__key">Brush.Solo</code><span class="sw__hex mono"></span><span class="sw__use">Solo on — blue</span></button><button class="sw" data-hex="{"dark": "#F2B53C", "light": "#7A4F00", "ember-graphite": "#D9C34C", "ember-paper": "#837010"}" title="Copy hex"><span class="sw__chip" style="background:var(--warning)"></span><span class="sw__name">Warning</span><code class="sw__key">Brush.Warning</code><span class="sw__hex mono"></span><span class="sw__use">Meter −6…0 dB</span></button><button class="sw" data-hex="{"dark": "#6CC673", "light": "#22692B", "ember-graphite": "#58B368", "ember-paper": "#2C7A3E"}" title="Copy hex"><span class="sw__chip" style="background:var(--success)"></span><span class="sw__name">Green</span><code class="sw__key">Brush.Success</code><span class="sw__hex mono"></span><span class="sw__use">Meter safe range, positive status</span></button><button class="sw" data-hex="{"dark": "#3F8A45", "light": "#79B880", "ember-graphite": "#7FB069", "ember-paper": "#609548"}" title="Copy hex"><span class="sw__chip" style="background:var(--success-dim)"></span><span class="sw__name">Green dim</span><code class="sw__key">Brush.SuccessDim</code><span class="sw__hex mono"></span><span class="sw__use">Input, metronome</span></button></div>+ <h3>Semantics</h3><div class="swatches"><button class="sw" data-hex="{"dark": "#F06A6E", "light": "#B3262C", "ember-graphite": "#BE563E", "ember-paper": "#B54A32"}" title="Copy hex"><span class="sw__chip" style="background:var(--record)"></span><span class="sw__name">Record</span><code class="sw__key">Brush.Record</code><span class="sw__hex mono"></span><span class="sw__use">Record and arm, solid when on</span></button><button class="sw" data-hex="{"dark": "#17181A", "light": "#FFFFFF", "ember-graphite": "#FFFFFF", "ember-paper": "#FFF4EE"}" title="Copy hex"><span class="sw__chip" style="background:var(--record-ink)"></span><span class="sw__name">Record ink</span><code class="sw__key">Brush.RecordInk</code><span class="sw__hex mono"></span><span class="sw__use">Disc on an engaged record key</span></button><button class="sw" data-hex="{"dark": "#F06A6E", "light": "#B3262C", "ember-graphite": "#C2554A", "ember-paper": "#B13E33"}" title="Copy hex"><span class="sw__chip" style="background:var(--danger)"></span><span class="sw__name">Error</span><code class="sw__key">Brush.Danger</code><span class="sw__hex mono"></span><span class="sw__use">Overload, clipping, error text</span></button><button class="sw" data-hex="{"dark": "#F58F92", "light": "#9C1F24", "ember-graphite": "#E08A72", "ember-paper": "#A3391B"}" title="Copy hex"><span class="sw__chip" style="background:var(--danger-bright)"></span><span class="sw__name">Error light</span><code class="sw__key">Brush.DangerBright</code><span class="sw__hex mono"></span><span class="sw__use">Overload readout</span></button><button class="sw" data-hex="{"dark": "#F2B53C", "light": "#7A4F00", "ember-graphite": "#D9C34C", "ember-paper": "#837010"}" title="Copy hex"><span class="sw__chip" style="background:var(--mute)"></span><span class="sw__name">Mute</span><code class="sw__key">Brush.Mute</code><span class="sw__hex mono"></span><span class="sw__use">Mute on — amber</span></button><button class="sw" data-hex="{"dark": "#6A9FD8", "light": "#3F78B8", "ember-graphite": "#6D8FB5", "ember-paper": "#3E6288"}" title="Copy hex"><span class="sw__chip" style="background:var(--solo)"></span><span class="sw__name">Solo</span><code class="sw__key">Brush.Solo</code><span class="sw__hex mono"></span><span class="sw__use">Solo on — blue</span></button><button class="sw" data-hex="{"dark": "#F2B53C", "light": "#7A4F00", "ember-graphite": "#D9C34C", "ember-paper": "#837010"}" title="Copy hex"><span class="sw__chip" style="background:var(--warning)"></span><span class="sw__name">Warning</span><code class="sw__key">Brush.Warning</code><span class="sw__hex mono"></span><span class="sw__use">Meter −6…0 dB</span></button><button class="sw" data-hex="{"dark": "#6CC673", "light": "#22692B", "ember-graphite": "#58B368", "ember-paper": "#2C7A3E"}" title="Copy hex"><span class="sw__chip" style="background:var(--success)"></span><span class="sw__name">Green</span><code class="sw__key">Brush.Success</code><span class="sw__hex mono"></span><span class="sw__use">Meter safe range, positive status</span></button><button class="sw" data-hex="{"dark": "#17181A", "light": "#FFFFFF", "ember-graphite": "#171613", "ember-paper": "#FFFBF2"}" title="Copy hex"><span class="sw__chip" style="background:var(--success-ink)"></span><span class="sw__name">Green ink</span><code class="sw__key">Brush.SuccessInk</code><span class="sw__hex mono"></span><span class="sw__use">Glyph on a green key (Session play)</span></button><button class="sw" data-hex="{"dark": "#3F8A45", "light": "#79B880", "ember-graphite": "#7FB069", "ember-paper": "#609548"}" title="Copy hex"><span class="sw__chip" style="background:var(--success-dim)"></span><span class="sw__name">Green dim</span><code class="sw__key">Brush.SuccessDim</code><span class="sw__hex mono"></span><span class="sw__use">Input, metronome</span></button></div><h3>Graph chromas · inside graphs only, in this order</h3><div class="swatches"><button class="sw" data-hex="{"dark": "#D7D8DA", "light": "#252629", "ember-graphite": "#D8D3C8", "ember-paper": "#332E26"}" title="Copy hex"><span class="sw__chip" style="background:var(--viz-ink)"></span><span class="sw__name">1 · Viz ink</span><code class="sw__key">Brush.VizInk</code><span class="sw__hex mono"></span><span class="sw__use">Primary: left, mid, main</span></button><button class="sw" data-hex="{"dark": "#5FB3A8", "light": "#3A8A7F", "ember-graphite": "#5B9E9C", "ember-paper": "#2F7472"}" title="Copy hex"><span class="sw__chip" style="background:var(--chroma-teal)"></span><span class="sw__name">2 · Teal</span><code class="sw__key">Brush.ChromaTeal</code><span class="sw__hex mono"></span><span class="sw__use">Lows, early, input, modulation</span></button><button class="sw" data-hex="{"dark": "#D77A8F", "light": "#B4566B", "ember-graphite": "#B57286", "ember-paper": "#86465B"}" title="Copy hex"><span class="sw__chip" style="background:var(--chroma-rose)"></span><span class="sw__name">3 · Rose</span><code class="sw__key">Brush.ChromaRose</code><span class="sw__hex mono"></span><span class="sw__use">Right, highs, tail</span></button><button class="sw" data-hex="{"dark": "#6A9FD8", "light": "#3F78B8", "ember-graphite": "#6D8FB5", "ember-paper": "#3E6288"}" title="Copy hex"><span class="sw__chip" style="background:var(--chroma-steel)"></span><span class="sw__name">4 · Blue</span><code class="sw__key">Brush.ChromaSteel</code><span class="sw__hex mono"></span><span class="sw__use">Rare fourth layer</span></button><button class="sw" data-hex="{"dark": "#86C9C0", "light": "#2E7067", "ember-graphite": "#7FC0BE", "ember-paper": "#3E8A88"}" title="Copy hex"><span class="sw__chip" style="background:var(--chroma-teal-light)"></span><span class="sw__name">Teal light</span><code class="sw__key">Brush.ChromaTealLight</code><span class="sw__hex mono"></span><span class="sw__use">Text on teal</span></button><button class="sw" data-hex="{"dark": "#E49EAE", "light": "#93404F", "ember-graphite": "#D79BAB", "ember-paper": "#7F2D43"}" title="Copy hex"><span class="sw__chip" style="background:var(--chroma-rose-light)"></span><span class="sw__name">Rose light</span><code class="sw__key">Brush.ChromaRoseLight</code><span class="sw__hex mono"></span><span class="sw__use">Text on rose</span></button></div><h3>Track palette · nine roles, returns, master</h3><div class="swatches"><button class="sw" data-hex="{"dark": "#7FB87A", "light": "#4A7F46", "ember-graphite": "#58B368", "ember-paper": "#328140"}" title="Copy hex"><span class="sw__chip" style="background:var(--track1)"></span><span class="sw__name">Drums</span><code class="sw__key">Brush.Track1</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#5FB3A8", "light": "#3A8A7F", "ember-graphite": "#4E9E7A", "ember-paper": "#306F53"}" title="Copy hex"><span class="sw__chip" style="background:var(--track2)"></span><span class="sw__name">Perc</span><code class="sw__key">Brush.Track2</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#5AA6C4", "light": "#357C99", "ember-graphite": "#3E8E8E", "ember-paper": "#256464"}" title="Copy hex"><span class="sw__chip" style="background:var(--track3)"></span><span class="sw__name">Bass</span><code class="sw__key">Brush.Track3</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#6A9FD8", "light": "#3F78B8", "ember-graphite": "#5AA0B8", "ember-paper": "#317187"}" title="Copy hex"><span class="sw__chip" style="background:var(--track4)"></span><span class="sw__name">Keys</span><code class="sw__key">Brush.Track4</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#E0A84A", "light": "#B8862F", "ember-graphite": "#C77F55", "ember-paper": "#985127"}" title="Copy hex"><span class="sw__chip" style="background:var(--track5)"></span><span class="sw__name">Texture</span><code class="sw__key">Brush.Track5</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#9D90C9", "light": "#7363A8", "ember-graphite": "#7A6FB0", "ember-paper": "#4B4082"}" title="Copy hex"><span class="sw__chip" style="background:var(--track6)"></span><span class="sw__name">FX</span><code class="sw__key">Brush.Track6</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#D77A8F", "light": "#B4566B", "ember-graphite": "#B05A7A", "ember-paper": "#7F3450"}" title="Copy hex"><span class="sw__chip" style="background:var(--track7)"></span><span class="sw__name">Brass</span><code class="sw__key">Brush.Track7</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#B3B45E", "light": "#7E7F2F", "ember-graphite": "#9AA64A", "ember-paper": "#6C752C"}" title="Copy hex"><span class="sw__chip" style="background:var(--track8)"></span><span class="sw__name">Vox</span><code class="sw__key">Brush.Track8</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#8E9DB0", "light": "#5D6C80", "ember-graphite": "#7FA88E", "ember-paper": "#598C69"}" title="Copy hex"><span class="sw__chip" style="background:var(--track9)"></span><span class="sw__name">Return</span><code class="sw__key">Brush.Track9</code><span class="sw__hex mono"></span><span class="sw__use"></span></button><button class="sw" data-hex="{"dark": "#8E9DB0", "light": "#5D6C80", "ember-graphite": "#7FA88E", "ember-paper": "#598C69"}" title="Copy hex"><span class="sw__chip" style="background:var(--return-a)"></span><span class="sw__name">Return A</span><code class="sw__key">Brush.ReturnA</code><span class="sw__hex mono"></span><span class="sw__use">Return bus</span></button><button class="sw" data-hex="{"dark": "#7A889A", "light": "#4E5B6D", "ember-graphite": "#6B907B", "ember-paper": "#3E6A4D"}" title="Copy hex"><span class="sw__chip" style="background:var(--return-b)"></span><span class="sw__name">Return B</span><code class="sw__key">Brush.ReturnB</code><span class="sw__hex mono"></span><span class="sw__use">Return bus</span></button><button class="sw" data-hex="{"dark": "#A4A9B0", "light": "#4F535A", "ember-graphite": "#8D8779", "ember-paper": "#746D5C"}" title="Copy hex"><span class="sw__chip" style="background:var(--master)"></span><span class="sw__name">Master</span><code class="sw__key">Brush.Master</code><span class="sw__hex mono"></span><span class="sw__use">Muted grey: the sum, not a track</span></button></div><h3>Elevation</h3>diff --git a/DESIGN.md b/DESIGN.mdindex 967ac714..cc1cc883 100644--- a/DESIGN.md+++ b/DESIGN.md@@ -120,6 +120,7 @@ Studio: WCAG where Studio meets it, Studio's own value where it does not.| T3.6 | Derived ink on the track and return colours | 3.0 || T3.7 | The nine track colours, pairwise | ΔE ≥ 12 || T3.8 | `Accent`, `Mute`, `Solo`, `Record`, pairwise | ΔE ≥ 15 |+| T3.9 | `RecordInk` on `Record`, `SuccessInk` on `Success` | 4.5 |Track colours are not compared with state colours: solo blue is the Keys track blue bydesign. **Known gap:** in Studio Light the accent line on the ground (2.39) and faint ink@@ -139,6 +140,7 @@ HSL lightness (hue kept) that passes the bar:| ember-graphite | `TextDisabled` | `#55514A` | `#646054` | T3.3 TextDisabled/Panel 2.36 < 2.5; T3.3 TextDisabled/SurfaceHover 2.31 < 2.5; T3.3 TextDisabled/SurfaceRaised 2.41 < 2.5 || ember-graphite | `TextAxis` | `#4A463D` | `#65614F` | T3.3 TextAxis/BgApp 2.10 < 2.5; T3.3 TextAxis/Panel 2.38 < 2.5; T3.3 TextAxis/SurfaceHover 2.33 < 2.5; T3.3 TextAxis/SurfaceRaised 2.44 < 2.5 || ember-graphite | `Record` | `#C25B44` | `#BE563E` | T3.5 Record 4.31 < 4.5 |+| ember-graphite | `RecordInk` | `#F4E3DC` | `#FFFFFF` | T3.9 RecordInk/Record 3.67 < 4.5 || ember-paper | `TextMuted` | `#746D5C` | `#625B50` | T3.1 TextMuted/BgApp 3.54 < 4.5 || ember-paper | `TextTertiary` | `#8A8474` | `#7E786C` | T3.2 TextTertiary/BgApp 2.57 < 3.0 || ember-paper | `TextFaint` | `#9E9786` | `#8D866F` | T3.3 TextFaint/BgApp 2.00 < 2.5 |@@ -256,13 +258,14 @@ Fluent's `SystemAccentColor` ramps are retinted to the orange, so stock controls| Key | Role | Dark | Light | Use ||---|---|---|---|---|| `Brush.Record` | error | `#F06A6E` | `#B3262C` | Record and arm — solid when on |-| `Brush.RecordInk` | — | `#FFFFFF` | `#FFFFFF` | The disc on an engaged record key |+| `Brush.RecordInk` | — | `#17181A` | `#FFFFFF` | The disc on an engaged record key: dark on Dark's light red || `Brush.Danger` | error | `#F06A6E` | `#B3262C` | Overload, clipping, error text || `Brush.DangerBright` | — | `#F58F92` | `#9C1F24` | Overload readout text || `Brush.Mute` | warning amber | `#F2B53C` | `#7A4F00` | Mute on || `Brush.Warning` | warning amber | `#F2B53C` | `#7A4F00` | Meter −6…0 dB || `Brush.Solo` | track blue | `#6A9FD8` | `#3F78B8` | Solo on || `Brush.Success` | green | `#6CC673` | `#22692B` | Meter safe range, positive status; Play in Session |+| `Brush.SuccessInk` | — | `#17181A` | `#FFFFFF` | The glyph on a green key (Session play) || `Brush.SuccessDim` | green-dim | `#3F8A45` | `#79B880` | Transport input, metronome |`DangerHover` and `DangerSubtle` complete the error family; `NotaPalette` adds `DangerDeep`diff --git a/scripts/design-html.py b/scripts/design-html.pyindex 2b8810f3..913fd69d 100755--- a/scripts/design-html.py+++ b/scripts/design-html.py@@ -87,7 +87,7 @@ surfaces=[('BgSunken','Well','Graph windows, fields, readouts, the console; preslines=[('Seam','Seam','Between panels, around controls, between keys'),('Rule','Rule','Within a panel: separators, field edges, graph frame'),('BorderBrass','Accent line','An accent stroke where a fill is too heavy'),('GridBeat','Grid','Beat grid, zero axis'),('GridBar','Grid bar','Bar lines'),('VizGrid','Viz grid','Grid inside a graph window')]inks=[('TextHeading','Ink 0','Modal and section titles'),('TextPrimary','Primary','Names, values, button text'),('TextStrong','Ink 2','Toggle-key text, transport glyphs'),('TextSecondary','Secondary','Labels, idle icons, metadata'),('TextMuted','Muted','Section labels, units, badges'),('TextTertiary','Ink 5','Row tags, placeholders, empty states'),('TextFaint','Faint','Disabled controls; axis labels in graphs'),('VizInk','Viz ink','A value at rest: arcs, fills, curves'),('TextOnAccent','On accent','Text on the accent')]accent=[('Accent','Accent','Playing, selected, playhead, loop, toggled on, live'),('AccentBright','Accent glow','The accent as a line or text'),('AccentDeep','Pressed','Pressed accent'),('AccentDim','Accent dim','The soft accent')]-sem=[('Record','Record','Record and arm, solid when on'),('RecordInk','Record ink','Disc on an engaged record key'),('Danger','Error','Overload, clipping, error text'),('DangerBright','Error light','Overload readout'),('Mute','Mute','Mute on — amber'),('Solo','Solo','Solo on — blue'),('Warning','Warning','Meter −6…0 dB'),('Success','Green','Meter safe range, positive status'),('SuccessDim','Green dim','Input, metronome')]+sem=[('Record','Record','Record and arm, solid when on'),('RecordInk','Record ink','Disc on an engaged record key'),('Danger','Error','Overload, clipping, error text'),('DangerBright','Error light','Overload readout'),('Mute','Mute','Mute on — amber'),('Solo','Solo','Solo on — blue'),('Warning','Warning','Meter −6…0 dB'),('Success','Green','Meter safe range, positive status'),('SuccessInk','Green ink','Glyph on a green key (Session play)'),('SuccessDim','Green dim','Input, metronome')]chromas=[('VizInk','1 · Viz ink','Primary: left, mid, main'),('ChromaTeal','2 · Teal','Lows, early, input, modulation'),('ChromaRose','3 · Rose','Right, highs, tail'),('ChromaSteel','4 · Blue','Rare fourth layer'),('ChromaTealLight','Teal light','Text on teal'),('ChromaRoseLight','Rose light','Text on rose')]ROLES=['Drums','Perc','Bass','Keys','Texture','FX','Brass','Vox','Return']tracks=[(f'Track{i+1}',n,'') for i,n in enumerate(ROLES)]+[('ReturnA','Return A','Return bus'),('ReturnB','Return B','Return bus'),('Master','Master','Muted grey: the sum, not a track')]diff --git a/src/managed/Nota.App/Controls/ArpGrid.cs b/src/managed/Nota.App/Controls/ArpGrid.csindex 21a22bdd..4a80cd7d 100644--- a/src/managed/Nota.App/Controls/ArpGrid.cs+++ b/src/managed/Nota.App/Controls/ArpGrid.cs@@ -195,7 +195,10 @@ internal sealed class ArpGrid : Control}else Apply(s, d);}- protected override void OnPointerReleased(PointerReleasedEventArgs e) { if (_dragStep >= 0) { _dragStep = -1; e.Pointer.Capture(null); } }+ protected override void OnPointerReleased(PointerReleasedEventArgs e) { if (_dragStep >= 0) { _dragStep = -1; InvalidateVisual(); e.Pointer.Capture(null); } }++ // Capture taken away mid-drag (the window deactivates): end the drag.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e) { if (_dragStep >= 0) { _dragStep = -1; InvalidateVisual(); } base.OnPointerCaptureLost(e); }private int StepAt(double x) { var w = Well(); int n = StepCount; return Math.Clamp((int)((x - w.X) / w.Width * n), 0, n - 1); }private double DispAt(double y)diff --git a/src/managed/Nota.App/Controls/AutoFilterCurve.cs b/src/managed/Nota.App/Controls/AutoFilterCurve.csindex b28f48bb..5852b7fd 100644--- a/src/managed/Nota.App/Controls/AutoFilterCurve.cs+++ b/src/managed/Nota.App/Controls/AutoFilterCurve.cs@@ -124,11 +124,18 @@ internal sealed class AutoFilterCurve : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (!_drag) return;- _drag = false;+ _drag = false; InvalidateVisual();GestureEnd?.Invoke();e.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);+ }+private void Apply(Point p){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/AutoFilterViews.cs b/src/managed/Nota.App/Controls/AutoFilterViews.csindex c6e66324..1ebfdb20 100644--- a/src/managed/Nota.App/Controls/AutoFilterViews.cs+++ b/src/managed/Nota.App/Controls/AutoFilterViews.cs@@ -65,7 +65,14 @@ internal sealed class AfFader : Control{base.OnPointerReleased(e);if (!_drag) return;- _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke();+ _drag = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke();+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);}public override void Render(DrawingContext ctx)@@ -128,7 +135,13 @@ internal abstract class AfWindowBase : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (!_drag) return;- _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke();+ _drag = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke();+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);}protected static void Grid(DrawingContext ctx, double w, double h, int cols)diff --git a/src/managed/Nota.App/Controls/ChamberViews.cs b/src/managed/Nota.App/Controls/ChamberViews.csindex 87730d93..1c40d57e 100644--- a/src/managed/Nota.App/Controls/ChamberViews.cs+++ b/src/managed/Nota.App/Controls/ChamberViews.cs@@ -85,7 +85,11 @@ internal sealed class ChamberFader : Control}protected override void OnPointerMoved(PointerEventArgs e) { base.OnPointerMoved(e); if (_drag) Apply(e); }protected override void OnPointerReleased(PointerReleasedEventArgs e)- { base.OnPointerReleased(e); if (_drag) { _drag = false; e.Pointer.Capture(null); DragEnded?.Invoke(); } }+ { base.OnPointerReleased(e); if (_drag) { _drag = false; InvalidateVisual(); e.Pointer.Capture(null); DragEnded?.Invoke(); } }++ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag) { _drag = false; InvalidateVisual(); DragEnded?.Invoke(); } base.OnPointerCaptureLost(e); }public override void Render(DrawingContext ctx){@@ -187,6 +191,9 @@ internal sealed class ChamberIrView : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){ base.OnPointerReleased(e); if (_drag != 0) { int d = _drag; _drag = 0; e.Pointer.Capture(null); DragEnded?.Invoke(d); } }+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag != 0) { int d = _drag; _drag = 0; InvalidateVisual(); DragEnded?.Invoke(d); } base.OnPointerCaptureLost(e); }+private static string Sec(double s) => s >= 1 ? NotaNum.F($"{s:0.00}\u2009s") : NotaNum.F($"{s * 1000:0}\u2009ms");public override void Render(DrawingContext ctx)@@ -372,7 +379,10 @@ internal sealed class ChamberDecayGraph : ControlChanged?.Invoke(_drag, _rt[_drag]); InvalidateVisual();}protected override void OnPointerReleased(PointerReleasedEventArgs e)- { base.OnPointerReleased(e); if (_drag >= 0) { int b = _drag; _drag = -1; e.Pointer.Capture(null); DragEnded?.Invoke(b); } }+ { base.OnPointerReleased(e); if (_drag >= 0) { int b = _drag; _drag = -1; InvalidateVisual(); e.Pointer.Capture(null); DragEnded?.Invoke(b); } }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag >= 0) { int b = _drag; _drag = -1; InvalidateVisual(); DragEnded?.Invoke(b); } base.OnPointerCaptureLost(e); }private static string S(double s) => s >= 10 ? NotaNum.F($"{s:0}\u2009s") : NotaNum.F($"{s:0.0}\u2009s");@@ -498,7 +508,10 @@ internal sealed class ChamberEqCurve : ControlInvalidateVisual();}protected override void OnPointerReleased(PointerReleasedEventArgs e)- { base.OnPointerReleased(e); if (_drag >= 0) { int d = _drag; _drag = -1; e.Pointer.Capture(null); DragEnded?.Invoke(d); } }+ { base.OnPointerReleased(e); if (_drag >= 0) { int d = _drag; _drag = -1; InvalidateVisual(); e.Pointer.Capture(null); DragEnded?.Invoke(d); } }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag >= 0) { int d = _drag; _drag = -1; InvalidateVisual(); DragEnded?.Invoke(d); } base.OnPointerCaptureLost(e); }// |H| (dB) of the four stages at f.private double Db(double f)diff --git a/src/managed/Nota.App/Controls/ChordShiftTrack.cs b/src/managed/Nota.App/Controls/ChordShiftTrack.csindex 5fdf5b23..ff23ba54 100644--- a/src/managed/Nota.App/Controls/ChordShiftTrack.cs+++ b/src/managed/Nota.App/Controls/ChordShiftTrack.cs@@ -82,14 +82,14 @@ internal sealed class ChordShiftTrack : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (!_drag) return;- _drag = false;+ _drag = false; InvalidateVisual();e.Pointer.Capture(null);GestureEnd?.Invoke();}protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e){- if (_drag) { _drag = false; GestureEnd?.Invoke(); }+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }base.OnPointerCaptureLost(e);}diff --git a/src/managed/Nota.App/Controls/ChorusViews.cs b/src/managed/Nota.App/Controls/ChorusViews.csindex 0fcfec34..81cfdd26 100644--- a/src/managed/Nota.App/Controls/ChorusViews.cs+++ b/src/managed/Nota.App/Controls/ChorusViews.cs@@ -107,6 +107,13 @@ internal sealed class ChorusVoicesView : Control_drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/CompViews.cs b/src/managed/Nota.App/Controls/CompViews.csindex 14b5d6ce..88167f98 100644--- a/src/managed/Nota.App/Controls/CompViews.cs+++ b/src/managed/Nota.App/Controls/CompViews.cs@@ -104,7 +104,14 @@ internal sealed class CompFader : Control{base.OnPointerReleased(e);if (!_drag) return;- _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke();+ _drag = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke();+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);}public override void Render(DrawingContext ctx)@@ -176,7 +183,13 @@ internal sealed class CompTransferView : Control{base.OnPointerReleased(e);if (!_drag) return;- _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke();+ _drag = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke();+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);}private void Apply(Point p){@@ -465,6 +478,17 @@ internal sealed class CompKeyView : Controlif (_qGesture) { GestureEnd?.Invoke(2); _qGesture = false; }_drag = 0; e.Pointer.Capture(null);}++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag != 0)+ {+ GestureEnd?.Invoke(_drag - 1);+ if (_qGesture) { GestureEnd?.Invoke(2); _qGesture = false; }+ _drag = 0; InvalidateVisual();+ }+ base.OnPointerCaptureLost(e);+ }private void Apply(Point p){double hz = HzOf(p.X, Bounds.Width);diff --git a/src/managed/Nota.App/Controls/ConsortViews.cs b/src/managed/Nota.App/Controls/ConsortViews.csindex 7e6be909..65a4146d 100644--- a/src/managed/Nota.App/Controls/ConsortViews.cs+++ b/src/managed/Nota.App/Controls/ConsortViews.cs@@ -190,7 +190,11 @@ internal sealed class ConsortFilterCurve : Control{ base.OnPointerPressed(e); if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return; _drag = true; DragStarted?.Invoke(); Apply(e); e.Pointer.Capture(this); e.Handled = true; }protected override void OnPointerMoved(PointerEventArgs e) { base.OnPointerMoved(e); if (_drag) Apply(e); }protected override void OnPointerReleased(PointerReleasedEventArgs e)- { base.OnPointerReleased(e); if (_drag) { _drag = false; DragEnded?.Invoke(); e.Pointer.Capture(null); } }+ { base.OnPointerReleased(e); if (_drag) { _drag = false; InvalidateVisual(); DragEnded?.Invoke(); e.Pointer.Capture(null); } }++ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag) { _drag = false; InvalidateVisual(); DragEnded?.Invoke(); } base.OnPointerCaptureLost(e); }// |H| of a 4-pole ladder at ω/ωc = wr (resonance k), low-pass or high-pass tap.private double Mag(double wr, bool hp)@@ -333,7 +337,10 @@ internal sealed class ConsortStepGrid : Controlif (i >= 0 && i != _last) { _last = i; Paint?.Invoke(i, (e.KeyModifiers & KeyModifiers.Alt) != 0); }}protected override void OnPointerReleased(PointerReleasedEventArgs e)- { base.OnPointerReleased(e); if (_drag) { _drag = false; PaintEnded?.Invoke(); e.Pointer.Capture(null); } }+ { base.OnPointerReleased(e); if (_drag) { _drag = false; InvalidateVisual(); PaintEnded?.Invoke(); e.Pointer.Capture(null); } }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag) { _drag = false; InvalidateVisual(); PaintEnded?.Invoke(); } base.OnPointerCaptureLost(e); }public override void Render(DrawingContext ctx){@@ -396,7 +403,10 @@ internal sealed class ConsortPitchLane : Controlif (v != _p[_dragStep]) { _p[_dragStep] = v; PitchChanged?.Invoke(_dragStep, v); InvalidateVisual(); }}protected override void OnPointerReleased(PointerReleasedEventArgs e)- { base.OnPointerReleased(e); if (_dragStep >= 0) { DragEnded?.Invoke(_dragStep); _dragStep = -1; e.Pointer.Capture(null); } }+ { base.OnPointerReleased(e); if (_dragStep >= 0) { DragEnded?.Invoke(_dragStep); _dragStep = -1; InvalidateVisual(); e.Pointer.Capture(null); } }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_dragStep >= 0) { DragEnded?.Invoke(_dragStep); _dragStep = -1; InvalidateVisual(); } base.OnPointerCaptureLost(e); }public override void Render(DrawingContext ctx){@@ -535,6 +545,12 @@ internal sealed class ConsortJackField : Controlelse if (!_moved) Context?.Invoke(f, this);_from = null; e.Pointer.Capture(null); InvalidateVisual();}++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_from is not null) { _from = null; InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }protected override void OnPointerExited(PointerEventArgs e) { base.OnPointerExited(e); if (_hover != null) { _hover = null; InvalidateVisual(); } }private static void Cable(DrawingContext ctx, Point a, Point b, IBrush brush, bool list, double thick = 2.4)@@ -692,7 +708,13 @@ internal sealed class ConsortPatchMatrix : Controlbase.OnPointerReleased(e);if (_drag is not { } dg) return;GestureEnd?.Invoke(_rows[dg.r], _cols[dg.c]);- _drag = null; e.Pointer.Capture(null);+ _drag = null; InvalidateVisual(); e.Pointer.Capture(null);+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag is { } dg) { GestureEnd?.Invoke(_rows[dg.r], _cols[dg.c]); _drag = null; InvalidateVisual(); }+ base.OnPointerCaptureLost(e);}public override void Render(DrawingContext ctx)diff --git a/src/managed/Nota.App/Controls/CrushViews.cs b/src/managed/Nota.App/Controls/CrushViews.csindex 46f15d29..c6989713 100644--- a/src/managed/Nota.App/Controls/CrushViews.cs+++ b/src/managed/Nota.App/Controls/CrushViews.cs@@ -108,6 +108,13 @@ internal sealed class CrQuantView : Control_drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); InvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/DelayViews.cs b/src/managed/Nota.App/Controls/DelayViews.csindex aa9fb070..ac8ca42c 100644--- a/src/managed/Nota.App/Controls/DelayViews.cs+++ b/src/managed/Nota.App/Controls/DelayViews.cs@@ -156,7 +156,14 @@ internal sealed class DelayFader : Control{base.OnPointerReleased(e);if (!_drag) return;- _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke();+ _drag = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke();+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);}public override void Render(DrawingContext ctx)@@ -247,6 +254,12 @@ internal sealed class DelayFilterCurve : ControlGestureEnd?.Invoke(_drag - 1); _drag = 0; e.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag != 0) { GestureEnd?.Invoke(_drag - 1); _drag = 0; InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/DragNumber.cs b/src/managed/Nota.App/Controls/DragNumber.csindex 11983765..2235cac3 100644--- a/src/managed/Nota.App/Controls/DragNumber.cs+++ b/src/managed/Nota.App/Controls/DragNumber.cs@@ -99,6 +99,13 @@ public sealed class DragNumber : UserControle.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+private void BeginEditor(){_editing = true;diff --git a/src/managed/Nota.App/Controls/DynamicEqCurve.cs b/src/managed/Nota.App/Controls/DynamicEqCurve.csindex 584f5b93..89610db2 100644--- a/src/managed/Nota.App/Controls/DynamicEqCurve.cs+++ b/src/managed/Nota.App/Controls/DynamicEqCurve.cs@@ -262,7 +262,7 @@ public sealed class DynamicEqCurve : Controlif (_gestFreq) _engine.EndAutomationWrite(_track, AutomationTarget.DeviceParam, _device, DynEq.P(_drag, DynEq.FreqF), "");if (_gestGain) _engine.EndAutomationWrite(_track, AutomationTarget.DeviceParam, _device, DynEq.P(_drag, DynEq.GainF), "");}- _drag = -1; _gestFreq = _gestGain = false;+ _drag = -1; InvalidateVisual(); _gestFreq = _gestGain = false;}protected override void OnPointerWheelChanged(PointerWheelEventArgs e)@@ -465,7 +465,8 @@ public sealed class DynamicEqCurve : Controlbool bOn = BandOn(b), isSel = b == sel, dimmed = solo >= 0 && !isSel;var c = NodeAt(b);IBrush fill = !bOn || dimmed ? NotaPalette.BorderStrong : isSel ? NotaPalette.AccentBright : NotaPalette.TextSecondary;- IBrush num = bOn && !dimmed ? NotaPalette.TextOnAccent : NotaPalette.TextTertiary;+ // The number takes ink derived from its own node (orange, grey or dim), so it reads on all of them.+ IBrush num = bOn && !dimmed && fill is SolidColorBrush f ? NotaPalette.InkOn(f) : NotaPalette.TextTertiary;double r = NodeD / 2;ctx.DrawEllipse(fill, RingPen, c, r + 1, r + 1);if (IsDyn(b) && on[b])diff --git a/src/managed/Nota.App/Controls/Eq3Views.cs b/src/managed/Nota.App/Controls/Eq3Views.csindex dcd862ff..b23891b0 100644--- a/src/managed/Nota.App/Controls/Eq3Views.cs+++ b/src/managed/Nota.App/Controls/Eq3Views.cs@@ -139,6 +139,13 @@ internal sealed class Eq3Fader : Control_drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); InvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;@@ -309,6 +316,17 @@ internal sealed class Eq3Graph : ControlInvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag >= 0)+ {+ int d = _drag; _drag = -1;+ if (d < 2) XoverEnd?.Invoke(d); else GainEnd?.Invoke(d - 2);+ InvalidateVisual();+ }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/Eq8Views.cs b/src/managed/Nota.App/Controls/Eq8Views.csindex 1ca49a29..ebcb5548 100644--- a/src/managed/Nota.App/Controls/Eq8Views.cs+++ b/src/managed/Nota.App/Controls/Eq8Views.cs@@ -268,7 +268,7 @@ public sealed class Eq8Curve : Controlif (_gestFreq) _engine.EndAutomationWrite(_track, AutomationTarget.DeviceParam, _device, Eq8.P(_drag, Eq8.FreqF), "");if (_gestGain) _engine.EndAutomationWrite(_track, AutomationTarget.DeviceParam, _device, Eq8.P(_drag, Eq8.GainF), "");}- _drag = -1; _gestFreq = _gestGain = false;+ _drag = -1; InvalidateVisual(); _gestFreq = _gestGain = false;}protected override void OnPointerWheelChanged(PointerWheelEventArgs e)@@ -448,7 +448,8 @@ public sealed class Eq8Curve : Controlbool bOn = BandOn(b), isSel = b == sel;var c = NodeAt(b);IBrush fill = !bOn ? NotaPalette.BorderStrong : isSel ? NotaPalette.AccentBright : ch[b] == Eq8.Side ? NotaPalette.TealBright : NotaPalette.TextSecondary;- IBrush num = bOn ? NotaPalette.TextOnAccent : NotaPalette.TextTertiary;+ // The number takes ink derived from its own node (orange, teal or grey), so it reads on all of them.+ IBrush num = bOn && fill is SolidColorBrush f ? NotaPalette.InkOn(f) : NotaPalette.TextTertiary;double r = NodeD / 2;ctx.DrawEllipse(fill, RingPen, c, r + 1, r + 1);if (bOn && ch[b] != Eq8.Side && Eq8.ChannelInk(ch[b]) is { } ring) // Mid neutral, L / R rosediff --git a/src/managed/Nota.App/Controls/FlangerViews.cs b/src/managed/Nota.App/Controls/FlangerViews.csindex c0b6df2c..74ae14ad 100644--- a/src/managed/Nota.App/Controls/FlangerViews.cs+++ b/src/managed/Nota.App/Controls/FlangerViews.cs@@ -135,6 +135,13 @@ internal sealed class FlangerCombView : Control_drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); InvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/FluxVectorPad.cs b/src/managed/Nota.App/Controls/FluxVectorPad.csindex ec9948fa..a5549589 100644--- a/src/managed/Nota.App/Controls/FluxVectorPad.cs+++ b/src/managed/Nota.App/Controls/FluxVectorPad.cs@@ -72,11 +72,11 @@ internal sealed class FluxVectorPad : Control}protected override void OnPointerReleased(PointerReleasedEventArgs e){- if (_drag) { _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); }+ if (_drag) { _drag = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke(); }}protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e){- if (_drag) { _drag = false; GestureEnd?.Invoke(); }+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }}private void Apply(Point p)diff --git a/src/managed/Nota.App/Controls/GrainWaveViz.cs b/src/managed/Nota.App/Controls/GrainWaveViz.csindex be3be7cf..c6b58e4e 100644--- a/src/managed/Nota.App/Controls/GrainWaveViz.cs+++ b/src/managed/Nota.App/Controls/GrainWaveViz.cs@@ -94,11 +94,11 @@ internal sealed class GrainWaveViz : Controlprotected override void OnPointerMoved(PointerEventArgs e) { if (_drag) Apply(e.GetPosition(this)); }protected override void OnPointerReleased(PointerReleasedEventArgs e){- if (_drag) { _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); }+ if (_drag) { _drag = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke(); }}protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e){- if (_drag) { _drag = false; GestureEnd?.Invoke(); }+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }}private void Apply(Point p){diff --git a/src/managed/Nota.App/Controls/KeysViews.cs b/src/managed/Nota.App/Controls/KeysViews.csindex 5392ba88..7818f1fa 100644--- a/src/managed/Nota.App/Controls/KeysViews.cs+++ b/src/managed/Nota.App/Controls/KeysViews.cs@@ -75,12 +75,24 @@ internal sealed class KeysPickupView : Control, IMidiLearnRegionsprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (!_drag) return;- _drag = false;+ _drag = false; InvalidateVisual();_e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, "sym");_e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, "dist");e.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag)+ {+ _drag = false; InvalidateVisual();+ _e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, "sym");+ _e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, "dist");+ }+ base.OnPointerCaptureLost(e);+ }+private void Apply(Point p){var r = Plot();diff --git a/src/managed/Nota.App/Controls/Knob.cs b/src/managed/Nota.App/Controls/Knob.csindex a8017928..9203ce6d 100644--- a/src/managed/Nota.App/Controls/Knob.cs+++ b/src/managed/Nota.App/Controls/Knob.cs@@ -168,6 +168,13 @@ public sealed class Knob : ControlInvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+// Under the pointer the knob is live: its arc takes the accent (120ms is the button// fade; a dial repaints on the spot, which reads the same at this size).private bool _hover;diff --git a/src/managed/Nota.App/Controls/LensViews.cs b/src/managed/Nota.App/Controls/LensViews.csindex 468e76d1..259c1407 100644--- a/src/managed/Nota.App/Controls/LensViews.cs+++ b/src/managed/Nota.App/Controls/LensViews.cs@@ -333,6 +333,9 @@ internal sealed class LensScopeView : Controlprotected override void OnPointerMoved(PointerEventArgs e) { if (_drag != 0) Apply(e.GetPosition(this)); }protected override void OnPointerReleased(PointerReleasedEventArgs e) { _drag = 0; e.Pointer.Capture(null); }+ // Capture taken away mid-drag (the window deactivates): end the drag.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e) { if (_drag != 0) { _drag = 0; InvalidateVisual(); } base.OnPointerCaptureLost(e); }+private void Apply(Point p){double w = Bounds.Width, h = Bounds.Height;@@ -607,7 +610,13 @@ internal sealed class LensVSlider : Control}protected override void OnPointerReleased(PointerReleasedEventArgs e){- if (_drag) { _drag = false; GestureEnd?.Invoke(); e.Pointer.Capture(null); }+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); e.Pointer.Capture(null); }+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);}protected override void OnPointerWheelChanged(PointerWheelEventArgs e){diff --git a/src/managed/Nota.App/Controls/LevelViews.cs b/src/managed/Nota.App/Controls/LevelViews.csindex 1434ec92..728659dd 100644--- a/src/managed/Nota.App/Controls/LevelViews.cs+++ b/src/managed/Nota.App/Controls/LevelViews.cs@@ -109,7 +109,14 @@ internal sealed class LvHistoryView : Control{base.OnPointerReleased(e);if (!_dragging) return;- _dragging = false; e.Pointer.Capture(null); GestureEnd?.Invoke();+ _dragging = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke();+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_dragging) { _dragging = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);}public override void Render(DrawingContext ctx)@@ -225,7 +232,13 @@ internal sealed class LvGainFader : Control{base.OnPointerReleased(e);if (!_drag) return;- _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke();+ _drag = false; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke();+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; InvalidateVisual(); GestureEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);}public override void Render(DrawingContext ctx)diff --git a/src/managed/Nota.App/Controls/MiniFader.cs b/src/managed/Nota.App/Controls/MiniFader.csindex 45a766b0..76203b69 100644--- a/src/managed/Nota.App/Controls/MiniFader.cs+++ b/src/managed/Nota.App/Controls/MiniFader.cs@@ -96,6 +96,13 @@ public sealed class MiniFader : Controlif (_drag) GestureEnd?.Invoke();_drag = false;e.Pointer.Capture(null);+ InvalidateVisual(); // a drag that ended off the control leaves no hover to repaint it+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);}private void SetValue(double raw)diff --git a/src/managed/Nota.App/Controls/MonolithViews.cs b/src/managed/Nota.App/Controls/MonolithViews.csindex 6d6da0b7..17d5a5ee 100644--- a/src/managed/Nota.App/Controls/MonolithViews.cs+++ b/src/managed/Nota.App/Controls/MonolithViews.cs@@ -99,7 +99,11 @@ internal sealed class MonolithFilterCurve : Controlprotected override void OnPointerMoved(PointerEventArgs e){ base.OnPointerMoved(e); if (_drag) Apply(e); }protected override void OnPointerReleased(PointerReleasedEventArgs e)- { base.OnPointerReleased(e); if (_drag) { _drag = false; DragEnded?.Invoke(); e.Pointer.Capture(null); } }+ { base.OnPointerReleased(e); if (_drag) { _drag = false; InvalidateVisual(); DragEnded?.Invoke(); e.Pointer.Capture(null); } }++ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag) { _drag = false; InvalidateVisual(); DragEnded?.Invoke(); } base.OnPointerCaptureLost(e); }private double Y(double x, double w, double h){diff --git a/src/managed/Nota.App/Controls/OperatorAlgoViz.cs b/src/managed/Nota.App/Controls/OperatorAlgoViz.csindex 261d1b64..aa16d448 100644--- a/src/managed/Nota.App/Controls/OperatorAlgoViz.cs+++ b/src/managed/Nota.App/Controls/OperatorAlgoViz.cs@@ -184,6 +184,13 @@ internal sealed class OperatorRoutingViz : ControlInvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): drop the cable without rerouting.+ if (_drag >= 0) { _drag = -1; InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+// Change one operator's target, then snap to the algorithm that best matches.private void TryReroute(int src, int newTgt){diff --git a/src/managed/Nota.App/Controls/OrbitViews.cs b/src/managed/Nota.App/Controls/OrbitViews.csindex 0e98db89..bd7d5859 100644--- a/src/managed/Nota.App/Controls/OrbitViews.cs+++ b/src/managed/Nota.App/Controls/OrbitViews.cs@@ -124,6 +124,13 @@ internal sealed class OrbitGainView : Control_drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); InvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/PanBar.cs b/src/managed/Nota.App/Controls/PanBar.csindex 78f1148a..252b916b 100644--- a/src/managed/Nota.App/Controls/PanBar.cs+++ b/src/managed/Nota.App/Controls/PanBar.cs@@ -86,6 +86,13 @@ public sealed class PanBar : Controlif (_drag) GestureEnd?.Invoke();_drag = false;e.Pointer.Capture(null);+ InvalidateVisual(); // a drag that ended off the control leaves no hover to repaint it+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);}private void Apply(double p)diff --git a/src/managed/Nota.App/Controls/PanKnob.cs b/src/managed/Nota.App/Controls/PanKnob.csindex d6aa132b..c2a8f4a7 100644--- a/src/managed/Nota.App/Controls/PanKnob.cs+++ b/src/managed/Nota.App/Controls/PanKnob.cs@@ -35,6 +35,9 @@ internal sealed class PanKnob : Control}protected override void OnPointerReleased(PointerReleasedEventArgs e) { if (_drag) GestureEnd?.Invoke(); _drag = false; e.Pointer.Capture(null); }+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e) { if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); } base.OnPointerCaptureLost(e); }+public override void Render(DrawingContext ctx){double cx = Bounds.Width / 2, cy = Bounds.Height / 2, r = 11;diff --git a/src/managed/Nota.App/Controls/PentadViews.cs b/src/managed/Nota.App/Controls/PentadViews.csindex 9c095480..308bdf5e 100644--- a/src/managed/Nota.App/Controls/PentadViews.cs+++ b/src/managed/Nota.App/Controls/PentadViews.cs@@ -83,7 +83,11 @@ internal sealed class PentadFilterCurve : Control{ base.OnPointerPressed(e); if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return; _drag = true; DragStarted?.Invoke(); Apply(e); e.Pointer.Capture(this); e.Handled = true; }protected override void OnPointerMoved(PointerEventArgs e) { base.OnPointerMoved(e); if (_drag) Apply(e); }protected override void OnPointerReleased(PointerReleasedEventArgs e)- { base.OnPointerReleased(e); if (_drag) { _drag = false; DragEnded?.Invoke(); e.Pointer.Capture(null); } }+ { base.OnPointerReleased(e); if (_drag) { _drag = false; InvalidateVisual(); DragEnded?.Invoke(); e.Pointer.Capture(null); } }++ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag) { _drag = false; InvalidateVisual(); DragEnded?.Invoke(); } base.OnPointerCaptureLost(e); }// dB at normalized x (0..1 across 20 Hz..20 kHz): 4 identical poles with feedback k.private double Db(double x)diff --git a/src/managed/Nota.App/Controls/PerformWheel.cs b/src/managed/Nota.App/Controls/PerformWheel.csindex bdcf84ef..1528b3db 100644--- a/src/managed/Nota.App/Controls/PerformWheel.cs+++ b/src/managed/Nota.App/Controls/PerformWheel.cs@@ -80,12 +80,24 @@ internal sealed class PerformWheel : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (!_drag) return;- _drag = false;+ _drag = false; InvalidateVisual();e.Pointer.Capture(null);if (Spring) Write(Default);GestureEnd?.Invoke();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): spring back, end the gesture and drop the accent.+ if (_drag)+ {+ _drag = false; InvalidateVisual();+ if (Spring) Write(Default);+ GestureEnd?.Invoke();+ }+ base.OnPointerCaptureLost(e);+ }+private void Write(double v){v = Math.Clamp(v, 0, 1);diff --git a/src/managed/Nota.App/Controls/PhaserViews.cs b/src/managed/Nota.App/Controls/PhaserViews.csindex 37cf2ecd..b4149b1e 100644--- a/src/managed/Nota.App/Controls/PhaserViews.cs+++ b/src/managed/Nota.App/Controls/PhaserViews.cs@@ -152,6 +152,13 @@ internal sealed class PhaserResponseView : Control_drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); InvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/PrismViews.cs b/src/managed/Nota.App/Controls/PrismViews.csindex 1c59f673..72c77f25 100644--- a/src/managed/Nota.App/Controls/PrismViews.cs+++ b/src/managed/Nota.App/Controls/PrismViews.cs@@ -162,6 +162,13 @@ internal sealed class PrismSpectrum : Controlint d = _drag; _drag = -1; e.Pointer.Capture(null); DragEnded?.Invoke(d); InvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag >= 0) { int d = _drag; _drag = -1; DragEnded?.Invoke(d); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;@@ -336,6 +343,12 @@ internal sealed class PrismTransfer : Controlint d = _drag; _drag = 0; e.Pointer.Capture(null); DragEnded?.Invoke(d);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag != 0) { int d = _drag; _drag = 0; DragEnded?.Invoke(d); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/Controls/RangeSliderTrack.cs b/src/managed/Nota.App/Controls/RangeSliderTrack.csindex 06af2436..bb257f5d 100644--- a/src/managed/Nota.App/Controls/RangeSliderTrack.cs+++ b/src/managed/Nota.App/Controls/RangeSliderTrack.cs@@ -61,7 +61,7 @@ internal sealed class RangeSliderTrack : Controlif (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;if (e.ClickCount == 2 && Reset is not null){- if (_drag >= 0) { int d = _drag; _drag = -1; e.Pointer.Capture(null); GestureEnd?.Invoke(d); }+ if (_drag >= 0) { int d = _drag; _drag = -1; InvalidateVisual(); e.Pointer.Capture(null); GestureEnd?.Invoke(d); }Reset();e.Handled = true;return;@@ -110,7 +110,7 @@ internal sealed class RangeSliderTrack : Controlprotected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e){- if (_drag >= 0) { int d = _drag; _drag = -1; GestureEnd?.Invoke(d); }+ if (_drag >= 0) { int d = _drag; _drag = -1; InvalidateVisual(); GestureEnd?.Invoke(d); }base.OnPointerCaptureLost(e);}diff --git a/src/managed/Nota.App/Controls/ReverbViews.cs b/src/managed/Nota.App/Controls/ReverbViews.csindex 424508e9..261e70f4 100644--- a/src/managed/Nota.App/Controls/ReverbViews.cs+++ b/src/managed/Nota.App/Controls/ReverbViews.cs@@ -90,6 +90,13 @@ internal sealed class ReverbTailView : ControlGestureEnd?.Invoke(_drag - 1); _drag = 0; e.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag != 0) { GestureEnd?.Invoke(_drag - 1); _drag = 0; InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+private void Apply(Point p){var (x0, x1, top, bot) = Geo();diff --git a/src/managed/Nota.App/Controls/RhythmViews.cs b/src/managed/Nota.App/Controls/RhythmViews.csindex 64ba4256..ad47b912 100644--- a/src/managed/Nota.App/Controls/RhythmViews.cs+++ b/src/managed/Nota.App/Controls/RhythmViews.cs@@ -90,11 +90,18 @@ internal sealed class RhythmHitView : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (!_dragging) return;- _dragging = false;+ _dragging = false; InvalidateVisual();e.Pointer.Capture(null);DragEnd?.Invoke();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_dragging) { _dragging = false; InvalidateVisual(); DragEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;@@ -227,11 +234,17 @@ internal sealed class RhythmSampleView : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (_drag < 0) return;- int d = _drag; _drag = -1;+ int d = _drag; _drag = -1; InvalidateVisual();e.Pointer.Capture(null);DragEnd?.Invoke(d);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag >= 0) { int d = _drag; _drag = -1; InvalidateVisual(); DragEnd?.Invoke(d); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;@@ -370,6 +383,12 @@ internal sealed class RhythmStepStrip : Controle.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_pressStep >= 0) { _pressStep = -1; InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+protected override void OnPointerWheelChanged(PointerWheelEventArgs e){int s = StepAt(e.GetPosition(this).X);diff --git a/src/managed/Nota.App/Controls/ShutterViews.cs b/src/managed/Nota.App/Controls/ShutterViews.csindex ebac9d8e..1d6da317 100644--- a/src/managed/Nota.App/Controls/ShutterViews.cs+++ b/src/managed/Nota.App/Controls/ShutterViews.cs@@ -114,6 +114,13 @@ internal abstract class ShDragView : Controlif (_drag < 0) return;int h = _drag; _drag = -1; e.Pointer.Capture(null); GestureEnd?.Invoke(h); InvalidateVisual();}++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag >= 0) { int h = _drag; _drag = -1; GestureEnd?.Invoke(h); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }protected virtual StandardCursorType CursorFor(int handle) => StandardCursorType.SizeNorthSouth;private void Move(Point p)@@ -522,6 +529,12 @@ internal sealed class ShPatternView : Control_drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); InvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+private void Apply(Point p){var (c, v) = At(p);diff --git a/src/managed/Nota.App/Controls/SliderTrack.cs b/src/managed/Nota.App/Controls/SliderTrack.csindex 078ef1e2..44007ff4 100644--- a/src/managed/Nota.App/Controls/SliderTrack.cs+++ b/src/managed/Nota.App/Controls/SliderTrack.cs@@ -82,7 +82,7 @@ internal sealed class SliderTrack : Controlif (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;if (e.ClickCount == 2 && Reset is not null){- if (_drag) { _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); }+ if (_drag) { _drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke(); InvalidateVisual(); }Reset();e.Handled = true;return;@@ -116,12 +116,13 @@ internal sealed class SliderTrack : Control_drag = false;e.Pointer.Capture(null);GestureEnd?.Invoke();+ InvalidateVisual(); // a drag that ended off the control leaves no hover to repaint it}protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e){// Never leave an automation session dangling.- if (_drag) { _drag = false; GestureEnd?.Invoke(); }+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }base.OnPointerCaptureLost(e);}diff --git a/src/managed/Nota.App/Controls/SynthViz.cs b/src/managed/Nota.App/Controls/SynthViz.csindex 03581451..4f456047 100644--- a/src/managed/Nota.App/Controls/SynthViz.cs+++ b/src/managed/Nota.App/Controls/SynthViz.cs@@ -130,7 +130,11 @@ internal sealed class SynthViz : Control, IMidiLearnRegions}protected override void OnPointerMoved(PointerEventArgs e) { if (_drag >= 0) Apply(e.GetPosition(this)); }protected override void OnPointerReleased(PointerReleasedEventArgs e)- { if (_drag >= 0) { Gesture(false); _drag = -1; e.Pointer.Capture(null); } }+ { if (_drag >= 0) { Gesture(false); _drag = -1; InvalidateVisual(); e.Pointer.Capture(null); } }++ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag >= 0) { Gesture(false); _drag = -1; InvalidateVisual(); } base.OnPointerCaptureLost(e); }/// <summary>Raised after a drag writes a param, so the card's readouts follow.</summary>public event Action? Changed;diff --git a/src/managed/Nota.App/Controls/ThinScrollBar.cs b/src/managed/Nota.App/Controls/ThinScrollBar.csindex 3a58f28d..b0454374 100644--- a/src/managed/Nota.App/Controls/ThinScrollBar.cs+++ b/src/managed/Nota.App/Controls/ThinScrollBar.cs@@ -114,6 +114,13 @@ internal sealed class ThinScrollBar : ControlInvalidateVisual();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the drag and drop the accent.+ if (_dragging) { _dragging = false; InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+protected override void OnPointerExited(PointerEventArgs e){if (_hot) { _hot = false; InvalidateVisual(); }diff --git a/src/managed/Nota.App/Controls/VFader.cs b/src/managed/Nota.App/Controls/VFader.csindex 871eb28c..78222921 100644--- a/src/managed/Nota.App/Controls/VFader.cs+++ b/src/managed/Nota.App/Controls/VFader.cs@@ -35,6 +35,9 @@ internal sealed class VFader : Controlprotected override void OnPointerMoved(PointerEventArgs e) { if (_drag) SetY(e.GetPosition(this).Y); }protected override void OnPointerReleased(PointerReleasedEventArgs e) { if (_drag) GestureEnd?.Invoke(); _drag = false; e.Pointer.Capture(null); }+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e) { if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); } base.OnPointerCaptureLost(e); }+private void SetY(double y){double h = Bounds.Height; if (h <= CapH) return;diff --git a/src/managed/Nota.App/Controls/ValueBar.cs b/src/managed/Nota.App/Controls/ValueBar.csindex 27d5138f..d0068354 100644--- a/src/managed/Nota.App/Controls/ValueBar.cs+++ b/src/managed/Nota.App/Controls/ValueBar.cs@@ -88,6 +88,13 @@ public sealed class ValueBar : Controlif (_drag) GestureEnd?.Invoke();_drag = false;e.Pointer.Capture(null);+ InvalidateVisual(); // a drag that ended off the control leaves no hover to repaint it+ }++ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);}private void Apply(double v)diff --git a/src/managed/Nota.App/Controls/VintageViews.cs b/src/managed/Nota.App/Controls/VintageViews.csindex dafdf475..ade8ff63 100644--- a/src/managed/Nota.App/Controls/VintageViews.cs+++ b/src/managed/Nota.App/Controls/VintageViews.cs@@ -58,6 +58,13 @@ internal abstract class VtWindowBase : Control_drag = false; e.Pointer.Capture(null); GestureEnd?.Invoke();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag) { _drag = false; GestureEnd?.Invoke(); InvalidateVisual(); }+ base.OnPointerCaptureLost(e);+ }+protected static void Grid(DrawingContext ctx, double w, double h, int cols){for (int i = 1; i < 4; i++) ctx.DrawLine(NotaGraph.GridPen, new Point(0, h * i / 4), new Point(w, h * i / 4));diff --git a/src/managed/Nota.App/Controls/VoltEnv.cs b/src/managed/Nota.App/Controls/VoltEnv.csindex 382f237c..9815aa42 100644--- a/src/managed/Nota.App/Controls/VoltEnv.cs+++ b/src/managed/Nota.App/Controls/VoltEnv.cs@@ -79,7 +79,11 @@ namespace Nota.App;}protected override void OnPointerMoved(PointerEventArgs e) { if (_drag >= 0) Apply(e.GetPosition(this)); }protected override void OnPointerReleased(PointerReleasedEventArgs e)- { if (_drag >= 0) { Gest(false); _drag = -1; e.Pointer.Capture(null); } }+ { if (_drag >= 0) { Gest(false); _drag = -1; InvalidateVisual(); e.Pointer.Capture(null); } }++ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag >= 0) { Gest(false); _drag = -1; InvalidateVisual(); } base.OnPointerCaptureLost(e); }private void Gest(bool begin){diff --git a/src/managed/Nota.App/Controls/VoltFilter.cs b/src/managed/Nota.App/Controls/VoltFilter.csindex 4fef483b..8fe2f536 100644--- a/src/managed/Nota.App/Controls/VoltFilter.cs+++ b/src/managed/Nota.App/Controls/VoltFilter.cs@@ -55,7 +55,11 @@ namespace Nota.App;{ _drag = true; Gest(true); e.Pointer.Capture(this); Apply(e.GetPosition(this)); e.Handled = true; }protected override void OnPointerMoved(PointerEventArgs e) { if (_drag) Apply(e.GetPosition(this)); }protected override void OnPointerReleased(PointerReleasedEventArgs e)- { if (_drag) { _drag = false; Gest(false); e.Pointer.Capture(null); } }+ { if (_drag) { _drag = false; InvalidateVisual(); Gest(false); e.Pointer.Capture(null); } }++ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag) { _drag = false; InvalidateVisual(); Gest(false); } base.OnPointerCaptureLost(e); }private void Gest(bool begin){diff --git a/src/managed/Nota.App/Controls/VoltMatrix.cs b/src/managed/Nota.App/Controls/VoltMatrix.csindex 0c99e86d..546dcd7d 100644--- a/src/managed/Nota.App/Controls/VoltMatrix.cs+++ b/src/managed/Nota.App/Controls/VoltMatrix.cs@@ -96,6 +96,18 @@ internal sealed class VoltMatrix : ControlChanged?.Invoke();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_dragS >= 0)+ {+ _e.EndAutomationWrite(_t, AutomationTarget.PluginParam, -1, -1, Id(_dragS, _dragD));+ _dragS = _dragD = -1; InvalidateVisual();+ Changed?.Invoke();+ }+ base.OnPointerCaptureLost(e);+ }+private void Txt(DrawingContext ctx, string t, double x, double y, IBrush b, double size = 8, bool center = false){var ft = new FormattedText(t, CultureInfo.InvariantCulture, FlowDirection.LeftToRight, Face, size, b);diff --git a/src/managed/Nota.App/DeviceCards/Bodies/AutoGainDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/AutoGainDeviceBody.csindex 3f2665dc..bc4a7481 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/AutoGainDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/AutoGainDeviceBody.cs@@ -361,6 +361,7 @@ internal sealed class AutoGainDeviceBody : IDeviceBodyRefreshAll();};ceilBox.PointerReleased += (_, e) => { if (cd) { cd = false; End(Ceiling); e.Pointer.Capture(null); } };+ ceilBox.PointerCaptureLost += (_, _) => { if (cd) { cd = false; End(Ceiling); } };Learn(ceilBox, Ceiling);ToolTip.SetTip(ceilBox, "Ceiling, −6 … 0\u2009dBTP — drag up / down (Shift for fine steps), double-click resets to −1.0");readouts.Add(() =>diff --git a/src/managed/Nota.App/DeviceCards/Bodies/Eq3DeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/Eq3DeviceBody.csindex 5616e79a..db3928f0 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/Eq3DeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/Eq3DeviceBody.cs@@ -211,6 +211,7 @@ internal sealed class Eq3DeviceBody : IDeviceBodyRaw(Gain, v0); RefreshAll();};box.PointerReleased += (_, e) => { if (!drag) return; drag = false; e.Pointer.Capture(null); End(Gain); };+ box.PointerCaptureLost += (_, _) => { if (!drag) return; drag = false; End(Gain); };readouts.Add(() =>{double db = OutDb(P(Gain));diff --git a/src/managed/Nota.App/DeviceCards/Bodies/ForgeDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/ForgeDeviceBody.csindex 22ecf111..83939dc6 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/ForgeDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/ForgeDeviceBody.cs@@ -209,6 +209,7 @@ internal sealed class ForgeDeviceBody : IDeviceBodyRaw(OutP(s), ov + (oy - e.GetPosition(outBox).Y) / 120.0); Refresh();};outBox.PointerReleased += (_, e) => { if (od) { od = false; End(OutP(s)); e.Pointer.Capture(null); } };+ outBox.PointerCaptureLost += (_, _) => { if (od) { od = false; End(OutP(s)); } };Learn(outBox, OutP(s));ToolTip.SetTip(outBox, $"Stage {s + 1} output, −12 … +12 dB — drag up / down, double-click resets");diff --git a/src/managed/Nota.App/DeviceCards/Bodies/PrismDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/PrismDeviceBody.csindex 29e2abee..9596025c 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/PrismDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/PrismDeviceBody.cs@@ -189,6 +189,7 @@ internal sealed class PrismDeviceBody : IDeviceBody};host.PointerMoved += (_, e) => { if (drag) { Raw(p, (float)(v0 + (y0 - e.GetPosition(host).Y) / 140.0)); tb.Text = fmt(P(p)); } };host.PointerReleased += (_, e) => { if (drag) { drag = false; End(p); e.Pointer.Capture(null); } };+ host.PointerCaptureLost += (_, _) => { if (drag) { drag = false; End(p); } };readouts.Add(() => { tb.Text = fmt(P(p)); tb.Foreground = color(); });Learn(host, p);return host;diff --git a/src/managed/Nota.App/DeviceCards/Bodies/ShutterDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/ShutterDeviceBody.csindex 1f6c41bc..1d8852f9 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/ShutterDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/ShutterDeviceBody.cs@@ -546,6 +546,7 @@ internal sealed class ShutterDeviceBody : IDeviceBody};host.PointerMoved += (_, e) => { if (drag) SetX(e.GetPosition(grid).X); };host.PointerReleased += (_, e) => { if (!drag) return; drag = false; e.Pointer.Capture(null); End(p); };+ host.PointerCaptureLost += (_, _) => { if (!drag) return; drag = false; End(p); };grid.SizeChanged += (_, _) => Paint();readouts.Add(() => { if (!drag) Paint(); });Learn(host, p);diff --git a/src/managed/Nota.App/DeviceCards/Bodies/StrataDeviceBody.cs b/src/managed/Nota.App/DeviceCards/Bodies/StrataDeviceBody.csindex 278cdedb..708e2a65 100644--- a/src/managed/Nota.App/DeviceCards/Bodies/StrataDeviceBody.cs+++ b/src/managed/Nota.App/DeviceCards/Bodies/StrataDeviceBody.cs@@ -109,6 +109,7 @@ internal sealed class StrataDeviceBody : IDeviceBodydbTxts[i].PointerPressed += (_, e) => { drag = true; startY = e.GetPosition(dbTxts[iv]).Y; startDb = scope[7 + iv * 3]; e.Pointer.Capture(dbTxts[iv]); };dbTxts[i].PointerMoved += (_, e) => { if (drag) { double db = Math.Clamp(startDb + (startY - e.GetPosition(dbTxts[iv]).Y) * 0.15, -24, 12); Act(A_LayerGain, iv, (float)db); dbTxts[iv].Text = $"{db:+0.0;−0.0;0.0}"; } };dbTxts[i].PointerReleased += (_, e) => { drag = false; e.Pointer.Capture(null); };+ dbTxts[i].PointerCaptureLost += (_, _) => drag = false;muteBtns[i] = new Border { Width = 16, Height = 14, CornerRadius = NotaRadius.Badge, BorderThickness = new Thickness(1), BorderBrush = BorderDef, Background = Sunken, Cursor = new Cursor(StandardCursorType.Hand),Child = new TextBlock { Text = "M", FontSize = 8, FontWeight = FontWeight.Medium, Foreground = TextTertiary, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center } };muteBtns[i].PointerPressed += (_, _) => { bool nowMuted = scope[8 + iv * 3] <= 0.5f; Act(A_LayerMute, iv, nowMuted ? 1f : 0f); };diff --git a/src/managed/Nota.App/DeviceCards/Instruments/ConsortInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/ConsortInstrumentCard.csindex 5d6be3bc..82ae397c 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/ConsortInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/ConsortInstrumentCard.cs@@ -226,7 +226,9 @@ internal sealed class ConsortInstrumentCard : IInstrumentCard}host.PointerPressed += (_, e) => { springT?.Stop(); drag = true; if (pi >= 0) Begin(id); e.Pointer.Capture(host); From(e); };host.PointerMoved += (_, e) => { if (drag) From(e); };- host.PointerReleased += (_, e) => { if (drag) { drag = false; if (pi >= 0) End(id); e.Pointer.Capture(null); if (spring) Spring(); } };+ void EndDrag() { drag = false; if (pi >= 0) End(id); if (spring) Spring(); }+ host.PointerReleased += (_, e) => { if (drag) { EndDrag(); e.Pointer.Capture(null); } };+ host.PointerCaptureLost += (_, _) => { if (drag) EndDrag(); };host.SizeChanged += (_, _) => Vis(G(id));var nm = new TextBlock { Text = NotaText.Label(name), FontSize = NotaType.KnobLabel, FontWeight = FontWeight.Medium, Foreground = MutedC, HorizontalAlignment = HorizontalAlignment.Center };common.Add(() => { if (!drag) Vis(G(id)); bool moved = Math.Abs(G(id) - (spring ? 0.5f : 0f)) > 0.01f; nm.Foreground = moved ? TxtC : MutedC; });@@ -572,7 +574,8 @@ internal sealed class ConsortInstrumentCard : IInstrumentCard{ bool drag = false; double y0 = 0; float v0 = 0;lenBox.PointerPressed += (_, e) => { if (!e.GetCurrentPoint(lenBox).Properties.IsLeftButtonPressed) return; drag = true; y0 = e.GetPosition(lenBox).Y; v0 = G("seqlen"); Begin("seqlen"); e.Pointer.Capture(lenBox); e.Handled = true; };lenBox.PointerMoved += (_, e) => { if (!drag) return; float v = Math.Clamp(v0 + (float)(y0 - e.GetPosition(lenBox).Y) / 120f, 0, 1); v = (float)Math.Round(v * 15) / 15f; Raw("seqlen", v); Refresh(); };- lenBox.PointerReleased += (_, e) => { if (drag) { drag = false; End("seqlen"); e.Pointer.Capture(null); } }; }+ lenBox.PointerReleased += (_, e) => { if (drag) { drag = false; End("seqlen"); e.Pointer.Capture(null); } };+ lenBox.PointerCaptureLost += (_, _) => { if (drag) { drag = false; End("seqlen"); } }; }tabReadouts[3].Add(() => lenTxt.Text = $"{SeqLen()}");// legend = paint brushesstring[] names = { "note", "ratchet", "tie", "rest" };@@ -1004,6 +1007,7 @@ internal sealed class ConsortInstrumentCard : IInstrumentCard};depBox.PointerMoved += (_, e) => { if (!drag) return; float v = Math.Clamp(v0 + (float)(y0 - e.GetPosition(depBox).Y) / 200f, 0, 1); Raw(AmtId(slot), v); dep.Text = $"{(v - 0.5f) * 200:+0;−0;0}"; };depBox.PointerReleased += (_, e) => { if (drag) { drag = false; End(AmtId(slot)); e.Pointer.Capture(null); Refresh(); } };+ depBox.PointerCaptureLost += (_, _) => { if (drag) { drag = false; End(AmtId(slot)); Refresh(); } };bottomHost.Children.Add(Row(4, new Border { Width = 7, Height = 7, CornerRadius = NotaRadius.Control, Background = tone, VerticalAlignment = VerticalAlignment.Center },new TextBlock { Text = CableName(c), FontSize = 9, Foreground = TxtC, VerticalAlignment = VerticalAlignment.Center }, depBox));}diff --git a/src/managed/Nota.App/DeviceCards/Instruments/MonolithInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/MonolithInstrumentCard.csindex 17d119e0..63b8166b 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/MonolithInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/MonolithInstrumentCard.cs@@ -162,7 +162,9 @@ internal sealed class MonolithInstrumentCard : IInstrumentCard}host.PointerPressed += (_, e) => { springT?.Stop(); drag = true; if (pi >= 0) engine.BeginAutomationWrite(track, AutomationTarget.PluginParam, -1, -1, id); e.Pointer.Capture(host); From(e); };host.PointerMoved += (_, e) => { if (drag) From(e); };- host.PointerReleased += (_, e) => { if (drag) { drag = false; if (pi >= 0) engine.EndAutomationWrite(track, AutomationTarget.PluginParam, -1, -1, id); e.Pointer.Capture(null); if (spring) Spring(); } };+ void EndDrag() { drag = false; if (pi >= 0) engine.EndAutomationWrite(track, AutomationTarget.PluginParam, -1, -1, id); if (spring) Spring(); }+ host.PointerReleased += (_, e) => { if (drag) { EndDrag(); e.Pointer.Capture(null); } };+ host.PointerCaptureLost += (_, _) => { if (drag) EndDrag(); };host.SizeChanged += (_, _) => Vis(G(id));var valTxt = new TextBlock { FontSize = 7, Foreground = TextSecondary, HorizontalAlignment = HorizontalAlignment.Center };valTxt.BindResource(TextBlock.FontFamilyProperty, "Font.Mono");diff --git a/src/managed/Nota.App/DeviceCards/Instruments/MosaicInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/MosaicInstrumentCard.csindex 3216e535..d8da4840 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/MosaicInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/MosaicInstrumentCard.cs@@ -298,6 +298,7 @@ internal sealed class MosaicInstrumentCard : IInstrumentCardif (n != 0) { acc -= n; step(n); tb.Text = text(); Refresh(); }};b.PointerReleased += (_, e) => { if (!drag) return; drag = false; e.Pointer.Capture(null); done?.Invoke(); };+ b.PointerCaptureLost += (_, _) => { if (!drag) return; drag = false; done?.Invoke(); };b.PointerWheelChanged += (_, e) => { step(e.Delta.Y > 0 ? 1 : -1); tb.Text = text(); done?.Invoke(); Refresh(); e.Handled = true; };readouts.Add(() => { if (!drag) tb.Text = text(); });if (tip is not null) ToolTip.SetTip(b, tip);diff --git a/src/managed/Nota.App/DeviceCards/Instruments/PentadInstrumentCard.cs b/src/managed/Nota.App/DeviceCards/Instruments/PentadInstrumentCard.csindex c4591144..9c7d41cd 100644--- a/src/managed/Nota.App/DeviceCards/Instruments/PentadInstrumentCard.cs+++ b/src/managed/Nota.App/DeviceCards/Instruments/PentadInstrumentCard.cs@@ -206,7 +206,9 @@ internal sealed class PentadInstrumentCard : IInstrumentCard}host.PointerPressed += (_, e) => { springT?.Stop(); drag = true; if (pi >= 0) engine.BeginAutomationWrite(track, AutomationTarget.PluginParam, -1, -1, id); e.Pointer.Capture(host); From(e); };host.PointerMoved += (_, e) => { if (drag) From(e); };- host.PointerReleased += (_, e) => { if (drag) { drag = false; if (pi >= 0) engine.EndAutomationWrite(track, AutomationTarget.PluginParam, -1, -1, id); e.Pointer.Capture(null); if (spring) Spring(); } };+ void EndDrag() { drag = false; if (pi >= 0) engine.EndAutomationWrite(track, AutomationTarget.PluginParam, -1, -1, id); if (spring) Spring(); }+ host.PointerReleased += (_, e) => { if (drag) { EndDrag(); e.Pointer.Capture(null); } };+ host.PointerCaptureLost += (_, _) => { if (drag) EndDrag(); };host.SizeChanged += (_, _) => Vis(G(id));var nm = new TextBlock { Text = NotaText.Label(name), FontSize = NotaType.KnobLabel, FontWeight = FontWeight.Medium, Foreground = MutedC, HorizontalAlignment = HorizontalAlignment.Center };readouts.Add(() => { if (!drag) Vis(G(id)); bool moved = Math.Abs(G(id) - (spring ? 0.5f : 0f)) > 0.01f; nm.Foreground = moved ? TxtC : MutedC; });diff --git a/src/managed/Nota.App/DeviceCards/Mosaic/MosaicViews.cs b/src/managed/Nota.App/DeviceCards/Mosaic/MosaicViews.csindex 04fea71f..2d37e347 100644--- a/src/managed/Nota.App/DeviceCards/Mosaic/MosaicViews.cs+++ b/src/managed/Nota.App/DeviceCards/Mosaic/MosaicViews.cs@@ -215,10 +215,24 @@ internal sealed class MosaicZoneMap : Controlelse if (_cycleNext >= 0) { _sel = _cycleNext; Selected?.Invoke(_sel); }}_cycleNext = -1;- _drag = Drag.None; _dragZone = -1;+ _drag = Drag.None; InvalidateVisual(); _dragZone = -1;e.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): release the held key, commit the+ // zone as it stands and drop the accent (no click-to-cycle without a real release).+ if (_keyHeld >= 0) { KeyUp?.Invoke(_keyHeld); _keysDown.Remove(_keyHeld); _keyHeld = -1; InvalidateVisual(); }+ if (_drag != Drag.None)+ {+ if (_moved && _dragZone >= 0) Edited?.Invoke(_dragZone, _live.Klo, _live.Khi, _live.Vlo, _live.Vhi, true);+ _cycleNext = -1;+ _drag = Drag.None; InvalidateVisual(); _dragZone = -1;+ }+ base.OnPointerCaptureLost(e);+ }+// ---- drawing -----------------------------------------------------------------------------private static readonly IPen Hair = new Pen(NotaPalette.GraphBorder, 1);private static readonly IPen SelPen = new Pen(NotaPalette.AccentBright, 1.5);@@ -361,10 +375,16 @@ internal sealed class MosaicCurveView : Control{base.OnPointerReleased(e);if (!_drag) return;- _drag = false; End?.Invoke();+ _drag = false; InvalidateVisual(); End?.Invoke();e.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; InvalidateVisual(); End?.Invoke(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/DeviceCards/Rack/MacroPanel.cs b/src/managed/Nota.App/DeviceCards/Rack/MacroPanel.csindex ce3ee0eb..e44bbb44 100644--- a/src/managed/Nota.App/DeviceCards/Rack/MacroPanel.cs+++ b/src/managed/Nota.App/DeviceCards/Rack/MacroPanel.cs@@ -425,6 +425,7 @@ internal static class MacroPanel};track.PointerMoved += (_, e) => { if (drag != 0) Apply(e.GetPosition(track).X); };track.PointerReleased += (_, e) => { if (drag != 0) { drag = 0; e.Pointer.Capture(null); ctx.NotifyChanged(); } };+ track.PointerCaptureLost += (_, _) => { if (drag != 0) { drag = 0; ctx.NotifyChanged(); } };ToolTip.SetTip(track, "The range the macro sweeps: drag either end · the tick is where it is now");var g = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto,*,Auto"), ColumnSpacing = 5 };diff --git a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.csindex a1a087c5..5eecf92b 100644--- a/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs+++ b/src/managed/Nota.App/DeviceCards/Rack/RackCardView.cs@@ -124,6 +124,7 @@ internal sealed partial class RackCardView(DeviceCardContext ctx)slot.PointerPressed += (_, e) => { drag = true; e.Pointer.Capture(slot); SetFromX(e.GetPosition(slot).X); };slot.PointerMoved += (_, e) => { if (drag) SetFromX(e.GetPosition(slot).X); };slot.PointerReleased += (_, e) => { if (drag) { drag = false; e.Pointer.Capture(null); } };+ slot.PointerCaptureLost += (_, _) => drag = false;name.DoubleTapped += (_, _) => PromptRenameMacro(a, i, name);ValueEntry.Attach(val, () => E.PluginParamGet(T, adi, i), v => E.PluginParamSet(T, adi, i, (float)v),() => NotaNum.F($"{E.PluginParamGet(T, adi, i) * 100:0}"),@@ -388,6 +389,7 @@ internal sealed partial class RackCardView(DeviceCardContext ctx)gSlot.PointerPressed += (_, e) => { gd = true; e.Pointer.Capture(gSlot); GSet(e.GetPosition(gSlot).X); };gSlot.PointerMoved += (_, e) => { if (gd) GSet(e.GetPosition(gSlot).X); };gSlot.PointerReleased += (_, e) => { if (gd) { gd = false; e.Pointer.Capture(null); } };+ gSlot.PointerCaptureLost += (_, _) => gd = false;_irTick.Add(() => { if (!gd) GUpd(); });var glideRow = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*,Auto"), ColumnSpacing = 4, Children = { IrCap("GLIDE"), WithCol(gSlot, 1), WithCol(glideVal, 2) } };@@ -735,7 +737,9 @@ internal sealed partial class RackCardView(DeviceCardContext ctx)void Apply(double x) { double f = Math.Clamp(x / Math.Max(1, track.Bounds.Width), 0, 1); if (drag == 1) fLo = Math.Min(f, fHi); else fHi = Math.Max(f, fLo); Upd(); }track.PointerPressed += (_, e) => { double x = e.GetPosition(track).X, w = track.Bounds.Width; drag = Math.Abs(x - fLo * w) <= Math.Abs(x - fHi * w) ? 1 : 2; e.Pointer.Capture(track); Apply(x); };track.PointerMoved += (_, e) => { if (drag != 0) Apply(e.GetPosition(track).X); };- track.PointerReleased += (_, e) => { if (drag != 0) { drag = 0; e.Pointer.Capture(null); a.SetMappingRange(mappingIndex, (float)(pMin + fLo * span), (float)(pMin + fHi * span)); _ctx.RequestRebuild(); } };+ void EndDrag() { drag = 0; a.SetMappingRange(mappingIndex, (float)(pMin + fLo * span), (float)(pMin + fHi * span)); _ctx.RequestRebuild(); }+ track.PointerReleased += (_, e) => { if (drag != 0) { EndDrag(); e.Pointer.Capture(null); } };+ track.PointerCaptureLost += (_, _) => { if (drag != 0) EndDrag(); };_irTick.Add(Upd);var g = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*,Auto"), ColumnSpacing = 6, Children = { name, WithCol(track, 1), WithCol(vals, 2) } };return new Border { Background = IrInset, BorderBrush = IrField, BorderThickness = new Thickness(1), CornerRadius = NotaRadius.Control, Padding = new Thickness(7, 4), Child = g };@@ -948,6 +952,7 @@ internal sealed partial class RackCardView(DeviceCardContext ctx)gSlot.PointerPressed += (_, e) => { gd = true; e.Pointer.Capture(gSlot); GSet(e.GetPosition(gSlot).X); };gSlot.PointerMoved += (_, e) => { if (gd) GSet(e.GetPosition(gSlot).X); };gSlot.PointerReleased += (_, e) => { if (gd) { gd = false; e.Pointer.Capture(null); } };+ gSlot.PointerCaptureLost += (_, _) => gd = false;_irTick.Add(() => { if (!gd) GUpd(); });MidiLearn.Bind(gSlot, MidiTarget.RackVolume(T, di), "Rack Volume");var gainRow = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*,Auto"), ColumnSpacing = 4, VerticalAlignment = VerticalAlignment.Center, Children = { IrCap("GAIN"), WithCol(gSlot, 1), WithCol(gainVal, 2) } };@@ -1652,7 +1657,11 @@ internal sealed class RackZoneMap : Control}protected override void OnPointerMoved(PointerEventArgs e) { if (_drag >= 0) Apply(e.GetPosition(this).X); }protected override void OnPointerReleased(PointerReleasedEventArgs e)- { if (_drag >= 0) { RangeEdited?.Invoke(_drag, _lo[_drag], _hi[_drag]); _drag = -1; e.Pointer.Capture(null); } }+ { if (_drag >= 0) { RangeEdited?.Invoke(_drag, _lo[_drag], _hi[_drag]); _drag = -1; InvalidateVisual(); e.Pointer.Capture(null); } }++ // Capture taken away mid-drag (the window deactivates): commit the range as it stands and drop the accent.+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ { if (_drag >= 0) { RangeEdited?.Invoke(_drag, _lo[_drag], _hi[_drag]); _drag = -1; InvalidateVisual(); } base.OnPointerCaptureLost(e); }private void Apply(double x){diff --git a/src/managed/Nota.App/DeviceCards/Sampler/SamplerViews.cs b/src/managed/Nota.App/DeviceCards/Sampler/SamplerViews.csindex be3e666a..58d958de 100644--- a/src/managed/Nota.App/DeviceCards/Sampler/SamplerViews.cs+++ b/src/managed/Nota.App/DeviceCards/Sampler/SamplerViews.cs@@ -111,11 +111,18 @@ internal sealed class SamplerWaveView : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (_drag < 0) return;- int h = _drag; _drag = -1;+ int h = _drag; _drag = -1; InvalidateVisual();e.Pointer.Capture(null);DragEnd?.Invoke(h);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ // Capture taken away mid-drag (the window deactivates): end the gesture and drop the accent.+ if (_drag >= 0) { int h = _drag; _drag = -1; InvalidateVisual(); DragEnd?.Invoke(h); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;@@ -355,10 +362,21 @@ internal sealed class SamplerEnvView : Controlif (_drag < 0) return;DragEnd?.Invoke(Ids[_drag]);if (_drag == 1) DragEnd?.Invoke("sustain");- _drag = -1;+ _drag = -1; InvalidateVisual();e.Pointer.Capture(null);}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag >= 0)+ {+ DragEnd?.Invoke(Ids[_drag]);+ if (_drag == 1) DragEnd?.Invoke("sustain");+ _drag = -1; InvalidateVisual();+ }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;@@ -474,11 +492,17 @@ internal sealed class SamplerFilterView : Controlprotected override void OnPointerReleased(PointerReleasedEventArgs e){if (!_drag) return;- _drag = false;+ _drag = false; InvalidateVisual();e.Pointer.Capture(null);DragEnd?.Invoke();}+ protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)+ {+ if (_drag) { _drag = false; InvalidateVisual(); DragEnd?.Invoke(); }+ base.OnPointerCaptureLost(e);+ }+public override void Render(DrawingContext ctx){double w = Bounds.Width, h = Bounds.Height;diff --git a/src/managed/Nota.App/MainWindow.Mixer.cs b/src/managed/Nota.App/MainWindow.Mixer.csindex 06872be7..b4e59871 100644--- a/src/managed/Nota.App/MainWindow.Mixer.cs+++ b/src/managed/Nota.App/MainWindow.Mixer.cs@@ -45,6 +45,7 @@ public partial class MainWindowSetHost(win.Host, _mixer);_mixer.StripsChanged += Fit;_mixer.Refresh();+ win.Opened += (_, _) => Fit(); // again once shown: only now is it on the owner's screenwin.Show(this);}}diff --git a/src/managed/Nota.App/MainWindow.axaml b/src/managed/Nota.App/MainWindow.axamlindex 81de5552..33c8f860 100644--- a/src/managed/Nota.App/MainWindow.axaml+++ b/src/managed/Nota.App/MainWindow.axaml@@ -200,7 +200,7 @@<StackPanel Orientation="Horizontal" Spacing="6" VerticalAlignment="Center" Cursor="Hand" Background="Transparent"PointerPressed="OnTogglePositionDisplay"ToolTip.Tip="Switch between bars and time">- <TextBlock Classes="Readout" Text="{Binding Transport.PositionText}" FontSize="14" LetterSpacing="0.28"+ <TextBlock Classes="Readout" Text="{Binding Transport.PositionText}" FontSize="14"MinWidth="72" VerticalAlignment="Center" Foreground="{DynamicResource Brush.TextPrimary}"/><TextBlock Classes="CellLabel" Text="{Binding Transport.PositionUnitText}" VerticalAlignment="Center"/></StackPanel>diff --git a/src/managed/Nota.App/MainWindow.axaml.cs b/src/managed/Nota.App/MainWindow.axaml.csindex ce897cf6..1595d177 100644--- a/src/managed/Nota.App/MainWindow.axaml.cs+++ b/src/managed/Nota.App/MainWindow.axaml.cs@@ -537,6 +537,7 @@ public partial class MainWindow : Window}finally { Engine.EndUndoGroup(); }Timeline.Refresh();+ Timeline.RevealTrack(trackId); // scrolled into view, not left below the pinned returnsif (anchorTrackId > 0) Timeline.Select(trackId, -1); // show where it landed_session?.Refresh();if (_modular?.IsVisible == true) _modular.Refresh(); // new track shows in the graph/sidebardiff --git a/src/managed/Nota.App/ModularView.cs b/src/managed/Nota.App/ModularView.csindex bb0caa24..12fb9195 100644--- a/src/managed/Nota.App/ModularView.cs+++ b/src/managed/Nota.App/ModularView.cs@@ -260,6 +260,7 @@ public sealed class ModularView : UserControlprivate void RefreshSidebar(){_sidebarPanel.IsVisible = !_global; // collapses in Global view (islands are the tracks)+ _emptyHint.IsVisible = !_global && _trackId <= 0; // the hint is Track view's; Global has islandsif (_global) return;_sidebar.Children.Clear();int n = _engine.TrackCount;@@ -268,7 +269,6 @@ public sealed class ModularView : UserControl_sidebar.Children.Add(TrackRow(ti.Id, ti));if (_sidebar.Children.Count == 0)_sidebar.Children.Add(new TextBlock { Text = "No tracks yet", Classes = { "Caption" }, Margin = new Thickness(10, 8) });- _emptyHint.IsVisible = !_global && _trackId <= 0;}private Control TrackRow(int trackId, NotaTrackInfo ti)diff --git a/src/managed/Nota.App/Theme/NotaColourTheme.cs b/src/managed/Nota.App/Theme/NotaColourTheme.csindex d456d72d..f4645167 100644--- a/src/managed/Nota.App/Theme/NotaColourTheme.cs+++ b/src/managed/Nota.App/Theme/NotaColourTheme.cs@@ -110,13 +110,19 @@ internal static class NotaThemes{using var doc = JsonDocument.Parse(json);var root = doc.RootElement;- if (!root.TryGetProperty("formatVersion", out var fv) || fv.ValueKind != JsonValueKind.Number || fv.GetInt32() != 1)+ if (root.ValueKind != JsonValueKind.Object) return Fail("the file must hold one JSON object", out error);+ if (!root.TryGetProperty("formatVersion", out var fv) || fv.ValueKind != JsonValueKind.Number+ || !fv.TryGetInt32(out var version) || version != 1)return Fail("formatVersion must be 1", out error);- var id = root.TryGetProperty("id", out var i) ? i.GetString() ?? "" : "";+ // Metadata is read only when it is a string: a number or object here fails this+ // theme with a reason instead of throwing out of the loader.+ static string Str(JsonElement root, string key)+ => root.TryGetProperty(key, out var v) && v.ValueKind == JsonValueKind.String ? v.GetString() ?? "" : "";+ var id = Str(root, "id");if (!IdPattern.IsMatch(id) || id == "system") return Fail($"invalid id '{id}'", out error);- var name = root.TryGetProperty("name", out var n) ? n.GetString() ?? "" : "";+ var name = Str(root, "name");if (name.Length is < 1 or > 40) return Fail("name must be 1–40 characters", out error);- var kindText = root.TryGetProperty("kind", out var k) ? k.GetString() : null;+ var kindText = Str(root, "kind");NotaThemeKind kind;if (kindText == "dark") kind = NotaThemeKind.Dark;else if (kindText == "light") kind = NotaThemeKind.Light;@@ -142,6 +148,12 @@ internal static class NotaThemes{return Fail("not valid JSON: " + e.Message, out error);}+ catch (Exception e) when (e is InvalidOperationException or FormatException)+ {+ // A JSON value of the wrong kind somewhere the checks above don't look: fail this+ // theme with a reason (the loader logs and skips it) rather than throw out of startup.+ return Fail("unexpected value: " + e.Message, out error);+ }}private static NotaColourTheme? Fail(string reason, out string? error) { error = reason; return null; }diff --git a/src/managed/Nota.App/Theme/NotaPalette.cs b/src/managed/Nota.App/Theme/NotaPalette.csindex 2cb786fb..60ec1c89 100644--- a/src/managed/Nota.App/Theme/NotaPalette.cs+++ b/src/managed/Nota.App/Theme/NotaPalette.cs@@ -340,6 +340,7 @@ internal static class NotaPalettepublic static readonly SolidColorBrush Record = T(nameof(Record)); // Brush.Record — active recording, the only claim on redpublic static readonly SolidColorBrush RecordInk = T(nameof(RecordInk)); // Brush.RecordInk — disc on an engaged record buttonpublic static readonly SolidColorBrush Success = T(nameof(Success)); // Brush.Success — Signal, working meter zone+ public static readonly SolidColorBrush SuccessInk = T(nameof(SuccessInk)); // Brush.SuccessInk — ink on a Success fill (Session play)public static readonly SolidColorBrush SuccessDim = T(nameof(SuccessDim)); // Brush.SuccessDim — transport input, metronomepublic static readonly SolidColorBrush Warning = T(nameof(Warning)); // Brush.Warning — Caution, −6..0 dB// Track toggles: mute is amber, solo is blue, arm is Record. Each fills solid when on.@@ -451,7 +452,7 @@ internal static class NotaPalette["Brush.AccentDim"] = AccentDim, ["Brush.AccentEdge"] = AccentEdge,["Brush.AccentSubtle"] = AccentSubtle,["Brush.Record"] = Record, ["Brush.RecordInk"] = RecordInk,- ["Brush.Success"] = Success,+ ["Brush.Success"] = Success, ["Brush.SuccessInk"] = SuccessInk,["Brush.SuccessDim"] = SuccessDim, ["Brush.Warning"] = Warning,["Brush.Danger"] = Danger, ["Brush.DangerHover"] = DangerHover,["Brush.DangerBright"] = DangerBright,diff --git a/src/managed/Nota.App/Theme/NotaTheme.axaml b/src/managed/Nota.App/Theme/NotaTheme.axamlindex c2bc19a0..704db2af 100644--- a/src/managed/Nota.App/Theme/NotaTheme.axaml+++ b/src/managed/Nota.App/Theme/NotaTheme.axaml@@ -249,6 +249,7 @@<Style Selector="ToggleButton.danger:checked /template/ ContentPresenter#PART_ContentPresenter"><Setter Property="Background" Value="{DynamicResource Brush.Danger}"/><Setter Property="BorderBrush" Value="{DynamicResource Brush.Danger}"/>+ <Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.RecordInk}"/> <!-- beats the checked presenter's on-accent ink --></Style><Style Selector="ToggleButton.danger:checked"><Setter Property="Foreground" Value="{DynamicResource Brush.RecordInk}"/>@@ -274,6 +275,7 @@<Style Selector="ToggleButton.tp-icon.rec:checked /template/ ContentPresenter#PART_ContentPresenter"><Setter Property="Background" Value="{DynamicResource Brush.Record}"/><Setter Property="BorderBrush" Value="{DynamicResource Brush.Record}"/>+ <Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.RecordInk}"/> <!-- beats the checked presenter's on-accent ink --></Style><Style Selector="ToggleButton.tp-icon.rec:checked"><Setter Property="Foreground" Value="{DynamicResource Brush.RecordInk}"/>@@ -303,10 +305,12 @@<Style Selector="Button.tp-play.playing.session"><Setter Property="Background" Value="{DynamicResource Brush.Success}"/><Setter Property="BorderBrush" Value="{DynamicResource Brush.Success}"/>+ <Setter Property="Foreground" Value="{DynamicResource Brush.SuccessInk}"/></Style><Style Selector="Button.tp-play.playing.session:pointerover /template/ ContentPresenter#PART_ContentPresenter"><Setter Property="Background" Value="{DynamicResource Brush.Success}"/><Setter Property="BorderBrush" Value="{DynamicResource Brush.Success}"/>+ <Setter Property="Foreground" Value="{DynamicResource Brush.SuccessInk}"/></Style><!-- Chips: raised keys like any button, a little tighter. -->diff --git a/src/managed/Nota.App/Theme/NotaThemeService.cs b/src/managed/Nota.App/Theme/NotaThemeService.csindex dcf2b3aa..5b1e309e 100644--- a/src/managed/Nota.App/Theme/NotaThemeService.cs+++ b/src/managed/Nota.App/Theme/NotaThemeService.cs@@ -121,6 +121,9 @@ internal static class NotaThemeServiceprivate static void Invalidate(Visual v){v.InvalidateVisual();+ // An open popup's content lives in its own popup root, outside the window's visual+ // tree — reach it through the popup, or an open ComboBox list stays in the old colours.+ if (v is Avalonia.Controls.Primitives.Popup { IsOpen: true, Child: { } content }) Invalidate(content);foreach (var child in v.GetVisualChildren()) Invalidate(child);}}diff --git a/src/managed/Nota.App/Theme/Themes/ember-graphite.json b/src/managed/Nota.App/Theme/Themes/ember-graphite.jsonindex 92ced817..9d8c61ea 100644--- a/src/managed/Nota.App/Theme/Themes/ember-graphite.json+++ b/src/managed/Nota.App/Theme/Themes/ember-graphite.json@@ -52,8 +52,9 @@"AccentPale": "#FCE5B8","AccentSubtle": "#241F17","Record": "#BE563E",- "RecordInk": "#F4E3DC",+ "RecordInk": "#FFFFFF","Success": "#58B368",+ "SuccessInk": "#171613","SuccessDim": "#7FB069","Warning": "#D9C34C","Mute": "#D9C34C",diff --git a/src/managed/Nota.App/Theme/Themes/ember-paper.json b/src/managed/Nota.App/Theme/Themes/ember-paper.jsonindex 35561a64..f66e8296 100644--- a/src/managed/Nota.App/Theme/Themes/ember-paper.json+++ b/src/managed/Nota.App/Theme/Themes/ember-paper.json@@ -54,6 +54,7 @@"Record": "#B54A32","RecordInk": "#FFF4EE","Success": "#2C7A3E",+ "SuccessInk": "#FFFBF2","SuccessDim": "#609548","Warning": "#837010","Mute": "#837010",diff --git a/src/managed/Nota.App/Theme/Themes/studio-dark.json b/src/managed/Nota.App/Theme/Themes/studio-dark.jsonindex 85790f62..1fb7e73e 100644--- a/src/managed/Nota.App/Theme/Themes/studio-dark.json+++ b/src/managed/Nota.App/Theme/Themes/studio-dark.json@@ -52,8 +52,9 @@"AccentPale": "#FFD08A","AccentSubtle": "#4D3F2E","Record": "#F06A6E",- "RecordInk": "#FFFFFF",+ "RecordInk": "#17181A","Success": "#6CC673",+ "SuccessInk": "#17181A","SuccessDim": "#3F8A45","Warning": "#F2B53C","Mute": "#F2B53C",diff --git a/src/managed/Nota.App/Theme/Themes/studio-light.json b/src/managed/Nota.App/Theme/Themes/studio-light.jsonindex 46a0a8e0..5bc88236 100644--- a/src/managed/Nota.App/Theme/Themes/studio-light.json+++ b/src/managed/Nota.App/Theme/Themes/studio-light.json@@ -54,6 +54,7 @@"Record": "#B3262C","RecordInk": "#FFFFFF","Success": "#22692B",+ "SuccessInk": "#FFFFFF","SuccessDim": "#79B880","Warning": "#7A4F00","Mute": "#7A4F00",diff --git a/src/managed/Nota.Presentation/ViewModels/BrowserViewModel.cs b/src/managed/Nota.Presentation/ViewModels/BrowserViewModel.csindex 3cb51e96..b572f451 100644--- a/src/managed/Nota.Presentation/ViewModels/BrowserViewModel.cs+++ b/src/managed/Nota.Presentation/ViewModels/BrowserViewModel.cs@@ -406,6 +406,11 @@ public sealed partial class BrowserViewModel : ObservableObject(isInstrument ? _instrTree : _fxTree).Add(item);}+ // A rescan can take away the picked category's last device (an uninstalled plug-in+ // under Other): drop a pick whose chip is gone, or the tab stays empty with nothing to clear it.+ for (int t = 0; t < _categoryFilter.Length; t++)+ if (_categoryFilter[t].Length > 0 && !CategoriesOn(t).Contains(_categoryFilter[t])) _categoryFilter[t] = "";+RebuildDeviceTabs();RebuildSamples();RebuildProjects();diff --git a/tests/Nota.SmokeTest/BrowserCategoryTests.cs b/tests/Nota.SmokeTest/BrowserCategoryTests.csindex ce71d1d3..454e7760 100644--- a/tests/Nota.SmokeTest/BrowserCategoryTests.cs+++ b/tests/Nota.SmokeTest/BrowserCategoryTests.cs@@ -110,6 +110,14 @@ internal static class BrowserCategoryTestsyield return (!pvm.CategoriesOn(0).Contains(DeviceCategories.Other) && !pvm.CategoriesOn(2).Contains(DeviceCategories.Other),"no Other chip where nothing lands there");+ // A rescan that removes the picked category's last device clears the pick with its chip.+ pvm.SetCategoryFilter(1, DeviceCategories.Other);+ plugins.Set("Ambience | VST3 | fx | Smart | Fx/Reverb", "Ana | VST3 | inst | Sonic | Instrument/Synth");+ pvm.Rebuild();+ yield return (pvm.CategoryFilter(1) == "" && !pvm.CategoriesOn(1).Contains(DeviceCategories.Other) && Devices(pvm.Effects).Count == 27+ && pvm.CategoryFilter(0) == "Synths",+ "a rescan that empties the picked category clears the pick; other picks stay");+// An existing settings file has no key: the chips are on (FR-003).var old = JsonSerializer.Deserialize<Settings>("{}")!;yield return (old.BrowserCategoryChips, "settings without the new key show the category chips");diff --git a/tests/Nota.SmokeTest/BrowserTestSupport.cs b/tests/Nota.SmokeTest/BrowserTestSupport.csindex 406828d9..f8e1abda 100644--- a/tests/Nota.SmokeTest/BrowserTestSupport.cs+++ b/tests/Nota.SmokeTest/BrowserTestSupport.cs@@ -57,10 +57,12 @@ internal sealed class FakeBrowserLibrary : IBrowserLibrarypublic event Action? Changed { add { } remove { } }}-/// <summary>A fixed list of scanned plug-ins, each described the way the plug-in host does:-/// "Name | Format | inst|fx | Vendor | Category".</summary>-internal sealed class FakePluginCatalog(params string[] descriptions) : IPluginCatalog+/// <summary>A list of scanned plug-ins, each described the way the plug-in host does:+/// "Name | Format | inst|fx | Vendor | Category". <see cref="Set"/> stands in for a rescan.</summary>+internal sealed class FakePluginCatalog(params string[] initial) : IPluginCatalog{+ private string[] descriptions = initial;+ public void Set(params string[] list) => descriptions = list;public int Scan(string workerPath) => descriptions.Length;public int Count => descriptions.Length;public string? Description(int index) => index >= 0 && index < descriptions.Length ? descriptions[index] : null;diff --git a/tests/Nota.SmokeTest/DesignTokenCheck.Themes.cs b/tests/Nota.SmokeTest/DesignTokenCheck.Themes.csindex 676640ea..35dce963 100644--- a/tests/Nota.SmokeTest/DesignTokenCheck.Themes.cs+++ b/tests/Nota.SmokeTest/DesignTokenCheck.Themes.cs@@ -79,7 +79,7 @@ internal static partial class DesignTokenCheckvar fails = Pairings(theme.Colors).Where(p => p.Value < p.Min - 1e-9).ToList();yield return (fails.Count == 0,- fails.Count == 0 ? $"{id}: every readability pairing holds (T3.1–T3.8)"+ fails.Count == 0 ? $"{id}: every readability pairing holds (T3.1–T3.9)": $"{id}: {fails.Count} pairing(s) below the bar — " +string.Join("; ", fails.Take(6).Select(f => $"{f.Id} {f.What} {f.Value:0.00} < {f.Min}")));}@@ -136,6 +136,9 @@ internal static partial class DesignTokenCheckforeach (var s in new[] { "BgApp", "Panel", "BgSunken" }) yield return Cr("T3.4", "AccentBright", s, 2.3);foreach (var f in new[] { "Accent", "Mute", "Solo", "Record" })yield return new("T3.5", $"ink on {f}", Contrast(Ink(c[f]), c[f]), 4.5);+ // The ink tokens the theme itself sets for text and glyphs on a status fill.+ yield return Cr("T3.9", "RecordInk", "Record", 4.5);+ yield return Cr("T3.9", "SuccessInk", "Success", 4.5);foreach (var f in Enumerable.Range(1, 9).Select(i => $"Track{i}").Append("ReturnA").Append("ReturnB"))yield return new("T3.6", $"ink on {f}", Contrast(Ink(c[f]), c[f]), 3.0);var tracks = Enumerable.Range(1, 9).Select(i => $"Track{i}").ToArray();diff --git a/tests/Nota.SmokeTest/DesignTokenCheck.cs b/tests/Nota.SmokeTest/DesignTokenCheck.csindex 63b8124d..d9275473 100644--- a/tests/Nota.SmokeTest/DesignTokenCheck.cs+++ b/tests/Nota.SmokeTest/DesignTokenCheck.cs@@ -467,6 +467,17 @@ internal static partial class DesignTokenCheckvar tracked = Regex.Matches(theme, """<Setter Property="LetterSpacing" Value="(?<v>[0-9.]+)"/>""").Where(m => double.Parse(m.Groups["v"].Value, inv) > 0).Count();yield return (tracked == 0, tracked == 0 ? "no tracked (letter-spaced) text class in the theme" : $"{tracked} text style(s) still set LetterSpacing");+ // …nor do views: a positive LetterSpacing anywhere in the app is tracking by the back door.+ // The one exception is data, not a label: the Remote pairing code, spaced to be read aloud.+ var viewTracking = Directory.EnumerateFiles(app, "*.*", SearchOption.AllDirectories)+ .Where(f => (f.EndsWith(".cs") || f.EndsWith(".axaml")) && !f.Contains($"{Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}")+ && !f.Contains($"{Path.DirectorySeparatorChar}bin{Path.DirectorySeparatorChar}"))+ .SelectMany(f => Regex.Matches(File.ReadAllText(f), @"LetterSpacing\s*=\s*""?(?<v>[0-9.]+)")+ .Where(m => double.Parse(m.Groups["v"].Value, inv) > 0)+ .Select(_ => Path.GetRelativePath(app, f)))+ .Where(r => r.Replace('\\', '/') != "Remote/ConnectPhoneView.cs").Distinct().ToArray();+ yield return (viewTracking.Length == 0,+ viewTracking.Length == 0 ? "no view sets a positive LetterSpacing" : $"positive LetterSpacing in: {string.Join(", ", viewTracking)}");var fonts = File.ReadAllText(Path.Combine(app, "Theme/NotaFonts.cs"));var trackConsts = Regex.Matches(fonts, @"(?<n>\w+Tracking)\s*=\s*(?<v>[0-9.]+)").Where(m => double.Parse(m.Groups["v"].Value, inv) != 0).Select(m => m.Groups["n"].Value).ToArray();yield return (trackConsts.Length == 0, trackConsts.Length == 0 ? "NotaType tracking constants are 0" : $"tracking left in NotaType: {string.Join(", ", trackConsts)}");