Skip to content

Commit 1144740

Browse files
committed
docs: refresh README · ARCHITECTURE · FEATURE_ROADMAP · CHANGELOG for v2.0.x
README: - Main mermaid diagram redrawn — adds SessionLiveSnapshot, TakeLaneSnapshot, ModSnapshot, RTVoiceScheduler, AUv3ViewCache, comping canvas, Help tab, the priority chain (session → arrangement → order list), audio + MIDI clip dispatch, take comp triggers, metronome shared trigger, and the Tools layer fan-out. - New Tools + Collaboration data flow mermaid — shows how every offline actor (Stem · MIDI · Masking · DAW-Project · Collab) hops through Timeline.publishSnapshot to the engine, and where each writes (disk · arrangement · EQ · wire format). - Module breakdown updated for every module. - New feature sections: Recording + Comping, Modulation, Tools, Open Interchange, Collaboration Foundation, Help & Onboarding. - UAT count: 270+ → 299. docs/ARCHITECTURE.md: - Module-graph mermaid annotates every module with today's additions. - Module-role table refreshed. - Render-pipeline diagram shows priority chain + automation + modulation + audio/MIDI dispatch + take comp + metronome as parallel branches converging on activeChannelIndices, plus the RT scheduler as an optional parallel path. - Snapshot-lifecycle diagram: third atomic (_modPtr) + third dealloc queue (modDealloc). - "Arrangement consumption" → "Playback priority chain" — diagram redrawn around the three handles (session live, arrangement, take lanes) all converging on the voice trigger. docs/FEATURE_ROADMAP.md: - Pie chart: 39 → 47 items, refreshed buckets. - Today / Next / Later flowchart rewritten around 299 / 0 + Demucs/Magenta conversion + automerge-swift / SwiftGit2 vendoring as the next-release gates. - Shipped list: 16 new bullet entries covering everything from today's session. CHANGELOG.md: - [Unreleased]: full breakdown of session live, take comping + region playback, modulation DAG, MaskingAnalyzer, StemSeparator scaffold, MIDIGenerator scaffold, comping UI, AUv3 native UI embedding, CollabSession foundation, DAW-Project exporter, plus the audio + MIDI clip render-path consumption from the prior v2.0.1-followup work.
1 parent 5b0c86a commit 1144740

4 files changed

Lines changed: 310 additions & 59 deletions

File tree

CHANGELOG.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,102 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
88

