docs: record Ξ-W2-T1, the resample bake chain, and file its two deferrals
This commit is contained in:
@@ -270,6 +270,60 @@ decode; sounding voices are still destroyed across it, with no ghost-resurrectio
|
||||
a pre-v10 blob still lifts; and `getLatencySamples()` still derives from persisted state rather
|
||||
than from a transient the deactivate cleared.
|
||||
|
||||
## `Sample::sourceMode` has no value meaning "produced by the instrument"
|
||||
|
||||
**Context (what shipped — Ξ-W2-T1, resample-bake-chain).** A resample bake's landed
|
||||
`Sample` entry (`bake_land.cpp`) never sets `sourceMode`; it is left at the struct
|
||||
default (`SourceMode::MasterMix`) rather than recording that the entry's audio came
|
||||
from the instrument's own offline render, not from a capture backend.
|
||||
|
||||
**The wart.** A baked capture is indistinguishable, by `sourceMode`, from a master-mix
|
||||
render — the bank has no way to tell "this file was produced by ReaSampler 9000" from
|
||||
"this file was rendered off the master bus."
|
||||
|
||||
**Intended fix.** Add a `SourceMode` value for instrument-produced audio and set it at
|
||||
the one landing site.
|
||||
|
||||
**The constraint the fix MUST handle.** `bank_model.cpp`'s deserializer rejects any
|
||||
`sourceMode` value outside `MasterMix(0)..Realtime(5)` by failing the whole bank
|
||||
blob's parse (`parseSample` returns `false`), not just that one field — so appending a
|
||||
new enumerator is a forward-incompatible bank-format change: an older extension build
|
||||
reading a newer project's bank would refuse to load it entirely. This needs its own
|
||||
decision (a version-gated field, or accepting the compatibility cost) rather than a
|
||||
one-line enum append.
|
||||
|
||||
**Priority / risk.** Low / deferred. Logged at Ξ-W2-T1's review rather than folded in.
|
||||
|
||||
**Done looks like.** A baked capture's `sourceMode` reads as instrument-produced, and
|
||||
the compatibility question (how an older build reads a bank containing the new value)
|
||||
is answered rather than left to fail closed by accident.
|
||||
|
||||
## `instrument_bake` doubles peak memory on the WAV build
|
||||
|
||||
**Context (what shipped — Ξ-W2-T1, resample-bake-chain).** `runBake` (`instrument_bake.cpp`)
|
||||
copies the render's interleaved `float` buffer (`BakeAudio::interleaved`, `AudioSample
|
||||
= float`) into a `std::vector<double>` before handing it to `buildFloat32Wav`, which
|
||||
takes doubles and narrows back to float for the bank's 32-bit-float WAV contract.
|
||||
|
||||
**The wart.** The copy roughly doubles peak memory for the bake — an 8-byte double
|
||||
holding a value that started and ends as a 4-byte float — for the duration of the WAV
|
||||
build on a large bake.
|
||||
|
||||
**Intended fix.** Either give `buildFloat32Wav` (or a sibling entry point) a
|
||||
`float`-input overload so the bake path narrows nothing it doesn't already own in
|
||||
`float`, or narrow lazily during the WAV build instead of pre-copying the whole
|
||||
buffer.
|
||||
|
||||
**The constraint the fix MUST handle.** `buildFloat32Wav`'s `double` parameter is
|
||||
shared with every other caller in `core/capture/wav_codec`; a fix must not change
|
||||
those callers' contract or add a second WAV-building code path to maintain.
|
||||
|
||||
**Priority / risk.** Low / deferred. Logged at Ξ-W2-T1's review; correctness is
|
||||
unaffected, only peak memory on a large bake.
|
||||
|
||||
**Done looks like.** A bake's peak memory no longer includes a full double-precision
|
||||
copy of the rendered buffer, with `buildFloat32Wav`'s other callers unchanged.
|
||||
|
||||
## The deck layout rework — SPECCED, and the original shape SUPERSEDED
|
||||
|
||||
**Status (2026-08-01): no longer a deferral. The design notes Daniel owed this entry have
|
||||
|
||||
Reference in New Issue
Block a user