@dawcore/components 0.0.38 → 0.0.39-next.0

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/README.md CHANGED
@@ -163,10 +163,10 @@ await editor.addTrack({
163
163
  });
164
164
  ```
165
165
 
166
- This expands to a `<daw-track render-mode="piano-roll">` containing a `<daw-clip>` whose `midiNotes` JS property is set to the notes array. Equivalent declarative form:
166
+ This expands to a MIDI track, `<daw-track kind="midi">`, containing a `<daw-clip>` whose `midiNotes` JS property is set to the notes array. A MIDI track holds MIDI clips only and is drawn as a piano roll; an audio track (the default, `kind="audio"`) holds audio clips only. A clip of the other kind is not added and is reported with `daw-clip-error`. Equivalent declarative form:
167
167
 
168
168
  ```html
169
- <daw-track render-mode="piano-roll" name="Lead">
169
+ <daw-track kind="midi" name="Lead">
170
170
  <daw-clip midi-channel="0" midi-program="24"></daw-clip>
171
171
  </daw-track>
172
172
  <script>
@@ -230,18 +230,22 @@ adapter.transport.setCountInMode('always');
230
230
  adapter.transport.on('countIn', ({ beat, totalBeats }) => {
231
231
  console.log('Count-in: ' + beat + '/' + totalBeats);
232
232
  });
233
- adapter.transport.connectTrackOutput('track-id', reverbNode);
233
+ adapter.transport.connectTrackEffects('track-id', reverbNode, reverbNode);
234
234
  ```
235
235
 
236
236
  ## Effects
237
237
 
238
- Per-track and master effect chains (requires `@dawcore/transport` >= 0.0.13). `<daw-track>` owns its track chain; `<daw-editor>` owns the master chain — same API on both:
238
+ Per-track and master effect chains (requires `@dawcore/transport` >= 0.0.16). Track chains are **pre-fader inserts** — clips → effects → volume → pan → mute — so a track's volume fader sets its level in the mix without changing how hard a compressor or limiter works, and a mono clip reaches the chain as mono at full level. `exportAudio()` renders the same order. `<daw-track>` owns its track chain; `<daw-editor>` owns the master chain — same API on both:
239
239
 
240
240
  ```javascript
241
241
  const track = document.querySelector('daw-track');
242
242
 
243
- // Built-in native-* effects: native-gain, native-filter, native-compressor,
244
- // native-stereo-panner, native-delay
243
+ // Built-in native-* effects: native-gain, native-compressor,
244
+ // native-stereo-panner, native-delay, and one type per biquad filter shape:
245
+ // native-filter (lowpass), native-highpass, native-bandpass, native-notch
246
+ // (frequency + q — for lowpass/highpass q is resonance in dB, -3 = flat;
247
+ // for the others it is the linear quality factor), native-peaking (frequency + q + gain in dB),
248
+ // native-lowshelf, native-highshelf (frequency + gain in dB)
245
249
  const filterId = track.addEffect('native-filter', { frequency: 800 });
246
250
  const compressorId = editor.addEffect('native-compressor'); // master chain
247
251
 
@@ -259,7 +263,31 @@ editor.addEventListener('daw-effect-add', (e) => console.log(e.detail));
259
263
  // also: daw-effect-remove, daw-effect-change, daw-effect-bypass, daw-effect-reorder
