@signalsandsorcery/plugin-sdk 2.35.1 → 2.35.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +290 -4
- package/dist/index.d.ts +290 -4
- package/dist/index.js +1196 -604
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1192 -604
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -86,6 +86,72 @@ interface InstrumentDescriptor {
|
|
|
86
86
|
/** Whether this plugin is currently installed/available */
|
|
87
87
|
missing?: boolean;
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* One FX plugin in a panel bus's chain, as shown to the panel UI. The
|
|
91
|
+
* engine's Volume & Pan master section and level meter are filtered OUT —
|
|
92
|
+
* they are the strip's fader/meter, not user FX chips.
|
|
93
|
+
* @since SDK 2.36.0
|
|
94
|
+
*/
|
|
95
|
+
interface PanelBusFxEntry {
|
|
96
|
+
/**
|
|
97
|
+
* ENGINE chain index — pass this back to remove/bypass/editor calls.
|
|
98
|
+
* Not necessarily contiguous from 0: hidden master-section plugins share
|
|
99
|
+
* the same chain.
|
|
100
|
+
*/
|
|
101
|
+
index: number;
|
|
102
|
+
/** Scanned plugin id (the picker's `InstrumentDescriptor.pluginId`). */
|
|
103
|
+
pluginId: string;
|
|
104
|
+
/** Display name. */
|
|
105
|
+
name: string;
|
|
106
|
+
/** False when bypassed. */
|
|
107
|
+
enabled: boolean;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* A panel's mix-bus state for one scene (docs/panel-bus.md §9).
|
|
111
|
+
* @since SDK 2.36.0
|
|
112
|
+
*/
|
|
113
|
+
interface PanelBusState {
|
|
114
|
+
/** False = the panel has no bus in this scene (flat routing). */
|
|
115
|
+
engaged: boolean;
|
|
116
|
+
/** Master fader in dB (0 = unity). */
|
|
117
|
+
volume: number;
|
|
118
|
+
muted: boolean;
|
|
119
|
+
soloed: boolean;
|
|
120
|
+
/** User FX chain, top-to-bottom (master section excluded). */
|
|
121
|
+
fx: PanelBusFxEntry[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* One third-party (VST3/AU) FX insert on a TRACK's plugin chain, as shown to
|
|
125
|
+
* the panel UI. The track's instrument, the built-in FX-toggle plugins
|
|
126
|
+
* (reverb/delay/eq/…) and the Volume & Pan master section are filtered OUT —
|
|
127
|
+
* this list is only the user's external inserts. Same shape as
|
|
128
|
+
* `PanelBusFxEntry` by design: the drawer and the bus strip share UI idioms.
|
|
129
|
+
* @since SDK 2.39.0
|
|
130
|
+
*/
|
|
131
|
+
interface TrackExternalFxEntry {
|
|
132
|
+
/**
|
|
133
|
+
* ENGINE chain index — pass this back to remove/bypass/editor calls.
|
|
134
|
+
* Not contiguous from 0: the instrument and built-in FX share the chain.
|
|
135
|
+
*/
|
|
136
|
+
index: number;
|
|
137
|
+
/** Scanned plugin id (the picker's `InstrumentDescriptor.pluginId`). */
|
|
138
|
+
pluginId: string;
|
|
139
|
+
/** Display name. */
|
|
140
|
+
name: string;
|
|
141
|
+
/** False when bypassed. */
|
|
142
|
+
enabled: boolean;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Stereo peak levels of a panel bus's OUTPUT (post-FX, post-fader). dBFS,
|
|
146
|
+
* floored at -120 ("no signal"). Drives the strip's stereo meter.
|
|
147
|
+
* @since SDK 2.38.0
|
|
148
|
+
*/
|
|
149
|
+
interface PanelBusLevels {
|
|
150
|
+
leftDb: number;
|
|
151
|
+
rightDb: number;
|
|
152
|
+
/** Latched overload since the last read. */
|
|
153
|
+
clipped: boolean;
|
|
154
|
+
}
|
|
89
155
|
/** Every generator plugin must implement this interface. */
|
|
90
156
|
interface GeneratorPlugin {
|
|
91
157
|
/** Unique ID, npm-style scope: '@sas/synth-generator', '@user/my-plugin' */
|
|
@@ -565,6 +631,67 @@ interface PluginHost {
|
|
|
565
631
|
* origin/target scenes). Optional — callers MUST null-check. @since SDK 2.26.0
|
|
566
632
|
*/
|
|
567
633
|
getSceneName?(sceneDbId: string): Promise<string | null>;
|
|
634
|
+
/**
|
|
635
|
+
* FX plugins available for the bus picker (scanned, non-instrument).
|
|
636
|
+
* Same descriptor shape as `getAvailableInstruments` by design — the SDK
|
|
637
|
+
* picker components consume one type.
|
|
638
|
+
*/
|
|
639
|
+
getAvailableFx?(): Promise<InstrumentDescriptor[]>;
|
|
640
|
+
/**
|
|
641
|
+
* The panel's bus state for a scene. `{ engaged: false, … }` when the
|
|
642
|
+
* panel has no bus there — reading NEVER creates one. When engaged, this
|
|
643
|
+
* also (re)realizes the bus in the engine (adopt-by-marker; rebuild from
|
|
644
|
+
* the persisted blob only after a `.sasproj` import) and routes any
|
|
645
|
+
* not-yet-routed panel tracks through it, so calling it from `loadTracks`
|
|
646
|
+
* is the panel's whole reload story.
|
|
647
|
+
*/
|
|
648
|
+
getPanelBusState?(sceneId: string): Promise<PanelBusState>;
|
|
649
|
+
/**
|
|
650
|
+
* Stereo output levels for the strip's bus meter (~30 Hz poll). Null when
|
|
651
|
+
* the bus is disengaged/unrealized or the engine is unavailable — render
|
|
652
|
+
* the meter floored. Never engages a bus. @since SDK 2.38.0
|
|
653
|
+
*/
|
|
654
|
+
getPanelBusLevels?(sceneId: string): Promise<PanelBusLevels | null>;
|
|
655
|
+
/** Master fader in dB (engages the bus on first use). */
|
|
656
|
+
setPanelBusVolume?(sceneId: string, volumeDb: number): Promise<void>;
|
|
657
|
+
/** Bus mute — silences the whole panel (multiplies with per-track mutes). */
|
|
658
|
+
setPanelBusMute?(sceneId: string, muted: boolean): Promise<void>;
|
|
659
|
+
/** Panel solo — composes with track solo via the engine's solo rules. */
|
|
660
|
+
setPanelBusSolo?(sceneId: string, soloed: boolean): Promise<void>;
|
|
661
|
+
/**
|
|
662
|
+
* Add an FX plugin (by scanned pluginId) to the bus chain, engaging the
|
|
663
|
+
* bus if needed. Instruments are rejected engine-side.
|
|
664
|
+
*/
|
|
665
|
+
loadPanelBusFx?(sceneId: string, pluginId: string): Promise<PanelBusFxEntry>;
|
|
666
|
+
/** Remove a bus FX by its `PanelBusFxEntry.index`. */
|
|
667
|
+
removePanelBusFx?(sceneId: string, fxIndex: number): Promise<void>;
|
|
668
|
+
/** Bypass toggle for a bus FX by its `PanelBusFxEntry.index`. */
|
|
669
|
+
setPanelBusFxEnabled?(sceneId: string, fxIndex: number, enabled: boolean): Promise<void>;
|
|
670
|
+
/** Open the native editor window for a bus FX. */
|
|
671
|
+
showPanelBusFxEditor?(sceneId: string, fxIndex: number): Promise<void>;
|
|
672
|
+
/**
|
|
673
|
+
* Disengage the bus: FX chain removed, tracks reparented back under the
|
|
674
|
+
* scene, persisted state deleted. The panel returns to flat routing.
|
|
675
|
+
*/
|
|
676
|
+
disengagePanelBus?(sceneId: string): Promise<void>;
|
|
677
|
+
/**
|
|
678
|
+
* The track's external FX inserts (instrument + built-ins filtered out).
|
|
679
|
+
* Reading also converges persisted state: on the first read of a session
|
|
680
|
+
* the host re-applies saved raw plugin states, and after a `.sasproj`
|
|
681
|
+
* import it rebuilds missing inserts from the persisted blob.
|
|
682
|
+
*/
|
|
683
|
+
getTrackExternalFx?(trackId: string): Promise<TrackExternalFxEntry[]>;
|
|
684
|
+
/**
|
|
685
|
+
* Add an FX plugin (by scanned pluginId, from `getAvailableFx`) to the
|
|
686
|
+
* track's chain, inserted before Volume & Pan. Instruments are rejected.
|
|
687
|
+
*/
|
|
688
|
+
loadTrackExternalFx?(trackId: string, pluginId: string): Promise<TrackExternalFxEntry>;
|
|
689
|
+
/** Remove an external FX by its `TrackExternalFxEntry.index`. */
|
|
690
|
+
removeTrackExternalFx?(trackId: string, fxIndex: number): Promise<void>;
|
|
691
|
+
/** Bypass toggle for an external FX by its `TrackExternalFxEntry.index`. */
|
|
692
|
+
setTrackExternalFxEnabled?(trackId: string, fxIndex: number, enabled: boolean): Promise<void>;
|
|
693
|
+
/** Open the native editor window for an external FX. */
|
|
694
|
+
showTrackExternalFxEditor?(trackId: string, fxIndex: number): Promise<void>;
|
|
568
695
|
/** Subscribe to transport state changes. Returns unsubscribe function. */
|
|
569
696
|
onTransportEvent(listener: TransportEventListener): UnsubscribeFn;
|
|
570
697
|
/** Subscribe to deck boundary events. Returns unsubscribe function. */
|
|
@@ -2283,6 +2410,14 @@ interface TrackDrawerProps {
|
|
|
2283
2410
|
onFxDryWetChange?: (category: FxCategory, value: number) => void;
|
|
2284
2411
|
/** Disable FX controls (e.g. while the track is generating). */
|
|
2285
2412
|
fxDisabled?: boolean;
|
|
2413
|
+
/**
|
|
2414
|
+
* Third-party FX section under the toggle bar (@since SDK 2.39.0): pass the
|
|
2415
|
+
* panel's host and the section manages its own state
|
|
2416
|
+
* (TrackExternalFxSection). Renders nothing on hosts without the surface,
|
|
2417
|
+
* so panels can pass this unconditionally. Omit to keep a built-ins-only
|
|
2418
|
+
* FX tab.
|
|
2419
|
+
*/
|
|
2420
|
+
externalFxHost?: PluginHost;
|
|
2286
2421
|
/** Available instrument plugins from engine scan. */
|
|
2287
2422
|
instruments?: InstrumentDescriptor[];
|
|
2288
2423
|
/** Currently loaded instrument plugin ID (null = default Surge XT). */
|
|
@@ -2324,7 +2459,7 @@ interface TrackDrawerProps {
|
|
|
2324
2459
|
/** Optional single-note preview when the user adds a note. */
|
|
2325
2460
|
onAuditionNote?: (pitch: number, velocity: number, durationMs: number) => void;
|
|
2326
2461
|
}
|
|
2327
|
-
declare function TrackDrawer({ activeTab, onTabChange, trackId, fxState, onFxToggle, onFxPresetChange, onFxDryWetChange, fxDisabled, instruments, currentPluginId, isLoading, onSelect, onRefresh, editorStage, onShowEditor, onBackToInstruments, selectedInstrumentName, soundHistory, soundHistoryCursor, onRestoreSound, onToggleFavorite, onImportSound, importSoundLabel, editNotes, onNotesChange, editBars, editBpm, editSnap, onAuditionNote, }: TrackDrawerProps): React$1.ReactElement;
|
|
2462
|
+
declare function TrackDrawer({ activeTab, onTabChange, trackId, fxState, onFxToggle, onFxPresetChange, onFxDryWetChange, fxDisabled, externalFxHost, instruments, currentPluginId, isLoading, onSelect, onRefresh, editorStage, onShowEditor, onBackToInstruments, selectedInstrumentName, soundHistory, soundHistoryCursor, onRestoreSound, onToggleFavorite, onImportSound, importSoundLabel, editNotes, onNotesChange, editBars, editBpm, editSnap, onAuditionNote, }: TrackDrawerProps): React$1.ReactElement;
|
|
2328
2463
|
|
|
2329
2464
|
/**
|
|
2330
2465
|
* useTrackLevels — drives the cosmetic per-track strip meters.
|
|
@@ -2540,6 +2675,10 @@ interface SDKTrackRowProps {
|
|
|
2540
2675
|
onFxPresetChange?: (cat: FxCategory, idx: number) => void;
|
|
2541
2676
|
/** FX dry/wet */
|
|
2542
2677
|
onFxDryWetChange?: (cat: FxCategory, val: number) => void;
|
|
2678
|
+
/** Third-party FX section in the drawer's FX tab — pass the panel's host
|
|
2679
|
+
* (self-contained; renders nothing on hosts without the surface).
|
|
2680
|
+
* @since SDK 2.39.0 */
|
|
2681
|
+
externalFxHost?: PluginHost;
|
|
2543
2682
|
/** Open/close FX (optional — omit to hide FX button) */
|
|
2544
2683
|
onToggleFxDrawer?: () => void;
|
|
2545
2684
|
/** Progress persistence callback */
|
|
@@ -2599,7 +2738,7 @@ interface SDKTrackRowProps {
|
|
|
2599
2738
|
* a thin peak meter welds to the bottom of the row. Omit to hide it. */
|
|
2600
2739
|
levels?: TrackLevelsHandle;
|
|
2601
2740
|
}
|
|
2602
|
-
declare function TrackRow({ track, prompt, runtimeState, soloedOut, fxDetailState, drawerOpen, drawerTab, onTabChange, isGenerating, isAuthenticated, error, hasMidi, generationProgress, estimatedGenerationMs, onPromptChange, onGenerate, onShuffle, onCopy, onDelete, contentSlot, onMuteToggle, onSoloToggle, onVolumeChange, onPanChange, onFxToggle, onFxPresetChange, onFxDryWetChange, onToggleFxDrawer, onProgressChange, accentColor, instrumentName, instrumentMissing, onToggleDrawer, availableInstruments, currentInstrumentPluginId, onInstrumentSelect, instrumentsLoading, onRefreshInstruments, editorStage, onShowEditor, onBackToInstruments, soundHistory, soundHistoryCursor, onRestoreSound, onToggleFavorite, onImportSound, importSoundLabel, editNotes, onNotesChange, editBars, editBpm, editSnap, onAuditionNote, drag, levels, }: SDKTrackRowProps): React$1.ReactElement;
|
|
2741
|
+
declare function TrackRow({ track, prompt, runtimeState, soloedOut, fxDetailState, drawerOpen, drawerTab, onTabChange, isGenerating, isAuthenticated, error, hasMidi, generationProgress, estimatedGenerationMs, onPromptChange, onGenerate, onShuffle, onCopy, onDelete, contentSlot, onMuteToggle, onSoloToggle, onVolumeChange, onPanChange, onFxToggle, onFxPresetChange, onFxDryWetChange, externalFxHost, onToggleFxDrawer, onProgressChange, accentColor, instrumentName, instrumentMissing, onToggleDrawer, availableInstruments, currentInstrumentPluginId, onInstrumentSelect, instrumentsLoading, onRefreshInstruments, editorStage, onShowEditor, onBackToInstruments, soundHistory, soundHistoryCursor, onRestoreSound, onToggleFavorite, onImportSound, importSoundLabel, editNotes, onNotesChange, editBars, editBpm, editSnap, onAuditionNote, drag, levels, }: SDKTrackRowProps): React$1.ReactElement;
|
|
2603
2742
|
|
|
2604
2743
|
/**
|
|
2605
2744
|
* Crossfade-pair metadata — family-agnostic types + parsing shared by every
|
|
@@ -3528,6 +3667,153 @@ interface VolumeSliderProps {
|
|
|
3528
3667
|
}
|
|
3529
3668
|
declare const VolumeSlider: React$1.FC<VolumeSliderProps>;
|
|
3530
3669
|
|
|
3670
|
+
/**
|
|
3671
|
+
* PanelMasterStrip — the panel's mix-bus master section (docs/panel-bus.md §10).
|
|
3672
|
+
*
|
|
3673
|
+
* One compact strip: BUS label + master fader + M/S + the bus FX chain as
|
|
3674
|
+
* chips (bypass toggle, remove, optional native-editor open) + an "FX +"
|
|
3675
|
+
* picker that reuses the TrackDrawer Pick-tab grid idiom over FX descriptors.
|
|
3676
|
+
*
|
|
3677
|
+
* Fully CONTROLLED and presentational: the panel owns `bus` (from
|
|
3678
|
+
* `host.getPanelBusState`), the picker-open flag, and wires every callback to
|
|
3679
|
+
* the corresponding `host.*PanelBus*` method. A disengaged bus renders the
|
|
3680
|
+
* same strip at neutral values — the first interaction engages it host-side,
|
|
3681
|
+
* so there is no separate "create bus" affordance to learn.
|
|
3682
|
+
*/
|
|
3683
|
+
|
|
3684
|
+
interface PanelMasterStripProps {
|
|
3685
|
+
/** Bus state from `host.getPanelBusState(sceneId)`. */
|
|
3686
|
+
bus: PanelBusState;
|
|
3687
|
+
/**
|
|
3688
|
+
* Stereo output levels from `host.getPanelBusLevels` (polled by
|
|
3689
|
+
* usePanelBus). Null floors the meter (disengaged / engine quiet).
|
|
3690
|
+
*/
|
|
3691
|
+
levels?: PanelBusLevels | null;
|
|
3692
|
+
/** FX descriptors from `host.getAvailableFx()` (lazy-load on picker open). */
|
|
3693
|
+
availableFx?: InstrumentDescriptor[];
|
|
3694
|
+
/** True while `availableFx` is loading. */
|
|
3695
|
+
fxLoading?: boolean;
|
|
3696
|
+
/**
|
|
3697
|
+
* Another panel/track solo is active and this bus is NOT soloed — render
|
|
3698
|
+
* dimmed, mirroring TrackRow's soloed-out treatment. Feed
|
|
3699
|
+
* `anySolo && !bus.soloed` from the panel's `useAnySolo(host)` hook.
|
|
3700
|
+
*/
|
|
3701
|
+
soloedOut?: boolean;
|
|
3702
|
+
/** Disable all controls (e.g. while the panel is generating). */
|
|
3703
|
+
disabled?: boolean;
|
|
3704
|
+
/** Controlled FX-picker visibility. */
|
|
3705
|
+
fxPickerOpen: boolean;
|
|
3706
|
+
onToggleFxPicker: (open: boolean) => void;
|
|
3707
|
+
/** Re-scan / refresh the FX list. */
|
|
3708
|
+
onRefreshFx?: () => void;
|
|
3709
|
+
onVolumeChange: (volumeDb: number) => void;
|
|
3710
|
+
onMuteToggle: () => void;
|
|
3711
|
+
onSoloToggle: () => void;
|
|
3712
|
+
onAddFx: (pluginId: string) => void;
|
|
3713
|
+
onRemoveFx: (fxIndex: number) => void;
|
|
3714
|
+
onToggleFxEnabled: (fxIndex: number, enabled: boolean) => void;
|
|
3715
|
+
/** Optional: open the FX plugin's native editor window. */
|
|
3716
|
+
onShowFxEditor?: (fxIndex: number) => void;
|
|
3717
|
+
}
|
|
3718
|
+
declare function PanelMasterStrip({ bus, levels, availableFx, fxLoading, soloedOut, disabled, fxPickerOpen, onToggleFxPicker, onRefreshFx, onVolumeChange, onMuteToggle, onSoloToggle, onAddFx, onRemoveFx, onToggleFxEnabled, onShowFxEditor, }: PanelMasterStripProps): React$1.ReactElement;
|
|
3719
|
+
|
|
3720
|
+
/**
|
|
3721
|
+
* usePanelBus — panel-side state + handlers for the PanelMasterStrip
|
|
3722
|
+
* (docs/panel-bus.md §11).
|
|
3723
|
+
*
|
|
3724
|
+
* Feature-gated: `supported` is false on hosts without the panel-bus surface
|
|
3725
|
+
* (older app builds), and every consumer should render nothing in that case —
|
|
3726
|
+
* the strip must never appear on a host that can't back it. Reading state
|
|
3727
|
+
* NEVER engages a bus; the first mutation (fader move / FX add) does, host-side.
|
|
3728
|
+
*
|
|
3729
|
+
* Reload story: state re-reads on scene change and after every mutation.
|
|
3730
|
+
* `getPanelBusState` host-side also (re)realizes the bus (adopt-by-marker)
|
|
3731
|
+
* and routes not-yet-routed panel tracks, so calling `reload()` from the
|
|
3732
|
+
* panel's track-reload path keeps everything converged with zero extra wiring.
|
|
3733
|
+
*/
|
|
3734
|
+
|
|
3735
|
+
interface UsePanelBusResult {
|
|
3736
|
+
/** False on pre-2.36 hosts — render no strip. */
|
|
3737
|
+
supported: boolean;
|
|
3738
|
+
/** Null until the first load completes for the current scene. */
|
|
3739
|
+
bus: PanelBusState | null;
|
|
3740
|
+
/** Stereo output levels (null = disengaged / floored). Polled at ~15 Hz. */
|
|
3741
|
+
levels: PanelBusLevels | null;
|
|
3742
|
+
availableFx: InstrumentDescriptor[];
|
|
3743
|
+
fxLoading: boolean;
|
|
3744
|
+
fxPickerOpen: boolean;
|
|
3745
|
+
setFxPickerOpen: (open: boolean) => void;
|
|
3746
|
+
refreshFx: () => void;
|
|
3747
|
+
reload: () => Promise<void>;
|
|
3748
|
+
onVolumeChange: (volumeDb: number) => void;
|
|
3749
|
+
onMuteToggle: () => void;
|
|
3750
|
+
onSoloToggle: () => void;
|
|
3751
|
+
onAddFx: (pluginId: string) => void;
|
|
3752
|
+
onRemoveFx: (fxIndex: number) => void;
|
|
3753
|
+
onToggleFxEnabled: (fxIndex: number, enabled: boolean) => void;
|
|
3754
|
+
onShowFxEditor: (fxIndex: number) => void;
|
|
3755
|
+
}
|
|
3756
|
+
declare function usePanelBus(host: PluginHost, activeSceneId: string | null): UsePanelBusResult;
|
|
3757
|
+
|
|
3758
|
+
/**
|
|
3759
|
+
* TrackExternalFxSection — the TrackDrawer FX-tab block for one track's
|
|
3760
|
+
* third-party (VST3/AU) FX inserts, below the built-in FX toggle bar.
|
|
3761
|
+
*
|
|
3762
|
+
* SELF-CONTAINED by design: give it the host and a track id and it manages
|
|
3763
|
+
* its own fetch/mutation state via useTrackExternalFx. That keeps per-panel
|
|
3764
|
+
* wiring to a single prop (six panels consume this) instead of ten
|
|
3765
|
+
* callbacks. Renders nothing on hosts without the surface (pre-2.39), so
|
|
3766
|
+
* panels can pass the prop unconditionally.
|
|
3767
|
+
*
|
|
3768
|
+
* Visual idiom mirrors PanelMasterStrip's FX chips + picker grid: chip =
|
|
3769
|
+
* bypass dot + name (opens the native editor) + remove ✕; the picker is the
|
|
3770
|
+
* TrackDrawer Pick-tab grid over FX descriptors with a search box.
|
|
3771
|
+
*/
|
|
3772
|
+
|
|
3773
|
+
interface TrackExternalFxSectionProps {
|
|
3774
|
+
/** The panel's host — used directly; the section manages its own state. */
|
|
3775
|
+
host: PluginHost;
|
|
3776
|
+
/** ENGINE track id (the same id the panel passes to getTrackFxState). */
|
|
3777
|
+
trackId: string;
|
|
3778
|
+
/** Disable all controls (e.g. while the track is generating). */
|
|
3779
|
+
disabled?: boolean;
|
|
3780
|
+
}
|
|
3781
|
+
declare function TrackExternalFxSection({ host, trackId, disabled, }: TrackExternalFxSectionProps): React$1.ReactElement | null;
|
|
3782
|
+
|
|
3783
|
+
/**
|
|
3784
|
+
* useTrackExternalFx — panel-side state + handlers for one track's
|
|
3785
|
+
* third-party FX inserts (the TrackDrawer FX-tab section; the per-track
|
|
3786
|
+
* sibling of usePanelBus).
|
|
3787
|
+
*
|
|
3788
|
+
* Feature-gated: `supported` is false on hosts without the track-external-FX
|
|
3789
|
+
* surface (pre-2.39 app builds) and consumers must render nothing then.
|
|
3790
|
+
* Reading converges persisted state host-side (raw-state replay on the
|
|
3791
|
+
* session's first read; rebuild after a `.sasproj` import), so the mount
|
|
3792
|
+
* read is the whole reload story.
|
|
3793
|
+
*
|
|
3794
|
+
* Mutations follow the strip's pattern: host call → list reload. Errors
|
|
3795
|
+
* surface via the host's platform toast; the section re-reads whatever
|
|
3796
|
+
* state is true afterwards.
|
|
3797
|
+
*/
|
|
3798
|
+
|
|
3799
|
+
interface UseTrackExternalFxResult {
|
|
3800
|
+
/** False on pre-2.39 hosts — render no section. */
|
|
3801
|
+
supported: boolean;
|
|
3802
|
+
/** Null until the first load completes for the current track. */
|
|
3803
|
+
fx: TrackExternalFxEntry[] | null;
|
|
3804
|
+
availableFx: InstrumentDescriptor[];
|
|
3805
|
+
fxLoading: boolean;
|
|
3806
|
+
pickerOpen: boolean;
|
|
3807
|
+
setPickerOpen: (open: boolean) => void;
|
|
3808
|
+
refreshFx: () => void;
|
|
3809
|
+
reload: () => Promise<void>;
|
|
3810
|
+
onAddFx: (pluginId: string) => void;
|
|
3811
|
+
onRemoveFx: (fxIndex: number) => void;
|
|
3812
|
+
onToggleFxEnabled: (fxIndex: number, enabled: boolean) => void;
|
|
3813
|
+
onShowFxEditor: (fxIndex: number) => void;
|
|
3814
|
+
}
|
|
3815
|
+
declare function useTrackExternalFx(host: PluginHost, trackId: string): UseTrackExternalFxResult;
|
|
3816
|
+
|
|
3531
3817
|
/**
|
|
3532
3818
|
* PanSlider Component
|
|
3533
3819
|
*
|
|
@@ -4658,7 +4944,7 @@ declare function useAnySolo(host: Pick<PluginHost, 'isAnySoloActive' | 'onTrackS
|
|
|
4658
4944
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
4659
4945
|
* during activation and marks incompatible plugins accordingly.
|
|
4660
4946
|
*/
|
|
4661
|
-
declare const PLUGIN_SDK_VERSION = "2.
|
|
4947
|
+
declare const PLUGIN_SDK_VERSION = "2.39.0";
|
|
4662
4948
|
|
|
4663
4949
|
/**
|
|
4664
4950
|
* FX Preset Definitions
|
|
@@ -4806,4 +5092,4 @@ interface PickTopKOptions {
|
|
|
4806
5092
|
*/
|
|
4807
5093
|
declare function pickTopKWeighted<T>(scored: ReadonlyArray<ScoredCandidate<T>>, options?: PickTopKOptions): T | null;
|
|
4808
5094
|
|
|
4809
|
-
export { AUDIO_EFFECTS, AUDIO_EFFECT_LABEL, type AudioEffect, type AudioInputDevice, type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, ConfirmDialog, type ConfirmDialogProps, type CoreTrackHandlers, type CreateTrackOptions, type CrossfadeInpaintInput, type CrossfadeLayer, type CrossfadeMeta, CrossfadeModal, type CrossfadeModalProps, type CrossfadePairMeta, type CrossfadeSelection, type CrossfadeSlot, CrossfadeTrackRow, type CrossfadeTrackRowProps, type CrossfadeVolumeCurves, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, DRAG_DEAD_ZONE, type DeckBoundaryEvent, type DeckBoundaryListener, type DesignerRowSlots, DownloadPackButton, type DownloadPackButtonProps, type DownloadPackButtonVariant, type DrawerTab, type DrumKit, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, EQUAL_POWER_GAIN, type ExportMidiBundleOptions, type ExportMidiBundleResult, type ExportedPluginData, FX_CATEGORIES, FX_CHAIN_ORDER, FX_DISPLAY_LABELS, FX_ENGINE_PLUGIN_NAMES, FX_PRESET_CONFIGS, type FadeDirection, type FadeEntry, type FadeGesture, type FadeLayer, type FadeMeta, FadeModal, type FadeModalProps, type FadeSelection, FadeTrackRow, type FadeTrackRowProps, type FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, GUTTER_W, type GenerationServices, type GeneratorPanelAdapter, type GeneratorPanelCore, GeneratorPanelShell, type GeneratorPanelShellProps, type GeneratorPanelSlots, type GeneratorPlugin, type GeneratorTrackState, type GeneratorType, type GroupParseSpec, type GroupRenderContext, type ImportCandidateScene, type ImportCandidateTrack, ImportTrackModal, type ImportTrackModalProps, type InstrumentDescriptor, TrackDrawer as InstrumentDrawer, type TrackDrawerProps as InstrumentDrawerProps, type InstrumentSampler, type InstrumentZone, type LLMCandidate, type LLMContent, type LLMFunctionDeclaration, type LLMGenerationConfig, type LLMGenerationRequest, type LLMGenerationResult, type LLMNoteResponse, type LLMPart, type LLMSystemInstruction, type LLMTool, type LLMToolUseRequest, type LLMToolUseResponse, type LLMUsageMetadata, LevelMeter, type LevelMeterProps, type ListAudioFilesOptions, type ListImportableTracksOptions, type MidiClipData, type MidiWriteResult, type MixInterpolation, Modal, type ModalProps, type MusicalContext, OffsetScrubber, type OffsetScrubberProps, PLUGIN_SDK_VERSION, PX_PER_BEAT, PanSlider, type PanelFeatureFlags, type PanelGenerationStrategy, type PanelGroupExtension, type PanelIdentity, type PanelShuffleAdapter, type PanelSoundAdapter, type PeakAnalysis, PianoRollEditor, type PianoRollEditorProps, type PickTopKOptions, type PluginAppTool, type PluginAppToolInputSchema, type PluginAppToolResult, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, type PluginCuePoints, type PluginDownloadOptions, PluginError, type PluginErrorCode, type PluginFileDialogOptions, type PluginFxCategoryDetailState, type PluginGenerationContext, type PluginHost, type PluginHttpRequestOptions, type PluginHttpResponse, type PluginManifest, type PluginMidiNote, type PluginPresetData, type PluginPresetInfo, type PluginRegistration, type PluginSampleFilter, type PluginSampleImportResult, type PluginSampleInfo, type PluginSampleTrackInfo, type PluginSceneContext, type PluginSceneInfo, type PluginSettingsSchema, type PluginSettingsStore, type PluginSkill, type PluginSkillInputSchema, type PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackLevel, type PluginTrackRuntimeState, type PluginTransportState, type PluginTrimWindow, type PluginUIProps, type PostProcessOptions, RESIZE_HANDLE_PX, ROW_HEIGHT, type ReadMidiClip, type ReadMidiResult, type RecordingChunkFinalizedEvent, type RecordingTargetInfo, type ResolveGroupsOptions, type ResolvedCrossfadePair, type ResolvedFade, type ResolvedGroupsResult, type ResolvedTrackGroup, type SDKTrackRowProps, SLIDER_UNITY, SamplePackCTACard, type SamplePackCTACardProps, type SamplePackCTACardStatus, type SamplePackCardInfo, type SavePluginPresetOptions, type SceneChangeListener, type SceneFamilyTrack, type ScoredCandidate, ScrollingWaveform, type ScrollingWaveformProps, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type SoundHistoryEntry, type StemType, type SurgeSoundAdapterOverrides, type SynthesizeCuePointsOptions, TEXTURAL_ROLES, TRANSITION_DESIGNER_DRAFT_KEY, TrackDrawer, type TrackDrawerProps, type TrackFxDetailState, type TrackFxState, type TrackGroupMember, type TrackGroupMeta, type TrackLevelsHandle, TrackMeterStrip, type TrackMeterStripProps, type TrackMeterView, TrackRow, type TrackRowDragProps, type TrackSoundHistory, type TrackSoundSnapshot, type TrackStateChangeListener, TransitionDesigner, type TransitionDesignerDraft, type TransitionDesignerProps, type TransitionOps, type TransitionRowType, type TransportEvent, type TransportEventListener, type UnsubscribeFn, type UseGeneratorPanelCoreOptions, type UseSoundHistoryOptions, type UseSoundHistoryResult, type UseTrackReorderOptions, type UseTrackReorderResult, type UseTransitionOpsInputs, type VolumeAutomationPoint, VolumeSlider, type WaveformPeaks, WaveformView, type WaveformViewProps, analyzeWavPeak, asAudioEffect, asCrossfadeMeta, asFadeMeta, asTransitionDesignerDraft, buildCrossfadeInpaintPrompt, buildCrossfadeVolumeCurves, buildFadeVolumeCurve, buildRowSlots, calculateTimeBasedTarget, cellToPx, centerScrollTop, computePeaks, createSurgeSoundAdapter, dbIdsFromKeys, dbToSlider, defaultFadeGesture, drawWaveform, formatConcurrentTracks, hashString, moveItem, newTrackState, normalizeSlots, padPair, padSlots, parseCrossfadePairs, parseFades, parseLLMNoteResponse, parseTrackGroups, pickTopKWeighted, pitchToName, pluginFxToToggleFx, pxToCell, reconcileSlots, resizeNoteDuration, resolveTrackGroups, rowKey, rowType, scorePromptMatch, sliderToDb, slotsEqual, soundIdentity, synthesizeCuePoints, tokenizePrompt, trackDataKey, transposeNotes, useAnySolo, useGeneratorPanelCore, useSceneState, useSoundHistory, useTrackLevel, useTrackLevels, useTrackMeter, useTrackReorder, useTransitionOps, useTransportPlaying };
|
|
5095
|
+
export { AUDIO_EFFECTS, AUDIO_EFFECT_LABEL, type AudioEffect, type AudioInputDevice, type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, ConfirmDialog, type ConfirmDialogProps, type CoreTrackHandlers, type CreateTrackOptions, type CrossfadeInpaintInput, type CrossfadeLayer, type CrossfadeMeta, CrossfadeModal, type CrossfadeModalProps, type CrossfadePairMeta, type CrossfadeSelection, type CrossfadeSlot, CrossfadeTrackRow, type CrossfadeTrackRowProps, type CrossfadeVolumeCurves, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, DRAG_DEAD_ZONE, type DeckBoundaryEvent, type DeckBoundaryListener, type DesignerRowSlots, DownloadPackButton, type DownloadPackButtonProps, type DownloadPackButtonVariant, type DrawerTab, type DrumKit, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, EQUAL_POWER_GAIN, type ExportMidiBundleOptions, type ExportMidiBundleResult, type ExportedPluginData, FX_CATEGORIES, FX_CHAIN_ORDER, FX_DISPLAY_LABELS, FX_ENGINE_PLUGIN_NAMES, FX_PRESET_CONFIGS, type FadeDirection, type FadeEntry, type FadeGesture, type FadeLayer, type FadeMeta, FadeModal, type FadeModalProps, type FadeSelection, FadeTrackRow, type FadeTrackRowProps, type FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, GUTTER_W, type GenerationServices, type GeneratorPanelAdapter, type GeneratorPanelCore, GeneratorPanelShell, type GeneratorPanelShellProps, type GeneratorPanelSlots, type GeneratorPlugin, type GeneratorTrackState, type GeneratorType, type GroupParseSpec, type GroupRenderContext, type ImportCandidateScene, type ImportCandidateTrack, ImportTrackModal, type ImportTrackModalProps, type InstrumentDescriptor, TrackDrawer as InstrumentDrawer, type TrackDrawerProps as InstrumentDrawerProps, type InstrumentSampler, type InstrumentZone, type LLMCandidate, type LLMContent, type LLMFunctionDeclaration, type LLMGenerationConfig, type LLMGenerationRequest, type LLMGenerationResult, type LLMNoteResponse, type LLMPart, type LLMSystemInstruction, type LLMTool, type LLMToolUseRequest, type LLMToolUseResponse, type LLMUsageMetadata, LevelMeter, type LevelMeterProps, type ListAudioFilesOptions, type ListImportableTracksOptions, type MidiClipData, type MidiWriteResult, type MixInterpolation, Modal, type ModalProps, type MusicalContext, OffsetScrubber, type OffsetScrubberProps, PLUGIN_SDK_VERSION, PX_PER_BEAT, PanSlider, type PanelBusFxEntry, type PanelBusLevels, type PanelBusState, type PanelFeatureFlags, type PanelGenerationStrategy, type PanelGroupExtension, type PanelIdentity, PanelMasterStrip, type PanelMasterStripProps, type PanelShuffleAdapter, type PanelSoundAdapter, type PeakAnalysis, PianoRollEditor, type PianoRollEditorProps, type PickTopKOptions, type PluginAppTool, type PluginAppToolInputSchema, type PluginAppToolResult, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, type PluginCuePoints, type PluginDownloadOptions, PluginError, type PluginErrorCode, type PluginFileDialogOptions, type PluginFxCategoryDetailState, type PluginGenerationContext, type PluginHost, type PluginHttpRequestOptions, type PluginHttpResponse, type PluginManifest, type PluginMidiNote, type PluginPresetData, type PluginPresetInfo, type PluginRegistration, type PluginSampleFilter, type PluginSampleImportResult, type PluginSampleInfo, type PluginSampleTrackInfo, type PluginSceneContext, type PluginSceneInfo, type PluginSettingsSchema, type PluginSettingsStore, type PluginSkill, type PluginSkillInputSchema, type PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackLevel, type PluginTrackRuntimeState, type PluginTransportState, type PluginTrimWindow, type PluginUIProps, type PostProcessOptions, RESIZE_HANDLE_PX, ROW_HEIGHT, type ReadMidiClip, type ReadMidiResult, type RecordingChunkFinalizedEvent, type RecordingTargetInfo, type ResolveGroupsOptions, type ResolvedCrossfadePair, type ResolvedFade, type ResolvedGroupsResult, type ResolvedTrackGroup, type SDKTrackRowProps, SLIDER_UNITY, SamplePackCTACard, type SamplePackCTACardProps, type SamplePackCTACardStatus, type SamplePackCardInfo, type SavePluginPresetOptions, type SceneChangeListener, type SceneFamilyTrack, type ScoredCandidate, ScrollingWaveform, type ScrollingWaveformProps, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type SoundHistoryEntry, type StemType, type SurgeSoundAdapterOverrides, type SynthesizeCuePointsOptions, TEXTURAL_ROLES, TRANSITION_DESIGNER_DRAFT_KEY, TrackDrawer, type TrackDrawerProps, type TrackExternalFxEntry, TrackExternalFxSection, type TrackExternalFxSectionProps, type TrackFxDetailState, type TrackFxState, type TrackGroupMember, type TrackGroupMeta, type TrackLevelsHandle, TrackMeterStrip, type TrackMeterStripProps, type TrackMeterView, TrackRow, type TrackRowDragProps, type TrackSoundHistory, type TrackSoundSnapshot, type TrackStateChangeListener, TransitionDesigner, type TransitionDesignerDraft, type TransitionDesignerProps, type TransitionOps, type TransitionRowType, type TransportEvent, type TransportEventListener, type UnsubscribeFn, type UseGeneratorPanelCoreOptions, type UsePanelBusResult, type UseSoundHistoryOptions, type UseSoundHistoryResult, type UseTrackExternalFxResult, type UseTrackReorderOptions, type UseTrackReorderResult, type UseTransitionOpsInputs, type VolumeAutomationPoint, VolumeSlider, type WaveformPeaks, WaveformView, type WaveformViewProps, analyzeWavPeak, asAudioEffect, asCrossfadeMeta, asFadeMeta, asTransitionDesignerDraft, buildCrossfadeInpaintPrompt, buildCrossfadeVolumeCurves, buildFadeVolumeCurve, buildRowSlots, calculateTimeBasedTarget, cellToPx, centerScrollTop, computePeaks, createSurgeSoundAdapter, dbIdsFromKeys, dbToSlider, defaultFadeGesture, drawWaveform, formatConcurrentTracks, hashString, moveItem, newTrackState, normalizeSlots, padPair, padSlots, parseCrossfadePairs, parseFades, parseLLMNoteResponse, parseTrackGroups, pickTopKWeighted, pitchToName, pluginFxToToggleFx, pxToCell, reconcileSlots, resizeNoteDuration, resolveTrackGroups, rowKey, rowType, scorePromptMatch, sliderToDb, slotsEqual, soundIdentity, synthesizeCuePoints, tokenizePrompt, trackDataKey, transposeNotes, useAnySolo, useGeneratorPanelCore, usePanelBus, useSceneState, useSoundHistory, useTrackExternalFx, useTrackLevel, useTrackLevels, useTrackMeter, useTrackReorder, useTransitionOps, useTransportPlaying };
|