@grame/faustwasm 0.14.2 → 0.15.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grame/faustwasm",
3
- "version": "0.14.2",
3
+ "version": "0.15.0",
4
4
  "description": "WebAssembly version of Faust Compiler",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -1,4 +1,5 @@
1
1
  import {
2
+ InputParamHandler,
2
3
  OutputParamHandler,
3
4
  ComputeHandler,
4
5
  PlotHandler,
@@ -27,6 +28,7 @@ export class FaustAudioWorkletNode<
27
28
  protected fJSON: string;
28
29
  protected fInputsItems: string[];
29
30
  protected fOutputHandler: OutputParamHandler | null;
31
+ protected fInputHandler: InputParamHandler | null;
30
32
  protected fComputeHandler: ComputeHandler | null;
31
33
  protected fPlotHandler: PlotHandler | null;
32
34
  protected fUICallback: UIHandler;
@@ -60,6 +62,7 @@ export class FaustAudioWorkletNode<
60
62
  this.fJSONDsp = JSONObj;
61
63
  this.fJSON = factory.json;
62
64
  this.fOutputHandler = null;
65
+ this.fInputHandler = null;
63
66
  this.fComputeHandler = null;
64
67
  this.fPlotHandler = null;
65
68
  this.fDescriptor = [];
@@ -104,8 +107,10 @@ export class FaustAudioWorkletNode<
104
107
  }
105
108
 
