feat(capture): bindable capture family — master/tracks/items/razor (M7)

Four wet capture actions route to OfflineRenderBackend (snapshot/restore
RENDER_*, 32-bit float), produce a Sample, add to the bank, persist. Pure
render_settings maps source mode to RENDER_SETTINGS and parses P_RAZOREDITS
(tested). No arrange insertion. True dry deferred to M10.
This commit is contained in:
2026-07-23 10:01:34 -04:00
parent 4f1231ea81
commit 7b530193b2
7 changed files with 679 additions and 60 deletions
+19 -5
View File
@@ -14,6 +14,7 @@
// without dragging the SDK into every include site.
#include <string>
#include <vector>
#include "bank_model.h"
@@ -40,10 +41,20 @@ struct CaptureRequest {
double startSeconds = 0.0;
double endSeconds = 0.0;
// 1.0 = fully wet, 0.0 = fully dry. M3 renders the wet master mix (1.0);
// dry/partial routing is M7. Carried now so the Sample records it.
// 1.0 = fully wet, 0.0 = fully dry. All M7 actions set this to 1.0 (wet).
// The field is kept as the seam for future true-dry work (M10 null test):
// true pre-FX dry offline is NOT available via RENDER_SETTINGS — it requires
// FX-bypass-around-render or the M8 realtime pre-FX path, and will be
// designed alongside the M10 null test. Also recorded on the Sample.
double wetDry = 1.0;
// Track GUID(s) the capture came from, when the source mode is track-scoped
// (SelectedTracks). Empty for master/items/razor. The action layer (M7)
// resolves the selection to canonical GUID strings and passes them here; the
// backend copies them onto the Sample (it does NOT itself read the selection —
// it stays source-agnostic, driven entirely by the request).
std::vector<std::string> trackGuids;
// Render tail. Default OFF for the spike (exact bounds, no added silence —
// precision invariant). M7 makes this bindable.
bool renderTail = false;
@@ -90,9 +101,12 @@ public:
virtual CaptureResult capture(const CaptureRequest& request) = 0;
};
// Deterministic offline-render backend. M3 implements ONLY the
// TimeSelection / MasterMix case (both map to "render the master mix over the
// requested bounds"); any other source mode returns UnsupportedMode.
// Deterministic offline-render backend. M7 implements the full offline source
// family — master mix / time selection, selected tracks, selected items, razor
// area — all wet-only (render_settings.h) with optional tail. The source
// selection + range are resolved by the caller (the action layer) and handed in
// via the CaptureRequest; the backend drives RENDER_* and never reads the DAW
// selection itself. SourceMode::Realtime returns UnsupportedMode (that is M8).
class OfflineRenderBackend : public ICaptureBackend {
public:
CaptureResult capture(const CaptureRequest& request) override;