@signalsandsorcery/plugin-sdk 2.35.5 → 2.35.6
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 +322 -4
- package/dist/index.d.ts +322 -4
- package/dist/index.js +486 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +470 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -554,8 +554,12 @@ interface PluginHost {
|
|
|
554
554
|
* @since SDK 1.4.0
|
|
555
555
|
*/
|
|
556
556
|
readTextFile(absolutePath: string): Promise<string | null>;
|
|
557
|
-
/**
|
|
558
|
-
|
|
557
|
+
/**
|
|
558
|
+
* Get the FULL generation context for the active scene. Pass
|
|
559
|
+
* `opts.pinTrackDbIds` to pin reference tracks past the note budget
|
|
560
|
+
* (see `PluginGenerationContextOptions`). @since SDK 2.42.0 (opts)
|
|
561
|
+
*/
|
|
562
|
+
getGenerationContext(excludeTrackId?: string, opts?: PluginGenerationContextOptions): Promise<PluginGenerationContext>;
|
|
559
563
|
/** Get lightweight musical context (no concurrent track MIDI data). */
|
|
560
564
|
getMusicalContext(): Promise<MusicalContext>;
|
|
561
565
|
/** Get the active scene ID. Null if no scene is active. */
|
|
@@ -630,6 +634,16 @@ interface PluginHost {
|
|
|
630
634
|
* @since SDK 2.22.0
|
|
631
635
|
*/
|
|
632
636
|
listSceneFamilyTracks?(sceneDbId: string): Promise<SceneFamilyTrack[]>;
|
|
637
|
+
/**
|
|
638
|
+
* Enumerate ALL tracks in the ACTIVE scene — unfiltered by plugin family or
|
|
639
|
+
* ownership (unlike `listSceneFamilyTracks`). Read-only; names are
|
|
640
|
+
* display-only per the Track Identity rule (use `dbId` for any lookup).
|
|
641
|
+
* Powers reference-track pickers ("write in counterpoint against these") —
|
|
642
|
+
* the returned `dbId`s feed `PluginGenerationContextOptions.pinTrackDbIds`.
|
|
643
|
+
* Returns [] when no project/scene is bound. Optional — callers MUST
|
|
644
|
+
* null-check (see `listImportableTracks`). @since SDK 2.42.0
|
|
645
|
+
*/
|
|
646
|
+
listSceneTracks?(): Promise<SceneTrackSummary[]>;
|
|
633
647
|
/**
|
|
634
648
|
* Read a specific scene's musical key (tonic + mode) by db id. Labels the
|
|
635
649
|
* SOURCE keys of a crossfade's origin/target patterns — the active-scene
|
|
@@ -1422,6 +1436,24 @@ interface ImportCandidateScene {
|
|
|
1422
1436
|
*/
|
|
1423
1437
|
sameScene?: boolean;
|
|
1424
1438
|
}
|
|
1439
|
+
/**
|
|
1440
|
+
* One track in the ACTIVE scene, returned by `host.listSceneTracks` —
|
|
1441
|
+
* unfiltered by family/ownership. `name` is display-only (Track Identity
|
|
1442
|
+
* rule); `dbId` is the stable selector for `pinTrackDbIds`.
|
|
1443
|
+
* @since SDK 2.42.0
|
|
1444
|
+
*/
|
|
1445
|
+
interface SceneTrackSummary {
|
|
1446
|
+
/** Stable DB row id (`tracks.id`). */
|
|
1447
|
+
dbId: string;
|
|
1448
|
+
/** Display name — never use as an identifier. */
|
|
1449
|
+
name: string;
|
|
1450
|
+
/** Canonical role (`InstrumentType`) when stamped. */
|
|
1451
|
+
role?: string;
|
|
1452
|
+
/** User-typed prompt that produced the track, when stored. */
|
|
1453
|
+
prompt?: string;
|
|
1454
|
+
/** True when the track has saved MIDI (i.e. it can serve as a reference). */
|
|
1455
|
+
hasMidi: boolean;
|
|
1456
|
+
}
|
|
1425
1457
|
/**
|
|
1426
1458
|
* A source track's current sound, as returned by `host.getTrackSound`. The
|
|
1427
1459
|
* discriminant matches the panel that reads it: drums → 'sample', instruments →
|
|
@@ -1733,6 +1765,35 @@ interface PluginConcurrentTrackInfo {
|
|
|
1733
1765
|
truncated?: boolean;
|
|
1734
1766
|
/** The track's full note count before per-track truncation. */
|
|
1735
1767
|
originalNoteCount?: number;
|
|
1768
|
+
/**
|
|
1769
|
+
* Track display name — CONTEXT/DISPLAY ONLY (prompts, pickers). Never an
|
|
1770
|
+
* identifier: names are non-unique and mutable; use `trackId`/`dbId` for
|
|
1771
|
+
* any lookup. @since SDK 2.42.0
|
|
1772
|
+
*/
|
|
1773
|
+
name?: string;
|
|
1774
|
+
/** Stable DB row id (`tracks.id`) — correlates with `pinTrackDbIds` and
|
|
1775
|
+
* `listSceneTracks()` entries. @since SDK 2.42.0 */
|
|
1776
|
+
dbId?: string;
|
|
1777
|
+
/**
|
|
1778
|
+
* True when this track was pinned via
|
|
1779
|
+
* `PluginGenerationContextOptions.pinTrackDbIds` — i.e. it is REFERENCE
|
|
1780
|
+
* material the caller explicitly asked to write against, exempt from the
|
|
1781
|
+
* note budget. Formatters render pinned tracks in a distinct REFERENCE
|
|
1782
|
+
* block. @since SDK 2.42.0
|
|
1783
|
+
*/
|
|
1784
|
+
pinned?: boolean;
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* Options for `getGenerationContext`. @since SDK 2.42.0
|
|
1788
|
+
*/
|
|
1789
|
+
interface PluginGenerationContextOptions {
|
|
1790
|
+
/**
|
|
1791
|
+
* DB row ids (`tracks.id`) of reference tracks that must ALWAYS be included
|
|
1792
|
+
* whole — exempt from the cross-track note budget (ambient tracks fill the
|
|
1793
|
+
* remaining budget). Powers "write in counterpoint against THESE tracks".
|
|
1794
|
+
* Unknown ids and tracks without saved MIDI are ignored.
|
|
1795
|
+
*/
|
|
1796
|
+
pinTrackDbIds?: readonly string[];
|
|
1736
1797
|
}
|
|
1737
1798
|
interface PluginChordSegment {
|
|
1738
1799
|
chord: string;
|
|
@@ -5116,6 +5177,252 @@ interface SurgeSoundAdapterOverrides {
|
|
|
5116
5177
|
}
|
|
5117
5178
|
declare function createSurgeSoundAdapter(host: PluginHost, overrides?: SurgeSoundAdapterOverrides): PanelSoundAdapter;
|
|
5118
5179
|
|
|
5180
|
+
/**
|
|
5181
|
+
* ensemble-core: voice specifications — the register + complexity hierarchy
|
|
5182
|
+
* as DATA. The first live per-voice register map in the platform (the only
|
|
5183
|
+
* prior per-role [low,high] table, MusicTheory.getSuggestedRegister, was
|
|
5184
|
+
* dead code).
|
|
5185
|
+
*
|
|
5186
|
+
* The shape encodes the product intent: the TOP voice is the highest-pitched
|
|
5187
|
+
* and most complex line; complexity decreases with register; the bottom
|
|
5188
|
+
* voice is a sparse anchor (root pitch classes only when `rootOnly`).
|
|
5189
|
+
*
|
|
5190
|
+
* All thresholds are exported constants in the bass-plugin tradition —
|
|
5191
|
+
* tune by ear, not by refactor. Roles are plain strings validated by the
|
|
5192
|
+
* host at stamp time (`host.getValidRoles()`); the SDK deliberately ships
|
|
5193
|
+
* no role list.
|
|
5194
|
+
*
|
|
5195
|
+
* @since SDK 2.42.0
|
|
5196
|
+
*/
|
|
5197
|
+
interface EnsembleVoiceSpec {
|
|
5198
|
+
/** 0 = top voice; increases downward. */
|
|
5199
|
+
voiceIndex: number;
|
|
5200
|
+
/** Human label for the track row + prompt ("high florid line"). */
|
|
5201
|
+
label: string;
|
|
5202
|
+
/** InstrumentType to stamp on the voice's track (drives preset category). */
|
|
5203
|
+
role: string;
|
|
5204
|
+
/** Playable window (MIDI note numbers, inclusive). Enforced by octave-fold. */
|
|
5205
|
+
registerLow: number;
|
|
5206
|
+
registerHigh: number;
|
|
5207
|
+
/** Density budget — hard cap, enforced by weakest-note thinning. */
|
|
5208
|
+
maxNotesPerBar: number;
|
|
5209
|
+
/** Prompt text: rhythmic vocabulary for this voice. */
|
|
5210
|
+
rhythmPalette: string;
|
|
5211
|
+
/** Prompt text: harmonic discipline for this voice. */
|
|
5212
|
+
harmonicDiscipline: string;
|
|
5213
|
+
/** When true the voice plays ONLY each bar's chord-root pitch class. */
|
|
5214
|
+
rootOnly?: boolean;
|
|
5215
|
+
/**
|
|
5216
|
+
* Equal-onset survivor during the per-voice monophony sweep: top voices
|
|
5217
|
+
* keep the highest pitch, bottom voices the lowest (mirrors how ears
|
|
5218
|
+
* track outer voices).
|
|
5219
|
+
*/
|
|
5220
|
+
monoPreference: 'high' | 'low';
|
|
5221
|
+
}
|
|
5222
|
+
/** Supported ensemble sizes. */
|
|
5223
|
+
declare const ENSEMBLE_MIN_VOICES = 2;
|
|
5224
|
+
declare const ENSEMBLE_MAX_VOICES = 6;
|
|
5225
|
+
/**
|
|
5226
|
+
* Default voice specs for an N-voice ensemble, top voice first. Clamps N to
|
|
5227
|
+
* the supported range. Returned objects are fresh copies — callers may
|
|
5228
|
+
* override fields (e.g. style packs narrowing registers) without touching
|
|
5229
|
+
* the tables.
|
|
5230
|
+
*/
|
|
5231
|
+
declare function defaultVoiceSpecs(voiceCount: number): EnsembleVoiceSpec[];
|
|
5232
|
+
|
|
5233
|
+
/**
|
|
5234
|
+
* ensemble-core: HARD per-voice enforcement — the mechanical layer between
|
|
5235
|
+
* the LLM's jointly-composed voices and the clips that get written. In the
|
|
5236
|
+
* platform's bass-plugin tradition, everything here is deterministic
|
|
5237
|
+
* analysis/repair of written notes, never LLM intention:
|
|
5238
|
+
*
|
|
5239
|
+
* clip clamp → octave-fold into the voice's register window →
|
|
5240
|
+
* root-only pinning (anchor voices) → in-scale snap (optional) →
|
|
5241
|
+
* per-voice monophony sweep → per-bar density thinning
|
|
5242
|
+
*
|
|
5243
|
+
* Each voice stays a single line (monophonic); OVERLAP BETWEEN voices is the
|
|
5244
|
+
* point of counterpoint and is never touched here. Soft, style-dependent
|
|
5245
|
+
* rules (parallels, crossings, onset independence) live in
|
|
5246
|
+
* analyze-ensemble.ts — they are reported, not repaired.
|
|
5247
|
+
*
|
|
5248
|
+
* Pure functions; inputs are never mutated. @since SDK 2.42.0
|
|
5249
|
+
*/
|
|
5250
|
+
|
|
5251
|
+
/** Structural match for PluginMidiNote — keeps this module dependency-free. */
|
|
5252
|
+
interface EnsembleNote {
|
|
5253
|
+
pitch: number;
|
|
5254
|
+
startBeat: number;
|
|
5255
|
+
durationBeats: number;
|
|
5256
|
+
velocity: number;
|
|
5257
|
+
channel?: number;
|
|
5258
|
+
}
|
|
5259
|
+
interface EnforceVoiceOptions {
|
|
5260
|
+
/** Clip length in bars (4/4 assumed, matching the platform grid). */
|
|
5261
|
+
bars: number;
|
|
5262
|
+
/**
|
|
5263
|
+
* Chord-root pitch class (0-11) for a given bar, or null when unknown.
|
|
5264
|
+
* Required for `rootOnly` voices to mean anything; when absent, rootOnly
|
|
5265
|
+
* degrades to plain register enforcement.
|
|
5266
|
+
*/
|
|
5267
|
+
chordRootPcAtBar?: (bar: number) => number | null;
|
|
5268
|
+
/**
|
|
5269
|
+
* Scale pitch classes (0-11) for the scene key. When provided, non-scale
|
|
5270
|
+
* pitches snap to the nearest scale pitch class (chord tones supplied via
|
|
5271
|
+
* `chordPcsAtBar` are exempt — a sounding 7th over its chord is not an
|
|
5272
|
+
* error even outside the scale).
|
|
5273
|
+
*/
|
|
5274
|
+
scalePcs?: ReadonlySet<number>;
|
|
5275
|
+
/** Chord-tone pitch classes for a bar — exemptions for the scale snap. */
|
|
5276
|
+
chordPcsAtBar?: (bar: number) => ReadonlySet<number> | null;
|
|
5277
|
+
}
|
|
5278
|
+
interface EnforceVoiceResult {
|
|
5279
|
+
notes: EnsembleNote[];
|
|
5280
|
+
/** Human/LLM-readable descriptions of every repair performed. */
|
|
5281
|
+
repairs: string[];
|
|
5282
|
+
}
|
|
5283
|
+
declare const MIN_NOTE_DURATION_BEATS = 0.0625;
|
|
5284
|
+
/** Octave-fold a pitch into [low, high], preserving pitch class when possible. */
|
|
5285
|
+
declare function foldPitchToRegister(pitch: number, low: number, high: number): number;
|
|
5286
|
+
/** Nearest pitch within [low, high] having pitch class `pc` (ties go low). */
|
|
5287
|
+
declare function nearestPitchWithPc(reference: number, pc: number, low: number, high: number): number;
|
|
5288
|
+
/**
|
|
5289
|
+
* Enforce one voice's hard contract. Order matters: register first (so
|
|
5290
|
+
* root-only/scale snaps operate in-window), monophony before density (the
|
|
5291
|
+
* sweep can merge/trim what thinning would otherwise count).
|
|
5292
|
+
*/
|
|
5293
|
+
declare function enforceVoice(rawNotes: readonly EnsembleNote[], spec: EnsembleVoiceSpec, opts: EnforceVoiceOptions): EnforceVoiceResult;
|
|
5294
|
+
|
|
5295
|
+
/**
|
|
5296
|
+
* ensemble-core: SOFT cross-voice analysis — the "do the voices actually
|
|
5297
|
+
* talk to each other?" metrics. Nothing here repairs notes; violations are
|
|
5298
|
+
* REPORTED so the caller can (a) feed them back to the LLM for one guided
|
|
5299
|
+
* retry and (b) surface honest telemetry. Which findings count as
|
|
5300
|
+
* violations is style-dependent (see styles.ts) — parallels are a defect in
|
|
5301
|
+
* counterpoint and a feature in minimal interlock.
|
|
5302
|
+
*
|
|
5303
|
+
* Pure functions; deterministic; fixture-testable without an LLM.
|
|
5304
|
+
* @since SDK 2.42.0
|
|
5305
|
+
*/
|
|
5306
|
+
|
|
5307
|
+
type MotionKind = 'contrary' | 'oblique' | 'similar' | 'parallel';
|
|
5308
|
+
interface AdjacentPairAnalysis {
|
|
5309
|
+
/** Upper voice index of the pair (pairs with upperVoice + 1). */
|
|
5310
|
+
upperVoice: number;
|
|
5311
|
+
/** Fraction of the upper voice's onsets NOT shared with the lower voice. */
|
|
5312
|
+
onsetIndependence: number;
|
|
5313
|
+
/** Distribution of motion kinds across consecutive shared onsets. */
|
|
5314
|
+
motion: Record<MotionKind, number>;
|
|
5315
|
+
/** Consecutive perfect 5ths/octaves moving in similar motion. */
|
|
5316
|
+
parallelPerfects: Array<{
|
|
5317
|
+
atBeat: number;
|
|
5318
|
+
intervalPc: 0 | 7;
|
|
5319
|
+
}>;
|
|
5320
|
+
/** Beats where the nominally-upper voice sounds BELOW the lower voice. */
|
|
5321
|
+
crossings: number[];
|
|
5322
|
+
}
|
|
5323
|
+
interface EnsembleAnalysis {
|
|
5324
|
+
pairs: AdjacentPairAnalysis[];
|
|
5325
|
+
/** Fraction of ALL onsets (across voices) that land on a shared beat. */
|
|
5326
|
+
homorhythmScore: number;
|
|
5327
|
+
}
|
|
5328
|
+
/**
|
|
5329
|
+
* Analyze adjacent voice pairs (voice i against voice i+1, top-down order).
|
|
5330
|
+
* Voices with no notes yield neutral entries rather than poisoning the run.
|
|
5331
|
+
*/
|
|
5332
|
+
declare function analyzeEnsemble(voices: ReadonlyArray<readonly EnsembleNote[]>): EnsembleAnalysis;
|
|
5333
|
+
/**
|
|
5334
|
+
* Render style-filtered violations as short instructions an LLM can act on
|
|
5335
|
+
* in a retry ("Between voice 1 and voice 2, avoid parallel octaves at beat
|
|
5336
|
+
* 6"). Empty array = the ensemble passes this style's soft rules.
|
|
5337
|
+
*/
|
|
5338
|
+
declare function describeViolations(analysis: EnsembleAnalysis, rules: {
|
|
5339
|
+
forbidParallelPerfects: boolean;
|
|
5340
|
+
forbidVoiceCrossing: boolean;
|
|
5341
|
+
minOnsetIndependence: number;
|
|
5342
|
+
}): string[];
|
|
5343
|
+
|
|
5344
|
+
/**
|
|
5345
|
+
* ensemble-core: style packs. A style = which SOFT rules are violations +
|
|
5346
|
+
* a prompt paragraph steering the joint composition. Hard rules (register,
|
|
5347
|
+
* per-voice monophony, density caps, root-only anchors) apply to every
|
|
5348
|
+
* style — see enforce-voice.ts. Explicitly NOT just baroque: parallels are
|
|
5349
|
+
* a defect in `counterpoint` and the whole point of `interlock`.
|
|
5350
|
+
*
|
|
5351
|
+
* @since SDK 2.42.0
|
|
5352
|
+
*/
|
|
5353
|
+
type EnsembleStyle = 'counterpoint' | 'chorale' | 'interlock';
|
|
5354
|
+
declare const ENSEMBLE_STYLES: readonly EnsembleStyle[];
|
|
5355
|
+
interface EnsembleStyleRules {
|
|
5356
|
+
/** Consecutive perfect 5ths/octaves between adjacent voices are violations. */
|
|
5357
|
+
forbidParallelPerfects: boolean;
|
|
5358
|
+
/** A nominally-upper voice sounding below its neighbor is a violation. */
|
|
5359
|
+
forbidVoiceCrossing: boolean;
|
|
5360
|
+
/**
|
|
5361
|
+
* Minimum fraction of an upper voice's onsets that must NOT coincide with
|
|
5362
|
+
* its lower neighbor (0 = homorhythm fine, 1 = fully independent).
|
|
5363
|
+
*/
|
|
5364
|
+
minOnsetIndependence: number;
|
|
5365
|
+
/** Prompt paragraph injected into the system prompt for this style. */
|
|
5366
|
+
promptParagraph: string;
|
|
5367
|
+
}
|
|
5368
|
+
declare const STYLE_RULES: Record<EnsembleStyle, EnsembleStyleRules>;
|
|
5369
|
+
|
|
5370
|
+
/**
|
|
5371
|
+
* ensemble-core: the `submit_ensemble` function-calling contract — how the
|
|
5372
|
+
* ONE joint LLM call returns all voices as structured JSON. Built for
|
|
5373
|
+
* `host.generateWithLLMTools` with `functionCallingConfig.mode: 'ANY'` +
|
|
5374
|
+
* `allowedFunctionNames: [SUBMIT_ENSEMBLE_TOOL_NAME]`, which forces a
|
|
5375
|
+
* schema-constrained call instead of free text (the `generateWithLLM`
|
|
5376
|
+
* `responseFormat` field is a dead letter — this is the reliable path).
|
|
5377
|
+
*
|
|
5378
|
+
* Parsing is defensive: the model's args pass through structural checks and
|
|
5379
|
+
* per-note validation; a voice the model omits comes back as an empty note
|
|
5380
|
+
* list so the caller can decide whether that is acceptable for the style.
|
|
5381
|
+
*
|
|
5382
|
+
* @since SDK 2.42.0
|
|
5383
|
+
*/
|
|
5384
|
+
|
|
5385
|
+
declare const SUBMIT_ENSEMBLE_TOOL_NAME = "submit_ensemble";
|
|
5386
|
+
/**
|
|
5387
|
+
* JSON-Schema `parameters` for the submit_ensemble tool. Gemini function
|
|
5388
|
+
* calling accepts standard JSON Schema here.
|
|
5389
|
+
*/
|
|
5390
|
+
declare function buildSubmitEnsembleParameters(voiceCount: number): Record<string, unknown>;
|
|
5391
|
+
interface ParsedEnsemble {
|
|
5392
|
+
/** Index-aligned: entry v = notes for voiceIndex v (possibly empty). */
|
|
5393
|
+
voiceNotes: EnsembleNote[][];
|
|
5394
|
+
/** Structural oddities worth logging (wrong count, dropped notes…). */
|
|
5395
|
+
warnings: string[];
|
|
5396
|
+
}
|
|
5397
|
+
/**
|
|
5398
|
+
* Validate + normalize the functionCall args into per-voice note lists.
|
|
5399
|
+
* Returns null only when nothing usable came back.
|
|
5400
|
+
*/
|
|
5401
|
+
declare function parseEnsembleArgs(args: unknown, voiceCount: number): ParsedEnsemble | null;
|
|
5402
|
+
|
|
5403
|
+
/**
|
|
5404
|
+
* ensemble-core: the joint-composition system prompt. ONE call composes ALL
|
|
5405
|
+
* voices together — the coordination (imitation, staggered entrances,
|
|
5406
|
+
* contrary motion) has to be planned across voices, which is exactly what
|
|
5407
|
+
* per-track generation can never do. Mirrors the bass plugin's prompt
|
|
5408
|
+
* discipline: numbered load-bearing rules, register/density contracts
|
|
5409
|
+
* stated per voice, sound selection nowhere in sight (that stays
|
|
5410
|
+
* mechanical, host-side).
|
|
5411
|
+
*
|
|
5412
|
+
* The musical context (key/BPM/chords/contract) arrives via the host's
|
|
5413
|
+
* generateWithLLM(Tools) auto-prefix — this prompt states the ENSEMBLE
|
|
5414
|
+
* rules and the per-voice contracts only.
|
|
5415
|
+
*
|
|
5416
|
+
* @since SDK 2.42.0
|
|
5417
|
+
*/
|
|
5418
|
+
|
|
5419
|
+
declare function buildEnsembleSystemPrompt(specs: readonly EnsembleVoiceSpec[], style: EnsembleStyle): string;
|
|
5420
|
+
/**
|
|
5421
|
+
* Build the retry user-message suffix from soft-rule violations — one
|
|
5422
|
+
* guided second attempt, quota-conscious (callers should not loop).
|
|
5423
|
+
*/
|
|
5424
|
+
declare function buildViolationRetrySuffix(violations: readonly string[]): string;
|
|
5425
|
+
|
|
5119
5426
|
/**
|
|
5120
5427
|
* useSceneState — Scene-keyed state hook for plugin developers.
|
|
5121
5428
|
*
|
|
@@ -5169,7 +5476,7 @@ declare function useAnySolo(host: Pick<PluginHost, 'isAnySoloActive' | 'onTrackS
|
|
|
5169
5476
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
5170
5477
|
* during activation and marks incompatible plugins accordingly.
|
|
5171
5478
|
*/
|
|
5172
|
-
declare const PLUGIN_SDK_VERSION = "2.
|
|
5479
|
+
declare const PLUGIN_SDK_VERSION = "2.42.0";
|
|
5173
5480
|
|
|
5174
5481
|
/**
|
|
5175
5482
|
* FX Preset Definitions
|
|
@@ -5234,8 +5541,19 @@ declare function dbToSlider(db: number): number;
|
|
|
5234
5541
|
* grouped by chord) so the model sees velocity / start-beat /
|
|
5235
5542
|
* duration / pitch verbatim and can reason about feel + harmony.
|
|
5236
5543
|
*
|
|
5544
|
+
* Tracks pinned via `PluginGenerationContextOptions.pinTrackDbIds` render
|
|
5545
|
+
* FIRST under a REFERENCE TRACKS header with an explicit counterpoint
|
|
5546
|
+
* instruction — they are the parts the caller asked to write against,
|
|
5547
|
+
* not merely ambient context.
|
|
5548
|
+
*
|
|
5237
5549
|
* Returns the empty string when there are no concurrent tracks — call
|
|
5238
5550
|
* sites can `if (block) push(block)` rather than baking in a placeholder.
|
|
5551
|
+
*
|
|
5552
|
+
* NOTE: maintained as byte-identical copies in
|
|
5553
|
+
* `sas-plugin-sdk/src/utils/format-concurrent-tracks.ts` (panels) and
|
|
5554
|
+
* `sas-app/src/shared/utils/format-concurrent-tracks.ts` (main process,
|
|
5555
|
+
* which must not import SDK runtime). The parity test
|
|
5556
|
+
* `format-concurrent-tracks-parity.test.ts` pins the two together.
|
|
5239
5557
|
*/
|
|
5240
5558
|
|
|
5241
5559
|
declare function formatConcurrentTracks(ctx: PluginGenerationContext): string;
|
|
@@ -5317,4 +5635,4 @@ interface PickTopKOptions {
|
|
|
5317
5635
|
*/
|
|
5318
5636
|
declare function pickTopKWeighted<T>(scored: ReadonlyArray<ScoredCandidate<T>>, options?: PickTopKOptions): T | null;
|
|
5319
5637
|
|
|
5320
|
-
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 GroupFadeEntry, type GroupFadeEntryOf, type GroupFadeMemberLayer, GroupFadeTrackRow, type GroupFadeTrackRowProps, 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 PanelTransitionGroupAdapter, 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 ResolvedGroupFade, 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 VerbatimFadeMember, 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, splitFadeEntries, synthesizeCuePoints, tokenizePrompt, trackDataKey, transposeNotes, useAnySolo, useGeneratorPanelCore, usePanelBus, useSceneState, useSoundHistory, useTrackExternalFx, useTrackLevel, useTrackLevels, useTrackMeter, useTrackReorder, useTransitionOps, useTransportPlaying };
|
|
5638
|
+
export { AUDIO_EFFECTS, AUDIO_EFFECT_LABEL, type AdjacentPairAnalysis, 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, ENSEMBLE_MAX_VOICES, ENSEMBLE_MIN_VOICES, ENSEMBLE_STYLES, EQUAL_POWER_GAIN, type EnforceVoiceOptions, type EnforceVoiceResult, type EnsembleAnalysis, type EnsembleNote, type EnsembleStyle, type EnsembleStyleRules, type EnsembleVoiceSpec, 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 GroupFadeEntry, type GroupFadeEntryOf, type GroupFadeMemberLayer, GroupFadeTrackRow, type GroupFadeTrackRowProps, 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, MIN_NOTE_DURATION_BEATS, type MidiClipData, type MidiWriteResult, type MixInterpolation, Modal, type ModalProps, type MotionKind, 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 PanelTransitionGroupAdapter, type ParsedEnsemble, 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 PluginGenerationContextOptions, 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 ResolvedGroupFade, type ResolvedGroupsResult, type ResolvedTrackGroup, type SDKTrackRowProps, SLIDER_UNITY, STYLE_RULES, SUBMIT_ENSEMBLE_TOOL_NAME, SamplePackCTACard, type SamplePackCTACardProps, type SamplePackCTACardStatus, type SamplePackCardInfo, type SavePluginPresetOptions, type SceneChangeListener, type SceneFamilyTrack, type SceneTrackSummary, 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 VerbatimFadeMember, type VolumeAutomationPoint, VolumeSlider, type WaveformPeaks, WaveformView, type WaveformViewProps, analyzeEnsemble, analyzeWavPeak, asAudioEffect, asCrossfadeMeta, asFadeMeta, asTransitionDesignerDraft, buildCrossfadeInpaintPrompt, buildCrossfadeVolumeCurves, buildEnsembleSystemPrompt, buildFadeVolumeCurve, buildRowSlots, buildSubmitEnsembleParameters, buildViolationRetrySuffix, calculateTimeBasedTarget, cellToPx, centerScrollTop, computePeaks, createSurgeSoundAdapter, dbIdsFromKeys, dbToSlider, defaultFadeGesture, defaultVoiceSpecs, describeViolations, drawWaveform, enforceVoice, foldPitchToRegister, formatConcurrentTracks, hashString, moveItem, nearestPitchWithPc, newTrackState, normalizeSlots, padPair, padSlots, parseCrossfadePairs, parseEnsembleArgs, parseFades, parseLLMNoteResponse, parseTrackGroups, pickTopKWeighted, pitchToName, pluginFxToToggleFx, pxToCell, reconcileSlots, resizeNoteDuration, resolveTrackGroups, rowKey, rowType, scorePromptMatch, sliderToDb, slotsEqual, soundIdentity, splitFadeEntries, synthesizeCuePoints, tokenizePrompt, trackDataKey, transposeNotes, useAnySolo, useGeneratorPanelCore, usePanelBus, useSceneState, useSoundHistory, useTrackExternalFx, useTrackLevel, useTrackLevels, useTrackMeter, useTrackReorder, useTransitionOps, useTransportPlaying };
|