106
109
  protected handleMessageAux = (e: MessageEvent) => {
107
- if (e.data.type === 'param' && this.fOutputHandler) {
110
+ if (e.data.type === 'out-param' && this.fOutputHandler) {
108
111
  this.fOutputHandler(e.data.path, e.data.value);
112
+ } else if (e.data.type === 'in-param' && this.fInputHandler) {
113
+ this.fInputHandler(e.data.path, e.data.value);
109
114
  } else if (e.data.type === 'plot' && this.fPlotHandler) {
110
115
  this.fPlotHandler(e.data.value, e.data.index, e.data.events);
111
116
  }
@@ -187,8 +192,18 @@ export class FaustAudioWorkletNode<
187
192
  callOutputParamHandler(path: string, value: number) {
188
193
  if (this.fOutputHandler) {
189
194
  this.fOutputHandler(path, value);
190
- } else {
191
- console.warn('No OutputParamHandler set for this Faust node.');
195
+ }
196
+ }
197
+
198
+ setInputParamHandler(handler: InputParamHandler | null) {
199
+ this.fInputHandler = handler;
200
+ }
201
+ getInputParamHandler() {
202
+ return this.fInputHandler;
203
+ }
204
+ callInputParamHandler(path: string, value: number) {
205
+ if (this.fInputHandler) {
206
+ this.fInputHandler(path, value);
192
207
  }
193
208
  }
194
209
 
@@ -370,7 +370,10 @@ const getFaustAudioWorkletProcessor = <Poly extends boolean = false>(
370
370
 
371
371
  // Setup output handler
372
372
  this.fDSPCode.setOutputParamHandler((path, value) =>
373
- this.port.postMessage({ path, value, type: 'param' })
373
+ this.port.postMessage({ path, value, type: 'out-param' })
374
+ );
375
+ this.fDSPCode.setInputParamHandler((path, value) =>
376
+ this.port.postMessage({ path, value, type: 'in-param' })
374
377
  );
375
378
 
376
379
  this.fDSPCode.start();
@@ -425,7 +428,10 @@ const getFaustAudioWorkletProcessor = <Poly extends boolean = false>(
425
428
 
426
429
  // Setup output handler
427
430
  this.fDSPCode.setOutputParamHandler((path, value) =>
428
- this.port.postMessage({ path, value, type: 'param' })
431
+ this.port.postMessage({ path, value, type: 'out-param' })
432
+ );
433
+ this.fDSPCode.setInputParamHandler((path, value) =>
434
+ this.port.postMessage({ path, value, type: 'in-param' })
429
435
  );
430
436
 
431
437
  this.fDSPCode.start();
@@ -768,7 +768,10 @@ const getFaustFFTAudioWorkletProcessor = (
768
768
 
769
769
  // Setup output handler
770
770
  this.fDSPCode.setOutputParamHandler((path, value) =>
771
- this.port.postMessage({ path, value, type: 'param' })
771
+ this.port.postMessage({ path, value, type: 'out-param' })
772
+ );
773
+ this.fDSPCode.setInputParamHandler((path, value) =>
774
+ this.port.postMessage({ path, value, type: 'in-param' })
772
775
  );
773
776
  this.fDSPCode.setPlotHandler(this.fPlotHandler);
774
777
  const params = this.fDSPCode.getParams();
@@ -6,6 +6,7 @@ import {
6
6
  IFaustBaseWebAudioDsp,
7
7
  IFaustMonoWebAudioDsp,
8
8
  IFaustPolyWebAudioDsp,
9
+ InputParamHandler,
9
10
  MetadataHandler,
10
11
  OutputParamHandler,
11
12
  PlotHandler
@@ -116,6 +117,16 @@ export class FaustOfflineProcessor<Poly extends boolean = false> {
116
117
  this.fDSPCode.callOutputParamHandler(path, value);
117
118
  }
118
119
 
120
+ setInputParamHandler(handler: InputParamHandler) {
121
+ this.fDSPCode.setInputParamHandler(handler);
122
+ }
123
+ getInputParamHandler() {
124
+ return this.fDSPCode.getInputParamHandler();
125
+ }
126
+ callInputParamHandler(path: string, value: number) {
127
+ this.fDSPCode.callInputParamHandler(path, value);
128
+ }
129
+
119
130
  setComputeHandler(handler: ComputeHandler) {
120
131
  this.fDSPCode.setComputeHandler(handler);
121
132
  }
@@ -4,6 +4,7 @@ import type {
4
4
  FaustPolyWebAudioDsp,
5
5
  IFaustMonoWebAudioDsp,
6
6
  IFaustPolyWebAudioDsp,
7
+ InputParamHandler,
7
8
  MetadataHandler,
8
9
  OutputParamHandler,
9
10
  PlotHandler
@@ -134,6 +135,16 @@ export class FaustScriptProcessorNode<
134
135
  this.fDSPCode.callOutputParamHandler(path, value);
135
136
  }
136
137
 
138
+ setInputParamHandler(handler: InputParamHandler) {
139
+ this.fDSPCode.setInputParamHandler(handler);
140
+ }
141
+ getInputParamHandler() {
142
+ return this.fDSPCode.getInputParamHandler();
143
+ }
144
+ callInputParamHandler(path: string, value: number) {
145
+ this.fDSPCode.callInputParamHandler(path, value);
146
+ }
147
+
137
148
  setComputeHandler(handler: ComputeHandler) {
138
149
  this.fDSPCode.setComputeHandler(handler);
139
150
  }
@@ -20,6 +20,7 @@ import FaustSensors, {
20
20
 
21
21
  // Public API
22
22
  export type OutputParamHandler = (path: string, value: number) => void;
23
+ export type InputParamHandler = (path: string, value: number) => void;
23
24
  export type ComputeHandler = (buffer_size: number) => void;
24
25
  export type PlotHandler = (
25
26
  plotted: Float32Array[] | Float64Array[],
@@ -444,6 +445,7 @@ export class Soundfile {
444
445
  * DSP implementation that mimic the C++ 'dsp' class:
445
446
  * - adding MIDI control: metadata are decoded and incoming MIDI messages will control the associated controllers
446
447
  * - an output handler can be set to treat produced output controllers (like 'bargraph')
448
+ * - an input handler can be set to follow control parameter changes (like sliders)
447
449
  * - regular controllers are handled using setParamValue/getParamValue and getParams methods
448
450
  */
449
451
  export interface IFaustBaseWebAudioDsp {
@@ -467,9 +469,30 @@ export interface IFaustBaseWebAudioDsp {
467
469
  * @param path - the path to the wanted parameter (retrieved using 'getParams' method)
468
470
  * @param value - the float value for the wanted control
469
471
  */
470
-
471
472
  callOutputParamHandler(path: string, value: number): void;
472
473
 
474
+ /**
475
+ * Set the parameter input handler, to be called when input parameters change (like sliders).
476
+ *
477
+ * @param handler - the input handler
478
+ */
479
+ setInputParamHandler(handler: InputParamHandler | null): void;
480
+
481
+ /**
482
+ * Get the parameter input handler.
483
+ *
484
+ * @return the current input handler
485
+ */
486
+ getInputParamHandler(): InputParamHandler | null;
487
+
488
+ /**
489
+ * Call the input parameter handler with a path and value.
490
+ *
491
+ * @param path - the path to the wanted parameter (retrieved using 'getParams' method)
492
+ * @param value - the float value for the wanted control
493
+ */
494
+ callInputParamHandler(path: string, value: number): void;
495
+
473
496
  /**
474
497
  * Set the compute handler, to be called in the 'compute' method with buffer size.
475
498
  *
@@ -708,6 +731,7 @@ export interface IFaustPolyWebAudioNode
708
731
 
709
732
  export class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
710
733
  protected fOutputHandler: OutputParamHandler | null = null;
734
+ protected fInputHandler: InputParamHandler | null = null;
711
735
  protected fComputeHandler: ComputeHandler | null = null;
712
736
 
713
737
  // To handle MIDI events plot
@@ -1337,8 +1361,18 @@ export class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
1337
1361
  callOutputParamHandler(path: string, value: number) {
1338
1362
  if (this.fOutputHandler) {
1339
1363
  this.fOutputHandler(path, value);
1340
- } else {
1341
- console.warn('No OutputParamHandler set for this Faust node.');
1364
+ }
1365
+ }
1366
+
1367
+ setInputParamHandler(handler: InputParamHandler | null) {
1368
+ this.fInputHandler = handler;
1369
+ }
1370
+ getInputParamHandler() {
1371
+ return this.fInputHandler;
1372
+ }
1373
+ callInputParamHandler(path: string, value: number) {
1374
+ if (this.fInputHandler) {
1375
+ this.fInputHandler(path, value);
1342
1376
  }
1343
1377
  }
1344
1378
 
@@ -1551,6 +1585,7 @@ export class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
1551
1585
  destroy() {
1552
1586
  this.fDestroyed = true;
1553
1587
  this.fOutputHandler = null;
1588
+ this.fInputHandler = null;
1554
1589
  this.fComputeHandler = null;
1555
1590
  this.fPlotHandler = null;
1556
1591
  }
@@ -1800,6 +1835,7 @@ export class FaustMonoWebAudioDsp
1800
1835
  this.fPathTable[path],
1801
1836
  value
1802
1837
  );
1838
+ this.callInputParamHandler(path, this.getParamValue(path));
1803
1839
  }
1804
1840
  getParamValue(path: string) {
1805
1841
  return this.fInstance.api.getParamValue(
@@ -2403,6 +2439,7 @@ export class FaustPolyWebAudioDsp
2403
2439
  voice.setParamValue(this.fPathTable[path], value)
2404
2440
  );
2405
2441
  }
2442
+ this.callInputParamHandler(path, this.getParamValue(path));
2406
2443
  }
2407
2444
  getParamValue(path: string) {
2408
2445
  if (
@@ -413,6 +413,7 @@ export declare class FaustWasmInstantiator {
413
413
  static createSyncPolyDSPInstance(voiceFactory: LooseFaustDspFactory, mixerModule: WebAssembly.Module, voices: number, effectFactory?: LooseFaustDspFactory): FaustPolyDspInstance;
414
414
  }
415
415
  export type OutputParamHandler = (path: string, value: number) => void;
416
+ export type InputParamHandler = (path: string, value: number) => void;
416
417
  export type ComputeHandler = (buffer_size: number) => void;
417
418
  export type PlotHandler = (plotted: Float32Array[] | Float64Array[], index: number, events?: {
418
419
  type: string;
@@ -534,6 +535,7 @@ export declare class Soundfile {
534
535
  * DSP implementation that mimic the C++ 'dsp' class:
535
536
  * - adding MIDI control: metadata are decoded and incoming MIDI messages will control the associated controllers
536
537
  * - an output handler can be set to treat produced output controllers (like 'bargraph')
538
+ * - an input handler can be set to follow control parameter changes (like sliders)
537
539
  * - regular controllers are handled using setParamValue/getParamValue and getParams methods
538
540
  */
539
541
  export interface IFaustBaseWebAudioDsp {
@@ -556,6 +558,25 @@ export interface IFaustBaseWebAudioDsp {
556
558
  * @param value - the float value for the wanted control
557
559
  */
558
560
  callOutputParamHandler(path: string, value: number): void;
561
+ /**
562
+ * Set the parameter input handler, to be called when input parameters change (like sliders).
563
+ *
564
+ * @param handler - the input handler
565
+ */
566
+ setInputParamHandler(handler: InputParamHandler | null): void;
567
+ /**
568
+ * Get the parameter input handler.
569
+ *
570
+ * @return the current input handler
571
+ */
572
+ getInputParamHandler(): InputParamHandler | null;
573
+ /**
574
+ * Call the input parameter handler with a path and value.
575
+ *
576
+ * @param path - the path to the wanted parameter (retrieved using 'getParams' method)
577
+ * @param value - the float value for the wanted control
578
+ */
579
+ callInputParamHandler(path: string, value: number): void;
559
580
  /**
560
581
  * Set the compute handler, to be called in the 'compute' method with buffer size.
561
582
  *
@@ -752,6 +773,7 @@ export interface IFaustPolyWebAudioNode extends IFaustPolyWebAudioDsp, AudioNode
752
773
  }
753
774
  export declare class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
754
775
  protected fOutputHandler: OutputParamHandler | null;
776
+ protected fInputHandler: InputParamHandler | null;
755
777
  protected fComputeHandler: ComputeHandler | null;
756
778
  protected fPlotHandler: PlotHandler | null;
757
779
  protected fCachedEvents: {
@@ -857,6 +879,9 @@ export declare class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
857
879
  setOutputParamHandler(handler: OutputParamHandler | null): void;
858
880
  getOutputParamHandler(): OutputParamHandler | null;
859
881
  callOutputParamHandler(path: string, value: number): void;
882
+ setInputParamHandler(handler: InputParamHandler | null): void;
883
+ getInputParamHandler(): InputParamHandler | null;
884
+ callInputParamHandler(path: string, value: number): void;
860
885
  setComputeHandler(handler: ComputeHandler | null): void;
861
886
  getComputeHandler(): ComputeHandler | null;
862
887
  setPlotHandler(handler: PlotHandler | null): void;
@@ -1211,6 +1236,9 @@ export declare class FaustOfflineProcessor<Poly extends boolean = false> {
1211
1236
  setOutputParamHandler(handler: OutputParamHandler): void;
1212
1237
  getOutputParamHandler(): OutputParamHandler | null;
1213
1238
  callOutputParamHandler(path: string, value: number): void;
1239
+ setInputParamHandler(handler: InputParamHandler): void;
1240
+ getInputParamHandler(): InputParamHandler | null;
1241
+ callInputParamHandler(path: string, value: number): void;
1214
1242
  setComputeHandler(handler: ComputeHandler): void;
1215
1243
  getComputeHandler(): ComputeHandler | null;
1216
1244
  setPlotHandler(handler: PlotHandler): void;
@@ -1397,6 +1425,7 @@ export declare class FaustAudioWorkletNode<Poly extends boolean = false> extends
1397
1425
  protected fJSON: string;
1398
1426
  protected fInputsItems: string[];
1399
1427
  protected fOutputHandler: OutputParamHandler | null;
1428
+ protected fInputHandler: InputParamHandler | null;
1400
1429
  protected fComputeHandler: ComputeHandler | null;
1401
1430
  protected fPlotHandler: PlotHandler | null;
1402
1431
  protected fUICallback: UIHandler;
@@ -1413,6 +1442,9 @@ export declare class FaustAudioWorkletNode<Poly extends boolean = false> extends
1413
1442
  setOutputParamHandler(handler: OutputParamHandler | null): void;
1414
1443
  getOutputParamHandler(): OutputParamHandler | null;
1415
1444
  callOutputParamHandler(path: string, value: number): void;
1445
+ setInputParamHandler(handler: InputParamHandler | null): void;
1446
+ getInputParamHandler(): InputParamHandler | null;
1447
+ callInputParamHandler(path: string, value: number): void;
1416
1448
  setComputeHandler(handler: ComputeHandler | null): void;
1417
1449
  getComputeHandler(): ComputeHandler | null;
1418
1450
  setPlotHandler(handler: PlotHandler | null): void;
@@ -1485,6 +1517,9 @@ export declare class FaustScriptProcessorNode<Poly extends boolean = false> exte
1485
1517
  setOutputParamHandler(handler: OutputParamHandler): void;
1486
1518
  getOutputParamHandler(): OutputParamHandler | null;
1487
1519
  callOutputParamHandler(path: string, value: number): void;
1520
+ setInputParamHandler(handler: InputParamHandler): void;
1521
+ getInputParamHandler(): InputParamHandler | null;
1522
+ callInputParamHandler(path: string, value: number): void;
1488
1523
  setComputeHandler(handler: ComputeHandler): void;
1489
1524
  getComputeHandler(): ComputeHandler | null;
1490
1525
  setPlotHandler(handler: PlotHandler): void;
@@ -281,7 +281,10 @@ var getFaustAudioWorkletProcessor = (dependencies, faustData, register = true) =
281
281
  this.port.addEventListener("message", this.handleMessageAux);
282
282
  this.port.start();
283
283
  this.fDSPCode.setOutputParamHandler(
284
- (path, value) => this.port.postMessage({ path, value, type: "param" })
284
+ (path, value) => this.port.postMessage({ path, value, type: "out-param" })
285
+ );
286
+ this.fDSPCode.setInputParamHandler(
287
+ (path, value) => this.port.postMessage({ path, value, type: "in-param" })
285
288
  );
286
289
  this.fDSPCode.start();
287
290
  }
@@ -331,7 +334,10 @@ var getFaustAudioWorkletProcessor = (dependencies, faustData, register = true) =
331
334
  this.port.addEventListener("message", this.handleMessageAux);
332
335
  this.port.start();
333
336
  this.fDSPCode.setOutputParamHandler(
334
- (path, value) => this.port.postMessage({ path, value, type: "param" })
337
+ (path, value) => this.port.postMessage({ path, value, type: "out-param" })
338
+ );
339
+ this.fDSPCode.setInputParamHandler(
340
+ (path, value) => this.port.postMessage({ path, value, type: "in-param" })
335
341
  );
336
342
  this.fDSPCode.start();
337
343
  }
@@ -867,7 +873,10 @@ var getFaustFFTAudioWorkletProcessor = (dependencies, faustData, register = true
867
873
  this.soundfiles
868
874
  );
869
875
  this.fDSPCode.setOutputParamHandler(
870
- (path, value) => this.port.postMessage({ path, value, type: "param" })
876
+ (path, value) => this.port.postMessage({ path, value, type: "out-param" })
877
+ );
878
+ this.fDSPCode.setInputParamHandler(
879
+ (path, value) => this.port.postMessage({ path, value, type: "in-param" })
871
880
  );
872
881
  this.fDSPCode.setPlotHandler(this.fPlotHandler);
873
882
  const params = this.fDSPCode.getParams();
@@ -2501,6 +2510,7 @@ var Soundfile = class _Soundfile {
2501
2510
  var FaustBaseWebAudioDsp = class _FaustBaseWebAudioDsp {
2502
2511
  constructor(sampleSize, bufferSize, soundfiles) {
2503
2512
  this.fOutputHandler = null;
2513
+ this.fInputHandler = null;
2504
2514
  this.fComputeHandler = null;
2505
2515
  // To handle MIDI events plot
2506
2516
  this.fPlotHandler = null;
@@ -2923,8 +2933,17 @@ var FaustBaseWebAudioDsp = class _FaustBaseWebAudioDsp {
2923
2933
  callOutputParamHandler(path, value) {
2924
2934
  if (this.fOutputHandler) {
2925
2935
  this.fOutputHandler(path, value);
2926
- } else {
2927
- console.warn("No OutputParamHandler set for this Faust node.");
2936
+ }
2937
+ }
2938
+ setInputParamHandler(handler) {
2939
+ this.fInputHandler = handler;
2940
+ }
2941
+ getInputParamHandler() {
2942
+ return this.fInputHandler;
2943
+ }
2944
+ callInputParamHandler(path, value) {
2945
+ if (this.fInputHandler) {
2946
+ this.fInputHandler(path, value);
2928
2947
  }
2929
2948
  }
2930
2949
  setComputeHandler(handler) {
@@ -3116,6 +3135,7 @@ var FaustBaseWebAudioDsp = class _FaustBaseWebAudioDsp {
3116
3135
  destroy() {
3117
3136
  this.fDestroyed = true;
3118
3137
  this.fOutputHandler = null;
3138
+ this.fInputHandler = null;
3119
3139
  this.fComputeHandler = null;
3120
3140
  this.fPlotHandler = null;
3121
3141
  }
@@ -3257,6 +3277,7 @@ var FaustMonoWebAudioDsp = class extends FaustBaseWebAudioDsp {
3257
3277
  this.fPathTable[path],
3258
3278
  value
3259
3279
  );
3280
+ this.callInputParamHandler(path, this.getParamValue(path));
3260
3281
  }
3261
3282
  getParamValue(path) {
3262
3283
  return this.fInstance.api.getParamValue(
@@ -3672,6 +3693,7 @@ var FaustPolyWebAudioDsp = class _FaustPolyWebAudioDsp extends FaustBaseWebAudio
3672
3693
  (voice) => voice.setParamValue(this.fPathTable[path], value)
3673
3694
  );
3674
3695
  }
3696
+ this.callInputParamHandler(path, this.getParamValue(path));
3675
3697
  }
3676
3698
  getParamValue(path) {
3677
3699
  if (this.fJSONEffect && _FaustPolyWebAudioDsp.findPath(this.fJSONEffect.ui, path) && this.fInstance.effectAPI) {
@@ -3823,6 +3845,15 @@ var FaustOfflineProcessor = class {
3823
3845
  callOutputParamHandler(path, value) {
3824
3846
  this.fDSPCode.callOutputParamHandler(path, value);
3825
3847
  }
3848
+ setInputParamHandler(handler) {
3849
+ this.fDSPCode.setInputParamHandler(handler);
3850
+ }
3851
+ getInputParamHandler() {
3852
+ return this.fDSPCode.getInputParamHandler();
3853
+ }
3854
+ callInputParamHandler(path, value) {
3855
+ this.fDSPCode.callInputParamHandler(path, value);
3856
+ }
3826
3857
  setComputeHandler(handler) {
3827
3858
  this.fDSPCode.setComputeHandler(handler);
3828
3859
  }
@@ -4728,8 +4759,10 @@ var FaustAudioWorkletNode = class extends (globalThis.AudioWorkletNode || null)
4728
4759
  __privateAdd(this, _hasAccInput, false);
4729
4760
  __privateAdd(this, _hasGyrInput, false);
4730
4761
  this.handleMessageAux = (e) => {
4731
- if (e.data.type === "param" && this.fOutputHandler) {
4762
+ if (e.data.type === "out-param" && this.fOutputHandler) {
4732
4763
  this.fOutputHandler(e.data.path, e.data.value);
4764
+ } else if (e.data.type === "in-param" && this.fInputHandler) {
4765
+ this.fInputHandler(e.data.path, e.data.value);
4733
4766
  } else if (e.data.type === "plot" && this.fPlotHandler) {
4734
4767
  this.fPlotHandler(e.data.value, e.data.index, e.data.events);
4735
4768
  }
@@ -4753,6 +4786,7 @@ var FaustAudioWorkletNode = class extends (globalThis.AudioWorkletNode || null)
4753
4786
  this.fJSONDsp = JSONObj;
4754
4787
  this.fJSON = factory.json;
4755
4788
  this.fOutputHandler = null;
4789
+ this.fInputHandler = null;
4756
4790
  this.fComputeHandler = null;
4757
4791
  this.fPlotHandler = null;
4758
4792
  this.fDescriptor = [];
@@ -4833,8 +4867,17 @@ var FaustAudioWorkletNode = class extends (globalThis.AudioWorkletNode || null)
4833
4867
  callOutputParamHandler(path, value) {
4834
4868
  if (this.fOutputHandler) {
4835
4869
  this.fOutputHandler(path, value);
4836
- } else {
4837
- console.warn("No OutputParamHandler set for this Faust node.");
4870
+ }
4871
+ }
4872
+ setInputParamHandler(handler) {
4873
+ this.fInputHandler = handler;
4874
+ }
4875
+ getInputParamHandler() {
4876
+ return this.fInputHandler;
4877
+ }
4878
+ callInputParamHandler(path, value) {
4879
+ if (this.fInputHandler) {
4880
+ this.fInputHandler(path, value);
4838
4881
  }
4839
4882
  }
4840
4883
  setComputeHandler(handler) {
@@ -5129,6 +5172,15 @@ var FaustScriptProcessorNode = class extends (globalThis.ScriptProcessorNode ||
5129
5172
  callOutputParamHandler(path, value) {
5130
5173
  this.fDSPCode.callOutputParamHandler(path, value);
5131
5174
  }
5175
+ setInputParamHandler(handler) {
5176
+ this.fDSPCode.setInputParamHandler(handler);
5177
+ }
5178
+ getInputParamHandler() {
5179
+ return this.fDSPCode.getInputParamHandler();
5180
+ }
5181
+ callInputParamHandler(path, value) {
5182
+ this.fDSPCode.callInputParamHandler(path, value);
5183
+ }
5132
5184
  setComputeHandler(handler) {
5133
5185
  this.fDSPCode.setComputeHandler(handler);
5134
5186
  }