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
Research: Nota Remote in the new look, with clip previews in Scenes
R1 — What the phone is told about a skin's geometry
- Decision: per theme in the
thememessage, addfont(family name, only when the skin names one) andr(the seven resolved radii in px, keyed by the theme-file step keyscard group field cell valueBar switch fine, only when the skin differs from the design scale). Nota resolves them withSkinGeometry.RadiusOf, the function the desktop uses.RemoteThemegainsstring? FontandIReadOnlyDictionary<string, double>? Radii. - Rationale: the phone needs no copy of the roundness rule — one source of truth. Omitting both for built-ins keeps the message unchanged for the common case.
- Alternatives: send
scale+stepsand recompute in TypeScript (drift risk).
R2 — Wearing a typeface the phone may not have
- Decision:
--font-ui: "<family>", Geist, system-ui, sans-serif; CSS falls back to Geist per family and per glyph. The family is sanitised (quotes, backslashes,;{}stripped) before it goes into CSS. Nota sends no font files. - Alternatives:
document.fonts.check()detection — unreliable for local fonts on iOS.
R3 — Radii as custom properties
- Decision:
app.cssdefines--r-card 9px … --r-fine 2px; the theme layer overrides them fromrand resets them whenris absent. Everyborder-radiusin the phone's sources is0,50%or built fromvar(--r-*). - Phone part → step (DESIGN.md § Corner scale, by what the part is):
| Phone part | Step |
|---|---|
| Header, tabs, rail, banner, Mixer strips, covers, Big transport ground | Docked (0) |
| Big framed areas: Macros grid frame, XY field, Empty card, cover checklist, Big transport keys | Card |
Sheet / menu, toast, segment group, .btn, transport keys, track and device pickers, axes panel |
Group |
| Field (device name, code cells), row highlight, pad, Scenes clip cell | Field |
| Segment cell, M / S / Arm, scale cell, chord, scene button, Stop, section button, tag chips | Cell |
| Fader cap, pan bar, slots, rate chip | ValueBar |
| Switch track | Switch |
| Switch knob, meter channel, colour bars, note bars | Fine |
R4 — Orange in three strengths on the phone
- live (solid
--accent+--ink-on-accent): Play running, Record (record colour), count-in number, a looping section, pad / key / cell / chord under a finger, the Tilt pill. - picked (
--accent-softfill +--picked-ink;--picked-ink=--accent-brightin dark themes,--accent-palein light ones): current tab / rail item, segmenton,.btn.ontoggles (Full velocity, Repeat, Loop, Click, Tilt off-state stays raised), chosen row in sheets, chosen tonic, the open position readout. - values: track colour on Macros arcs and the XY crosshair / point (clarification); Mixer grey at rest, a held fader / pan borrows soft tint + accent line.
- Switches in the phone's menu are settings switches: solid accent track when on, as DESIGN.md § Switch.
- Track-colour tint without
color-mix()(target Safari 16 / Chrome 100): a layer filled withvar(--tc)at a fixed opacity under the content.
R5 — Type: one face, tabular figures, phone sizes
- Decision: root
font-family: var(--font-ui),font-variant-numeric: tabular-nums; dropGeistMono-Medium.woff2, theGeist Monoface and.mono. Phone sizes stay (never smaller than today); weights follow the scale (readouts 500, names 600, labels 400 ink 3). lib/fmt.ts:db(),pct(),bpm(),bars()with U+2212, U+2009 and fixed precision.
R6 — Clip previews: what is sent (#557)
- Decision: a new message
clips(Nota → phone) carrying, per changed slot, the clip's name, colour, length in beats and eithern(note bars) orp(peaks). See contracts/clips-message.md.- Notes:
[start, len, pitch]relative to the clip, start/len quantised to 1/64 of the clip length (integers 0–64) — the phone draws them at cell resolution anyway. More than 128 notes: merge per pitch row overlapping bars after quantisation; if still over, keep the first 128 by start (the shape stays readable; FR-021). - Peaks: 48 buckets of
max(|min|, |max|)normalised 0–99 to the clip's loudest bucket (the desktop draws exactly this normalised magnitude; sign is not drawn). - Clip colour:
host.ClipColor(trackId, scene)— the clip's own colour, else its track's, asSessionView.ClipBrushdoes. Name:GetSessionClipName, else "
- Notes:
- Rationale: integers keep JSON small: a 64-note clip ≈ 0.8 KB, peaks ≈ 0.2 KB; a 32 × 32 grid of mixed clips stays well under 64 KB for the first send (SC-009).
- Alternatives: binary frames (the hub speaks JSON text only; not worth a second framing); sending raw notes (unbounded).
R7 — Clip previews: when it is sent (change detection)
- Decision: no engine revision counter exists for Session slots, so the hub keeps per
slot a 64-bit signature (FNV-1a over the compact preview + name + colour + length) and
re-reads slots round-robin: at most 24 slots per UI tick, only while at least one
phone is on Scenes, so a 32 × 32 grid is fully re-checked about every 0.7 s at 60 Hz.
A slot whose
SessionSlotState/ length changed, and every recording slot (state 4 / 5, re-read 4× a second), jumps the queue. A changed signature marks the slot dirty; each phone on Scenes gets the dirty slots it has not seen (per-phone sent-signature map); opening Scenes or a new connection sends all non-empty slots once, batched up to 64 slots per message. - Audio thread:
GetSessionNotes,GetSessionSlotPeaks,GetSessionClipName,AudioRecordPeaksOfare the control-side reads the desktop Session view already makes on the UI thread (Engine_Session.cpp:sessionSlotPeaks→getClipPeaks, const, no audio-thread work). No new locks; nothing new crosses the C ABI. - Recording MIDI: stored notes via
GetSessionNoteswhile recording, the length shown as whole bars recorded so far (asDrawRecordingNotes); the desktop's held-key overlay (RecordPreview) is app-side and not available to the hub — held keys appear when they are stored (an accepted simplification; the take still visibly grows). - Recording audio:
AudioRecordPeaksOf(trackId, …)for the slot recording. - Alternatives: an engine-side revision counter (C ABI change, out of proportion for a look feature); re-reading everything each tick (FR-022 forbids).
R8 — Drawing the preview on the phone
- Decision: one
<canvas>per filled cell (device-pixel-ratio aware), redrawn only when its preview, colour, size or state changes; notes 3 px bars with--r-fine-scaled corners, peaks centred bars 62 % of a step wide, asDrawPeaks. Ink: the clip colour on a stopped cell,--tc-inkon a playing / queued (filled) cell,--record/ its ink when recording. The canvas reads colours from computed custom properties, so a theme change repaints. - Cell layout: top row name (ellipsis) + length; preview area below; play mark and progress line on top.
- Alternatives: inline SVG per cell (hundreds of nodes per clip on big grids).
R9 — Checks
tests/Nota.SmokeTest/DesignTokenCheck.Remote.cs: radii0,50%orvar(--r-…); noGeist Mono/monospace/class="mono";--picked-inkdefined for both kinds.tests/Nota.SmokeTest/RemoteTests.cs: theme payload carriesfont/rfor a skin and neither for a built-in;clipssent only to a phone on Scenes, once per change, capped, and not re-sent while nothing changes.npm run checkclean;npm run buildbuilds;scripts/build.shgreen.