c3368d0a91
- native_bridge/: InstrumentEngineManager multi-channel, sample-accurate, CC/program/pitchbend, transport, Vst3Instrument stub (HAVE_VST3SDK) - src-tauri: shm.rs, bridge spawn + audio pump + health monitor, open_vst_gui, externalBin, commands - app: UnifiedMidiRouter, NativeBridgeService, bridgeAudioNode, audioRoutingEngine, Plugin Manager UI, Bridge/WASM indicator, set_position sync - build: 3 ps1 (force-added, build/ ignored), verify_bundle --check-bridge, CI workflow - docs: TASKS.md, TEST_NOTES.md (Windows verify checklist), install/report updates
44 lines
1.7 KiB
C++
44 lines
1.7 KiB
C++
// native_bridge/include/Vst3Instrument.h
|
|
// VST3 host instrument (A7). Compiled ALWAYS; the real vst3sdk wiring is
|
|
// inside #ifdef HAVE_VST3SDK (set by CMake when the vst3sdk submodule is
|
|
// present). Without the SDK the class degrades to a no-op stub so the bridge
|
|
// still builds for SF2/SF3/SFZ.
|
|
#ifndef VST3_INSTRUMENT_H
|
|
#define VST3_INSTRUMENT_H
|
|
|
|
#include "INativeInstrument.h"
|
|
|
|
#include <string>
|
|
|
|
class Vst3Instrument : public INativeInstrument {
|
|
public:
|
|
Vst3Instrument();
|
|
~Vst3Instrument() override;
|
|
|
|
bool loadPlugin(const std::string& path, double sampleRate);
|
|
|
|
bool init(double sampleRate, uint32_t maxBlockSize) override;
|
|
void selectProgram(uint32_t channel, uint32_t bank, uint32_t program) override;
|
|
void noteOn(uint32_t channel, uint32_t pitch, float velocity, uint32_t sampleOffset) override;
|
|
void noteOff(uint32_t channel, uint32_t pitch, uint32_t sampleOffset) override;
|
|
void controlChange(uint32_t channel, uint32_t cc, uint32_t value) override;
|
|
void programChange(uint32_t channel, uint32_t program) override;
|
|
void pitchBend(uint32_t channel, uint32_t bend14) override;
|
|
bool openGUI(void* parentWindowHandle) override;
|
|
void closeGUI() override;
|
|
void processAudioBlock(float* outputL, float* outputR, uint32_t numSamples) override;
|
|
|
|
private:
|
|
void* module_; // Steinberg::IPluginFactory* (owned by module)
|
|
void* processor_; // Steinberg::Vst::IComponent*
|
|
void* controller_; // Steinberg::Vst::IEditController*
|
|
void* view_; // Steinberg::IPlugView*
|
|
std::string path_;
|
|
double sampleRate_;
|
|
uint32_t maxBlockSize_;
|
|
bool loaded_;
|
|
bool guiAttached_;
|
|
};
|
|
|
|
#endif // VST3_INSTRUMENT_H
|