260
264
  ```
261
265
 
262
- Register custom effects with `registerEffect(type, definition)`; inspect built-ins with `getEffectDefinitions()` (exports from `@dawcore/components`).
266
+ Register custom effects with `registerEffect(type, definition)`; inspect built-ins with `getEffectDefinitions()`. Both are exports of `@waveform-playlist/core` (add it as a direct dependency), not of `@dawcore/components`. The registry is shared with the React effects hooks in `@waveform-playlist/browser/tone`, so one registration serves both. The definition types are `NativeEffectDefinition`, `NativeEffectInstance` and `EffectParamDef`, also from core.
267
+
268
+ An effect backed by an `AudioWorkletNode` needs its module added to every context it is created on — including the `OfflineAudioContext` that `exportAudio()` builds internally. Give the definition an async `prepare` hook; it runs once per context:
269
+
270
+ ```javascript
271
+ import { registerEffect } from '@waveform-playlist/core';
272
+
273
+ registerEffect('my-limiter', {
274
+ label: 'Limiter',
275
+ category: 'dynamics',
276
+ defaults: { ceiling: -1 },
277
+ params: { ceiling: { min: -24, max: 0, unit: 'dB' } },
278
+ prepare: (ctx) => ctx.audioWorklet.addModule('/limiter.worklet.js'),
279
+ create: (ctx) => {
280
+ const node = new AudioWorkletNode(ctx, 'my-limiter');
281
+ return { input: node, output: node, applyParams: (p) => { /* ... */ } };
282
+ },
283
+ });
284
+
285
+ await editor.prepareEffect('my-limiter'); // live context — addEffect is synchronous
286
+ track.addEffect('my-limiter');
287
+ await editor.exportAudio(); // prepares the offline context itself
288
+ ```
289
+
290
+ `setEffectsState()` also awaits `prepare`, so a restored chain needs no extra call.
263
291
 
264
292
  ### WAM Plugins
265
293
 
@@ -274,6 +302,8 @@ See `examples/dawcore-native/effects.html` for a native-effects demo and `exampl
274
302
 
275
303
  ### Faust Effects (compiled in the browser)
276
304
 
