feat(vst): S18 VST3 channel isolation — beta ReaSampler 9000 pairs with beta extension only
Fork the VST3 class UID (beta UID minted+frozen), on-disk name, and display name by the one channel bit via app_version; couple UID selection to the channel at compile time so a refactor can't split identity from data.
This commit is contained in:
+57
-20
@@ -2,41 +2,78 @@
|
||||
// (Phase S). One place for the plugin's class UID, name, vendor, and version so the
|
||||
// processor, factory, and editor agree.
|
||||
//
|
||||
// The class UID is FOREVER-STABLE once shipped: a REAPER project that instantiates this
|
||||
// instrument records the UID, so changing it orphans every saved instance. Minted once
|
||||
// for the spike; do not regenerate.
|
||||
// A class UID is FOREVER-STABLE once shipped: a REAPER project that instantiates this
|
||||
// instrument records the UID, so changing it orphans every saved instance. Minted once;
|
||||
// do not regenerate.
|
||||
//
|
||||
// CHANNEL ISOLATION (S18, beta-in-isolation — the instrument-side companion to V4). Just
|
||||
// as V4 gave the extension a per-channel ext-state namespace / command-id family / dock
|
||||
// ident, S18 gives the VST3 instrument a per-channel PLUGIN IDENTITY: its class UID, its
|
||||
// on-disk filename, and its display name all fork by the ONE channel bit
|
||||
// (REASAMPLER_CHANNEL_IS_BETA, from version_generated.h). ONE class per binary — the bit
|
||||
// selects which UID compiles into the single DEF_CLASS2, so a beta build carries only the
|
||||
// beta identity and can never present the stable one (mirrors V4's fully-isolated-binary
|
||||
// philosophy). The two UIDs below are BOTH frozen forever; the filename + display name
|
||||
// derive from app_version's vstOutputName()/vstPluginName() (this header owns only the
|
||||
// binary UID identity — the string identity lives in the pure module).
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pluginterfaces/base/funknown.h"
|
||||
|
||||
#include "version_generated.h" // REASAMPLER_CHANNEL_IS_BETA — the one channel bit
|
||||
|
||||
namespace reasampler::vst {
|
||||
|
||||
// Human-facing identity (S-NAME-1, SETTLED 2026-07-26). "ReaSampler" is the extension
|
||||
// (capture + organization); the MIDI-playback instrument's product name is
|
||||
// "ReaSampler 9000" — the string that surfaces in REAPER's FX browser, the factory
|
||||
// display name, the editor title band, and the embed-strip label. The on-disk module is
|
||||
// renamed to match (CMake OUTPUT_NAME reasampler_9000.vst3). The VST3 class UID below is
|
||||
// the compat anchor and is NOT changed by the rename — a saved REAPER project rebinds a
|
||||
// saved instance by class UID, so the display/filename rename keeps existing instances
|
||||
// resolving (compat is a DAW-verify; see PLAN.md §S-NAME-1).
|
||||
inline constexpr const char* kPluginName = "ReaSampler 9000";
|
||||
// Vendor identity (S-NAME-1, SETTLED 2026-07-26). Shared across channels — V4 kept the
|
||||
// lane-name prefix shared, so shared-where-V4-shares is the default (the channel is carried
|
||||
// by the UID + filename + display fork, not the vendor block).
|
||||
inline constexpr const char* kVendorName = "ReaSampler";
|
||||
inline constexpr const char* kVendorUrl = "https://github.com/daniel-c-harvey/reasampler";
|
||||
inline constexpr const char* kVendorEmail = "mailto:the.real.daniel.harvey@gmail.com";
|
||||
|
||||
// The processor class UID (the SingleComponentEffect). FOREVER-STABLE once shipped —
|
||||
// a saved REAPER project records it, so changing it orphans every saved instance.
|
||||
// Minted once for the S1 spike (2026-07-26). Defined as four longs so the factory's
|
||||
// INLINE_UID (compile-time brace init) and the runtime FUID below share one source.
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// The two FOREVER-FROZEN VST3 class UIDs — one per channel. A saved REAPER project records
|
||||
// the UID of the instance it instantiated and rebinds by it on reopen, so EACH is a
|
||||
// permanent commitment: changing either orphans every saved instance of that channel. The
|
||||
// channel bit selects which one this binary's factory registers (below) — one class per
|
||||
// binary, never both. Documented with the SAME gravity: neither may EVER be regenerated.
|
||||
|
||||
// STABLE class UID (S-NAME-1). Minted at the S1 spike (2026-07-26), locked. FROZEN FOREVER.
|
||||
#define REASAMPLER_PROC_UID_1 0x5E45A11E
|
||||
#define REASAMPLER_PROC_UID_2 0x9C7B4D6A
|
||||
#define REASAMPLER_PROC_UID_3 0xB1E3F208
|
||||
#define REASAMPLER_PROC_UID_4 0x4A6C1D9F
|
||||
|
||||
static const Steinberg::FUID kReaSamplerProcessorUID(REASAMPLER_PROC_UID_1,
|
||||
REASAMPLER_PROC_UID_2,
|
||||
REASAMPLER_PROC_UID_3,
|
||||
REASAMPLER_PROC_UID_4);
|
||||
// BETA class UID (S18). Minted once (2026-07-26), locked FROM THIS WAVE per Daniel's
|
||||
// fast-track (fork S18-F1: mint now, not at first beta release). FROZEN FOREVER — the same
|
||||
// permanent lock as the stable UID; do not regenerate even though no beta VST has shipped.
|
||||
#define REASAMPLER_PROC_UID_BETA_1 0xCCFFEB3A
|
||||
#define REASAMPLER_PROC_UID_BETA_2 0x4FF532A6
|
||||
#define REASAMPLER_PROC_UID_BETA_3 0x9E181798
|
||||
#define REASAMPLER_PROC_UID_BETA_4 0x4256955F
|
||||
|
||||
// The channel-selected UID macros the factory's INLINE_UID (compile-time brace init) and the
|
||||
// runtime FUID below both source, so exactly one class UID is compiled into this binary. This
|
||||
// is the ONLY channel #ifdef in the VST shell (an INLINE_UID needs literal brace-init tokens,
|
||||
// so it cannot route through app_version's runtime string accessors — the header owns the
|
||||
// binary UID fork, app_version owns the string fork).
|
||||
#if REASAMPLER_CHANNEL_IS_BETA
|
||||
#define REASAMPLER_ACTIVE_UID_1 REASAMPLER_PROC_UID_BETA_1
|
||||
#define REASAMPLER_ACTIVE_UID_2 REASAMPLER_PROC_UID_BETA_2
|
||||
#define REASAMPLER_ACTIVE_UID_3 REASAMPLER_PROC_UID_BETA_3
|
||||
#define REASAMPLER_ACTIVE_UID_4 REASAMPLER_PROC_UID_BETA_4
|
||||
#else
|
||||
#define REASAMPLER_ACTIVE_UID_1 REASAMPLER_PROC_UID_1
|
||||
#define REASAMPLER_ACTIVE_UID_2 REASAMPLER_PROC_UID_2
|
||||
#define REASAMPLER_ACTIVE_UID_3 REASAMPLER_PROC_UID_3
|
||||
#define REASAMPLER_ACTIVE_UID_4 REASAMPLER_PROC_UID_4
|
||||
#endif
|
||||
|
||||
// The runtime FUID for the class this binary registers — the channel-selected UID above.
|
||||
static const Steinberg::FUID kReaSamplerProcessorUID(REASAMPLER_ACTIVE_UID_1,
|
||||
REASAMPLER_ACTIVE_UID_2,
|
||||
REASAMPLER_ACTIVE_UID_3,
|
||||
REASAMPLER_ACTIVE_UID_4);
|
||||
|
||||
} // namespace reasampler::vst
|
||||
|
||||
Reference in New Issue
Block a user