@buffered-audio/nodes 0.15.2 → 0.17.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/dist/index.d.ts CHANGED
@@ -27,10 +27,10 @@ declare class ReadFfmpegStream<P extends ReadFfmpegProperties = ReadFfmpegProper
27
27
  private readBytes;
28
28
  }
29
29
  declare class ReadFfmpegNode extends SourceNode<ReadFfmpegProperties> {
30
- static readonly moduleName = "Read FFmpeg";
30
+ static readonly nodeName = "Read FFmpeg";
31
31
  static readonly packageName: string;
32
32
  static readonly packageVersion: string;
33
- static readonly moduleDescription = "Read audio from a file using FFmpeg";
33
+ static readonly nodeDescription = "Read audio from a file using FFmpeg";
34
34
  static readonly schema: z.ZodObject<{
35
35
  path: z.ZodDefault<z.ZodString>;
36
36
  ffmpegPath: z.ZodDefault<z.ZodString>;
@@ -66,10 +66,10 @@ declare class ReadWavStream<P extends ReadWavProperties = ReadWavProperties> ext
66
66
  _teardown(): void;
67
67
  }
68
68
  declare class ReadWavNode extends SourceNode<ReadWavProperties> {
69
- static readonly moduleName = "Read WAV";
69
+ static readonly nodeName = "Read WAV";
70
70
  static readonly packageName: string;
71
71
  static readonly packageVersion: string;
72
- static readonly moduleDescription = "Read audio from a WAV file";
72
+ static readonly nodeDescription = "Read audio from a WAV file";
73
73
  static readonly schema: z.ZodObject<{
74
74
  path: z.ZodDefault<z.ZodString>;
75
75
  }, z.core.$strip>;
@@ -90,10 +90,10 @@ interface ReadProperties extends z.infer<typeof schema$m>, SourceNodeProperties
90
90
  readonly channels?: ReadonlyArray<number>;
91
91
  }
92
92
  declare class ReadNode extends SourceNode<ReadProperties> {
93
- static readonly moduleName = "Read";
93
+ static readonly nodeName = "Read";
94
94
  static readonly packageName: string;
95
95
  static readonly packageVersion: string;
96
- static readonly moduleDescription = "Read audio from a file";
96
+ static readonly nodeDescription = "Read audio from a file";
97
97
  static readonly schema: z.ZodObject<{
98
98
  path: z.ZodDefault<z.ZodString>;
99
99
  ffmpegPath: z.ZodDefault<z.ZodString>;
@@ -144,10 +144,10 @@ declare class LoudnessStatsStream extends BufferedTargetStream<LoudnessStatsProp
144
144
  _close(): Promise<void>;
145
145
  }
146
146
  declare class LoudnessStatsNode extends TargetNode<LoudnessStatsProperties> {
147
- static readonly moduleName = "Loudness Stats";
147
+ static readonly nodeName = "Loudness Stats";
148
148
  static readonly packageName: string;
149
149
  static readonly packageVersion: string;
150
- static readonly moduleDescription = "Measure integrated loudness, true peak, and loudness range per EBU R128, plus an amplitude-distribution histogram";
150
+ static readonly nodeDescription = "Measure integrated loudness, true peak, and loudness range per EBU R128, plus an amplitude-distribution histogram";
151
151
  static readonly schema: z.ZodObject<{
152
152
  bucketCount: z.ZodDefault<z.ZodNumber>;
153
153
  outputPath: z.ZodDefault<z.ZodString>;
@@ -209,10 +209,10 @@ declare class SpectrogramStream extends BufferedTargetStream<SpectrogramProperti
209
209
  private flushWriteBuffer;
210
210
  }
211
211
  declare class SpectrogramNode extends TargetNode<SpectrogramProperties> {
212
- static readonly moduleName = "Spectrogram";
212
+ static readonly nodeName = "Spectrogram";
213
213
  static readonly packageName: string;
214
214
  static readonly packageVersion: string;
215
- static readonly moduleDescription = "Generate spectrogram visualization data";
215
+ static readonly nodeDescription = "Generate spectrogram visualization data";
216
216
  static readonly schema: z.ZodObject<{
217
217
  outputPath: z.ZodDefault<z.ZodString>;
218
218
  fftSize: z.ZodDefault<z.ZodNumber>;
@@ -264,10 +264,10 @@ declare class WaveformStream extends BufferedTargetStream<WaveformProperties> {
264
264
  private flushWriteBuffer;
265
265
  }
266
266
  declare class WaveformNode extends TargetNode<WaveformProperties> {
267
- static readonly moduleName = "Waveform";
267
+ static readonly nodeName = "Waveform";
268
268
  static readonly packageName: string;
269
269
  static readonly packageVersion: string;
270
- static readonly moduleDescription = "Generate waveform visualization data";
270
+ static readonly nodeDescription = "Generate waveform visualization data";
271
271
  static readonly schema: z.ZodObject<{
272
272
  outputPath: z.ZodDefault<z.ZodString>;
273
273
  resolution: z.ZodDefault<z.ZodNumber>;
@@ -316,10 +316,10 @@ declare class WriteStream extends BufferedTargetStream<WriteProperties> {
316
316
  private writeToStdin;
317
317
  }
318
318
  declare class WriteNode extends TargetNode<WriteProperties> {
319
- static readonly moduleName = "Write";
319
+ static readonly nodeName = "Write";
320
320
  static readonly packageName: string;
321
321
  static readonly packageVersion: string;
322
- static readonly moduleDescription = "Write audio to a file";
322
+ static readonly nodeDescription = "Write audio to a file";
323
323
  static readonly schema: z.ZodObject<{
324
324
  path: z.ZodDefault<z.ZodString>;
325
325
  ffmpegPath: z.ZodDefault<z.ZodString>;
@@ -371,10 +371,10 @@ declare class CutStream extends BufferedTransformStream<CutProperties> {
371
371
  _unbuffer(chunk: AudioChunk): AudioChunk | undefined;
372
372
  }
373
373
  declare class CutNode extends TransformNode<CutProperties> {
374
- static readonly moduleName = "Cut";
374
+ static readonly nodeName = "Cut";
375
375
  static readonly packageName: string;
376
376
  static readonly packageVersion: string;
377
- static readonly moduleDescription = "Remove a region of audio";
377
+ static readonly nodeDescription = "Remove a region of audio";
378
378
  static readonly schema: z.ZodObject<{
379
379
  regions: z.ZodDefault<z.ZodArray<z.ZodObject<{
380
380
  start: z.ZodNumber;
@@ -402,10 +402,10 @@ declare class DitherStream extends BufferedTransformStream<DitherProperties> {
402
402
  _unbuffer(chunk: AudioChunk): AudioChunk;
403
403
  }
404
404
  declare class DitherNode extends TransformNode<DitherProperties> {
405
- static readonly moduleName = "Dither";
405
+ static readonly nodeName = "Dither";
406
406
  static readonly packageName: string;
407
407
  static readonly packageVersion: string;
408
- static readonly moduleDescription = "Add shaped noise to reduce quantization distortion";
408
+ static readonly nodeDescription = "Add shaped noise to reduce quantization distortion";
409
409
  static readonly schema: z.ZodObject<{
410
410
  bitDepth: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<16>, z.ZodLiteral<24>]>>;
411
411
  noiseShaping: z.ZodDefault<z.ZodBoolean>;
@@ -433,10 +433,10 @@ declare class NormalizeStream extends BufferedTransformStream<NormalizePropertie
433
433
  _unbuffer(chunk: AudioChunk): AudioChunk;
434
434
  }
435
435
  declare class NormalizeNode extends TransformNode<NormalizeProperties> {
436
- static readonly moduleName = "Normalize";
436
+ static readonly nodeName = "Normalize";
437
437
  static readonly packageName: string;
438
438
  static readonly packageVersion: string;
439
- static readonly moduleDescription = "Adjust peak or loudness level to a target ceiling";
439
+ static readonly nodeDescription = "Adjust peak or loudness level to a target ceiling";
440
440
  static readonly schema: z.ZodObject<{
441
441
  ceiling: z.ZodDefault<z.ZodNumber>;
442
442
  }, z.core.$strip>;
@@ -458,13 +458,19 @@ declare const schema$f: z.ZodObject<{
458
458
  interface PadProperties extends z.infer<typeof schema$f>, TransformNodeProperties {
459
459
  }
460
460
  declare class PadStream extends BufferedTransformStream<PadProperties> {
461
- _process(buffer: ChunkBuffer): Promise<void>;
461
+ private seenChunk;
462
+ private capturedSampleRate;
463
+ private capturedBitDepth;
464
+ private capturedChannels;
465
+ private outputOffset;
466
+ _unbuffer(chunk: AudioChunk): AudioChunk;
467
+ _flush(): Array<AudioChunk> | undefined;
462
468
  }
463
469
  declare class PadNode extends TransformNode<PadProperties> {
464
- static readonly moduleName = "Pad";
470
+ static readonly nodeName = "Pad";
465
471
  static readonly packageName: string;
466
472
  static readonly packageVersion: string;
467
- static readonly moduleDescription = "Add silence to start or end of audio";
473
+ static readonly nodeDescription = "Add silence to start or end of audio";
468
474
  static readonly schema: z.ZodObject<{
469
475
  before: z.ZodDefault<z.ZodNumber>;
470
476
  after: z.ZodDefault<z.ZodNumber>;
@@ -494,10 +500,10 @@ declare class PhaseStream extends BufferedTransformStream<PhaseProperties> {
494
500
  private applyPhaseRotation;
495
501
  }
496
502
  declare class PhaseNode extends TransformNode<PhaseProperties> {
497
- static readonly moduleName = "Phase";
503
+ static readonly nodeName = "Phase";
498
504
  static readonly packageName: string;
499
505
  static readonly packageVersion: string;
500
- static readonly moduleDescription = "Invert or rotate signal phase";
506
+ static readonly nodeDescription = "Invert or rotate signal phase";
501
507
  static readonly schema: z.ZodObject<{
502
508
  invert: z.ZodDefault<z.ZodBoolean>;
503
509
  angle: z.ZodOptional<z.ZodNumber>;
@@ -520,10 +526,10 @@ declare class ReverseStream extends BufferedTransformStream {
520
526
  _process(buffer: ChunkBuffer): Promise<void>;
521
527
  }
522
528
  declare class ReverseNode extends TransformNode {
523
- static readonly moduleName = "Reverse";
529
+ static readonly nodeName = "Reverse";
524
530
  static readonly packageName: string;
525
531
  static readonly packageVersion: string;
526
- static readonly moduleDescription = "Reverse audio playback direction";
532
+ static readonly nodeDescription = "Reverse audio playback direction";
527
533
  static readonly schema: z.ZodObject<{}, z.core.$strip>;
528
534
  static is(value: unknown): value is ReverseNode;
529
535
  readonly type: readonly ["buffered-audio-node", "transform", "reverse"];
@@ -551,10 +557,10 @@ declare class SpliceStream extends BufferedTransformStream<SpliceProperties> {
551
557
  _unbuffer(chunk: AudioChunk): AudioChunk;
552
558
  }
553
559
  declare class SpliceNode extends TransformNode<SpliceProperties> {
554
- static readonly moduleName = "Splice";
560
+ static readonly nodeName = "Splice";
555
561
  static readonly packageName: string;
556
562
  static readonly packageVersion: string;
557
- static readonly moduleDescription = "Replace a region of audio with processed content";
563
+ static readonly nodeDescription = "Replace a region of audio with processed content";
558
564
  static readonly schema: z.ZodObject<{
559
565
  insertPath: z.ZodDefault<z.ZodString>;
560
566
  insertAt: z.ZodDefault<z.ZodNumber>;
@@ -577,13 +583,20 @@ declare const schema$c: z.ZodObject<{
577
583
  interface TrimProperties extends z.infer<typeof schema$c>, TransformNodeProperties {
578
584
  }
579
585
  declare class TrimStream extends BufferedTransformStream<TrimProperties> {
586
+ private firstAbove;
587
+ private lastAbove;
588
+ private scanOffset;
589
+ private startFrame;
590
+ private endFrame;
591
+ _buffer(chunk: AudioChunk, buffer: ChunkBuffer): Promise<void>;
580
592
  _process(buffer: ChunkBuffer): Promise<void>;
593
+ _unbuffer(chunk: AudioChunk): AudioChunk | undefined;
581
594
  }
582
595
  declare class TrimNode extends TransformNode<TrimProperties> {
583
- static readonly moduleName = "Trim";
596
+ static readonly nodeName = "Trim";
584
597
  static readonly packageName: string;
585
598
  static readonly packageVersion: string;
586
- static readonly moduleDescription = "Remove silence from start and end";
599
+ static readonly nodeDescription = "Remove silence from start and end";
587
600
  static readonly schema: z.ZodObject<{
588
601
  threshold: z.ZodDefault<z.ZodNumber>;
589
602
  margin: z.ZodDefault<z.ZodNumber>;
@@ -604,17 +617,14 @@ declare function trim(options?: {
604
617
  id?: string;
605
618
  }): TrimNode;
606
619
 
607
- /**
608
- * Downmix N channels to 1 by averaging all channels equally.
609
- */
610
620
  declare class DownmixMonoStream extends BufferedTransformStream {
611
621
  _unbuffer(chunk: AudioChunk): AudioChunk;
612
622
  }
613
623
  declare class DownmixMonoNode extends TransformNode {
614
- static readonly moduleName = "Downmix Mono";
624
+ static readonly nodeName = "Downmix Mono";
615
625
  static readonly packageName: string;
616
626
  static readonly packageVersion: string;
617
- static readonly moduleDescription = "Mix all input channels to a single mono channel by averaging";
627
+ static readonly nodeDescription = "Mix all input channels to a single mono channel by averaging";
618
628
  static readonly schema: z.ZodObject<{}, z.core.$strip>;
619
629
  static is(value: unknown): value is DownmixMonoNode;
620
630
  readonly type: readonly ["buffered-audio-node", "transform", "downmix-mono"];
@@ -630,18 +640,14 @@ declare const schema$b: z.ZodObject<{
630
640
  }, z.core.$strip>;
631
641
  interface DuplicateChannelsProperties extends z.infer<typeof schema$b>, TransformNodeProperties {
632
642
  }
633
- /**
634
- * Duplicate a single mono channel into N identical output channels.
635
- * Requires exactly 1 input channel; throws for any other channel count.
636
- */
637
643
  declare class DuplicateChannelsStream extends BufferedTransformStream<DuplicateChannelsProperties> {
638
644
  _unbuffer(chunk: AudioChunk): AudioChunk;
639
645
  }
640
646
  declare class DuplicateChannelsNode extends TransformNode<DuplicateChannelsProperties> {
641
- static readonly moduleName = "Duplicate Channels";
647
+ static readonly nodeName = "Duplicate Channels";
642
648
  static readonly packageName: string;
643
649
  static readonly packageVersion: string;
644
- static readonly moduleDescription = "Duplicate a mono signal into multiple identical output channels";
650
+ static readonly nodeDescription = "Duplicate a mono signal into multiple identical output channels; requires exactly 1 input channel, throws otherwise";
645
651
  static readonly schema: z.ZodObject<{
646
652
  channels: z.ZodDefault<z.ZodNumber>;
647
653
  }, z.core.$strip>;
@@ -664,10 +670,10 @@ declare class GainStream extends BufferedTransformStream<GainProperties> {
664
670
  _unbuffer(chunk: AudioChunk): AudioChunk;
665
671
  }
666
672
  declare class GainNode extends TransformNode<GainProperties> {
667
- static readonly moduleName = "Gain";
673
+ static readonly nodeName = "Gain";
668
674
  static readonly packageName: string;
669
675
  static readonly packageVersion: string;
670
- static readonly moduleDescription = "Adjust signal level by a fixed amount in dB";
676
+ static readonly nodeDescription = "Adjust signal level by a fixed amount in dB";
671
677
  static readonly schema: z.ZodObject<{
672
678
  gain: z.ZodDefault<z.ZodNumber>;
673
679
  }, z.core.$strip>;
@@ -686,22 +692,14 @@ declare const schema$9: z.ZodObject<{
686
692
  }, z.core.$strip>;
687
693
  interface PanProperties extends z.infer<typeof schema$9>, TransformNodeProperties {
688
694
  }
689
- /**
690
- * Pan transform.
691
- * - Mono input (1 ch): equal-power pan to stereo.
692
- * - Stereo input (2 ch): balance (pan shifts gain between existing L/R).
693
- * - More than 2 channels: throws (unsupported).
694
- *
695
- * Equal-power law: L = cos(θ), R = sin(θ), where θ = (pan + 1) / 2 * π/2.
696
- */
697
695
  declare class PanStream extends BufferedTransformStream<PanProperties> {
698
696
  _unbuffer(chunk: AudioChunk): AudioChunk;
699
697
  }
700
698
  declare class PanNode extends TransformNode<PanProperties> {
701
- static readonly moduleName = "Pan";
699
+ static readonly nodeName = "Pan";
702
700
  static readonly packageName: string;
703
701
  static readonly packageVersion: string;
704
- static readonly moduleDescription = "Position mono signal in stereo field or adjust stereo balance";
702
+ static readonly nodeDescription = "Position mono signal in stereo field or adjust stereo balance; throws for inputs with more than 2 channels";
705
703
  static readonly schema: z.ZodObject<{
706
704
  pan: z.ZodDefault<z.ZodNumber>;
707
705
  }, z.core.$strip>;
@@ -744,10 +742,10 @@ declare class FfmpegStream<P extends FfmpegProperties = FfmpegProperties> extend
744
742
  _teardown(): Promise<void>;
745
743
  }
746
744
  declare class FfmpegNode<P extends FfmpegProperties = FfmpegProperties> extends TransformNode<P> {
747
- static readonly moduleName: string;
745
+ static readonly nodeName: string;
748
746
  static readonly packageName: string;
749
747
  static readonly packageVersion: string;
750
- static readonly moduleDescription: string;
748
+ static readonly nodeDescription: string;
751
749
  static readonly schema: z.ZodType;
752
750
  static is(value: unknown): value is FfmpegNode;
753
751
  readonly type: ReadonlyArray<string>;
@@ -762,56 +760,6 @@ declare function ffmpeg(options: {
762
760
  id?: string;
763
761
  }): FfmpegNode;
764
762
 
765
- /**
766
- * Schema for the loudnessTarget node.
767
- *
768
- * Fits a source to a `(LUFS, true-peak)` target pair via a single
769
- * level-indexed gain curve with a peak-respecting smoothed gain
770
- * envelope. The curve carries an upper-arm peak anchor that gives
771
- * structural control over `targetTp` in the same envelope that lands
772
- * LUFS. See design-loudness-target §"Parameters" for the parameter
773
- * rationale and §"Two-pass node structure" for the stream structure.
774
- *
775
- * `pivot` is optional; when undefined the node derives it from
776
- * `median(considered LRA blocks)` (BS.1770 / EBU R128 two-stage gate)
777
- * on the pass-1 measurement — see design-loudness-target §"Pivot
778
- * semantic — lower bound of the gain-riding zone". `floor` is
779
- * optional; when undefined the curve has no pass-through region and
780
- * applies uniform body gain B below pivot. The `.refine()` enforces
781
- * `floor < pivot` only when both are set; per-field `.lt(0)` still
782
- * constrains each to dB < 0 when supplied.
783
- *
784
- * Iteration is 2D joint on `(B, peakGainDb)`. `limitDb` is set ONCE
785
- * from the measurement (or an explicit override) and is constant across
786
- * attempts. Initial `B` is seeded by a histogram-based LUFS predictor
787
- * (per `plan-loudness-target-deterministic` 2026-05-13 revert) so
788
- * attempt 1 lands close to target and the secant converges in fewer
789
- * attempts. Initial `peakGainDb` is the closed-form `effectiveTargetTp
790
- * − limitDb`; per-attempt proportional feedback on TP overshoot moves
791
- * it from there. LRA falls out as a consequence of the resulting
792
- * geometry — there is no LRA target axis.
793
- *
794
- * `targetTp` is the do-no-harm-default peak axis:
795
- * - `targetTp` undefined → `effectiveTargetTp = sourcePeakDb` and
796
- * `peakGainDb` collapses to 0; peaks track body lift unchanged.
797
- *
798
- * `limitDb` is the limit-anchor override. Default behaviour:
799
- * - unset → top-down percentile walk over the source's 4×-rate
800
- * detection-envelope histogram (`measureSource`'s `limitAutoDb`),
801
- * parameterised by `limitPercentile`.
802
- * - set → fix the limit anchor at this value (clamped to the per-
803
- * source feasible window inside the iterator).
804
- *
805
- * `limitPercentile` selects the brick-wall threshold's statistical
806
- * quantile on the detection histogram: with default `0.995` the top
807
- * 0.5 % of detection samples sit above `limitAutoDb` and brick-wall at
808
- * the target ceiling. Higher values → less limiting (tighter quantile);
809
- * lower values → more aggressive limiting.
810
- *
811
- * `smoothing` is the peak-respecting envelope time constant in ms;
812
- * collapses `K = W` window-half-width and bidirectional IIR time
813
- * constant into one user parameter.
814
- */
815
763
  declare const schema$8: z.ZodObject<{
816
764
  targetLufs: z.ZodDefault<z.ZodNumber>;
817
765
  pivot: z.ZodOptional<z.ZodNumber>;
@@ -827,79 +775,29 @@ declare const schema$8: z.ZodObject<{
827
775
  interface LoudnessTargetProperties extends z.infer<typeof schema$8>, TransformNodeProperties {
828
776
  }
829
777
  declare class LoudnessTargetStream extends BufferedTransformStream<LoudnessTargetProperties> {
830
- /**
831
- * BASE-rate peak-respecting smoothed gain envelope produced by the
832
- * winning iteration attempt, held as a disk-backed single-channel
833
- * `ChunkBuffer` of size `frames` (post the 2026-05-13 base-rate-
834
- * downstream rewrite; no `× OVERSAMPLE_FACTOR` factor). The
835
- * envelope is read chunk-by-chunk in `_unbuffer` rather than held
836
- * as a flat `Float32Array` — keeps RAM at ~10 MB regardless of
837
- * source length. `null` when the stream passes through (silent /
838
- * sub-block-length source).
839
- */
840
778
  private winningSmoothedEnvelopeBuffer;
841
- /**
842
- * Body gain `B` from the winning iteration attempt. `null` when the
843
- * stream passes through (no curve was learned). Diagnostic only —
844
- * the apply pass uses the materialised envelope, not `B` directly.
845
- */
846
779
  private winningB;
847
- /**
848
- * Limit anchor `limitDb` used for this source — constant across
849
- * iteration attempts. Sourced from `limitDbOverride` when explicit,
850
- * else from the percentile-derived `limitAutoDb` on the source's
851
- * detection-envelope histogram, else `sourcePeakDb` (no limiting).
852
- * `null` when the stream passes through. Diagnostic only.
853
- */
854
780
  private winningLimitDb;
855
- /**
856
- * `peakGainDb` from the winning attempt — the upper-segment right-
857
- * endpoint anchor gain. Starts at the closed-form
858
- * `effectiveTargetTp − limitDb` and adjusts via proportional
859
- * feedback on observed signed TP error. `null` when the stream
860
- * passes through.
861
- */
862
781
  private winningPeakGainDb;
863
- /**
864
- * Set to `true` by the first `_unbuffer` call so the
865
- * `winningSmoothedEnvelopeBuffer`'s read cursor is rewound exactly
866
- * once. The envelope is read-only in `_unbuffer` and consumed
867
- * forward in chunk-cadence lockstep with upstream chunks; this
868
- * lazy-reset pattern keeps the cursor management out of `_setup`.
869
- * Post the 2026-05-13 base-rate-downstream rewrite the
870
- * upsampled-source cache no longer exists — `_unbuffer` reads
871
- * source samples directly from the framework-provided chunk.
872
- */
873
782
  private unbufferCursorsReady;
874
- /**
875
- * Per-chunk wall-clock time spent in `_unbuffer`. Post the
876
- * 2026-05-13 base-rate-downstream rewrite, `_unbuffer` is a pure
877
- * base-rate multiply per chunk (no upsample, no downsample, no
878
- * AA filter — the smoothed envelope is bandlimited far below
879
- * base-rate Nyquist, so the multiply introduces no high-frequency
880
- * content). Accumulated across all `_unbuffer` calls.
881
- */
783
+ private measurementAccumulator?;
784
+ private capturedDetectionEnvelope;
882
785
  unbufferElapsedMs: number;
883
- /**
884
- * Wall-clock breakdown of the learn pass. `iteration` is the wall
885
- * time spent inside `iterateForTargets`. `detection` stays at 0 for
886
- * QA-driver log parity — detection-envelope build cost is folded
887
- * into `iteration`.
888
- */
889
786
  learnTimingMs: {
890
787
  sourceMeasurement: number;
891
788
  detection: number;
892
789
  iteration: number;
893
790
  };
791
+ _buffer(chunk: AudioChunk, buffer: ChunkBuffer): Promise<void>;
894
792
  _process(buffer: ChunkBuffer): Promise<void>;
895
793
  _teardown(): Promise<void>;
896
794
  _unbuffer(chunk: AudioChunk): Promise<AudioChunk>;
897
795
  }
898
796
  declare class LoudnessTargetNode extends TransformNode<LoudnessTargetProperties> {
899
- static readonly moduleName = "Loudness Target";
797
+ static readonly nodeName = "Loudness Target";
900
798
  static readonly packageName: string;
901
799
  static readonly packageVersion: string;
902
- static readonly moduleDescription = "Peak-aware content-adaptive curve fitting (LUFS, true-peak, LRA) via a single combined gain envelope with a peak-respecting two-stage smoother. The upper-arm peak anchor jointly iterates with the body gain to land both LUFS and true-peak targets in one envelope.";
800
+ static readonly nodeDescription = "Peak-aware content-adaptive curve fitting (LUFS, true-peak, LRA) via a single combined gain envelope with a peak-respecting two-stage smoother. The upper-arm peak anchor jointly iterates with the body gain to land both LUFS and true-peak targets in one envelope.";
903
801
  static readonly schema: z.ZodObject<{
904
802
  targetLufs: z.ZodDefault<z.ZodNumber>;
905
803
  pivot: z.ZodOptional<z.ZodNumber>;
@@ -939,14 +837,16 @@ interface LoudnessNormalizeProperties extends z.infer<typeof schema$7>, Transfor
939
837
  }
940
838
  declare class LoudnessNormalizeStream extends BufferedTransformStream<LoudnessNormalizeProperties> {
941
839
  private gain;
942
- _process(buffer: ChunkBuffer): Promise<void>;
840
+ private accumulator?;
841
+ _buffer(chunk: AudioChunk, buffer: ChunkBuffer): Promise<void>;
842
+ _process(_buffer: ChunkBuffer): void;
943
843
  _unbuffer(chunk: AudioChunk): AudioChunk;
944
844
  }
945
845
  declare class LoudnessNormalizeNode extends TransformNode<LoudnessNormalizeProperties> {
946
- static readonly moduleName = "Loudness Normalize";
846
+ static readonly nodeName = "Loudness Normalize";
947
847
  static readonly packageName: string;
948
848
  static readonly packageVersion: string;
949
- static readonly moduleDescription = "Measure integrated loudness (BS.1770) and apply a single linear gain to hit a target LUFS \u2014 no limiting, no dynamics";
849
+ static readonly nodeDescription = "Measure integrated loudness (BS.1770) and apply a single linear gain to hit a target LUFS \u2014 no limiting, no dynamics";
950
850
  static readonly schema: z.ZodObject<{
951
851
  target: z.ZodDefault<z.ZodNumber>;
952
852
  }, z.core.$strip>;
@@ -968,14 +868,16 @@ interface TruePeakNormalizeProperties extends z.infer<typeof schema$6>, Transfor
968
868
  }
969
869
  declare class TruePeakNormalizeStream extends BufferedTransformStream<TruePeakNormalizeProperties> {
970
870
  private gain;
971
- _process(buffer: ChunkBuffer): Promise<void>;
871
+ private accumulator?;
872
+ _buffer(chunk: AudioChunk, buffer: ChunkBuffer): Promise<void>;
873
+ _process(_buffer: ChunkBuffer): void;
972
874
  _unbuffer(chunk: AudioChunk): AudioChunk;
973
875
  }
974
876
  declare class TruePeakNormalizeNode extends TransformNode<TruePeakNormalizeProperties> {
975
- static readonly moduleName = "True Peak Normalize";
877
+ static readonly nodeName = "True Peak Normalize";
976
878
  static readonly packageName: string;
977
879
  static readonly packageVersion: string;
978
- static readonly moduleDescription = "Measure source true peak (4\u00D7 upsampled, BS.1770-4 style) and apply a single linear gain to hit a target dBTP";
880
+ static readonly nodeDescription = "Measure source true peak (4\u00D7 upsampled, BS.1770-4 style) and apply a single linear gain to hit a target dBTP";
979
881
  static readonly schema: z.ZodObject<{
980
882
  target: z.ZodDefault<z.ZodNumber>;
981
883
  }, z.core.$strip>;
@@ -1001,149 +903,22 @@ interface CrestReduceProperties extends z.infer<typeof schema$5>, TransformNodeP
1001
903
  declare class CrestReduceStream extends BufferedTransformStream<CrestReduceProperties> {
1002
904
  private fftBackend?;
1003
905
  private fftAddonOptions?;
1004
- /**
1005
- * Whole-file transformed output as a node-owned, disk-backed
1006
- * `ChunkBuffer` (the `loudnessTarget` `winningSmoothedEnvelopeBuffer`
1007
- * precedent — NOT a stream-resident full-length `Float32Array`, which
1008
- * was the design-streaming.md materialization anti-pattern Phase 2
1009
- * removes). `_process` writes the produced output here at flush;
1010
- * `_unbuffer` serves it chunk-by-chunk. `null` when the stream passes
1011
- * through (no audio or a sub-frame input — there is no `strength`
1012
- * bypass after the 2026-05-17 keystone; the node always runs the
1013
- * gate/search/lattice path), in which case `_unbuffer` emits the
1014
- * input verbatim (the length-preserving passthrough fallback).
1015
- */
1016
- private outputBuffer;
1017
- /**
1018
- * Set `true` by the first `_unbuffer` call so `outputBuffer`'s read
1019
- * cursor is rewound exactly once (it is at end-of-buffer after
1020
- * `_process`'s streaming production write). Rewound lazily in
1021
- * `_unbuffer` — after `_process` finished — not eagerly, so a stable
1022
- * cursor state exists (the `loudnessTarget` `unbufferCursorsReady`
1023
- * precedent).
1024
- */
1025
- private unbufferCursorReady;
906
+ private truePeakAccumulator?;
907
+ private smoothedTrajectory?;
908
+ private applyOrder;
909
+ private applyHopSize;
910
+ private applyState?;
1026
911
  _setup(input: ReadableStream<AudioChunk>, context: StreamContext): Promise<ReadableStream<AudioChunk>>;
1027
912
  private get hopSize();
1028
- /**
1029
- * Whole-file processing at flush (the `loudnessTarget` accumulate-then-
1030
- * process precedent — `bufferSize === WHOLE_FILE`, so the framework hands
1031
- * the ENTIRE accumulated signal in one `_process` call). The SINGLE
1032
- * realization (2026-05-16 FUNDAMENTAL REFRAME — the normalized
1033
- * Gray–Markel lossless-lattice phase rotator; `spectral` and the
1034
- * `realization` parameter removed):
1035
- *
1036
- * The 2026-05-17 KEYSTONE rework — SINGLE-PASS, per-binding-peak
1037
- * Item-7 search over a TP-DRIVEN gate and a TP-DRIVEN commit
1038
- * objective; NO `strength` (the node always applies the optimal
1039
- * value); NO whole-signal never-worsen veto (the only never-worsen
1040
- * is the per-window commit-only-if-better intrinsic to the Item-7
1041
- * search):
1042
- *
1043
- * 1. WHOLE-SIGNAL 4× true peak + its input-sample index measured
1044
- * ONCE — a SEQUENTIAL CHUNKED WALK driving per-channel BS.1770-4
1045
- * 4× `TruePeakUpsampler`s directly
1046
- * (`measureBufferTruePeakWithArgmax`; 12-tap history carries
1047
- * across `upsample` so chunk boundaries are invisible). The dBTP
1048
- * is the gate's proximity reference; `peakInputSample`
1049
- * force-binds the analysis frame containing the file's global
1050
- * 4× true peak.
1051
- * 2. EXTRACT + TP-DRIVEN GATE + ITEM-7 SEARCH, one streaming
1052
- * sliding-window pass — `streamLatticeTrajectory(buffer, …,
1053
- * { globalTruePeakDb, peakInputSample, sampleRate, lambda })`: a
1054
- * `frameSize` ring of the linked-stereo sum + ONE per channel,
1055
- * computed on the fly (NO whole-signal array). Per hop the
1056
- * grounded Abel & Smith (Item 9) + RMV §III step-down (Item 8)
1057
- * reflection row is fitted VERBATIM; the frame is classified by
1058
- * the TP-DRIVEN gate predicate (`isBindingPeak` —
1059
- * `peakPriorityAmount` headroom AND ( the window's OWN
1060
- * per-channel 4× true peak within BINDING_DELTA_DB of the global
1061
- * 4× true peak, SAME true-peak domain — OR the global-4×-TP
1062
- * frame, force-bound ); `binding.ts` UNFROZEN); an ACTIVE-band
1063
- * peak frame runs the §Algorithm Specification Item-7 search
1064
- * (`searchBindingPeak`, Hong/Kim/Har 2011 §3; `search.ts`
1065
- * UNFROZEN — its COMMIT OBJECTIVE is the cross-channel 4×
1066
- * true-peak power, the Eq. 7–9 φ′ raw-sample recurrence kept as
1067
- * the candidate-proposal direction only) over the PER-CHANNEL
1068
- * windows with the FULL group-delay-ceiling λ — its committed
1069
- * scale (commit-only-if-better on the 4× TP power; identity
1070
- * `c=0` is the guaranteed floor) is the per-active-peak OPTIMAL
1071
- * decorrelation value; a NON-active frame's envelope value is 0.
1072
- * There is NO `strength` (λ is ALWAYS the full ceiling,
1073
- * `groupDelayLambda`). The O(frames) trajectory IS the
1074
- * decorrelation envelope (the ONLY resident product besides
1075
- * bounded scratch).
1076
- * 2b. COMBINE the envelope (the 2026-05-17 PER-PEAK-EXACT model):
1077
- * `smoothControlTrajectory` = `max` of a per-peak EXACT-OPTIMAL
1078
- * flat hold centered on the PEAK SAMPLE `n_i` (half-width
1079
- * `exactHoldHalfWidthFrames(sampleRate, hopSize)` — the
1080
- * group-delay span, NEVER `smoothing`) that pins the EXACT
1081
- * Item-7 optimal at every binding peak so whole-signal
1082
- * true-peak reduction is `smoothing`-INVARIANT, and a
1083
- * `smoothing`-driven bidirectional zero-phase SPILL
1084
- * (transient-asymmetry pullback pre-pass THEN forward+backward
1085
- * `BidirectionalIir` on the trajectory's FRAME-RATE axis,
1086
- * τ = (ms/1000)·√2 internal to `BidirectionalIir`) whose ONLY
1087
- * effect is decorrelation spill into the gated gaps + easing
1088
- * between active values. HARD RULE (design §Rejected
1089
- * Approaches): both passes are on the CONTROL trajectory ONLY —
1090
- * NEVER the audio.
1091
- * 3. ONE streaming PRODUCTION pass over the committed
1092
- * per-peak-exact + bidirectionally-SMOOTHED decorrelation
1093
- * envelope. `streamLatticeApply` is the byte-faithful
1094
- * `processLatticeChannel` transcription (lattice.ts BYTE-FROZEN)
1095
- * and is called with the literal `1` for its internal
1096
- * transcribed scalar (an identity no-op at the call site — an
1097
- * internal arg of the verbatim transcription, NOT a public
1098
- * surface; there is no `strength`). There is NO whole-signal
1099
- * never-worsen veto (removed — the per-window
1100
- * commit-only-if-better in the Item-7 search is the only
1101
- * never-worsen) and NO per-sample binding gate / edge crossfade:
1102
- * a non-active segment is the lattice at eased-to-zero
1103
- * coefficients (a crest-invariant pure delay). Each output chunk
1104
- * is written straight into the node-owned output `ChunkBuffer`
1105
- * (served chunk-by-chunk by `_unbuffer`). The streamed lattice
1106
- * output is BIT-IDENTICAL to processing one contiguous array.
1107
- *
1108
- * NO whole-signal `Float32Array` exists anywhere — the
1109
- * design-streaming.md materialization anti-pattern is GENUINELY
1110
- * eliminated (not relocated). Resident state: the O(frames) trajectory
1111
- * + mask + bounded ring (sum + per-channel) / accumulator / chunk
1112
- * scratch.
1113
- *
1114
- * There is NO node-level bypass (the `strength` parameter and its
1115
- * `strength <= 0` early-return were removed by the 2026-05-17
1116
- * keystone). The only passthrough is the length-preserving fallback
1117
- * for no audio / a sub-frame input (no analysis frame fits) —
1118
- * `_unbuffer` then emits the input verbatim.
1119
- */
913
+ _buffer(chunk: AudioChunk, buffer: ChunkBuffer): Promise<void>;
1120
914
  _process(buffer: ChunkBuffer): Promise<void>;
1121
- /**
1122
- * Serve the whole-file transformed output sequentially in chunk cadence
1123
- * from the node-owned disk-backed `ChunkBuffer` (the `loudnessTarget`
1124
- * `_unbuffer` precedent — read forward in chunk-cadence lockstep with
1125
- * upstream chunks; NO overlap re-feed since `bufferSize === WHOLE_FILE`).
1126
- * When no transform was produced (no audio or a sub-frame input —
1127
- * there is no `strength` bypass after the 2026-05-17 keystone) the
1128
- * input chunk is emitted VERBATIM — the length-preserving passthrough
1129
- * fallback (nothing mutated, same backing arrays).
1130
- */
1131
- _unbuffer(chunk: AudioChunk): Promise<AudioChunk | undefined>;
1132
- /**
1133
- * Idempotent cleanup of the node-owned output `ChunkBuffer` so its
1134
- * backing temp file is released on EVERY exit path — not only graceful
1135
- * end-of-stream (the 2026-05-12 `_teardown`-guaranteed-cleanup
1136
- * Decision; the `loudnessTarget` precedent). `BufferedTransformStream`
1137
- * already closes its own accumulation `chunkBuffer` in `teardown()`;
1138
- * this node-owned extra buffer needs its own release.
1139
- */
1140
- _teardown(): Promise<void>;
915
+ _unbuffer(chunk: AudioChunk): AudioChunk | undefined;
1141
916
  }
1142
917
  declare class CrestReduceNode extends TransformNode<CrestReduceProperties> {
1143
- static readonly moduleName = "Crest Reduce";
918
+ static readonly nodeName = "Crest Reduce";
1144
919
  static readonly packageName: string;
1145
920
  static readonly packageVersion: string;
1146
- static readonly moduleDescription = "Content-adaptive, magnitude-preserving, phase-only crest-factor reducer \u2014 a pre-limiter headroom stage that rearranges signal phase to flatten true-peak excursions without changing the magnitude spectrum, never increasing crest factor";
921
+ static readonly nodeDescription = "Content-adaptive, magnitude-preserving, phase-only crest-factor reducer \u2014 a pre-limiter headroom stage that rearranges signal phase to flatten true-peak excursions without changing the magnitude spectrum, never increasing crest factor";
1147
922
  static readonly schema: z.ZodObject<{
1148
923
  smoothing: z.ZodDefault<z.ZodNumber>;
1149
924
  frameSize: z.ZodDefault<z.ZodNumber>;
@@ -1182,42 +957,6 @@ declare const schema$4: z.ZodObject<{
1182
957
  }, z.core.$strip>;
1183
958
  interface DeBleedProperties extends z.infer<typeof schema$4>, TransformNodeProperties {
1184
959
  }
1185
- /**
1186
- * Adaptive de-bleed node — MEF FDAF Kalman + MWF + Lukin-Todd post-filter.
1187
- *
1188
- * Pipeline per design-de-bleed.md "2026-05-01: Replace stages 1+2 with MEF":
1189
- *
1190
- * - **Stage 0 (MSAD)**: per-band SNR thresholding to gate Kalman update and
1191
- * trigger ISP restoration.
1192
- * - **Stage 1 (FDAF Kalman)**: per-frame frequency-domain Kalman update
1193
- * on `Ĥ_{m,μ}(ℓ,k)` per (target, reference) pair.
1194
- * - **Stage 2 (MWF)**: per-frame Wiener gain mask with per-interferer PSD
1195
- * `Φ̂_{D̂D̂,m} = |D̂_m^total|²` smoothed temporally (β = 0.5 MEF default).
1196
- * - **Stage 3 (NLM + DFTT)**: Lukin-Todd 2D smoothing of the gain mask.
1197
- * - **Stage 4 (synthesis)**: iSTFT of the masked target STFT.
1198
- *
1199
- * **IO pattern** (post chunk-buffer-sequential-api refactor): the target
1200
- * `buffer` is treated as read-only during `_process`; a fresh `outputBuffer`
1201
- * is allocated, all processed audio is streamed sequentially into it, then the
1202
- * input buffer is cleared and the output is stream-copied back. The
1203
- * `WindowReader` helper maintains a per-buffer sample-domain scratch that
1204
- * advances in lockstep with the outer chunk loop — replacing the prior
1205
- * offset-based reads against the input buffer. References use the same
1206
- * `WindowReader` pattern, driven in lockstep with the target.
1207
- *
1208
- * **Outer-loop ordering**: all channels processed in lockstep per chunk
1209
- * (option A from the Phase 6 plan). The per-channel algorithmic state
1210
- * (Kalman, MWF PSD, MSAD, ISP) has no cross-channel coupling, so reordering
1211
- * the inherent two nested loops from `for ch: for chunk` to
1212
- * `for chunk: for ch` is a pure refactor with no algorithmic effect. This is
1213
- * required by the new sequential ChunkBuffer API: `outputBuffer.write` stores
1214
- * all channels at each frame position, so we must produce all channels'
1215
- * samples for a given output frame range in one go.
1216
- *
1217
- * **Hard "do not extend" boundary** (Kokkinis): per-interferer PSD is
1218
- * `|D̂^WF|²` from the Kalman bleed estimate ONLY. No PSD envelope of target,
1219
- * no dominant-bin selection, no coherence-based interferer-PSD estimator.
1220
- */
1221
960
  declare class DeBleedStream extends BufferedTransformStream<DeBleedProperties> {
1222
961
  private fftBackend?;
1223
962
  private fftAddonOptions?;
@@ -1228,28 +967,14 @@ declare class DeBleedStream extends BufferedTransformStream<DeBleedProperties> {
1228
967
  private numBins;
1229
968
  _setup(input: ReadableStream<AudioChunk>, context: StreamContext): Promise<ReadableStream<AudioChunk>>;
1230
969
  _teardown(): Promise<void>;
1231
- /**
1232
- * Run the first-N-seconds warm-up scan across all target channels and all
1233
- * references in a single sequential pass over each buffer.
1234
- *
1235
- * Each buffer is rewound to its start, then sequentially read for
1236
- * `warmupSamples` real samples. STFTs are computed once per buffer (one
1237
- * STFT per channel for the multi-channel target, one STFT per reference
1238
- * for the references). Per-channel cross-spectral accumulators then
1239
- * consume the pre-computed STFTs.
1240
- *
1241
- * Returns a `channels × refCount` array of `TransferFunction` seeds:
1242
- * `seedsByChannel[ch][refIndex]`. Degeneracy validation and cold-start
1243
- * fallback per `validateTransferSeed`.
1244
- */
1245
970
  private warmupSeedsAllChannels;
1246
971
  _process(buffer: ChunkBuffer): Promise<void>;
1247
972
  }
1248
973
  declare class DeBleedNode extends TransformNode<DeBleedProperties> {
1249
- static readonly moduleName = "De-Bleed Adaptive";
974
+ static readonly nodeName = "De-Bleed Adaptive";
1250
975
  static readonly packageName: string;
1251
976
  static readonly packageVersion: string;
1252
- static readonly moduleDescription = "Adaptive (MEF FDAF Kalman + MWF + MSAD) reference-based microphone bleed reduction. Stages 1+2 are MEF Meyer-Elshamy-Fingscheidt 2020; Stage 3 is Lukin-Todd 2D NLM+DFTT post-filter.";
977
+ static readonly nodeDescription = "Adaptive (MEF FDAF Kalman + MWF + MSAD) reference-based microphone bleed reduction. Stages 1+2 are MEF Meyer-Elshamy-Fingscheidt 2020; Stage 3 is Lukin-Todd 2D NLM+DFTT post-filter.";
1253
978
  static readonly schema: z.ZodObject<{
1254
979
  references: z.ZodDefault<z.ZodArray<z.ZodString>>;
1255
980
  reductionStrength: z.ZodDefault<z.ZodNumber>;
@@ -1301,10 +1026,10 @@ declare class DeepFilterNet3Stream extends BufferedTransformStream<DeepFilterNet
1301
1026
  _teardown(): void;
1302
1027
  }
1303
1028
  declare class DeepFilterNet3Node extends TransformNode<DeepFilterNet3Properties> {
1304
- static readonly moduleName = "DeepFilterNet3 (Denoiser)";
1029
+ static readonly nodeName = "DeepFilterNet3 (Denoiser)";
1305
1030
  static readonly packageName: string;
1306
1031
  static readonly packageVersion: string;
1307
- static readonly moduleDescription = "Remove background noise from speech using DeepFilterNet3 (48 kHz full-band CRN)";
1032
+ static readonly nodeDescription = "Remove background noise from speech using DeepFilterNet3 (48 kHz full-band CRN)";
1308
1033
  static readonly schema: z.ZodObject<{
1309
1034
  modelPath: z.ZodDefault<z.ZodString>;
1310
1035
  ffmpegPath: z.ZodDefault<z.ZodString>;
@@ -1347,10 +1072,10 @@ declare class DtlnStream extends BufferedTransformStream<DtlnProperties> {
1347
1072
  private runMainPass;
1348
1073
  }
1349
1074
  declare class DtlnNode extends TransformNode<DtlnProperties> {
1350
- static readonly moduleName = "DTLN (Denoiser)";
1075
+ static readonly nodeName = "DTLN (Denoiser)";
1351
1076
  static readonly packageName: string;
1352
1077
  static readonly packageVersion: string;
1353
- static readonly moduleDescription = "Remove background noise from speech using DTLN neural network";
1078
+ static readonly nodeDescription = "Remove background noise from speech using DTLN neural network";
1354
1079
  static readonly schema: z.ZodObject<{
1355
1080
  modelPath1: z.ZodDefault<z.ZodString>;
1356
1081
  modelPath2: z.ZodDefault<z.ZodString>;
@@ -1399,10 +1124,10 @@ declare class HtdemucsStream extends BufferedTransformStream<HtdemucsProperties>
1399
1124
  private emitStable;
1400
1125
  }
1401
1126
  declare class HtdemucsNode extends TransformNode<HtdemucsProperties> {
1402
- static readonly moduleName = "HTDemucs (Stem Separator)";
1127
+ static readonly nodeName = "HTDemucs (Stem Separator)";
1403
1128
  static readonly packageName: string;
1404
1129
  static readonly packageVersion: string;
1405
- static readonly moduleDescription = "Rebalance stem volumes using HTDemucs source separation";
1130
+ static readonly nodeDescription = "Rebalance stem volumes using HTDemucs source separation";
1406
1131
  static readonly schema: z.ZodObject<{
1407
1132
  modelPath: z.ZodDefault<z.ZodString>;
1408
1133
  ffmpegPath: z.ZodDefault<z.ZodString>;
@@ -1441,10 +1166,10 @@ declare class KimVocal2Stream extends BufferedTransformStream<KimVocal2Propertie
1441
1166
  private emitStable;
1442
1167
  }
1443
1168
  declare class KimVocal2Node extends TransformNode<KimVocal2Properties> {
1444
- static readonly moduleName = "Kim Vocal 2 (Stem Separator)";
1169
+ static readonly nodeName = "Kim Vocal 2 (Stem Separator)";
1445
1170
  static readonly packageName: string;
1446
1171
  static readonly packageVersion: string;
1447
- static readonly moduleDescription = "Isolate dialogue from background using MDX-Net vocal separation";
1172
+ static readonly nodeDescription = "Isolate dialogue from background using MDX-Net vocal separation";
1448
1173
  static readonly schema: z.ZodObject<{
1449
1174
  modelPath: z.ZodDefault<z.ZodString>;
1450
1175
  ffmpegPath: z.ZodDefault<z.ZodString>;
@@ -1471,47 +1196,14 @@ interface VstStage {
1471
1196
  readonly pluginPath: string;
1472
1197
  readonly pluginName?: string;
1473
1198
  readonly presetPath?: string;
1474
- /**
1475
- * Optional parameter overrides applied after `presetPath` loads. Keys map
1476
- * to Pedalboard parameter names exposed by the plugin (lowercase / snake-
1477
- * cased identifiers — see `plugin.parameters` in Pedalboard). Useful for
1478
- * plugins whose on-disk preset format Pedalboard's `load_preset` rejects
1479
- * (e.g. Waves XPst inside a VST3 wrapper) but whose parameter surface is
1480
- * reachable directly.
1481
- */
1482
- readonly parameters?: Readonly<Record<string, number | string | boolean>>;
1483
1199
  }
1484
1200
 
1485
1201
  interface Vst3Properties extends TransformNodeProperties {
1486
1202
  readonly vstHostPath: string;
1487
1203
  readonly stages: ReadonlyArray<VstStage>;
1488
1204
  readonly bypass?: boolean;
1489
- /**
1490
- * Extra args appended after the canonical CLI args. Test-only; allows the
1491
- * unit tests to spawn `node <stub.mjs>` by passing `node` as `vstHostPath`
1492
- * and `[stub.mjs]` here.
1493
- */
1494
1205
  readonly extraArgs?: ReadonlyArray<string>;
1495
1206
  }
1496
- /**
1497
- * Whole-file VST3 chain stream. The framework drives `_process` exactly once
1498
- * (after the upstream EOF flushes the accumulated buffer at `bufferSize:
1499
- * WHOLE_FILE`). The buffer is streamed through a `vst-host` subprocess that
1500
- * runs Pedalboard's offline mode (`reset=True`) over the configured chain;
1501
- * Pedalboard handles plugin delay compensation internally so the returned
1502
- * audio is sample-aligned with the input — no leading silence, no tail loss.
1503
- *
1504
- * Memory discipline: although `bufferSize: WHOLE_FILE` schedules the
1505
- * `_process` call after EOF, the JS-side memory cost is bounded.
1506
- * `processStreamingThroughVstHost` drains the buffer to subprocess stdin in
1507
- * `CHUNK_FRAMES`-sized chunks, then `clear()`s the buffer (Pedalboard's
1508
- * offline mode has captured the full input internally by then), then drains
1509
- * subprocess stdout chunk-by-chunk back into the SAME buffer. No temp
1510
- * ChunkBuffer, no stream-copy phase. Disk usage stays at 1× source size.
1511
- * The subprocess holds the full interleaved input in its own RAM
1512
- * (Pedalboard's offline-mode constraint), but that's not part of the Node
1513
- * heap.
1514
- */
1515
1207
  declare class Vst3Stream<P extends Vst3Properties = Vst3Properties> extends BufferedTransformStream<P> {
1516
1208
  private streamContext?;
1517
1209
  private stagesJsonPath?;
@@ -1521,10 +1213,10 @@ declare class Vst3Stream<P extends Vst3Properties = Vst3Properties> extends Buff
1521
1213
  _teardown(): Promise<void>;
1522
1214
  }
1523
1215
  declare class Vst3Node<P extends Vst3Properties = Vst3Properties> extends TransformNode<P> {
1524
- static readonly moduleName: string;
1216
+ static readonly nodeName: string;
1525
1217
  static readonly packageName: string;
1526
1218
  static readonly packageVersion: string;
1527
- static readonly moduleDescription: string;
1219
+ static readonly nodeDescription: string;
1528
1220
  static readonly schema: z.ZodType;
1529
1221
  static is(value: unknown): value is Vst3Node;
1530
1222
  readonly type: ReadonlyArray<string>;