305
+ > `addFaustEffect` is for **live compilation** only — DSP source written or supplied at runtime. If your effects are fixed when you build your app, compile them in advance and load them as ordinary effects: see the [Precompiled Faust Effects guide](https://naomiaro.github.io/waveform-playlist/docs/faust-effects). Live compilation downloads the Faust compiler and ships LGPL and GPL-3.0-or-later code to the browser.
306
+
277
307
  Write custom DSP in [Faust](https://faust.grame.fr/) and hear it instantly — `addFaustEffect(dspCode, options?)` compiles the source **in the browser** via the optional `@dawcore/faust` peer (`npm install @dawcore/faust @dawcore/wam`) and adds the result to the chain as an ordinary WAM entry:
278
308
 
279
309
  ```javascript
@@ -350,9 +380,20 @@ const result = await editor.loadFiles(fileList);
350
380
  // e.preventDefault(); // skip automatic clip creation
351
381
  console.log('recorded:', e.detail.audioBuffer);
352
382
  });
383
+
384
+ // Fires once the take's clip exists — address it by id
385
+ editor.addEventListener('daw-recording-clip-add', (e) => {
386
+ const { trackId, clipId } = e.detail;
387
+ editor.updateClip(trackId, clipId, { gain: 2, name: 'Take 1' });
388
+ // editor.removeClip(trackId, clipId) to discard the take
389
+ });
353
390
  </script>
354
391
  ```
355
392
 
393
+ A recorded take has no `<daw-clip>` element; its engine clip id is the `clipId` in `daw-recording-clip-add`, and it is also on the take's entry in `editor.tracks[n].clips` (`kind: 'drop'`, `clipId`). That entry follows the engine: `updateClip()`, drags and trims refresh it, and it is dropped when the clip goes away (`removeClip()`, undo, a later punch-in over it). Splitting a take replaces it with two new clips, which have no entry of their own.
394
+
395
+ `daw-recording-clip-add` is not guaranteed after every `daw-recording-complete`: it is skipped when you cancel the complete event, when peak generation for the take fails (`daw-error` with `operation: 'recording-peaks'`), and when the track was removed in the meantime.
396
+
356
397
  During a take the editor shows the live preview with full clip chrome (header label from `RecordingOptions.clipName`, default "Recording…"), transiently mutes the recorded track (punch-in replaces whatever the take overlaps, so the doomed material never plays under the overdub — the track's Mute control is untouched and the previous state is restored when the session ends), and suppresses the end-of-timeline auto-stop so the take can run past existing audio.
357
398
 
358
399
  ## Single-Track Player
@@ -444,6 +485,7 @@ Core orchestrator. Attributes:
444
485
  | `mono` | boolean | `false` | Merge stereo to mono display |
445
486
  | `bar-width` / `bar-gap` | number | `1` / `0` | Waveform bar rendering style |
446
487
  | `rounded-bars` | boolean | `false` | Pill-shaped bar caps (radius `bar-width / 2`) |
488
+ | `gain-scaled-waveforms` | boolean | `false` | Draw each clip's waveform scaled by its `gain` (clamped to the channel height) instead of at source level |
447
489
  | `indefinite-playback` | boolean | `false` | Disable the end-of-timeline auto-stop — roll until explicit stop (DAW style). Implies `fill-viewport` |
448
490
  | `fill-viewport` | boolean | `false` | Keep ruler/timeline filling the viewport even when audio is shorter (layout only) |
449
491
  | `scale-mode` | string | `'temporal'` | `'temporal'` (seconds) or `'beats'` (tick-linear grid) |
@@ -466,7 +508,7 @@ Methods:
466
508
 
467
509
  ### `<daw-track>`
468
510
 
469
- Declarative track data. Attributes: `src`, `name`, `volume`, `pan`, `muted`, `soloed`, `render-mode` (`'waveform' | 'piano-roll' | 'spectrogram'`, default `'waveform'`). JS property: `spectrogramConfig` (per-track spectrogram override). Also exposes the per-track effects API (see [Effects](#effects)).
511
+ Declarative track data. Attributes: `src`, `name`, `volume`, `pan`, `muted`, `soloed`, `kind` (`'audio' | 'midi'`, default `'audio'`: what the track holds; set it before the track is added), `render-mode` (`'waveform' | 'spectrogram'`, default `'waveform'`: how an audio track is drawn; a MIDI track is always a piano roll). JS property: `spectrogramConfig` (per-track spectrogram override). Also exposes the per-track effects API (see [Effects](#effects)).
470
512
 
471
513
  ### `<daw-clip>`
472
514
 
@@ -474,7 +516,7 @@ Declarative clip data. Attributes: `src`, `peaks-src`, `start`, `duration`, `off
474
516
 
475
517
  ### `<daw-piano-roll>`
476
518
 
477
- Visual element for MIDI note rendering. Mounted automatically when the parent track has `render-mode="piano-roll"` — you don't usually instantiate it directly. See [MIDI Tracks](#midi-tracks).
519
+ Visual element for MIDI note rendering. Mounted automatically for the clips of a MIDI track (`<daw-track kind="midi">`) — you don't usually instantiate it directly. See [MIDI Tracks](#midi-tracks).
478
520
 
479
521
  ### `<daw-transport for="editor-id">`
480
522
 
@@ -534,6 +576,8 @@ editor.addEventListener('daw-recording-complete', (e) => {
534
576
  // e.preventDefault() to skip automatic clip creation
535
577
  console.log(e.detail.audioBuffer);
536
578
  });
579
+ // The take's clip now exists: detail is { trackId, clipId }
580
+ editor.addEventListener('daw-recording-clip-add', (e) => console.log(e.detail));
537
581
 
538
582
  // Effects (track events bubble up to the editor)
539
583
  editor.addEventListener('daw-effect-add', (e) => console.log(e.detail));
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as lit from 'lit';
2
2
  import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost } from 'lit';
3
- import { AnnotationData, AnnotationShortcutMap, MidiNoteData, RenderMode, SpectrogramConfig, Peaks, Bits, FadeType, PeakData, MeterEntry, SnapTo, ColorMapValue, ClipTrack, KeyboardShortcut } from '@waveform-playlist/core';
3
+ import { AnnotationData, AnnotationShortcutMap, MidiNoteData, TrackKind, RenderMode, SpectrogramConfig, Peaks, Bits, FadeType, PeakData, MeterEntry, SnapTo, ColorMapValue, ClipTrack, KeyboardShortcut } from '@waveform-playlist/core';
4
4
  import WaveformData from 'waveform-data';
5
5
  import { PlayoutAdapter, PlaylistEngine } from '@waveform-playlist/engine';
6
6
  import { MidiLoadOptions, MidiLoadResult } from '@dawcore/midi';
@@ -222,47 +222,6 @@ declare global {
222
222
  }
223
223
  }
224
224
 
225
- /** Range/display metadata for one effect parameter. */
226
- interface EffectParamDef {
227
- min: number;
228
- max: number;
229
- step?: number;
230
- /** 's', 'ms', 'Hz', 'dB', '%' … */
231
- unit?: string;
232
- }
233
- /**
234
- * A live, wired effect. `input`/`output` are the chain attachment points
235
- * (the same node for single-node effects). `applyParams` updates AudioParams
236
- * in place — the chain never rebuilds for parameter changes.
237
- */
238
- interface EffectInstance {
239
- input: AudioNode;
240
- output: AudioNode;
241
- applyParams: (params: Record<string, number>) => void;
242
- dispose?: () => void;
243
- /** Serializable snapshot of plugin-internal state (WAM getState). */
244
- getState?: () => Promise<unknown>;
245
- /** Builds the plugin's own GUI element (WAM createGui). GUI lifecycle is
246
- * independent of audio — hiding/destroying a GUI never stops processing. */
247
- createGui?: () => Promise<HTMLElement>;
248
- /** Releases a GUI element previously built by `createGui` (WAM destroyGui). */
249
- destroyGui?: (gui: HTMLElement) => void;
250
- /** Parameter metadata for the generic fallback panel (WAM getParameterInfo). */
251
- getParameterInfo?: () => Promise<unknown>;
252
- }
253
- /** A registered effect type. `create` must work on any BaseAudioContext so
254
- * the same definitions serve offline rendering. */
255
- interface EffectDefinition {
256
- label: string;
257
- category: string;
258
- defaults: Record<string, number>;
259
- params: Record<string, EffectParamDef>;
260
- /** Name of the wet/dry param, when the effect has one. Bypass zeroes it
261
- * (storing the original); effects without one are bypassed by
262
- * disconnection. */
263
- wetParam?: string;
264
- create: (audioContext: BaseAudioContext, params: Record<string, number>) => EffectInstance;
265
- }
266
225
  /** Public, serializable view of one chain entry. */
267
226
  interface EffectState {
268
227
  id: string;
@@ -304,12 +263,6 @@ type SerializedEffectEntry = {
304
263
  * playback; restore ignores the flag and retries the URL/DSP. */
305
264
  placeholder?: true;
306
265
  };
307
- /** Result of creating an effect via the registry. */
308
- interface CreatedEffect {
309
- instance: EffectInstance;
310
- params: Record<string, number>;
311
- wetParam?: string;
312
- }
313
266
 
314
267
  declare class DawTrackElement extends LitElement {
315
268
  src: string;
@@ -318,6 +271,14 @@ declare class DawTrackElement extends LitElement {
318
271
  pan: number;
319
272
  muted: boolean;
320
273
  soloed: boolean;
274
+ /**
275
+ * What the track holds: `'audio'` (default) or `'midi'`. Every `<daw-clip>`
276
+ * child must be of this kind (#756). Set it before the track connects:
277
+ * the editor reads it when it loads the track.
278
+ */
279
+ get kind(): TrackKind;
280
+ set kind(value: TrackKind);
281
+ private _kind;
321
282
  get renderMode(): RenderMode;
322
283
  set renderMode(value: RenderMode);
323
284
  private _renderMode;
@@ -396,6 +357,10 @@ declare class DawWaveformElement extends LitElement {
396
357
  barGap: number;
397
358
  /** Draw bars with pill-shaped rounded caps (radius barWidth/2). */
398
359
  roundedBars: boolean;
360
+ /** Linear gain applied to the DRAWN bars (clamped to the channel height).
361
+ * Display-only — peaks are untouched, so changing it never regenerates
362
+ * them. The editor feeds it a clip's gain under `gain-scaled-waveforms`. */
363
+ gain: number;
399
364
  /** Visible viewport start in pixels (relative to timeline origin). */
400
365
  visibleStart: number;
401
366
  /** Visible viewport end in pixels (relative to timeline origin). */
@@ -582,6 +547,10 @@ interface TrackDescriptor {
582
547
  pan: number;
583
548
  muted: boolean;
584
549
  soloed: boolean;
550
+ /** What the track holds: audio clips or MIDI clips, never both (#756). */
551
+ kind: TrackKind;
552
+ /** How an audio track is drawn. A MIDI track is drawn as a piano roll from
553
+ * its `kind`; its `renderMode` is always `'waveform'` and means nothing. */
585
554
  renderMode: TrackRenderMode;
586
555
  spectrogramConfig?: SpectrogramConfig | null;
587
556
  clips: ClipDescriptor[];
@@ -622,12 +591,17 @@ interface DomClipDescriptor extends BaseClipDescriptor {
622
591
  }
623
592
  /**
624
593
  * A clip descriptor synthesized from a non-DOM source — file drops, the
625
- * `<daw-track src>` shorthand fallback, or recording-clip insertion. No
626
- * `clipId` because there's no DOM element to align with; the engine
627
- * generates its own id at clip-creation time.
594
+ * `<daw-track src>` shorthand fallback, or recording-clip insertion. There
595
+ * is no DOM element to align with; the engine generates its own id at
596
+ * clip-creation time.
597
+ *
598
+ * `clipId` is that engine clip id when the editor knows it at descriptor
599
+ * creation — currently recorded takes (#659). Pass it to
600
+ * `editor.updateClip()` / `removeClip()` to address the clip.
628
601
  */
629
602
  interface DropClipDescriptor extends BaseClipDescriptor {
630
603
  kind: 'drop';
604
+ clipId?: string;
631
605
  }
632
606
  type ClipDescriptor = DomClipDescriptor | DropClipDescriptor;
633
607
  /**
@@ -646,14 +620,20 @@ interface TrackConfig {
646
620
  pan?: number;
647
621
  muted?: boolean;
648
622
  soloed?: boolean;
623
+ /**
624
+ * What the track holds. Default `'audio'`, or `'midi'` when `midi` is given.
625
+ * Every clip must be of this kind: a clip of the other kind is not added and
626
+ * is reported through `daw-clip-error`. Creation-only: ignored by `updateTrack`.
627
+ */
628
+ kind?: TrackKind;
629
+ /** How an audio track is drawn. Ignored for a MIDI track (a piano roll). */
649
630
  renderMode?: TrackRenderMode;
650
631
  spectrogramConfig?: SpectrogramConfig | null;
651
632
  clips?: ClipConfig[];
652
633
  /**
653
- * Convenience: creates a single piano-roll `<daw-clip>` child with these
654
- * notes and sets `render-mode="piano-roll"` on the track. Equivalent to
655
- * passing `{ renderMode: 'piano-roll', clips: [{ midiNotes, midiChannel, midiProgram }] }`.
656
- * An explicit `renderMode` takes precedence over the inferred `'piano-roll'`.
634
+ * Convenience: makes the track a MIDI track (`kind: 'midi'`) with a single
635
+ * `<daw-clip>` child holding these notes. Equivalent to passing
636
+ * `{ kind: 'midi', clips: [{ midiNotes, midiChannel, midiProgram }] }`.
657
637
  *
658
638
  * Creation-only — ignored by `updateTrack`. To modify notes after the
659
639
  * track is built, use `editor.updateClip(trackId, clipId, { midiNotes })` or
@@ -948,7 +928,7 @@ interface RecordingHost extends ReactiveControllerHost {
948
928
  _engine?: {
949
929
  setTrackMute(trackId: string, muted: boolean): void;
950
930
  getState(): {
951
- tracks: Array<{
931
+ tracks: ReadonlyArray<{
952
932
  id: string;
953
933
  muted: boolean;
954
934
  }>;
@@ -1223,6 +1203,17 @@ interface DawRecordingCompleteDetail {
1223
1203
  durationSamples: number;
1224
1204
  offsetSamples: number;
1225
1205
  }
1206
+ /** Follows `daw-recording-complete` once the take's clip is in the engine.
1207
+ * NOT guaranteed after every complete — it is skipped when the consumer
1208
+ * cancelled `daw-recording-complete`, when peak generation for the take
1209
+ * failed (`daw-error` with `operation: 'recording-peaks'` fires instead),
1210
+ * when the track was removed meanwhile, and on a disconnected editor.
1211
+ * Don't await it without a fallback. */
1212
+ interface DawRecordingClipAddDetail {
1213
+ trackId: string;
1214
+ /** Engine clip id — pass to `editor.updateClip()` / `removeClip()`. */
1215
+ clipId: string;
1216
+ }
1226
1217
  interface DawRecordingErrorDetail {
1227
1218
  trackId: string;
1228
1219
  error: unknown;
@@ -1367,6 +1358,7 @@ interface DawEventMap {
1367
1358
  'daw-track-remove': CustomEvent<DawTrackRemoveDetail>;
1368
1359
  'daw-recording-start': CustomEvent<DawRecordingStartDetail>;
1369
1360
  'daw-recording-complete': CustomEvent<DawRecordingCompleteDetail>;
1361
+ 'daw-recording-clip-add': CustomEvent<DawRecordingClipAddDetail>;
1370
1362
  'daw-recording-error': CustomEvent<DawRecordingErrorDetail>;
1371
1363
  'daw-recording-pause': CustomEvent<DawRecordingPauseDetail>;
1372
1364
  'daw-recording-resume': CustomEvent<DawRecordingResumeDetail>;
@@ -1497,6 +1489,10 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
1497
1489
  roundedBars: boolean;
1498
1490
  fileDrop: boolean;
1499
1491
  clipHeaders: boolean;
1492
+ /** Scale each clip's drawn waveform by its `gain` (clamped to the channel
1493
+ * height), so levelled clips look the way they sound. Off by default:
1494
+ * waveforms show source level. Draw-time only — no peak regeneration. */
1495
+ gainScaledWaveforms: boolean;
1500
1496
  clipHeaderHeight: number;
1501
1497
  interactiveClips: boolean;
1502
1498
  /**
@@ -1609,6 +1605,14 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
1609
1605
  private _adapterConsumedByDispose;
1610
1606
  private _effectsManager;
1611
1607
  private get _effects();
1608
+ /**
1609
+ * Run a registered effect type's async `prepare` hook (e.g. an
1610
+ * `audioWorklet.addModule`) on this editor's audio context. Await it before
1611
+ * the synchronous `addEffect`/`addTrackEffect` for effect types that define
1612
+ * one; `setEffectsState()` and `exportAudio()` run it themselves. Idempotent
1613
+ * per context, and a no-op for types without a hook.
1614
+ */
1615
+ prepareEffect(type: string): Promise<void>;
1612
1616
  /** Master effects chain — inserted between the master bus and the destination. */
1613
1617
  addEffect(type: string, params?: Record<string, number>): string;
1614
1618
  removeEffect(effectId: string): void;
@@ -1800,7 +1804,11 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
1800
1804
  * ghost that even removeTrack() can't clean (no element, no engine
1801
1805
  * entry). Never prunes tracks that are mid-load or element-backed —
1802
1806
  * their descriptors legitimately precede their engine entries. */
1803
- _reconcileDescriptorsWithEngineTracks(tracks: ClipTrack[]): void;
1807
+ _reconcileDescriptorsWithEngineTracks(tracks: readonly ClipTrack[]): void;
1808
+ /** Prune id-bearing drop descriptors the engine no longer has, and refresh
1809
+ * the rest from their engine clip. Returns the SAME array when nothing
1810
+ * changed, so an unchanged track never triggers a re-render. */
1811
+ private _reconcileIdentifiedDropClips;
1804
1812
  private static _CONTROL_PROPS;
1805
1813
  private _onTrackControl;
1806
1814
  private _onTrackRemoveRequest;
@@ -1862,6 +1870,11 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
1862
1870
  private _applyClipUpdate;
1863
1871
  private _removeClipFromTrack;
1864
1872
  private _readTrackDescriptor;
1873
+ /**
1874
+ * The error for a clip whose kind is not its track's (#756), or null. A clip
1875
+ * with no `src` is a MIDI clip (see _isMidiDescriptor).
1876
+ */
1877
+ private _clipKindError;
1865
1878
  private _loadTrack;
1866
1879
  _fetchAndDecode(src: string): Promise<AudioBuffer>;
1867
1880
  private _fetchPeaks;
@@ -2047,7 +2060,7 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
2047
2060
  * the observer's _syncEngineOrderToDom, which finds the orders equal and
2048
2061
  * no-ops — converges in one pass (write-only-on-change).
2049
2062
  */
2050
- _syncDomToEngineOrder(tracks: ClipTrack[]): void;
2063
+ _syncDomToEngineOrder(tracks: readonly ClipTrack[]): void;
2051
2064
  private _getOrderedTracks;
2052
2065
  render(): lit.TemplateResult<1>;
2053
2066
  }
@@ -2490,7 +2503,7 @@ interface PointerEngineContract {
2490
2503
  interface SplitEngineContract {
2491
2504
  getState(): {
2492
2505
  selectedTrackId: string | null;
2493
- tracks: ClipTrack[];
2506
+ tracks: readonly ClipTrack[];
2494
2507
  };
2495
2508
  splitClip(trackId: string, clipId: string, atSample: number): void;
2496
2509
  }
@@ -2514,9 +2527,4 @@ interface SplitHost {
2514
2527
  */
2515
2528
  declare function splitAtPlayhead(host: SplitHost): boolean;
2516
2529
 
2517
- declare function registerEffect(type: string, definition: EffectDefinition): void;
2518
- /** A copy — mutating the returned map does not affect the registry. */
2519
- declare function getEffectDefinitions(): Map<string, EffectDefinition>;
2520
- declare function createEffectInstance(type: string, audioContext: BaseAudioContext, params?: Record<string, number>): CreatedEffect;
2521
-
2522
- export { ANNOTATION_LANE_HEIGHT, AudioResumeController, type ClipConfig, type ClipDescriptor, type ClipEngineContract, ClipPointerHandler, type ClipPointerHost, type DawAnnotationConnectedDetail, DawAnnotationElement, DawAnnotationListElement, type DawAnnotationSelectDetail, type DawAnnotationTrackConnectedDetail, DawAnnotationTrackElement, type DawAnnotationUpdateDetail, type DawClipConnectedDetail, DawClipElement, type DawClipErrorDetail, type DawClipIdDetail, type DawClipMoveDetail, type DawClipSplitDetail, type DawClipTrimDetail, type DawClipUpdateDetail, DawEditorElement, type DawEffectAddDetail, type DawEffectBypassDetail, type DawEffectChangeDetail, type DawEffectErrorDetail, type DawEffectRemoveDetail, type DawEffectReorderDetail, type DawErrorDetail, type DawEvent, type DawEventMap, type DawFilesLoadErrorDetail, DawGridElement, DawKeyboardShortcutsElement, DawPauseButtonElement, DawPianoRollElement, DawPlayButtonElement, DawPlayerElement, DawPlayheadElement, DawRecordButtonElement, type DawRecordingCompleteDetail, type DawRecordingErrorDetail, type DawRecordingStartDetail, DawRulerElement, type DawSeekDetail, type DawSelectionDetail, DawSelectionElement, DawSpectrogramElement, DawStopButtonElement, DawTimeDisplayElement, type DawTimeFormatChangeDetail, DawTimeFormatElement, type DawTimeUpdateDetail, type DawTrackConnectedDetail, type DawTrackControlDetail, DawTrackControlsElement, DawTrackElement, type DawTrackErrorDetail, type DawTrackIdDetail, type DawTrackRemoveDetail, type DawTrackSelectDetail, DawTransportButton, DawTransportElement, DawWaveformElement, type DomClipDescriptor, type DropClipDescriptor, type EffectDefinition, type EffectInstance, type EffectParamDef, type EffectState, type ExportAudioHost, type ExportOptions, type KeyBinding, type LoadFilesResult, PlaybackAnimationController, type PlaybackAnimationOptions, type PlaybackShortcutMap, type PlayheadLike, type PointerEngineContract, RecordingController, type RecordingOptions, type RecordingSession, type SerializedEffectEntry, SpectrogramController, type SplitEngineContract, type SplitHost, type SplittingShortcutMap, TIME_DISPLAY_FORMATS, type TimeDisplayFormat, type TrackConfig, type TrackDescriptor, type TrackRenderMode, type TrackWithId, type UndoShortcutMap, type WaveformSegment, createEffectInstance, formatDisplayTime, getEffectDefinitions, isDomClip, isTimeDisplayFormat, parseDisplayTime, registerEffect, resolveTransportTarget, splitAtPlayhead, targetSupports, warnOnce, warnUnsupportedOnce };
2530
+ export { ANNOTATION_LANE_HEIGHT, AudioResumeController, type ClipConfig, type ClipDescriptor, type ClipEngineContract, ClipPointerHandler, type ClipPointerHost, type DawAnnotationConnectedDetail, DawAnnotationElement, DawAnnotationListElement, type DawAnnotationSelectDetail, type DawAnnotationTrackConnectedDetail, DawAnnotationTrackElement, type DawAnnotationUpdateDetail, type DawClipConnectedDetail, DawClipElement, type DawClipErrorDetail, type DawClipIdDetail, type DawClipMoveDetail, type DawClipSplitDetail, type DawClipTrimDetail, type DawClipUpdateDetail, DawEditorElement, type DawEffectAddDetail, type DawEffectBypassDetail, type DawEffectChangeDetail, type DawEffectErrorDetail, type DawEffectRemoveDetail, type DawEffectReorderDetail, type DawErrorDetail, type DawEvent, type DawEventMap, type DawFilesLoadErrorDetail, DawGridElement, DawKeyboardShortcutsElement, DawPauseButtonElement, DawPianoRollElement, DawPlayButtonElement, DawPlayerElement, DawPlayheadElement, DawRecordButtonElement, type DawRecordingClipAddDetail, type DawRecordingCompleteDetail, type DawRecordingErrorDetail, type DawRecordingStartDetail, DawRulerElement, type DawSeekDetail, type DawSelectionDetail, DawSelectionElement, DawSpectrogramElement, DawStopButtonElement, DawTimeDisplayElement, type DawTimeFormatChangeDetail, DawTimeFormatElement, type DawTimeUpdateDetail, type DawTrackConnectedDetail, type DawTrackControlDetail, DawTrackControlsElement, DawTrackElement, type DawTrackErrorDetail, type DawTrackIdDetail, type DawTrackRemoveDetail, type DawTrackSelectDetail, DawTransportButton, DawTransportElement, DawWaveformElement, type DomClipDescriptor, type DropClipDescriptor, type EffectState, type ExportAudioHost, type ExportOptions, type KeyBinding, type LoadFilesResult, PlaybackAnimationController, type PlaybackAnimationOptions, type PlaybackShortcutMap, type PlayheadLike, type PointerEngineContract, RecordingController, type RecordingOptions, type RecordingSession, type SerializedEffectEntry, SpectrogramController, type SplitEngineContract, type SplitHost, type SplittingShortcutMap, TIME_DISPLAY_FORMATS, type TimeDisplayFormat, type TrackConfig, type TrackDescriptor, type TrackRenderMode, type TrackWithId, type UndoShortcutMap, type WaveformSegment, formatDisplayTime, isDomClip, isTimeDisplayFormat, parseDisplayTime, resolveTransportTarget, splitAtPlayhead, targetSupports, warnOnce, warnUnsupportedOnce };