@signalsandsorcery/plugin-sdk 2.24.1 → 2.25.1
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 +34 -2
- package/dist/index.d.ts +34 -2
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -227,6 +227,16 @@ interface PluginHost {
|
|
|
227
227
|
setTrackMute(trackId: string, muted: boolean): Promise<void>;
|
|
228
228
|
/** Set track volume (linear 0.0 - 1.0). Only works on owned tracks. */
|
|
229
229
|
setTrackVolume(trackId: string, volume: number): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Set/replace a time-based volume automation curve (a fade envelope) on a track,
|
|
232
|
+
* or clear it with an empty array. Points are {time: seconds, db}; linear between
|
|
233
|
+
* points. Used by crossfade tracks to fade origin↔target across the looped
|
|
234
|
+
* transition. Optional — callers MUST null-check. @since SDK 2.25.0
|
|
235
|
+
*/
|
|
236
|
+
setTrackVolumeAutomation?(trackId: string, points: Array<{
|
|
237
|
+
time: number;
|
|
238
|
+
db: number;
|
|
239
|
+
}>): Promise<void>;
|
|
230
240
|
/** Set track pan (-1.0 left to 1.0 right). Only works on owned tracks. */
|
|
231
241
|
setTrackPan(trackId: string, pan: number): Promise<void>;
|
|
232
242
|
/** Set track solo state. Only works on owned tracks. */
|
|
@@ -2606,6 +2616,28 @@ declare function asCrossfadeMeta(val: unknown): CrossfadeMeta | null;
|
|
|
2606
2616
|
* row instead of vanishing.
|
|
2607
2617
|
*/
|
|
2608
2618
|
declare function parseCrossfadePairs(sceneData: Record<string, unknown>): CrossfadePairMeta[];
|
|
2619
|
+
/** One volume-automation point: a dB value at a time offset (seconds from clip start). */
|
|
2620
|
+
interface VolumeAutomationPoint {
|
|
2621
|
+
time: number;
|
|
2622
|
+
db: number;
|
|
2623
|
+
}
|
|
2624
|
+
/** Origin + target volume curves for one crossfade pair. */
|
|
2625
|
+
interface CrossfadeVolumeCurves {
|
|
2626
|
+
origin: VolumeAutomationPoint[];
|
|
2627
|
+
target: VolumeAutomationPoint[];
|
|
2628
|
+
}
|
|
2629
|
+
/**
|
|
2630
|
+
* Equal-power crossfade volume curves over a transition of `bars` at `bpm`.
|
|
2631
|
+
* The ORIGIN layer fades OUT and the TARGET fades IN; `sliderPos` (0..1) sets
|
|
2632
|
+
* WHERE in time the equal-power (-3 dB) crossover sits — 0 = hand off near the
|
|
2633
|
+
* start, 1 = hold the origin until near the end. Points span the clip window
|
|
2634
|
+
* [0, durationSeconds] so the engine re-reads them each loop (re-fade per loop).
|
|
2635
|
+
* `steps`+1 points with linear interpolation approximate the cos/sin curve.
|
|
2636
|
+
*
|
|
2637
|
+
* Returns dB point arrays for `host.setTrackVolumeAutomation` — origin on the top
|
|
2638
|
+
* layer, target on the bottom. @since SDK 2.25.0
|
|
2639
|
+
*/
|
|
2640
|
+
declare function buildCrossfadeVolumeCurves(bars: number, bpm: number, sliderPos: number, steps?: number): CrossfadeVolumeCurves;
|
|
2609
2641
|
|
|
2610
2642
|
/**
|
|
2611
2643
|
* CrossfadeTrackRow — a transition "crossfade track": two stacked TrackRows
|
|
@@ -3561,7 +3593,7 @@ declare function useSoundHistory(applySound: (trackId: string, descriptor: unkno
|
|
|
3561
3593
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
3562
3594
|
* during activation and marks incompatible plugins accordingly.
|
|
3563
3595
|
*/
|
|
3564
|
-
declare const PLUGIN_SDK_VERSION = "2.
|
|
3596
|
+
declare const PLUGIN_SDK_VERSION = "2.25.0";
|
|
3565
3597
|
|
|
3566
3598
|
/**
|
|
3567
3599
|
* FX Preset Definitions
|
|
@@ -3709,4 +3741,4 @@ interface PickTopKOptions {
|
|
|
3709
3741
|
*/
|
|
3710
3742
|
declare function pickTopKWeighted<T>(scored: ReadonlyArray<ScoredCandidate<T>>, options?: PickTopKOptions): T | null;
|
|
3711
3743
|
|
|
3712
|
-
export { type AudioInputDevice, type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, ConfirmDialog, type ConfirmDialogProps, type CreateTrackOptions, type CrossfadeInpaintInput, type CrossfadeLayer, type CrossfadeMeta, CrossfadeModal, type CrossfadeModalProps, type CrossfadePairMeta, type CrossfadeSelection, type CrossfadeSlot, CrossfadeTrackRow, type CrossfadeTrackRowProps, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, DRAG_DEAD_ZONE, type DeckBoundaryEvent, type DeckBoundaryListener, 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 FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, GUTTER_W, type GeneratorPlugin, type GeneratorType, 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 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 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 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 SynthesizeCuePointsOptions, TrackDrawer, type TrackDrawerProps, type TrackFxDetailState, type TrackFxState, type TrackLevelsHandle, TrackMeterStrip, type TrackMeterStripProps, type TrackMeterView, TrackRow, type TrackRowDragProps, type TrackSoundHistory, type TrackSoundSnapshot, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, type UseSoundHistoryOptions, type UseSoundHistoryResult, type UseTrackReorderOptions, type UseTrackReorderResult, VolumeSlider, type WaveformPeaks, WaveformView, type WaveformViewProps, analyzeWavPeak, asCrossfadeMeta, buildCrossfadeInpaintPrompt, calculateTimeBasedTarget, cellToPx, centerScrollTop, computePeaks, dbToSlider, drawWaveform, formatConcurrentTracks, moveItem, parseCrossfadePairs, pickTopKWeighted, pitchToName, pxToCell, resizeNoteDuration, scorePromptMatch, sliderToDb, synthesizeCuePoints, tokenizePrompt, transposeNotes, useAnySolo, useSceneState, useSoundHistory, useTrackLevel, useTrackLevels, useTrackMeter, useTrackReorder, useTransportPlaying };
|
|
3744
|
+
export { type AudioInputDevice, type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, ConfirmDialog, type ConfirmDialogProps, 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, 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 FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, GUTTER_W, type GeneratorPlugin, type GeneratorType, 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 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 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 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 SynthesizeCuePointsOptions, TrackDrawer, type TrackDrawerProps, type TrackFxDetailState, type TrackFxState, type TrackLevelsHandle, TrackMeterStrip, type TrackMeterStripProps, type TrackMeterView, TrackRow, type TrackRowDragProps, type TrackSoundHistory, type TrackSoundSnapshot, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, type UseSoundHistoryOptions, type UseSoundHistoryResult, type UseTrackReorderOptions, type UseTrackReorderResult, type VolumeAutomationPoint, VolumeSlider, type WaveformPeaks, WaveformView, type WaveformViewProps, analyzeWavPeak, asCrossfadeMeta, buildCrossfadeInpaintPrompt, buildCrossfadeVolumeCurves, calculateTimeBasedTarget, cellToPx, centerScrollTop, computePeaks, dbToSlider, drawWaveform, formatConcurrentTracks, moveItem, parseCrossfadePairs, pickTopKWeighted, pitchToName, pxToCell, resizeNoteDuration, scorePromptMatch, sliderToDb, synthesizeCuePoints, tokenizePrompt, transposeNotes, useAnySolo, useSceneState, useSoundHistory, useTrackLevel, useTrackLevels, useTrackMeter, useTrackReorder, useTransportPlaying };
|
package/dist/index.d.ts
CHANGED
|
@@ -227,6 +227,16 @@ interface PluginHost {
|
|
|
227
227
|
setTrackMute(trackId: string, muted: boolean): Promise<void>;
|
|
228
228
|
/** Set track volume (linear 0.0 - 1.0). Only works on owned tracks. */
|
|
229
229
|
setTrackVolume(trackId: string, volume: number): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Set/replace a time-based volume automation curve (a fade envelope) on a track,
|
|
232
|
+
* or clear it with an empty array. Points are {time: seconds, db}; linear between
|
|
233
|
+
* points. Used by crossfade tracks to fade origin↔target across the looped
|
|
234
|
+
* transition. Optional — callers MUST null-check. @since SDK 2.25.0
|
|
235
|
+
*/
|
|
236
|
+
setTrackVolumeAutomation?(trackId: string, points: Array<{
|
|
237
|
+
time: number;
|
|
238
|
+
db: number;
|
|
239
|
+
}>): Promise<void>;
|
|
230
240
|
/** Set track pan (-1.0 left to 1.0 right). Only works on owned tracks. */
|
|
231
241
|
setTrackPan(trackId: string, pan: number): Promise<void>;
|
|
232
242
|
/** Set track solo state. Only works on owned tracks. */
|
|
@@ -2606,6 +2616,28 @@ declare function asCrossfadeMeta(val: unknown): CrossfadeMeta | null;
|
|
|
2606
2616
|
* row instead of vanishing.
|
|
2607
2617
|
*/
|
|
2608
2618
|
declare function parseCrossfadePairs(sceneData: Record<string, unknown>): CrossfadePairMeta[];
|
|
2619
|
+
/** One volume-automation point: a dB value at a time offset (seconds from clip start). */
|
|
2620
|
+
interface VolumeAutomationPoint {
|
|
2621
|
+
time: number;
|
|
2622
|
+
db: number;
|
|
2623
|
+
}
|
|
2624
|
+
/** Origin + target volume curves for one crossfade pair. */
|
|
2625
|
+
interface CrossfadeVolumeCurves {
|
|
2626
|
+
origin: VolumeAutomationPoint[];
|
|
2627
|
+
target: VolumeAutomationPoint[];
|
|
2628
|
+
}
|
|
2629
|
+
/**
|
|
2630
|
+
* Equal-power crossfade volume curves over a transition of `bars` at `bpm`.
|
|
2631
|
+
* The ORIGIN layer fades OUT and the TARGET fades IN; `sliderPos` (0..1) sets
|
|
2632
|
+
* WHERE in time the equal-power (-3 dB) crossover sits — 0 = hand off near the
|
|
2633
|
+
* start, 1 = hold the origin until near the end. Points span the clip window
|
|
2634
|
+
* [0, durationSeconds] so the engine re-reads them each loop (re-fade per loop).
|
|
2635
|
+
* `steps`+1 points with linear interpolation approximate the cos/sin curve.
|
|
2636
|
+
*
|
|
2637
|
+
* Returns dB point arrays for `host.setTrackVolumeAutomation` — origin on the top
|
|
2638
|
+
* layer, target on the bottom. @since SDK 2.25.0
|
|
2639
|
+
*/
|
|
2640
|
+
declare function buildCrossfadeVolumeCurves(bars: number, bpm: number, sliderPos: number, steps?: number): CrossfadeVolumeCurves;
|
|
2609
2641
|
|
|
2610
2642
|
/**
|
|
2611
2643
|
* CrossfadeTrackRow — a transition "crossfade track": two stacked TrackRows
|
|
@@ -3561,7 +3593,7 @@ declare function useSoundHistory(applySound: (trackId: string, descriptor: unkno
|
|
|
3561
3593
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
3562
3594
|
* during activation and marks incompatible plugins accordingly.
|
|
3563
3595
|
*/
|
|
3564
|
-
declare const PLUGIN_SDK_VERSION = "2.
|
|
3596
|
+
declare const PLUGIN_SDK_VERSION = "2.25.0";
|
|
3565
3597
|
|
|
3566
3598
|
/**
|
|
3567
3599
|
* FX Preset Definitions
|
|
@@ -3709,4 +3741,4 @@ interface PickTopKOptions {
|
|
|
3709
3741
|
*/
|
|
3710
3742
|
declare function pickTopKWeighted<T>(scored: ReadonlyArray<ScoredCandidate<T>>, options?: PickTopKOptions): T | null;
|
|
3711
3743
|
|
|
3712
|
-
export { type AudioInputDevice, type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, ConfirmDialog, type ConfirmDialogProps, type CreateTrackOptions, type CrossfadeInpaintInput, type CrossfadeLayer, type CrossfadeMeta, CrossfadeModal, type CrossfadeModalProps, type CrossfadePairMeta, type CrossfadeSelection, type CrossfadeSlot, CrossfadeTrackRow, type CrossfadeTrackRowProps, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, DRAG_DEAD_ZONE, type DeckBoundaryEvent, type DeckBoundaryListener, 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 FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, GUTTER_W, type GeneratorPlugin, type GeneratorType, 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 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 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 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 SynthesizeCuePointsOptions, TrackDrawer, type TrackDrawerProps, type TrackFxDetailState, type TrackFxState, type TrackLevelsHandle, TrackMeterStrip, type TrackMeterStripProps, type TrackMeterView, TrackRow, type TrackRowDragProps, type TrackSoundHistory, type TrackSoundSnapshot, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, type UseSoundHistoryOptions, type UseSoundHistoryResult, type UseTrackReorderOptions, type UseTrackReorderResult, VolumeSlider, type WaveformPeaks, WaveformView, type WaveformViewProps, analyzeWavPeak, asCrossfadeMeta, buildCrossfadeInpaintPrompt, calculateTimeBasedTarget, cellToPx, centerScrollTop, computePeaks, dbToSlider, drawWaveform, formatConcurrentTracks, moveItem, parseCrossfadePairs, pickTopKWeighted, pitchToName, pxToCell, resizeNoteDuration, scorePromptMatch, sliderToDb, synthesizeCuePoints, tokenizePrompt, transposeNotes, useAnySolo, useSceneState, useSoundHistory, useTrackLevel, useTrackLevels, useTrackMeter, useTrackReorder, useTransportPlaying };
|
|
3744
|
+
export { type AudioInputDevice, type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, ConfirmDialog, type ConfirmDialogProps, 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, 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 FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, GUTTER_W, type GeneratorPlugin, type GeneratorType, 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 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 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 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 SynthesizeCuePointsOptions, TrackDrawer, type TrackDrawerProps, type TrackFxDetailState, type TrackFxState, type TrackLevelsHandle, TrackMeterStrip, type TrackMeterStripProps, type TrackMeterView, TrackRow, type TrackRowDragProps, type TrackSoundHistory, type TrackSoundSnapshot, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, type UseSoundHistoryOptions, type UseSoundHistoryResult, type UseTrackReorderOptions, type UseTrackReorderResult, type VolumeAutomationPoint, VolumeSlider, type WaveformPeaks, WaveformView, type WaveformViewProps, analyzeWavPeak, asCrossfadeMeta, buildCrossfadeInpaintPrompt, buildCrossfadeVolumeCurves, calculateTimeBasedTarget, cellToPx, centerScrollTop, computePeaks, dbToSlider, drawWaveform, formatConcurrentTracks, moveItem, parseCrossfadePairs, pickTopKWeighted, pitchToName, pxToCell, resizeNoteDuration, scorePromptMatch, sliderToDb, synthesizeCuePoints, tokenizePrompt, transposeNotes, useAnySolo, useSceneState, useSoundHistory, useTrackLevel, useTrackLevels, useTrackMeter, useTrackReorder, useTransportPlaying };
|
package/dist/index.js
CHANGED
|
@@ -73,6 +73,7 @@ __export(index_exports, {
|
|
|
73
73
|
analyzeWavPeak: () => analyzeWavPeak,
|
|
74
74
|
asCrossfadeMeta: () => asCrossfadeMeta,
|
|
75
75
|
buildCrossfadeInpaintPrompt: () => buildCrossfadeInpaintPrompt,
|
|
76
|
+
buildCrossfadeVolumeCurves: () => buildCrossfadeVolumeCurves,
|
|
76
77
|
calculateTimeBasedTarget: () => calculateTimeBasedTarget,
|
|
77
78
|
cellToPx: () => cellToPx,
|
|
78
79
|
centerScrollTop: () => centerScrollTop,
|
|
@@ -2577,6 +2578,25 @@ function parseCrossfadePairs(sceneData) {
|
|
|
2577
2578
|
}
|
|
2578
2579
|
return pairs;
|
|
2579
2580
|
}
|
|
2581
|
+
var FADE_FLOOR_DB = -80;
|
|
2582
|
+
function gainToDb(gain) {
|
|
2583
|
+
return gain <= 1e-4 ? FADE_FLOOR_DB : Math.max(FADE_FLOOR_DB, 20 * Math.log10(gain));
|
|
2584
|
+
}
|
|
2585
|
+
function buildCrossfadeVolumeCurves(bars, bpm, sliderPos, steps = 32) {
|
|
2586
|
+
const durationSeconds = bars * 4 * 60 / Math.max(1, bpm);
|
|
2587
|
+
const s = Math.min(0.98, Math.max(0.02, sliderPos));
|
|
2588
|
+
const round = (n) => Math.round(n * 1e3) / 1e3;
|
|
2589
|
+
const origin = [];
|
|
2590
|
+
const target = [];
|
|
2591
|
+
for (let i = 0; i <= steps; i++) {
|
|
2592
|
+
const x = i / steps;
|
|
2593
|
+
const time = round(x * durationSeconds);
|
|
2594
|
+
const theta = x <= s ? x / s * (Math.PI / 4) : Math.PI / 4 + (x - s) / (1 - s) * (Math.PI / 4);
|
|
2595
|
+
origin.push({ time, db: Math.round(gainToDb(Math.cos(theta)) * 100) / 100 });
|
|
2596
|
+
target.push({ time, db: Math.round(gainToDb(Math.sin(theta)) * 100) / 100 });
|
|
2597
|
+
}
|
|
2598
|
+
return { origin, target };
|
|
2599
|
+
}
|
|
2580
2600
|
|
|
2581
2601
|
// src/crossfade-inpaint.ts
|
|
2582
2602
|
var PITCH_NAMES = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"];
|
|
@@ -3868,7 +3888,7 @@ function useTrackReorder({
|
|
|
3868
3888
|
}
|
|
3869
3889
|
|
|
3870
3890
|
// src/constants/sdk-version.ts
|
|
3871
|
-
var PLUGIN_SDK_VERSION = "2.
|
|
3891
|
+
var PLUGIN_SDK_VERSION = "2.25.0";
|
|
3872
3892
|
|
|
3873
3893
|
// src/utils/format-concurrent-tracks.ts
|
|
3874
3894
|
function formatConcurrentTracks(ctx) {
|
|
@@ -4055,6 +4075,7 @@ function pickTopKWeighted(scored, options = {}) {
|
|
|
4055
4075
|
analyzeWavPeak,
|
|
4056
4076
|
asCrossfadeMeta,
|
|
4057
4077
|
buildCrossfadeInpaintPrompt,
|
|
4078
|
+
buildCrossfadeVolumeCurves,
|
|
4058
4079
|
calculateTimeBasedTarget,
|
|
4059
4080
|
cellToPx,
|
|
4060
4081
|
centerScrollTop,
|