@signalsandsorcery/plugin-sdk 1.2.1 → 1.2.2

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 CHANGED
@@ -262,6 +262,21 @@ interface PluginHost {
262
262
  getPluginSampleTracks(): Promise<PluginSampleTrackInfo[]>;
263
263
  /** Time-stretch a sample to a target BPM. Returns the new sample info. */
264
264
  timeStretchSample(sampleId: string, targetBpm: number): Promise<PluginSampleInfo>;
265
+ /**
266
+ * Lightweight one-shot sample audition through the cue (headphone) output.
267
+ *
268
+ * Plays the file via a dedicated SimpleLoopPlayer instance in the audio
269
+ * engine — no Tracktion track or clip is created, no BPM matching, no
270
+ * sync. Calling previewSample again with a different file replaces the
271
+ * current preview cleanly. Independent of loop-b: starting/stopping a
272
+ * preview never affects the performance deck and vice versa.
273
+ */
274
+ previewSample(filePath: string): Promise<void>;
275
+ /**
276
+ * Stop any in-flight sample preview started by previewSample(). Safe to
277
+ * call when no preview is active — never throws.
278
+ */
279
+ stopPreview(): Promise<void>;
265
280
  /** Invoke the host's audio texture generation pipeline. */
266
281
  generateAudioTexture(request: PluginAudioTextureRequest): Promise<PluginAudioTextureResult>;
267
282
  /** Trigger bulk composition for the active scene (LLM plans arrangement, creates tracks, generates MIDI). */
package/dist/index.d.ts CHANGED
@@ -262,6 +262,21 @@ interface PluginHost {
262
262
  getPluginSampleTracks(): Promise<PluginSampleTrackInfo[]>;
263
263
  /** Time-stretch a sample to a target BPM. Returns the new sample info. */
264
264
  timeStretchSample(sampleId: string, targetBpm: number): Promise<PluginSampleInfo>;
265
+ /**
266
+ * Lightweight one-shot sample audition through the cue (headphone) output.
267
+ *
268
+ * Plays the file via a dedicated SimpleLoopPlayer instance in the audio
269
+ * engine — no Tracktion track or clip is created, no BPM matching, no
270
+ * sync. Calling previewSample again with a different file replaces the
271
+ * current preview cleanly. Independent of loop-b: starting/stopping a
272
+ * preview never affects the performance deck and vice versa.
273
+ */
274
+ previewSample(filePath: string): Promise<void>;
275
+ /**
276
+ * Stop any in-flight sample preview started by previewSample(). Safe to
277
+ * call when no preview is active — never throws.
278
+ */
279
+ stopPreview(): Promise<void>;
265
280
  /** Invoke the host's audio texture generation pipeline. */
266
281
  generateAudioTexture(request: PluginAudioTextureRequest): Promise<PluginAudioTextureResult>;
267
282
  /** Trigger bulk composition for the active scene (LLM plans arrangement, creates tracks, generates MIDI). */