feat: VST FX rack per-track + masterbus render via native_bridge
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
// native_bridge/include/RenderFxJob.h
|
||||
#ifndef RENDER_FX_JOB_H
|
||||
#define RENDER_FX_JOB_H
|
||||
|
||||
#include <string>
|
||||
|
||||
// Offline FX render mode (Phase 0 of PLAN_MASTERBUS_FX_RACK_VST.md):
|
||||
// `daw_vst_bridge --render-fx <job.json> --in <input.wav> --out <output.wav>`
|
||||
// reads a stereo WAV, runs the input through a chain of VST3 audio effects
|
||||
// (audio-in/audio-out, NO MIDI) plus builtin DSP (gain/normalize), and writes
|
||||
// a 16-bit stereo WAV. Same exit-code contract as --render: 0 ok, 1 job/argument
|
||||
// error, 2 plugin load failure, 3 plugin crashed mid-render (SEH guarded).
|
||||
//
|
||||
// job.json: { sample_rate, block_size?,
|
||||
// fx_chain: [
|
||||
// { type: "vst3", path, preset_b64?, bypass? },
|
||||
// { type: "builtin", id: "gain", params: { db } },
|
||||
// { type: "builtin", id: "normalize", params: { peak } }
|
||||
// ] }
|
||||
// vst3: path = .vst3 module; preset_b64 = base64 of a .vstpreset FILE (raw
|
||||
// SDK chunk format) or of the bridge state blob — both applied via
|
||||
// setState before processing. bypass=true → slot skipped (passthrough).
|
||||
// gain: multiply by 10^(db/20), block-wise.
|
||||
// normalize: post-chain global pass — scale down to peak (0.95) only when
|
||||
// the peak EXCEEDS it (mirrors render_project's clip guard).
|
||||
int run_render_fx_job(const std::string& jobPath, const std::string& inPath,
|
||||
const std::string& outPath);
|
||||
|
||||
// Plugin scan mode (Phase 1): `daw_vst_bridge --scan <dir>` walks <dir>
|
||||
// recursively, loads every .vst3 module and classifies its classes
|
||||
// (kVstAudioEffectClass without "Instrument" subcategory → effect, else
|
||||
// instrument), and prints JSON to stdout:
|
||||
// {"plugins":[{"path":"...","name":"...","is_fx":true,"is_instrument":false,"type":"VST3"}]}
|
||||
// .dll/.so (VST2) cannot be introspected headlessly → classified as instrument.
|
||||
// Returns 0 on success, non-zero on unrecoverable error (a single plugin that
|
||||
// crashes the module loader is skipped, not fatal).
|
||||
int run_scan_dir(const std::string& dirPath);
|
||||
|
||||
#endif // RENDER_FX_JOB_H
|
||||
Reference in New Issue
Block a user