@signalsandsorcery/plugin-sdk 1.1.0 → 1.2.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 +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -138,6 +138,17 @@ interface PluginHost {
|
|
|
138
138
|
writeMidiClip(trackId: string, clip: MidiClipData): Promise<MidiWriteResult>;
|
|
139
139
|
/** Clear all MIDI from a track this plugin owns. */
|
|
140
140
|
clearMidi(trackId: string): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Export all tracks owned by this plugin in the active scene as a ZIP bundle
|
|
143
|
+
* of Standard MIDI Files (one .mid per track, named after each track with
|
|
144
|
+
* collision-avoidance suffixes). Prompts the user for a save location.
|
|
145
|
+
*
|
|
146
|
+
* Tracks with no MIDI data are skipped. Returns the path written, or
|
|
147
|
+
* `{ canceled: true }` if the user dismissed the save dialog.
|
|
148
|
+
*
|
|
149
|
+
* @since SDK 1.1.0
|
|
150
|
+
*/
|
|
151
|
+
exportTracksAsMidiBundle(options?: ExportMidiBundleOptions): Promise<ExportMidiBundleResult>;
|
|
141
152
|
/**
|
|
142
153
|
* Run the host's MIDI post-processing pipeline on raw notes.
|
|
143
154
|
* Wraps MidiProcessor: quantize -> swing -> scale -> register -> overlaps -> humanize.
|
|
@@ -399,6 +410,31 @@ interface MidiWriteResult {
|
|
|
399
410
|
/** Actual bars covered */
|
|
400
411
|
bars: number;
|
|
401
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* Options for {@link PluginHost.exportTracksAsMidiBundle}.
|
|
415
|
+
* @since SDK 1.1.0
|
|
416
|
+
*/
|
|
417
|
+
interface ExportMidiBundleOptions {
|
|
418
|
+
/** Default ZIP filename suggested in the save dialog (without extension). */
|
|
419
|
+
defaultName?: string;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Result of {@link PluginHost.exportTracksAsMidiBundle}.
|
|
423
|
+
* @since SDK 1.1.0
|
|
424
|
+
*/
|
|
425
|
+
type ExportMidiBundleResult = {
|
|
426
|
+
success: true;
|
|
427
|
+
filePath: string;
|
|
428
|
+
trackCount: number;
|
|
429
|
+
skippedCount: number;
|
|
430
|
+
} | {
|
|
431
|
+
success: false;
|
|
432
|
+
canceled: true;
|
|
433
|
+
} | {
|
|
434
|
+
success: false;
|
|
435
|
+
canceled?: false;
|
|
436
|
+
error: string;
|
|
437
|
+
};
|
|
402
438
|
interface PostProcessOptions {
|
|
403
439
|
/** Snap notes to grid (default: true) */
|
|
404
440
|
quantize?: boolean;
|
|
@@ -1169,4 +1205,4 @@ declare function sliderToDb(slider: number): number;
|
|
|
1169
1205
|
*/
|
|
1170
1206
|
declare function dbToSlider(db: number): number;
|
|
1171
1207
|
|
|
1172
|
-
export { type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, type CreateTrackOptions, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, type DeckBoundaryEvent, type DeckBoundaryListener, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, 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, type GeneratorPlugin, type GeneratorType, type InstrumentDescriptor, InstrumentDrawer, type InstrumentDrawerProps, type LLMGenerationRequest, type LLMGenerationResult, type MidiClipData, type MidiWriteResult, type MixInterpolation, type MusicalContext, PLUGIN_SDK_VERSION, PanSlider, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, 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 PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackRuntimeState, type PluginTransportState, type PluginUIProps, type PostProcessOptions, type SDKTrackRowProps, SLIDER_UNITY, type SavePluginPresetOptions, type SceneChangeListener, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type StemType, type TrackFxDetailState, type TrackFxState, TrackRow, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, VALID_INSTRUMENT_ROLES, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
|
1208
|
+
export { type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, type CreateTrackOptions, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, type DeckBoundaryEvent, type DeckBoundaryListener, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, 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, type GeneratorPlugin, type GeneratorType, type InstrumentDescriptor, InstrumentDrawer, type InstrumentDrawerProps, type LLMGenerationRequest, type LLMGenerationResult, type MidiClipData, type MidiWriteResult, type MixInterpolation, type MusicalContext, PLUGIN_SDK_VERSION, PanSlider, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, 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 PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackRuntimeState, type PluginTransportState, type PluginUIProps, type PostProcessOptions, type SDKTrackRowProps, SLIDER_UNITY, type SavePluginPresetOptions, type SceneChangeListener, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type StemType, type TrackFxDetailState, type TrackFxState, TrackRow, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, VALID_INSTRUMENT_ROLES, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
package/dist/index.d.ts
CHANGED
|
@@ -138,6 +138,17 @@ interface PluginHost {
|
|
|
138
138
|
writeMidiClip(trackId: string, clip: MidiClipData): Promise<MidiWriteResult>;
|
|
139
139
|
/** Clear all MIDI from a track this plugin owns. */
|
|
140
140
|
clearMidi(trackId: string): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Export all tracks owned by this plugin in the active scene as a ZIP bundle
|
|
143
|
+
* of Standard MIDI Files (one .mid per track, named after each track with
|
|
144
|
+
* collision-avoidance suffixes). Prompts the user for a save location.
|
|
145
|
+
*
|
|
146
|
+
* Tracks with no MIDI data are skipped. Returns the path written, or
|
|
147
|
+
* `{ canceled: true }` if the user dismissed the save dialog.
|
|
148
|
+
*
|
|
149
|
+
* @since SDK 1.1.0
|
|
150
|
+
*/
|
|
151
|
+
exportTracksAsMidiBundle(options?: ExportMidiBundleOptions): Promise<ExportMidiBundleResult>;
|
|
141
152
|
/**
|
|
142
153
|
* Run the host's MIDI post-processing pipeline on raw notes.
|
|
143
154
|
* Wraps MidiProcessor: quantize -> swing -> scale -> register -> overlaps -> humanize.
|
|
@@ -399,6 +410,31 @@ interface MidiWriteResult {
|
|
|
399
410
|
/** Actual bars covered */
|
|
400
411
|
bars: number;
|
|
401
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* Options for {@link PluginHost.exportTracksAsMidiBundle}.
|
|
415
|
+
* @since SDK 1.1.0
|
|
416
|
+
*/
|
|
417
|
+
interface ExportMidiBundleOptions {
|
|
418
|
+
/** Default ZIP filename suggested in the save dialog (without extension). */
|
|
419
|
+
defaultName?: string;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Result of {@link PluginHost.exportTracksAsMidiBundle}.
|
|
423
|
+
* @since SDK 1.1.0
|
|
424
|
+
*/
|
|
425
|
+
type ExportMidiBundleResult = {
|
|
426
|
+
success: true;
|
|
427
|
+
filePath: string;
|
|
428
|
+
trackCount: number;
|
|
429
|
+
skippedCount: number;
|
|
430
|
+
} | {
|
|
431
|
+
success: false;
|
|
432
|
+
canceled: true;
|
|
433
|
+
} | {
|
|
434
|
+
success: false;
|
|
435
|
+
canceled?: false;
|
|
436
|
+
error: string;
|
|
437
|
+
};
|
|
402
438
|
interface PostProcessOptions {
|
|
403
439
|
/** Snap notes to grid (default: true) */
|
|
404
440
|
quantize?: boolean;
|
|
@@ -1169,4 +1205,4 @@ declare function sliderToDb(slider: number): number;
|
|
|
1169
1205
|
*/
|
|
1170
1206
|
declare function dbToSlider(db: number): number;
|
|
1171
1207
|
|
|
1172
|
-
export { type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, type CreateTrackOptions, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, type DeckBoundaryEvent, type DeckBoundaryListener, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, 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, type GeneratorPlugin, type GeneratorType, type InstrumentDescriptor, InstrumentDrawer, type InstrumentDrawerProps, type LLMGenerationRequest, type LLMGenerationResult, type MidiClipData, type MidiWriteResult, type MixInterpolation, type MusicalContext, PLUGIN_SDK_VERSION, PanSlider, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, 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 PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackRuntimeState, type PluginTransportState, type PluginUIProps, type PostProcessOptions, type SDKTrackRowProps, SLIDER_UNITY, type SavePluginPresetOptions, type SceneChangeListener, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type StemType, type TrackFxDetailState, type TrackFxState, TrackRow, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, VALID_INSTRUMENT_ROLES, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
|
1208
|
+
export { type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, type CreateTrackOptions, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, type DeckBoundaryEvent, type DeckBoundaryListener, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, 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, type GeneratorPlugin, type GeneratorType, type InstrumentDescriptor, InstrumentDrawer, type InstrumentDrawerProps, type LLMGenerationRequest, type LLMGenerationResult, type MidiClipData, type MidiWriteResult, type MixInterpolation, type MusicalContext, PLUGIN_SDK_VERSION, PanSlider, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, 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 PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackRuntimeState, type PluginTransportState, type PluginUIProps, type PostProcessOptions, type SDKTrackRowProps, SLIDER_UNITY, type SavePluginPresetOptions, type SceneChangeListener, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type StemType, type TrackFxDetailState, type TrackFxState, TrackRow, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, VALID_INSTRUMENT_ROLES, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|