9+
### Added
10+
- **Session-view live-cell render path**`SongSnapshot.sessionLive`
11+
carries a render-thread-safe `[SessionLiveSnapshot.Cell]` derived from
12+
`SessionGrid.livePlayback` + per-column `liveSinceBeat`. The render path
13+
treats live cells as priority-1 overrides over arrangement clips and the
14+
order list (matches the Ableton "session overrides arrangement" rule).
15+
Pattern cells substitute the row; `.audio` and `.midi` cells loop with
16+
per-loop trigger / event dispatch via shared dispatch helper. Quantized
17+
launches now actually advance: `Timeline.publishSnapshot` calls
18+
`SessionGrid.advanceLaunches(nowBeat:)` every UI tick. Plus
19+
`PlaybackState.arrangement` and `PlaybackState.sessionGrid` were added
20+
so the live engine consumes them — pre-fix only the test harness did.
21+
- **Take comp regions + render path playback** — `TakeLane.regions:
22+
[CompRegion]` for region-based active-take selection.
23+
`TakeLane.cacheInBank(_:)` allocates each take's interleaved PCM into the
24+
unified sample bank; the render path triggers a voice from the cached
25+
bank region whenever the playhead crosses a region's `startBeat`.
26+
`RecordingTake` gained `bankOffset`/`bankLength` (runtime-only — never
27+
persisted). `TakeLaneSnapshot` is the RT-safe handoff.
28+
- **Modulation routing DAG** — new `ToooT_Core/Modulation.swift` with
29+
`ModSource`, `ModSlot`, `ModSnapshot`. Sources: LFO, sidechain peak,
30+
envelope, MIDI CC. Destinations: channel volume / pan / send, bus
31+
volume, master volume. `RenderResources.modBuffer` is a flat 128-slot
32+
Float* allocated at engine init. `evaluateModulation` runs at every row
33+
tick after automation, additively writing source × amount into the same
34+
destination fields automation already touches. Bipolar slots span
35+
`[-amount, +amount]`; unipolar map sin LFOs to `[0, amount]`. Atomic
36+
swap pattern + dealloc queue mirrors `AutomationSnapshot`.
37+
- **MaskingAnalyzer (offline frequency-masking)** — `ToooT_Plugins/
38+
MaskingAnalyzer.swift` is an `actor` that consumes per-channel frozen
39+
PCM and produces ranked `[MaskingSuggestion]`. Hann-windowed FFT via
40+
`vDSP.FFT`, 10-band log-spaced binning matching `LinearPhaseEQ`,
41+
pair-wise mean-energy comparison with configurable threshold + cap.
42+
Confidence score 0…1. Pure offline — never touches RT thread.
43+
- **StemSeparator scaffold**`ToooT_Plugins/StemSeparator.swift` is the
44+
CoreML / Demucs integration scaffold. Streaming AVAudioFile I/O,
45+
7.8 s window with 1 s overlap-add crossfade, per-stem WAV writers,
46+
cooperative cancellation, MainActor progress callback. Model is loaded
47+
from the bundle (`Demucs_htdemucs.mlpackage`); init throws
48+
`Error.modelMissing` with a clear searched-path if absent.
49+
- **MIDIGenerator scaffold**`ToooT_Plugins/MIDIGenerator.swift` is the
50+
same shape: actor, model probe, autoregressive token sampler (softmax
51+
with temperature), Magenta "performance" vocabulary decoder that emits
52+
`[ClipMIDIEvent]` ready for a `.midi` arrangement clip.
53+
- **Take-comping UI**`ToooT_UI/CompingView.swift` renders stacked take
54+
rows with painted comp regions; horizontal drag paints a region
55+
active for the dragged span on whichever take row was clicked.
56+
- **AUv3 native-UI embedding**`ToooT_UI/AUv3PluginViewWindow.swift`
57+
ships `AUv3ViewCache` (caches `NSViewController` per plugin instance to
58+
skip XPC handshake on reopen), `AUv3HostedView`
59+
(`NSViewControllerRepresentable`), `AUv3PluginWindow` (sheet host with
60+
generic-parameter-list fallback when the plugin doesn't ship a custom
61+
UI). Uses the documented `requestViewController` path so v3 plugins
62+
remain out-of-process.
63+
- **CollabSession foundation**`ToooT_IO/CollabSession.swift` is the
64+
Network.framework P2P transport: `NWBrowser` Bonjour discovery on
65+
`_tooot._tcp.local.`, `NWListener` for structural sync (length-prefixed
66+
blob channel — Automerge applies once dep is vendored), UDP multicast
67+
for live `ParamPacket` parameter drags. Fixed-size 36-byte packet wire
68+
format encoded with one `withUnsafeBytes`, no per-call allocations.
69+
- **DAW-Project XML exporter**`ToooT_IO/DAWProjectExporter.swift`
70+
serialises `Arrangement` (with tracks, pattern/audio/MIDI clips,
71+
fades, gains, MIDI notes) to the Bitwig-led MIT-licensed open
72+
interchange format. Replaces AAF / OMF as the open path for handing
73+
sessions to other DAWs.
74+
- **Audio + MIDI clip render-path consumption**`Arrangement` now drives
75+
audio for every `ClipKind`, not just `.pattern`. Audio clips trigger a
76+
one-shot voice into the unified bank region at clip onset and silence the
77+
channel at clip end (`Arrangement.audioClipsStarting/Ending(forChannel:atBeat:)`).
78+
MIDI clips carry an embedded `[ClipMIDIEvent]` array (relative beat
79+
offsets, `noteOn`/`noteOff`, MIDI note + velocity + instrument) which the
80+
render path dispatches at row resolution via the existing voice trigger
81+
machinery (`Arrangement.midiEvents(forChannel:atBeat:)`). Pattern-clip
82+
override semantics unchanged. UAT 62 verifies onset, end, noteOn, noteOff
83+
for both kinds end-to-end.
84+
- **`RTVoiceScheduler` — opt-in worker pool for realtime voice processing**
85+
— spawns N user-interactive `Thread`s coordinated via per-worker
86+
`DispatchSemaphore`s plus a single done-semaphore. When
87+
`EngineSharedState.realtimeMulticoreEnabled = 1`, the realtime render
88+
block partitions active voices across the pool, each writing into its
89+
thread-local scratch slot; voice processing + PDC + sidechain peak run
90+
in parallel, then the audio thread does a serial vDSP_vsma reduce into
91+
the master + bus accumulators. Defaults to off; flip the flag to opt in.
92+
UAT 63 covers the scheduler primitive (full dispatch coverage, slot
93+
ownership, prompt teardown, post-stop fallback).
94+
95+
### Changed
96+
- **UATRunner — section reorder + timeouts.** `§15` (60-second openmpt A/B
97+
fidelity test) now runs before the summary so its failures count toward
98+
the pass/fail tally, and the missing-reference-WAV path falls through
99+
instead of `exit(0)`. `§26` (AUv3 plugin discovery + hosting) runs last,
100+
bounded by a 15 s discovery timeout and a 30 s hosting timeout — so a
101+
cold `AVAudioUnitComponentManager` cache prints a skip-with-warning
102+
rather than gating the rest of the suite (was the v2.0.1 carry-over
103+
TODO).
104+
9105
## [2.0.1] — 2026-04-26
10106

11107
### Added

0 commit comments

Comments
 (0)