spessasynth_core 4.1.6 → 4.2.1

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
@@ -247,15 +247,15 @@ declare const DLSLoopTypes: {
247
247
  type DLSLoopType = (typeof DLSLoopTypes)[keyof typeof DLSLoopTypes];
248
248
 
249
249
  declare class LowpassFilter {
250
+ /**
251
+ * For smoothing the filter cutoff frequency.
252
+ */
253
+ static smoothingConstant: number;
250
254
  /**
251
255
  * Cached coefficient calculations.
252
256
  * stored as cachedCoefficients[resonanceCb + currentInitialFc * 961].
253
257
  */
254
258
  private static cachedCoefficients;
255
- /**
256
- * For smoothing the filter cutoff frequency.
257
- */
258
- private static smoothingConstant;
259
259
  /**
260
260
  * Resonance in centibels.
261
261
  */
@@ -267,48 +267,48 @@ declare class LowpassFilter {
267
267
  /**
268
268
  * Filter coefficient 1.
269
269
  */
270
- private a0;
270
+ a0: number;
271
271
  /**
272
272
  * Filter coefficient 2.
273
273
  */
274
- private a1;
274
+ a1: number;
275
275
  /**
276
276
  * Filter coefficient 3.
277
277
  */
278
- private a2;
278
+ a2: number;
279
279
  /**
280
280
  * Filter coefficient 4.
281
281
  */
282
- private a3;
282
+ a3: number;
283
283
  /**
284
284
  * Filter coefficient 5.
285
285
  */
286
- private a4;
286
+ a4: number;
287
287
  /**
288
288
  * Input history 1.
289
289
  */
290
- private x1;
290
+ x1: number;
291
291
  /**
292
292
  * Input history 2.
293
293
  */
294
- private x2;
294
+ x2: number;
295
295
  /**
296
296
  * Output history 1.
297
297
  */
298
- private y1;
298
+ y1: number;
299
299
  /**
300
300
  * Output history 2.
301
301
  */
302
- private y2;
302
+ y2: number;
303
303
  /**
304
304
  * For tracking the last cutoff frequency in the apply method, absolute cents.
305
305
  * Set to infinity to force recalculation.
306
306
  */
307
- private lastTargetCutoff;
307
+ lastTargetCutoff: number;
308
308
  /**
309
309
  * Used for tracking if the filter has been initialized.
310
310
  */
311
- private initialized;
311
+ initialized: boolean;
312
312
  /**
313
313
  * Filter's sample rate in Hz.
314
314
  */
@@ -325,14 +325,6 @@ declare class LowpassFilter {
325
325
  constructor(sampleRate: number);
326
326
  static initCache(sampleRate: number): void;
327
327
  init(): void;
328
- /**
329
- * Applies the lowpass filter to the output buffer of a voice.
330
- * @param sampleCount The amount of samples to write.
331
- * @param voice The voice to apply the filter to.
332
- * @param outputBuffer The output buffer to filter.
333
- * @param fcOffset The frequency excursion in cents to apply to the filter.
334
- */
335
- process(sampleCount: number, voice: Voice, outputBuffer: Float32Array, fcOffset: number): void;
336
328
  /**
337
329
  * Calculates the filter coefficients based on the current resonance and cutoff frequency and caches them.
338
330
  * @param cutoffCents The cutoff frequency in cents.
@@ -820,6 +812,257 @@ declare const midiControllers: {
820
812
  };
821
813
  type MIDIController = (typeof midiControllers)[keyof typeof midiControllers];
822
814
 
815
+ interface EffectProcessor {
816
+ /**
817
+ * 0-127
818
+ * This parameter sets the amount of the effect sent to the effect output.
819
+ */
820
+ level: number;
821
+ /**
822
+ * 0-7
823
+ * A low-pass filter can be applied to the sound coming into the effect to cut the high
824
+ * frequency range. Higher values will cut more of the high frequencies, resulting in a
825
+ * more mellow effect sound.
826
+ */
827
+ preLowpass: number;
828
+ }
829
+ interface ReverbProcessorSnapshot extends EffectProcessor {
830
+ /**
831
+ * 0-7.
832
+ * If character is not available, it should default to the first one.
833
+ *
834
+ * This parameter selects the type of reverb. 0–5 are reverb effects, and 6 and 7 are delay
835
+ * effects.
836
+ */
837
+ character: number;
838
+ /**
839
+ * 0-127
840
+ * This parameter sets the time over which the reverberation will continue.
841
+ * Higher values result in longer reverberation.
842
+ */
843
+ time: number;
844
+ /**
845
+ * 0-127
846
+ * This parameter is used when the Reverb Character is set to 6 or 7, or the Reverb Type
847
+ * is set to Delay or Panning Delay (Rev Character 6, 7). It sets the way in which delays
848
+ * repeat. Higher values result in more delay repeats.
849
+ */
850
+ delayFeedback: number;
851
+ /**
852
+ * 0 - 127 (ms)
853
+ * This parameter sets the delay time until the reverberant sound is heard.
854
+ * Higher values result in a longer pre-delay time, simulating a larger reverberant space.
855
+ */
856
+ preDelayTime: number;
857
+ }
858
+ interface ReverbProcessor extends ReverbProcessorSnapshot {
859
+ /**
860
+ * Process the effect and ADDS it to the output.
861
+ * @param input The input buffer to process. It always starts at index 0.
862
+ * @param outputLeft The left output buffer.
863
+ * @param outputRight The right output buffer.
864
+ * @param startIndex The index to start mixing at into the output buffers.
865
+ * @param sampleCount The amount of samples to mix.
866
+ */
867
+ process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
868
+ /**
869
+ * Gets a synthesizer from this effect processor instance.
870
+ */
871
+ getSnapshot(): ReverbProcessorSnapshot;
872
+ }
873
+ interface ChorusProcessorSnapshot extends EffectProcessor {
874
+ /**
875
+ * 0-127
876
+ * This parameter sets the level at which the chorus sound is re-input (fed back) into the
877
+ * chorus. By using feedback, a denser chorus sound can be created.
878
+ * Higher values result in a greater feedback level.
879
+ */
880
+ feedback: number;
881
+ /**
882
+ * 0-127
883
+ * This parameter sets the delay time of the chorus effect.
884
+ */
885
+ delay: number;
886
+ /**
887
+ * 0-127
888
+ * This parameter sets the speed (frequency) at which the chorus sound is modulated.
889
+ * Higher values result in faster modulation.
890
+ */
891
+ rate: number;
892
+ /**
893
+ * 0-127
894
+ * This parameter sets the depth at which the chorus sound is modulated.
895
+ * Higher values result in deeper modulation.
896
+ */
897
+ depth: number;
898
+ /**
899
+ * 0-127
900
+ * This parameter sets the amount of chorus sound that will be sent to the reverb.
901
+ * Higher values result in more sound being sent.
902
+ */
903
+ sendLevelToReverb: number;
904
+ /**
905
+ * 0-127
906
+ * This parameter sets the amount of chorus sound that will be sent to the delay.
907
+ * Higher values result in more sound being sent.
908
+ */
909
+ sendLevelToDelay: number;
910
+ }
911
+ interface ChorusProcessor extends ChorusProcessorSnapshot {
912
+ /**
913
+ * Process the effect and ADDS it to the output.
914
+ * @param input The input buffer to process. It always starts at index 0.
915
+ * @param outputLeft The left output buffer.
916
+ * @param outputRight The right output buffer.
917
+ * @param outputReverb The mono input for reverb. It always starts at index 0.
918
+ * @param outputDelay The mono input for delay. It always starts at index 0.
919
+ * @param startIndex The index to start mixing at into the output buffers.
920
+ * @param sampleCount The amount of samples to mix.
921
+ */
922
+ process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
923
+ /**
924
+ * Gets a synthesizer from this effect processor instance.
925
+ */
926
+ getSnapshot(): ChorusProcessorSnapshot;
927
+ }
928
+ interface DelayProcessorSnapshot extends EffectProcessor {
929
+ /**
930
+ * 0-115
931
+ * 0.1ms-340ms-1000ms
932
+ * The delay effect has three delay times; center, left and
933
+ * right (when listening in stereo). Delay Time Center sets the delay time of the delay
934
+ * located at the center.
935
+ * Refer to SC-8850 Owner's Manual p. 236 for the exact mapping of the values.
936
+ */
937
+ timeCenter: number;
938
+ /**
939
+ * 0-120
940
+ * 4% - 500%
941
+ * This parameter sets the delay time of the delay located at the left as a percentage of
942
+ * the Delay Time Center (up to a max. of 1.0 s).
943
+ * The resolution is 100/24(%).
944
+ */
945
+ timeRatioLeft: number;
946
+ /**
947
+ * 1-120
948
+ * 4%-500%
949
+ * This parameter sets the delay time of the delay located at the right as a percentage of
950
+ * the Delay Time Center (up to a max. of 1.0 s).
951
+ * The resolution is 100/24(%).
952
+ */
953
+ timeRatioRight: number;
954
+ /**
955
+ * 0-127
956
+ * This parameter sets the volume of the central delay. Higher values result in a louder
957
+ * center delay.
958
+ */
959
+ levelCenter: number;
960
+ /**
961
+ * 0-127
962
+ * This parameter sets the volume of the left delay. Higher values result in a louder left
963
+ * delay.
964
+ */
965
+ levelLeft: number;
966
+ /**
967
+ * 0-127
968
+ * This parameter sets the volume of the right delay. Higher values result in a louder
969
+ * right delay.
970
+ */
971
+ levelRight: number;
972
+ /**
973
+ * 0-127
974
+ * (-64)-63
975
+ * This parameter affects the number of times the delay will repeat. With a value of 0,
976
+ * the delay will not repeat. With higher values there will be more repeats.
977
+ * With negative (-) values, the center delay will be fed back with inverted phase.
978
+ * Negative values are effective with short delay times.
979
+ */
980
+ feedback: number;
981
+ /**
982
+ * 0-127
983
+ * This parameter sets the amount of delay sound that is sent to the reverb.
984
+ * Higher values result in more sound being sent.
985
+ */
986
+ sendLevelToReverb: number;
987
+ }
988
+ interface DelayProcessor extends DelayProcessorSnapshot {
989
+ /**
990
+ * Process the effect and ADDS it to the output.
991
+ * @param input The input buffer to process. It always starts at index 0.
992
+ * @param outputLeft The left output buffer.
993
+ * @param outputRight The right output buffer.
994
+ * @param outputReverb The mono input for reverb. It always starts at index 0.
995
+ * @param startIndex The index to start mixing at into the output buffers.
996
+ * @param sampleCount The amount of samples to mix.
997
+ */
998
+ process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, startIndex: number, sampleCount: number): void;
999
+ /**
1000
+ * Gets a synthesizer from this effect processor instance.
1001
+ */
1002
+ getSnapshot(): DelayProcessorSnapshot;
1003
+ }
1004
+ interface InsertionProcessor {
1005
+ /**
1006
+ * The EFX type of this processor, stored as MSB << | LSB.
1007
+ * For example 0x30, 0x10 is 0x3010
1008
+ */
1009
+ readonly type: number;
1010
+ /**
1011
+ * 0-1 (floating point)
1012
+ * This parameter sets the amount of insertion sound that will be sent to the reverb.
1013
+ * Higher values result in more sound being sent.
1014
+ */
1015
+ sendLevelToReverb: number;
1016
+ /**
1017
+ * 0-1 (floating point)
1018
+ * This parameter sets the amount of insertion sound that will be sent to the chorus.
1019
+ * Higher values result in more sound being sent.
1020
+ */
1021
+ sendLevelToChorus: number;
1022
+ /**
1023
+ * 0-1 (floating point)
1024
+ * This parameter sets the amount of insertion sound that will be sent to the delay.
1025
+ * Higher values result in more sound being sent.
1026
+ */
1027
+ sendLevelToDelay: number;
1028
+ /**
1029
+ * Resets the params to their default values.
1030
+ * This does not need to reset send levels.
1031
+ */
1032
+ reset(): void;
1033
+ /**
1034
+ * Sets an EFX parameter.
1035
+ * @param parameter The parameter number (0x03-0x16).
1036
+ * @param value The new value (0-127).
1037
+ */
1038
+ setParameter(parameter: number, value: number): void;
1039
+ /**
1040
+ * Process the effect and ADDS it to the output.
1041
+ * @param inputLeft The left input buffer to process. It always starts at index 0.
1042
+ * @param inputRight The right input buffer to process. It always starts at index 0.
1043
+ * @param outputLeft The left output buffer.
1044
+ * @param outputRight The right output buffer.
1045
+ * @param outputReverb The mono input for reverb. It always starts at index 0.
1046
+ * @param outputChorus The mono input for chorus. It always starts at index 0.
1047
+ * @param outputDelay The mono input for delay. It always starts at index 0.
1048
+ * @param startIndex The index to start mixing at into the output buffers.
1049
+ * @param sampleCount The amount of samples to mix.
1050
+ */
1051
+ process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputChorus: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
1052
+ }
1053
+ interface InsertionProcessorSnapshot {
1054
+ type: number;
1055
+ /**
1056
+ * 20 parameters for the effect, 255 means "no change" + 3 effect sends (index 20, 21, 22)
1057
+ */
1058
+ params: Uint8Array;
1059
+ /**
1060
+ * A boolean list for channels that have the insertion effect enabled.
1061
+ */
1062
+ channels: boolean[];
1063
+ }
1064
+ type InsertionProcessorConstructor = new (sampleRate: number) => InsertionProcessor;
1065
+
823
1066
  type SynthSystem = "gm" | "gm2" | "gs" | "xg";
824
1067
  interface NoteOnCallback {
825
1068
  /** The MIDI note number. */
@@ -935,6 +1178,71 @@ interface ChannelPropertyChangeCallback {
935
1178
  */
936
1179
  property: ChannelProperty;
937
1180
  }
1181
+ type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
1182
+ type EffectChangeCallback = {
1183
+ /**
1184
+ * The effect that was changed, "reverb", "chorus", "delay" or "insertion"
1185
+ */
1186
+ effect: "reverb";
1187
+ /**
1188
+ * The parameter type or "macro".
1189
+ */
1190
+ parameter: FXType<ReverbProcessor>;
1191
+ /**
1192
+ * The new 7-bit value.
1193
+ */
1194
+ value: number;
1195
+ } | {
1196
+ /**
1197
+ * The effect that was changed, "reverb", "chorus", "delay" or "insertion"
1198
+ */
1199
+ effect: "chorus";
1200
+ /**
1201
+ * The parameter type or "macro".
1202
+ */
1203
+ parameter: FXType<ChorusProcessor>;
1204
+ /**
1205
+ * The new 7-bit value.
1206
+ */
1207
+ value: number;
1208
+ } | {
1209
+ /**
1210
+ * The effect that was changed, "reverb", "chorus", "delay" or "insertion"
1211
+ */
1212
+ effect: "delay";
1213
+ /**
1214
+ * The parameter type or "macro".
1215
+ */
1216
+ parameter: FXType<DelayProcessor>;
1217
+ /**
1218
+ * The new 7-bit value.
1219
+ */
1220
+ value: number;
1221
+ } | {
1222
+ /**
1223
+ * The effect that was changed, "reverb", "chorus", "delay" or "insertion"
1224
+ */
1225
+ effect: "insertion";
1226
+ /**
1227
+ * The parameter that was changed. This maps to GS address map at addr2 = 0x03.
1228
+ * See SC-8850 Manual p.237,
1229
+ * for example:
1230
+ * - 0x0 - EFX type, the value is 16 bit in this special case. Note that this resets the parameters!
1231
+ * - 0x3 - EFX param 1
1232
+ * - 0x16 - EFX param 20 (usually level)
1233
+ * - 0x17 - EFX send to reverb
1234
+ *
1235
+ * There are two exceptions:
1236
+ * - -1 - the channel has ENABLED the effect.
1237
+ * - -2 - the channel has DISABLED the effect.
1238
+ * For both of these cases, `value` is the channel number.
1239
+ */
1240
+ parameter: number;
1241
+ /**
1242
+ * The new value for the parameter.
1243
+ */
1244
+ value: number;
1245
+ };
938
1246
  interface SynthProcessorEventData {
939
1247
  /**
940
1248
  * This event fires when a note is played.
@@ -1004,6 +1312,10 @@ interface SynthProcessorEventData {
1004
1312
  * This event fires when a channel property changes.
1005
1313
  */
1006
1314
  channelPropertyChange: ChannelPropertyChangeCallback;
1315
+ /**
1316
+ * This event fires when an effect processor is modified.
1317
+ */
1318
+ effectChange: EffectChangeCallback;
1007
1319
  }
1008
1320
  type SynthProcessorEvent = {
1009
1321
  [K in keyof SynthProcessorEventData]: {
@@ -1050,6 +1362,11 @@ interface ChannelProperty {
1050
1362
  * Indicates whether the channel is a drum channel.
1051
1363
  */
1052
1364
  isDrum: boolean;
1365
+ /**
1366
+ * Indicates whether the channel uses an insertion effect.
1367
+ * This means that there will be no separate dry output for processSplit().
1368
+ */
1369
+ isEFX: boolean;
1053
1370
  /**
1054
1371
  * The channel's transposition, in semitones.
1055
1372
  */
@@ -1068,6 +1385,18 @@ interface SynthProcessorOptions {
1068
1385
  * Indicates if the effects are enabled. This can be changed later.
1069
1386
  */
1070
1387
  enableEffects: boolean;
1388
+ /**
1389
+ * Reverb processor for the synthesizer. Leave undefined to use the default.
1390
+ */
1391
+ reverbProcessor: ReverbProcessor;
1392
+ /**
1393
+ * Chorus processor for the synthesizer. Leave undefined to use the default.
1394
+ */
1395
+ chorusProcessor: ChorusProcessor;
1396
+ /**
1397
+ * Delay processor for the synthesizer. Leave undefined to use the default.
1398
+ */
1399
+ delayProcessor: DelayProcessor;
1071
1400
  }
1072
1401
  /**
1073
1402
  * The master parameters of the synthesizer.
@@ -1083,8 +1412,20 @@ interface MasterParameterType {
1083
1412
  masterPan: number;
1084
1413
  /**
1085
1414
  * The maximum number of voices that can be played at once.
1415
+ *
1416
+ * @remarks
1417
+ * Increasing this value causes memory allocation for more voices.
1418
+ * It is recommended to set it at the beginning, before rendering audio to avoid GC.
1419
+ * Decreasing it does not cause memory usage change, so it's fine to use.
1086
1420
  */
1087
1421
  voiceCap: number;
1422
+ /**
1423
+ * Enabling this parameter will cause a new voice allocation when the voice cap is hit, rather than stealing existing voices.
1424
+ *
1425
+ * @remarks
1426
+ * This is not recommended in real-time environments.
1427
+ */
1428
+ autoAllocateVoices: boolean;
1088
1429
  /**
1089
1430
  * The interpolation type used for sample playback.
1090
1431
  */
@@ -1103,10 +1444,61 @@ interface MasterParameterType {
1103
1444
  * The reverb gain, from 0 to any number. 1 is 100% reverb.
1104
1445
  */
1105
1446
  reverbGain: number;
1447
+ /**
1448
+ * If the synthesizer should prevent editing of the reverb parameters.
1449
+ * This effect is modified using MIDI system exclusive messages, so
1450
+ * the recommended use case would be setting
1451
+ * the reverb parameters then locking it to prevent changes by MIDI files.
1452
+ */
1453
+ reverbLock: boolean;
1106
1454
  /**
1107
1455
  * The chorus gain, from 0 to any number. 1 is 100% chorus.
1108
1456
  */
1109
1457
  chorusGain: number;
1458
+ /**
1459
+ * If the synthesizer should prevent editing of the chorus parameters.
1460
+ * This effect is modified using MIDI system exclusive messages, so
1461
+ * the recommended use case would be setting
1462
+ * the chorus parameters then locking it to prevent changes by MIDI files.
1463
+ */
1464
+ chorusLock: boolean;
1465
+ /**
1466
+ * The delay gain, from 0 to any number. 1 is 100% delay.
1467
+ */
1468
+ delayGain: number;
1469
+ /**
1470
+ * If the synthesizer should prevent editing of the delay parameters.
1471
+ * This effect is modified using MIDI system exclusive messages, so
1472
+ * the recommended use case would be setting
1473
+ * the delay parameters then locking it to prevent changes by MIDI files.
1474
+ */
1475
+ delayLock: boolean;
1476
+ /**
1477
+ * If the synthesizer should prevent changing the insertion effect type and parameters (including enabling/disabling it on channels).
1478
+ * This effect is modified using MIDI system exclusive messages, so
1479
+ * the recommended use case would be setting
1480
+ * the insertion effect type and parameters then locking it to prevent changes by MIDI files.
1481
+ */
1482
+ insertionEffectLock: boolean;
1483
+ /**
1484
+ * If the synthesizer should prevent editing of the drum parameters.
1485
+ * These params are modified using MIDI system exclusive messages or NRPN, so
1486
+ * the recommended use case would be setting
1487
+ * the drum parameters then locking it to prevent changes by MIDI files.
1488
+ */
1489
+ drumLock: boolean;
1490
+ /**
1491
+ * If the synthesizer should prevent applying the custom vibrato.
1492
+ * This effect is modified using NRPN, so
1493
+ * the recommended use case would be setting
1494
+ * the custom vibrato then locking it to prevent changes by MIDI files.
1495
+ */
1496
+ customVibratoLock: boolean;
1497
+ /**
1498
+ * If the synthesizer should prevent changing any parameters via NRPN.
1499
+ * This includes the custom vibrato parameters.
1500
+ */
1501
+ nprnParamLock: boolean;
1110
1502
  /**
1111
1503
  * Forces note killing instead of releasing. Improves performance in black MIDIs.
1112
1504
  */
@@ -1329,6 +1721,22 @@ declare class Voice {
1329
1721
  * From -500 to 500, where zero means disabled (use the channel pan). Used for random pan.
1330
1722
  */
1331
1723
  overridePan: number;
1724
+ /**
1725
+ * In cents, used for drum tuning.
1726
+ */
1727
+ pitchOffset: number;
1728
+ /**
1729
+ * Reverb send of the voice, used for drum parts, otherwise 1.
1730
+ */
1731
+ reverbSend: number;
1732
+ /**
1733
+ * Chorus send of the voice, used for drum parts, otherwise 1.
1734
+ */
1735
+ chorusSend: number;
1736
+ /**
1737
+ * Delay send of the voice, used for drum parts, otherwise 1.
1738
+ */
1739
+ delaySend: number;
1332
1740
  /**
1333
1741
  * Exclusive class number for hi-hats etc.
1334
1742
  */
@@ -2314,9 +2722,9 @@ declare function controllerChange(this: MIDIChannel, controllerNumber: MIDIContr
2314
2722
 
2315
2723
  /**
2316
2724
  * Executes a data entry coarse (MSB) change for the current channel.
2317
- * @param dataValue The value to set for the data entry coarse controller (0-127).
2725
+ * @param dataCoarse The value to set for the data entry coarse controller (0-127).
2318
2726
  */
2319
- declare function dataEntryCoarse(this: MIDIChannel, dataValue: number): void;
2727
+ declare function dataEntryCoarse(this: MIDIChannel, dataCoarse: number): void;
2320
2728
 
2321
2729
  /**
2322
2730
  * Sends a "MIDI Note on" message and starts a note.
@@ -2393,7 +2801,36 @@ type SysExAcceptedArray = number[] | IndexedByteArray | Uint8Array | Int8Array |
2393
2801
  * This is a rather extensive method that handles various system exclusive messages,
2394
2802
  * including Roland GS, MIDI Tuning Standard, and other non-realtime messages.
2395
2803
  */
2396
- declare function systemExclusiveInternal(this: SynthesizerCore, syx: SysExAcceptedArray, channelOffset: number): void;
2804
+ declare function systemExclusiveInternal(this: SynthesizerCore, syx: SysExAcceptedArray, channelOffset?: number): void;
2805
+
2806
+ declare const NON_CC_INDEX_OFFSET = 128;
2807
+ declare const CONTROLLER_TABLE_SIZE = 147;
2808
+ /**
2809
+ * An array with the default MIDI controller values. Note that these are 14-bit, not 7-bit.
2810
+ */
2811
+ declare const defaultMIDIControllerValues: Int16Array<ArrayBuffer>;
2812
+ declare const setResetValue: (i: MIDIController, v: number) => number;
2813
+ declare const CUSTOM_CONTROLLER_TABLE_SIZE: number;
2814
+ declare const customResetArray: Float32Array<ArrayBuffer>;
2815
+ declare const drumReverbResetArray: Int8Array<ArrayBuffer>;
2816
+
2817
+ declare const DEFAULT_MASTER_PARAMETERS: MasterParameterType;
2818
+
2819
+ /**
2820
+ * Default MIDI drum channel.
2821
+ */
2822
+ declare const DEFAULT_PERCUSSION = 9;
2823
+ declare const ALL_CHANNELS_OR_DIFFERENT_ACTION = -1;
2824
+
2825
+ declare class ThruFX implements InsertionProcessor {
2826
+ sendLevelToReverb: number;
2827
+ sendLevelToChorus: number;
2828
+ sendLevelToDelay: number;
2829
+ readonly type = 0;
2830
+ reset(): void;
2831
+ process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputChorus: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
2832
+ setParameter(parameter: number, value: number): void;
2833
+ }
2397
2834
 
2398
2835
  /**
2399
2836
  * The core synthesis engine which interacts with channels and holds all the synth parameters.
@@ -2406,7 +2843,31 @@ declare class SynthesizerCore {
2406
2843
  /**
2407
2844
  * All MIDI channels of the synthesizer.
2408
2845
  */
2409
- midiChannels: MIDIChannel[];
2846
+ readonly midiChannels: MIDIChannel[];
2847
+ /**
2848
+ * The insertion processor's left input buffer.
2849
+ */
2850
+ insertionInputL: Float32Array<ArrayBuffer>;
2851
+ /**
2852
+ * The insertion processor's right input buffer.
2853
+ */
2854
+ insertionInputR: Float32Array<ArrayBuffer>;
2855
+ /**
2856
+ * The reverb processor's input buffer.
2857
+ */
2858
+ reverbInput: Float32Array<ArrayBuffer>;
2859
+ /**
2860
+ * The chorus processor's input buffer.
2861
+ */
2862
+ chorusInput: Float32Array<ArrayBuffer>;
2863
+ /**
2864
+ * The delay processor's input buffer.
2865
+ */
2866
+ delayInput: Float32Array<ArrayBuffer>;
2867
+ /**
2868
+ * Delay is not used outside SC-88+ MIDIs, this is an optimization.
2869
+ */
2870
+ delayActive: boolean;
2410
2871
  /**
2411
2872
  * The sound bank manager, which manages all sound banks and presets.
2412
2873
  */
@@ -2429,11 +2890,20 @@ declare class SynthesizerCore {
2429
2890
  masterGain: number;
2430
2891
  masterPan: number;
2431
2892
  voiceCap: number;
2893
+ autoAllocateVoices: boolean;
2432
2894
  interpolationType: InterpolationType;
2433
2895
  midiSystem: SynthSystem;
2434
2896
  monophonicRetriggerMode: boolean;
2435
2897
  reverbGain: number;
2898
+ reverbLock: boolean;
2436
2899
  chorusGain: number;
2900
+ chorusLock: boolean;
2901
+ delayGain: number;
2902
+ delayLock: boolean;
2903
+ insertionEffectLock: boolean;
2904
+ drumLock: boolean;
2905
+ customVibratoLock: boolean;
2906
+ nprnParamLock: boolean;
2437
2907
  blackMIDIMode: boolean;
2438
2908
  transposition: number;
2439
2909
  deviceID: number;
@@ -2446,11 +2916,6 @@ declare class SynthesizerCore {
2446
2916
  * The volume gain, set by MIDI sysEx
2447
2917
  */
2448
2918
  midiVolume: number;
2449
- /**
2450
- * Set via system exclusive.
2451
- * Note: Remember to reset in system reset!
2452
- */
2453
- reverbSend: number;
2454
2919
  /**
2455
2920
  * Are the chorus and reverb effects enabled?
2456
2921
  */
@@ -2459,11 +2924,6 @@ declare class SynthesizerCore {
2459
2924
  * Is the event system enabled?
2460
2925
  */
2461
2926
  enableEventSystem: boolean;
2462
- /**
2463
- * Set via system exclusive.
2464
- * Note: Remember to reset in system reset!
2465
- */
2466
- chorusSend: number;
2467
2927
  /**
2468
2928
  * The pan of the left channel.
2469
2929
  */
@@ -2522,10 +2982,52 @@ declare class SynthesizerCore {
2522
2982
  * Current total amount of voices that are currently playing.
2523
2983
  */
2524
2984
  voiceCount: number;
2985
+ /**
2986
+ * A sysEx may set a "Part" (channel) to receive on a different channel number.
2987
+ * This slows down the access, so this toggle tracks if it's enabled or not.
2988
+ */
2989
+ customChannelNumbers: boolean;
2990
+ /**
2991
+ * The synthesizer's reverb processor.
2992
+ */
2993
+ readonly reverbProcessor: ReverbProcessor;
2994
+ /**
2995
+ * The synthesizer's chorus processor.
2996
+ */
2997
+ readonly chorusProcessor: ChorusProcessor;
2998
+ /**
2999
+ * The synthesizer's delay processor.
3000
+ */
3001
+ readonly delayProcessor: DelayProcessor;
3002
+ /**
3003
+ * The fallback processor when the requested insertion is not available.
3004
+ */
3005
+ protected readonly insertionFallback: ThruFX;
3006
+ /**
3007
+ * The current insertion processor.
3008
+ */
3009
+ protected insertionProcessor: InsertionProcessor;
3010
+ /**
3011
+ * All the insertion effects available to the processor.
3012
+ * The key is the EFX type stored as MSB << 8 | LSB
3013
+ */
3014
+ protected readonly insertionEffects: Map<number, InsertionProcessor>;
3015
+ /**
3016
+ * Insertion is not used outside SC-88Pro+ MIDIs, this is an optimization.
3017
+ */
3018
+ protected insertionActive: boolean;
2525
3019
  /**
2526
3020
  * For F5 system exclusive.
2527
3021
  */
2528
- channelOffset: number;
3022
+ protected portSelectChannelOffset: number;
3023
+ /**
3024
+ * For insertion snapshot tracking
3025
+ * 20 parameters (0-19) + 3 sends
3026
+ * Index to gs is Addr3 - 3 (for example EFX PARAMETER 1 is 0x03 and here it's 0)
3027
+ * note: 255 means "no change"
3028
+ * @protected
3029
+ */
3030
+ protected insertionParams: Uint8Array<ArrayBuffer>;
2529
3031
  /**
2530
3032
  * Last time the priorities were assigned.
2531
3033
  * Used to prevent assigning priorities multiple times when more than one voice is triggered during a quantum.
@@ -2540,6 +3042,13 @@ declare class SynthesizerCore {
2540
3042
  */
2541
3043
  private readonly sampleTime;
2542
3044
  constructor(eventCallbackHandler: <K extends keyof SynthProcessorEventData>(eventType: K, eventData: SynthProcessorEventData[K]) => unknown, missingPresetHandler: (patch: MIDIPatch, system: SynthSystem) => BasicPreset | undefined, sampleRate: number, options: SynthProcessorOptions);
3045
+ controllerChange(channel: number, controllerNumber: MIDIController, controllerValue: number): void;
3046
+ noteOn(channel: number, midiNote: number, velocity: number): void;
3047
+ noteOff(channel: number, midiNote: number): void;
3048
+ polyPressure(channel: number, midiNote: number, pressure: number): void;
3049
+ channelPressure(channel: number, pressure: number): void;
3050
+ pitchWheel(channel: number, pitch: number, midiNote?: number): void;
3051
+ programChange(channel: number, programNumber: number): void;
2543
3052
  /**
2544
3053
  * Assigns the first available voice for use.
2545
3054
  * If none available, will assign priorities.
@@ -2557,7 +3066,7 @@ declare class SynthesizerCore {
2557
3066
  * @param force If true, forces the message to be processed.
2558
3067
  * @param options Additional options for scheduling the message.
2559
3068
  */
2560
- processMessage(message: Uint8Array | number[], channelOffset: number, force: boolean, options: SynthMethodOptions): void;
3069
+ processMessage(message: Uint8Array | number[], channelOffset?: number, force?: boolean, options?: SynthMethodOptions): void;
2561
3070
  destroySynthProcessor(): void;
2562
3071
  /**
2563
3072
  * @param channel channel to get voices for
@@ -2573,17 +3082,53 @@ declare class SynthesizerCore {
2573
3082
  * except for the locked controllers.
2574
3083
  */
2575
3084
  resetAllControllers(system?: SynthSystem): void;
2576
- renderAudio(outputs: Float32Array[], reverb: Float32Array[], chorus: Float32Array[], startIndex?: number, sampleCount?: number): void;
2577
- /**
2578
- * Renders the float32 audio data of each channel; buffer size of 128 is recommended.
2579
- * All float arrays must have the same length.
2580
- * @param reverb reverb stereo channels (L, R).
2581
- * @param chorus chorus stereo channels (L, R).
2582
- * @param separate a total of 16 stereo pairs (L, R) for each MIDI channel.
2583
- * @param startIndex start offset of the passed arrays, rendering starts at this index, defaults to 0.
2584
- * @param sampleCount the length of the rendered buffer, defaults to float32array length - startOffset.
2585
- */
2586
- renderAudioSplit(reverb: Float32Array[], chorus: Float32Array[], separate: Float32Array[][], startIndex?: number, sampleCount?: number): void;
3085
+ process(left: Float32Array, right: Float32Array, startIndex?: number, sampleCount?: number): void;
3086
+ /**
3087
+ * The main rendering pipeline, renders all voices the processes the effects:
3088
+ * ```
3089
+ * ┌────────────────────────────────┐
3090
+ * │ Voice Processor │
3091
+ * └───────────────┬────────────────┘
3092
+ *
3093
+ * ┌───────────────┴────────────────┐
3094
+ * │ Insertion Processor │
3095
+ * │ (Bypass or Process)
3096
+ * └───────────────┬────────────────┘
3097
+ * │
3098
+ * ┌──────────┬─────────┼────────────────────────┐
3099
+ * │ │ │ │
3100
+ * │ │ 𜸊 │
3101
+ * │ │ ┌───────┴───────┐ │
3102
+ * │ │ │ Chorus │ │
3103
+ * │ │ │ Processor ├──────────┐ │
3104
+ * │ │ └─┬──────────┬──┘ │ │
3105
+ * │ │ │ │ │ │
3106
+ * │ │ │ │ │ │
3107
+ * │ │ │ │ │ │
3108
+ * │ │ │ │ │ │
3109
+ * │ │ │ 𜸊 𜸊 𜸊
3110
+ * │ │ │ ┌────────┴───────┐ ┌─┴─────┴────────┐
3111
+ * │ └───┼>┤ Delay ├─>>┤ Reverb │
3112
+ * │ │ │ Processor │ │ Processor │
3113
+ * │ │ └────────┬───────┘ └───────┬────────┘
3114
+ * │ │ │ │
3115
+ * │ │ │ │
3116
+ * │ │ │ │
3117
+ * │ │ │ │
3118
+ * 𜸊 𜸊 𜸊 𜸊
3119
+ * ┌─────────┴──────────┐ ┌─┴──────────┴───────────────────┴────┐
3120
+ * │ Dry Output Pairs │ │ Stereo Effects Output │
3121
+ * └────────────────────┘ └─────────────────────────────────────┘
3122
+ * ```
3123
+ * The pipeline is quite similar to the one on SC-8850 manual page 78.
3124
+ * All output arrays must be the same length, the method will crash otherwise.
3125
+ * @param outputs The stereo pairs for each MIDI channel's dry output, will be wrapped if less.
3126
+ * @param effectsLeft The left stereo effect output buffer.
3127
+ * @param effectsRight The right stereo effect output buffer.
3128
+ * @param startIndex The index to start writing at into the output buffer.
3129
+ * @param samples The amount of samples to write.
3130
+ */
3131
+ processSplit(outputs: Float32Array[][], effectsLeft: Float32Array, effectsRight: Float32Array, startIndex?: number, samples?: number): void;
2587
3132
  /**
2588
3133
  * Gets voices for a preset.
2589
3134
  * @param preset The preset to get voices for.
@@ -2593,10 +3138,13 @@ declare class SynthesizerCore {
2593
3138
  */
2594
3139
  getVoicesForPreset(preset: BasicPreset, midiNote: number, velocity: number): CachedVoiceList;
2595
3140
  clearCache(): void;
3141
+ getInsertionSnapshot(): InsertionProcessorSnapshot;
2596
3142
  /**
2597
3143
  * Copied callback so MIDI channels can call it.
2598
3144
  */
2599
3145
  callEvent<K extends keyof SynthProcessorEventData>(eventName: K, eventData: SynthProcessorEventData[K]): void;
3146
+ protected resetInsertionParams(): void;
3147
+ protected resetInsertion(): void;
2600
3148
  /**
2601
3149
  * @param volume {number} 0 to 1
2602
3150
  */
@@ -2606,8 +3154,13 @@ declare class SynthesizerCore {
2606
3154
  * @param cents
2607
3155
  */
2608
3156
  protected setMasterTuning(cents: number): void;
3157
+ protected setReverbMacro(macro: number): void;
3158
+ protected setChorusMacro(macro: number): void;
3159
+ protected setDelayMacro(macro: number): void;
2609
3160
  protected getCachedVoice(patch: MIDIPatch, midiNote: number, velocity: number): CachedVoiceList | undefined;
2610
3161
  protected setCachedVoice(patch: MIDIPatch, midiNote: number, velocity: number, voices: CachedVoiceList): void;
3162
+ private registerInsertionProcessor;
3163
+ private processMessageInternal;
2611
3164
  /**
2612
3165
  * Assigns priorities to the voices.
2613
3166
  * Gets the priority of a voice based on its channel and state.
@@ -2619,10 +3172,67 @@ declare class SynthesizerCore {
2619
3172
  private getCachedVoiceIndex;
2620
3173
  }
2621
3174
 
3175
+ /**
3176
+ * Represents a single drum instrument's XG/GS parameters.
3177
+ */
3178
+ declare class DrumParameters {
3179
+ /**
3180
+ * Pitch offset in cents.
3181
+ */
3182
+ pitch: number;
3183
+ /**
3184
+ * Gain multiplier.
3185
+ */
3186
+ gain: number;
3187
+ /**
3188
+ * Exclusive class override.
3189
+ */
3190
+ exclusiveClass: number;
3191
+ /**
3192
+ * Pan, 1-64-127, 0 is random. This adds to the channel pan!
3193
+ */
3194
+ pan: number;
3195
+ /**
3196
+ * Reverb multiplier.
3197
+ */
3198
+ reverbGain: number;
3199
+ /**
3200
+ * Chorus multiplier.
3201
+ */
3202
+ chorusGain: number;
3203
+ /**
3204
+ * Delay multiplier.
3205
+ */
3206
+ delayGain: number;
3207
+ /**
3208
+ * If note on should be received.
3209
+ */
3210
+ rxNoteOn: boolean;
3211
+ /**
3212
+ * If note off should be received.
3213
+ * Note:
3214
+ * Due to the way sound banks implement drums (as 100s release time),
3215
+ * this means killing the voice on note off, not releasing it.
3216
+ */
3217
+ rxNoteOff: boolean;
3218
+ copyInto(p: DrumParameters): this;
3219
+ }
3220
+
2622
3221
  /**
2623
3222
  * This class represents a single MIDI Channel within the synthesizer.
2624
3223
  */
2625
3224
  declare class MIDIChannel {
3225
+ /**
3226
+ * An array of MIDI controllers for the channel.
3227
+ * This array is used to store the state of various MIDI controllers
3228
+ * such as volume, pan, modulation, etc.
3229
+ * @remarks
3230
+ * A bit of an explanation:
3231
+ * The controller table is stored as an int16 array, it stores 14-bit values.
3232
+ * This controller table is then extended with the modulatorSources section,
3233
+ * for example, pitch range and pitch range depth.
3234
+ * This allows us for precise control range and supports full pitch-wheel resolution.
3235
+ */
2626
3236
  readonly midiControllers: Int16Array;
2627
3237
  /**
2628
3238
  * An array for the MIDI 2.0 Per-note pitch wheels.
@@ -2639,20 +3249,24 @@ declare class MIDIChannel {
2639
3249
  * Refer to controller_tables.ts for the index definitions.
2640
3250
  */
2641
3251
  readonly customControllers: Float32Array;
2642
- /**
2643
- * The key shift of the channel (in semitones).
2644
- */
2645
- channelTransposeKeyShift: number;
2646
3252
  /**
2647
3253
  * An array of octave tuning values for each note on the channel.
2648
3254
  * Each index corresponds to a note (0 = C, 1 = C#, ..., 11 = B).
2649
3255
  * Note: Repeated every 12 notes.
2650
3256
  */
2651
- channelOctaveTuning: Int8Array;
3257
+ readonly octaveTuning: Int8Array;
3258
+ /**
3259
+ * Parameters for each drum instrument.
3260
+ */
3261
+ readonly drumParams: DrumParameters[];
2652
3262
  /**
2653
3263
  * A system for dynamic modulator assignment for advanced system exclusives.
2654
3264
  */
2655
3265
  sysExModulators: DynamicModulatorSystem;
3266
+ /**
3267
+ * The key shift of the channel (in semitones).
3268
+ */
3269
+ keyShift: number;
2656
3270
  /**
2657
3271
  * Indicates whether this channel is a drum channel.
2658
3272
  */
@@ -2661,6 +3275,26 @@ declare class MIDIChannel {
2661
3275
  * Enables random panning for every note played on this channel.
2662
3276
  */
2663
3277
  randomPan: boolean;
3278
+ /**
3279
+ * Indicates whether this channel uses the insertion EFX processor.
3280
+ */
3281
+ insertionEnabled: boolean;
3282
+ /**
3283
+ * CC1 for GS system exclusive.
3284
+ * An arbitrary MIDI controller, which can be bound to any synthesis parameter.
3285
+ */
3286
+ cc1: number;
3287
+ /**
3288
+ * CC2 for GS system exclusive.
3289
+ * An arbitrary MIDI controller, which can be bound to any synthesis parameter.
3290
+ */
3291
+ cc2: number;
3292
+ /**
3293
+ * Drum map for GS system exclusive tracking.
3294
+ * Only used for selecting the correct channel when setting drum parameters through sysEx,
3295
+ * as those don't specify the channel, but the drum number.
3296
+ */
3297
+ drumMap: number;
2664
3298
  /**
2665
3299
  * The current state of the data entry for the channel.
2666
3300
  */
@@ -2684,17 +3318,13 @@ declare class MIDIChannel {
2684
3318
  * Indicates the MIDI system when the preset was locked.
2685
3319
  */
2686
3320
  lockedSystem: SynthSystem;
2687
- /**
2688
- * Indicates whether the GS NRPN parameters are enabled for this channel.
2689
- */
2690
- lockGSNRPNParams: boolean;
2691
3321
  /**
2692
3322
  * The vibrato settings for the channel.
2693
3323
  * @property depth - Depth of the vibrato effect in cents.
2694
3324
  * @property delay - Delay before the vibrato effect starts (in seconds).
2695
3325
  * @property rate - Rate of the vibrato oscillation (in Hz).
2696
3326
  */
2697
- channelVibrato: {
3327
+ readonly channelVibrato: {
2698
3328
  delay: number;
2699
3329
  depth: number;
2700
3330
  rate: number;
@@ -2713,6 +3343,11 @@ declare class MIDIChannel {
2713
3343
  * The channel's number (0-based index)
2714
3344
  */
2715
3345
  readonly channel: number;
3346
+ /**
3347
+ * The channel's receiving number (0-based index)
3348
+ * Only used when customChannelNumbers is enabled
3349
+ */
3350
+ rxChannel: number;
2716
3351
  /**
2717
3352
  * Core synthesis engine.
2718
3353
  */
@@ -2764,7 +3399,7 @@ declare class MIDIChannel {
2764
3399
  * @param dataValue The value to set for the data entry coarse controller (0-127).
2765
3400
  */
2766
3401
  dataEntryCoarse: typeof dataEntryCoarse;
2767
- readonly renderVoice: (voice: Voice, timeNow: number, outputL: Float32Array<ArrayBufferLike>, outputR: Float32Array<ArrayBufferLike>, reverbL: Float32Array<ArrayBufferLike>, reverbR: Float32Array<ArrayBufferLike>, chorusL: Float32Array<ArrayBufferLike>, chorusR: Float32Array<ArrayBufferLike>, startIndex: number, sampleCount: number) => void;
3402
+ readonly renderVoice: (voice: Voice, timeNow: number, outputL: Float32Array<ArrayBufferLike>, outputR: Float32Array<ArrayBufferLike>, startIndex: number, sampleCount: number) => void;
2768
3403
  /**
2769
3404
  * Per-note pitch wheel mode uses the pitchWheels table as source
2770
3405
  * instead of the regular entry in the midiControllers table.
@@ -2889,17 +3524,6 @@ declare class MIDIChannel {
2889
3524
  * @param drums
2890
3525
  */
2891
3526
  setGSDrums(drums: boolean): void;
2892
- /**
2893
- * Sets a custom vibrato.
2894
- * @param depth In cents.
2895
- * @param rate In Hertz.
2896
- * @param delay seconds.
2897
- */
2898
- setVibrato(depth: number, rate: number, delay: number): void;
2899
- /**
2900
- * Disables and locks all GS NPRN parameters, including the custom vibrato.
2901
- */
2902
- disableAndLockGSNRPN(): void;
2903
3527
  resetGeneratorOverrides(): void;
2904
3528
  setGeneratorOverride(gen: GeneratorType, value: number, realtime?: boolean): void;
2905
3529
  resetGeneratorOffsets(): void;
@@ -2924,6 +3548,8 @@ declare class MIDIChannel {
2924
3548
  * Sends this channel's property
2925
3549
  */
2926
3550
  sendChannelProperty(): void;
3551
+ protected resetDrumParams(): void;
3552
+ protected resetVibratoParams(): void;
2927
3553
  protected computeModulatorsAll(sourceUsesCC: -1 | 0 | 1, sourceIndex: number): void;
2928
3554
  protected setBankMSB(bankMSB: number): void;
2929
3555
  protected setBankLSB(bankLSB: number): void;
@@ -2954,23 +3580,84 @@ declare class SpessaSynthProcessor {
2954
3580
  /**
2955
3581
  * Renders float32 audio data to stereo outputs; buffer size of 128 is recommended.
2956
3582
  * All float arrays must have the same length.
2957
- * @param outputs output stereo channels (L, R).
2958
- * @param reverb reverb stereo channels (L, R).
2959
- * @param chorus chorus stereo channels (L, R).
3583
+ * @param left the left output channel.
3584
+ * @param right the right output channel.
2960
3585
  * @param startIndex start offset of the passed arrays, rendering starts at this index, defaults to 0.
2961
3586
  * @param sampleCount the length of the rendered buffer, defaults to float32array length - startOffset.
2962
3587
  */
2963
- readonly renderAudio: (outputs: Float32Array[], reverb: Float32Array[], chorus: Float32Array[], startIndex?: number, sampleCount?: number) => void;
3588
+ readonly process: (left: Float32Array, right: Float32Array, startIndex?: number, sampleCount?: number) => void;
2964
3589
  /**
2965
- * Renders the float32 audio data of each channel; buffer size of 128 is recommended.
3590
+ * Renders float32 audio data to stereo outputs; buffer size of 128 is recommended.
2966
3591
  * All float arrays must have the same length.
2967
- * @param reverbChannels reverb stereo channels (L, R).
2968
- * @param chorusChannels chorus stereo channels (L, R).
2969
- * @param separateChannels a total of 16 stereo pairs (L, R) for each MIDI channel.
3592
+ * @param outputs any number stereo pairs (L, R) to render channels separately into.
3593
+ * @param effectsLeft the left stereo effect output buffer.
3594
+ * @param effectsRight the left stereo effect output buffer.
2970
3595
  * @param startIndex start offset of the passed arrays, rendering starts at this index, defaults to 0.
2971
3596
  * @param sampleCount the length of the rendered buffer, defaults to float32array length - startOffset.
2972
3597
  */
2973
- readonly renderAudioSplit: (reverb: Float32Array[], chorus: Float32Array[], separate: Float32Array[][], startIndex?: number, sampleCount?: number) => void;
3598
+ readonly processSplit: (outputs: Float32Array[][], effectsLeft: Float32Array, effectsRight: Float32Array, startIndex?: number, sampleCount?: number) => void;
3599
+ /**
3600
+ * Executes a system exclusive message for the synthesizer.
3601
+ * @param syx The system exclusive message as an array of bytes.
3602
+ * @param channelOffset The channel offset to apply (default is 0).
3603
+ */
3604
+ readonly systemExclusive: (syx: SysExAcceptedArray, channelOffset?: number) => void;
3605
+ /**
3606
+ * Executes a MIDI controller change message on the specified channel.
3607
+ * @param channel The MIDI channel to change the controller on.
3608
+ * @param controllerNumber The MIDI controller number to change.
3609
+ * @param controllerValue The value to set the controller to.
3610
+ */
3611
+ readonly controllerChange: (channel: number, controllerNumber: MIDIController, controllerValue: number) => void;
3612
+ /**
3613
+ * Executes a MIDI Note-on message on the specified channel.
3614
+ * @param channel The MIDI channel to send the note on.
3615
+ * @param midiNote The MIDI note number to play.
3616
+ * @param velocity The velocity of the note, from 0 to 127.
3617
+ * @remarks
3618
+ * If the velocity is 0, it will be treated as a Note-off message.
3619
+ */
3620
+ readonly noteOn: (channel: number, midiNote: number, velocity: number) => void;
3621
+ /**
3622
+ * Executes a MIDI Note-off message on the specified channel.
3623
+ * @param channel The MIDI channel to send the note off.
3624
+ * @param midiNote The MIDI note number to stop playing.
3625
+ */
3626
+ readonly noteOff: (channel: number, midiNote: number) => void;
3627
+ /**
3628
+ * Executes a MIDI Poly Pressure (Aftertouch) message on the specified channel.
3629
+ * @param channel The MIDI channel to send the poly pressure on.
3630
+ * @param midiNote The MIDI note number to apply the pressure to.
3631
+ * @param pressure The pressure value, from 0 to 127.
3632
+ */
3633
+ readonly polyPressure: (channel: number, midiNote: number, pressure: number) => void;
3634
+ /**
3635
+ * Executes a MIDI Channel Pressure (Aftertouch) message on the specified channel.
3636
+ * @param channel The MIDI channel to send the channel pressure on.
3637
+ * @param pressure The pressure value, from 0 to 127.
3638
+ */
3639
+ readonly channelPressure: (channel: number, pressure: number) => void;
3640
+ /**
3641
+ * Executes a MIDI Pitch Wheel message on the specified channel.
3642
+ * @param channel The MIDI channel to send the pitch wheel on.
3643
+ * @param pitch The new pitch value: 0-16384
3644
+ * @param midiNote The MIDI note number (optional), pass -1 for the regular pitch wheel.
3645
+ */
3646
+ readonly pitchWheel: (channel: number, pitch: number, midiNote?: number) => void;
3647
+ /**
3648
+ * Executes a MIDI Program Change message on the specified channel.
3649
+ * @param channel The MIDI channel to send the program change on.
3650
+ * @param programNumber The program number to change to, from 0 to 127.
3651
+ */
3652
+ readonly programChange: (channel: number, programNumber: number) => void;
3653
+ /**
3654
+ * Processes a raw MIDI message.
3655
+ * @param message The message to process.
3656
+ * @param channelOffset The channel offset for the message.
3657
+ * @param force If true, forces the message to be processed.
3658
+ * @param options Additional options for scheduling the message.
3659
+ */
3660
+ readonly processMessage: (message: Uint8Array | number[], channelOffset?: number, force?: boolean, options?: SynthMethodOptions) => void;
2974
3661
  /**
2975
3662
  * Core synthesis engine.
2976
3663
  */
@@ -3013,6 +3700,18 @@ declare class SpessaSynthProcessor {
3013
3700
  * The current time of the synthesizer, in seconds. You probably should not modify this directly.
3014
3701
  */
3015
3702
  get currentSynthTime(): number;
3703
+ /**
3704
+ * Synthesizer's reverb processor.
3705
+ */
3706
+ get reverbProcessor(): ReverbProcessor;
3707
+ /**
3708
+ * Synthesizer's chorus processor.
3709
+ */
3710
+ get chorusProcessor(): ChorusProcessor;
3711
+ /**
3712
+ * Synthesizer's delay processor.
3713
+ */
3714
+ get delayProcessor(): DelayProcessor;
3016
3715
  /**
3017
3716
  * The sound bank manager, which manages all sound banks and presets.
3018
3717
  */
@@ -3021,6 +3720,29 @@ declare class SpessaSynthProcessor {
3021
3720
  * Handles the custom key overrides: velocity and preset
3022
3721
  */
3023
3722
  get keyModifierManager(): KeyModifierManager;
3723
+ /**
3724
+ * Renders float32 audio data to stereo outputs; buffer size of 128 is recommended.
3725
+ * All float arrays must have the same length.
3726
+ * @param outputs output stereo channels (L, R).
3727
+ * @param reverb unused legacy parameter.
3728
+ * @param chorus unused legacy parameter.
3729
+ * @param startIndex start offset of the passed arrays, rendering starts at this index, defaults to 0.
3730
+ * @param sampleCount the length of the rendered buffer, defaults to float32array length - startOffset.
3731
+ * @deprecated use process() as the effects are now integrated.
3732
+ */
3733
+ renderAudio(outputs: Float32Array[], reverb: Float32Array[], chorus: Float32Array[], startIndex?: number, sampleCount?: number): void;
3734
+ /**
3735
+ * Renders the float32 audio data of each channel, routing effects to external outputs.
3736
+ * Buffer size of 128 is recommended.
3737
+ * All float arrays must have the same length.
3738
+ * @param reverbChannels unused legacy parameter.
3739
+ * @param chorusChannels unused legacy parameter.
3740
+ * @param separateChannels a total of 16 stereo pairs (L, R) for each MIDI channel.
3741
+ * @param startIndex start offset of the passed arrays, rendering starts at this index, defaults to 0.
3742
+ * @param sampleCount the length of the rendered buffer, defaults to float32array length - startOffset.
3743
+ * @deprecated use processSplit() as the effects are now integrated.
3744
+ */
3745
+ renderAudioSplit(reverbChannels: Float32Array[], chorusChannels: Float32Array[], separateChannels: Float32Array[][], startIndex?: number, sampleCount?: number): void;
3024
3746
  /**
3025
3747
  * A handler for missing presets during program change. By default, it warns to console.
3026
3748
  * @param patch The MIDI patch that was requested.
@@ -3028,12 +3750,6 @@ declare class SpessaSynthProcessor {
3028
3750
  * @returns If a BasicPreset instance is returned, it will be used by the channel.
3029
3751
  */
3030
3752
  onMissingPreset: (patch: MIDIPatch, system: SynthSystem) => BasicPreset | undefined;
3031
- /**
3032
- * Executes a system exclusive message for the synthesizer.
3033
- * @param syx The system exclusive message as an array of bytes.
3034
- * @param channelOffset The channel offset to apply (default is 0).
3035
- */
3036
- systemExclusive(syx: SysExAcceptedArray, channelOffset?: number): void;
3037
3753
  /**
3038
3754
  * Sets a master parameter of the synthesizer.
3039
3755
  * @param type The type of the master parameter to set.
@@ -3065,6 +3781,10 @@ declare class SpessaSynthProcessor {
3065
3781
  * Gets a synthesizer snapshot from this processor instance.
3066
3782
  */
3067
3783
  getSnapshot(): SynthesizerSnapshot;
3784
+ /**
3785
+ * @internal
3786
+ */
3787
+ getInsertionSnapshot(): InsertionProcessorSnapshot;
3068
3788
  /**
3069
3789
  * Sets the embedded sound bank.
3070
3790
  * @param bank The sound bank file to set.
@@ -3083,68 +3803,12 @@ declare class SpessaSynthProcessor {
3083
3803
  * This is irreversible, so use with caution.
3084
3804
  */
3085
3805
  destroySynthProcessor(): void;
3086
- /**
3087
- * Executes a MIDI controller change message on the specified channel.
3088
- * @param channel The MIDI channel to change the controller on.
3089
- * @param controllerNumber The MIDI controller number to change.
3090
- * @param controllerValue The value to set the controller to.
3091
- */
3092
- controllerChange(channel: number, controllerNumber: MIDIController, controllerValue: number): void;
3093
- /**
3094
- * Executes a MIDI Note-on message on the specified channel.
3095
- * @param channel The MIDI channel to send the note on.
3096
- * @param midiNote The MIDI note number to play.
3097
- * @param velocity The velocity of the note, from 0 to 127.
3098
- * @remarks
3099
- * If the velocity is 0, it will be treated as a Note-off message.
3100
- */
3101
- noteOn(channel: number, midiNote: number, velocity: number): void;
3102
- /**
3103
- * Executes a MIDI Note-off message on the specified channel.
3104
- * @param channel The MIDI channel to send the note off.
3105
- * @param midiNote The MIDI note number to stop playing.
3106
- */
3107
- noteOff(channel: number, midiNote: number): void;
3108
- /**
3109
- * Executes a MIDI Poly Pressure (Aftertouch) message on the specified channel.
3110
- * @param channel The MIDI channel to send the poly pressure on.
3111
- * @param midiNote The MIDI note number to apply the pressure to.
3112
- * @param pressure The pressure value, from 0 to 127.
3113
- */
3114
- polyPressure(channel: number, midiNote: number, pressure: number): void;
3115
- /**
3116
- * Executes a MIDI Channel Pressure (Aftertouch) message on the specified channel.
3117
- * @param channel The MIDI channel to send the channel pressure on.
3118
- * @param pressure The pressure value, from 0 to 127.
3119
- */
3120
- channelPressure(channel: number, pressure: number): void;
3121
- /**
3122
- * Executes a MIDI Pitch Wheel message on the specified channel.
3123
- * @param channel The MIDI channel to send the pitch wheel on.
3124
- * @param pitch The new pitch value: 0-16384
3125
- * @param midiNote The MIDI note number, pass -1 for the regular pitch wheel
3126
- */
3127
- pitchWheel(channel: number, pitch: number, midiNote?: number): void;
3128
- /**
3129
- * Executes a MIDI Program Change message on the specified channel.
3130
- * @param channel The MIDI channel to send the program change on.
3131
- * @param programNumber The program number to change to, from 0 to 127.
3132
- */
3133
- programChange(channel: number, programNumber: number): void;
3134
3806
  /**
3135
3807
  * DEPRECATED, does nothing!
3136
3808
  * @param amount
3137
3809
  * @deprecated
3138
3810
  */
3139
3811
  killVoices(amount: number): void;
3140
- /**
3141
- * Processes a raw MIDI message.
3142
- * @param message The message to process.
3143
- * @param channelOffset The channel offset for the message.
3144
- * @param force If true, forces the message to be processed.
3145
- * @param options Additional options for scheduling the message.
3146
- */
3147
- processMessage(message: Uint8Array | number[], channelOffset?: number, force?: boolean, options?: SynthMethodOptions): void;
3148
3812
  /**
3149
3813
  * Clears the synthesizer's voice cache.
3150
3814
  */
@@ -3197,10 +3861,6 @@ declare class ChannelSnapshot {
3197
3861
  * Array of custom (not SF2) control values such as RPN pitch tuning, transpose, modulation depth, etc.
3198
3862
  */
3199
3863
  customControllers: Float32Array;
3200
- /**
3201
- * Indicates whether the channel vibrato is locked.
3202
- */
3203
- lockVibrato: boolean;
3204
3864
  /**
3205
3865
  * The channel's vibrato settings.
3206
3866
  * @property depth Vibrato depth, in gain.
@@ -3215,11 +3875,15 @@ declare class ChannelSnapshot {
3215
3875
  /**
3216
3876
  * Key shift for the channel.
3217
3877
  */
3218
- channelTransposeKeyShift: number;
3878
+ keyShift: number;
3219
3879
  /**
3220
3880
  * The channel's octave tuning in cents.
3221
3881
  */
3222
- channelOctaveTuning: Int8Array;
3882
+ octaveTuning: Int8Array;
3883
+ /**
3884
+ * Parameters for each drum instrument.
3885
+ */
3886
+ drumParams: DrumParameters[];
3223
3887
  /**
3224
3888
  * Indicates whether the channel is muted.
3225
3889
  */
@@ -3232,11 +3896,11 @@ declare class ChannelSnapshot {
3232
3896
  * The channel number this snapshot represents.
3233
3897
  */
3234
3898
  channelNumber: number;
3235
- constructor(patch: MIDIPatchNamed, lockPreset: boolean, lockedSystem: SynthSystem, midiControllers: Int16Array, lockedControllers: boolean[], customControllers: Float32Array, lockVibrato: boolean, channelVibrato: {
3899
+ constructor(patch: MIDIPatchNamed, lockPreset: boolean, lockedSystem: SynthSystem, midiControllers: Int16Array, lockedControllers: boolean[], customControllers: Float32Array, channelVibrato: {
3236
3900
  delay: number;
3237
3901
  depth: number;
3238
3902
  rate: number;
3239
- }, channelTransposeKeyShift: number, channelOctaveTuning: Int8Array, isMuted: boolean, drumChannel: boolean, channelNumber: number);
3903
+ }, channelTransposeKeyShift: number, channelOctaveTuning: Int8Array, drumParams: DrumParameters[], isMuted: boolean, drumChannel: boolean, channelNumber: number);
3240
3904
  /**
3241
3905
  * Creates a copy of existing snapshot.
3242
3906
  * @param snapshot The snapshot to create a copy from.
@@ -3268,7 +3932,11 @@ declare class SynthesizerSnapshot {
3268
3932
  */
3269
3933
  keyMappings: (KeyModifier | undefined)[][];
3270
3934
  masterParameters: MasterParameterType;
3271
- constructor(channelSnapshots: ChannelSnapshot[], masterParameters: MasterParameterType, keyMappings: (KeyModifier | undefined)[][]);
3935
+ reverbSnapshot: ReverbProcessorSnapshot;
3936
+ chorusSnapshot: ChorusProcessorSnapshot;
3937
+ delaySnapshot: DelayProcessorSnapshot;
3938
+ insertionSnapshot: InsertionProcessorSnapshot;
3939
+ constructor(channelSnapshots: ChannelSnapshot[], masterParameters: MasterParameterType, keyMappings: (KeyModifier | undefined)[][], reverbSnapshot: ReverbProcessorSnapshot, chorusSnapshot: ChorusProcessorSnapshot, delaySnapshot: DelayProcessorSnapshot, insertionSnapshot: InsertionProcessorSnapshot);
3272
3940
  /**
3273
3941
  * Creates a new synthesizer snapshot from the given SpessaSynthProcessor.
3274
3942
  * @param processor the processor to take a snapshot of.
@@ -3287,6 +3955,18 @@ declare class SynthesizerSnapshot {
3287
3955
  apply(processor: SpessaSynthProcessor): void;
3288
3956
  }
3289
3957
 
3958
+ interface ModifyMIDIOptions {
3959
+ programChanges: DesiredProgramChange[];
3960
+ controllerChanges: DesiredControllerChange[];
3961
+ channelsToClear: number[];
3962
+ channelsToTranspose: DesiredChannelTranspose[];
3963
+ clearDrumParams: boolean;
3964
+ reverbParams?: ReverbProcessorSnapshot;
3965
+ chorusParams?: ChorusProcessorSnapshot;
3966
+ delayParams?: DelayProcessorSnapshot;
3967
+ insertionParams?: InsertionProcessorSnapshot;
3968
+ }
3969
+
3290
3970
  declare class MIDITrack {
3291
3971
  /**
3292
3972
  * The name of this track.
@@ -3310,8 +3990,15 @@ declare class MIDITrack {
3310
3990
  * Adds an event to the track.
3311
3991
  * @param event The event to add.
3312
3992
  * @param index The index at which to add this event.
3993
+ * @deprecated Use addEvents instead
3313
3994
  */
3314
3995
  addEvent(event: MIDIMessage, index: number): void;
3996
+ /**
3997
+ * Adds events to the track.
3998
+ * @param index The index at which to add these event.
3999
+ * @param events The events to add.
4000
+ */
4001
+ addEvents(index: number, ...events: MIDIMessage[]): void;
3315
4002
  /**
3316
4003
  * Removes an event from the track.
3317
4004
  * @param index The index of the event to remove.
@@ -3496,11 +4183,15 @@ declare class BasicMIDI {
3496
4183
  * Allows easy editing of the file by removing channels, changing programs,
3497
4184
  * changing controllers and transposing channels. Note that this modifies the MIDI *in-place*.
3498
4185
  * @param desiredProgramChanges - The programs to set on given channels.
3499
- * @param desiredControllerChanges - The controllers to set on given channels.
3500
- * @param desiredChannelsToClear - The channels to remove from the sequence.
3501
- * @param desiredChannelsToTranspose - The channels to transpose.
4186
+ * @param controllerChanges - The controllers to set on given channels.
4187
+ * @param channelsToClear - The channels to remove from the sequence.
4188
+ * @param channelsToTranspose - The channels to transpose.
4189
+ * @param clearDrumParams - If the drum parameters should be cleared.
4190
+ * @param reverbParams - The desired GS reverb params, leave undefined for no change.
4191
+ * @param chorusParams - The desired GS chorus params, leave undefined for no change.
4192
+ * @param delayParams - The desired GS delay params, leave undefined for no change.
3502
4193
  */
3503
- modify(desiredProgramChanges?: DesiredProgramChange[], desiredControllerChanges?: DesiredControllerChange[], desiredChannelsToClear?: number[], desiredChannelsToTranspose?: DesiredChannelTranspose[]): void;
4194
+ modify({ programChanges, controllerChanges, channelsToClear, channelsToTranspose, clearDrumParams, reverbParams, chorusParams, delayParams, insertionParams }: ModifyMIDIOptions): void;
3504
4195
  /**
3505
4196
  * Modifies the sequence *in-place* according to the locked presets and controllers in the given snapshot.
3506
4197
  * @param snapshot the snapshot to apply.
@@ -4087,9 +4778,9 @@ declare class SpessaSynthSequencer {
4087
4778
  songs: BasicMIDI[];
4088
4779
  /**
4089
4780
  * The shuffled song indexes.
4090
- * This is used when shuffleMode is enabled.
4781
+ * This is used when shuffle mode is enabled.
4091
4782
  */
4092
- shuffledSongIndexes: number[];
4783
+ readonly shuffledSongIndexes: number[];
4093
4784
  /**
4094
4785
  * The synthesizer connected to the sequencer.
4095
4786
  */
@@ -4204,23 +4895,25 @@ declare class SpessaSynthSequencer {
4204
4895
  protected _songIndex: number;
4205
4896
  /**
4206
4897
  * The current song index in the song list.
4207
- * If shuffleMode is enabled, this is the index of the shuffled song list.
4898
+ * If shuffle mode is enabled, this is the index of the shuffled song list.
4208
4899
  */
4209
4900
  get songIndex(): number;
4210
4901
  /**
4211
4902
  * The current song index in the song list.
4212
- * If shuffleMode is enabled, this is the index of the shuffled song list.
4903
+ * If shuffle mode is enabled, this is the index of the shuffled song list.
4213
4904
  */
4214
4905
  set songIndex(value: number);
4215
4906
  protected _shuffleMode: boolean;
4216
4907
  /**
4217
4908
  * Controls if the sequencer should shuffle the songs in the song list.
4218
4909
  * If true, the sequencer will play the songs in a random order.
4910
+ * Songs are shuffled on a `loadNewSongList` call.
4219
4911
  */
4220
4912
  get shuffleMode(): boolean;
4221
4913
  /**
4222
4914
  * Controls if the sequencer should shuffle the songs in the song list.
4223
4915
  * If true, the sequencer will play the songs in a random order.
4916
+ * Songs are shuffled on a `loadNewSongList` call.
4224
4917
  */
4225
4918
  set shuffleMode(on: boolean);
4226
4919
  /**
@@ -4306,7 +4999,6 @@ declare class SpessaSynthSequencer {
4306
4999
  protected sendMIDINoteOn(channel: number, midiNote: number, velocity: number): void;
4307
5000
  protected sendMIDINoteOff(channel: number, midiNote: number): void;
4308
5001
  protected sendMIDICC(channel: number, type: MIDIController, value: number): void;
4309
- protected sendMIDIProgramChange(channel: number, program: number): void;
4310
5002
  /**
4311
5003
  * Sets the pitch of the given channel
4312
5004
  * @param channel usually 0-15: the channel to change pitch
@@ -4315,24 +5007,6 @@ declare class SpessaSynthSequencer {
4315
5007
  protected sendMIDIPitchWheel(channel: number, pitch: number): void;
4316
5008
  }
4317
5009
 
4318
- declare const NON_CC_INDEX_OFFSET = 128;
4319
- declare const CONTROLLER_TABLE_SIZE = 147;
4320
- /**
4321
- * An array with the default MIDI controller values. Note that these are 14-bit, not 7-bit.
4322
- */
4323
- declare const defaultMIDIControllerValues: Int16Array<ArrayBuffer>;
4324
- declare const setResetValue: (i: MIDIController, v: number) => number;
4325
- declare const CUSTOM_CONTROLLER_TABLE_SIZE: number;
4326
- declare const customResetArray: Float32Array<ArrayBuffer>;
4327
-
4328
- declare const DEFAULT_MASTER_PARAMETERS: MasterParameterType;
4329
-
4330
- /**
4331
- * Default MIDI drum channel.
4332
- */
4333
- declare const DEFAULT_PERCUSSION = 9;
4334
- declare const ALL_CHANNELS_OR_DIFFERENT_ACTION = -1;
4335
-
4336
5010
  declare class SoundBankLoader {
4337
5011
  /**
4338
5012
  * Loads a sound bank from a file buffer.
@@ -4343,4 +5017,4 @@ declare class SoundBankLoader {
4343
5017
  private static loadDLS;
4344
5018
  }
4345
5019
 
4346
- export { ALL_CHANNELS_OR_DIFFERENT_ACTION, BasicGlobalZone, BasicInstrument, BasicInstrumentZone, BasicMIDI, BasicPreset, BasicPresetZone, BasicSample, BasicSoundBank, BasicZone, CONTROLLER_TABLE_SIZE, CUSTOM_CONTROLLER_TABLE_SIZE, type CachedVoiceList, type ChannelPressureCallback, type ChannelProperty, type ChannelPropertyChangeCallback, ChannelSnapshot, type ControllerChangeCallback, type CustomController, DEFAULT_MASTER_PARAMETERS, DEFAULT_PERCUSSION, DEFAULT_WAV_WRITE_OPTIONS, type DLSChunkFourCC, type DLSDestination, type DLSInfoFourCC, type DLSLoop, type DLSLoopType, DLSLoopTypes, type DLSSource, type DLSTransform, type DLSWriteOptions, type DataEntryState, type DesiredChannelTranspose, type DesiredControllerChange, type DesiredProgramChange, type DrumChangeCallback, EmptySample, type FourCC, GENERATORS_AMOUNT, Generator, type GeneratorType, type GenericBankInfoFourCC, type GenericRIFFFourCC, type GenericRange, IndexedByteArray, type InterpolationType, KeyModifier, MAX_GENERATOR, MIDIBuilder, type MIDIController, type MIDIFormat, type MIDILoop, type MIDILoopType, MIDIMessage, type MIDIMessageType, type MIDIPatch, type MIDIPatchNamed, MIDIPatchTools, MIDITrack, type MasterParameterChangeCallback, type MasterParameterType, Modulator, type ModulatorCurveType, ModulatorSource, type ModulatorSourceEnum, type ModulatorSourceIndex, type ModulatorTransformType, type MuteChannelCallback, NON_CC_INDEX_OFFSET, type NoteOffCallback, type NoteOnCallback, type NoteTime, type PitchWheelCallback, type PolyPressureCallback, type PresetList, type PresetListEntry, type ProgramChangeCallback, type ProgressFunction, type RMIDIWriteOptions, type RMIDInfoData, type RMIDInfoFourCC, type SF2ChunkFourCC, type SF2InfoFourCC, type SF2VersionTag, type SampleEncodingFunction, type SampleLoopingMode, type SampleType, type SequencerEvent, type SequencerEventData, type SoundBankErrorCallback, type SoundBankInfoData, type SoundBankInfoFourCC, SoundBankLoader, type SoundBankManagerListEntry, type SoundFont2WriteOptions, SpessaSynthCoreUtils, SpessaSynthLogging, SpessaSynthProcessor, SpessaSynthSequencer, type StopAllCallback, type SynthMethodOptions, type SynthProcessorEvent, type SynthProcessorEventData, type SynthProcessorOptions, type SynthSystem, SynthesizerSnapshot, type TempoChange, type VoiceParameters, type WaveMetadata, type WaveWriteOptions, audioToWav, customControllers, customResetArray, dataEntryStates, defaultGeneratorValues, defaultMIDIControllerValues, dlsDestinations, dlsSources, generatorLimits, generatorTypes, interpolationTypes, midiControllers, midiMessageTypes, modulatorCurveTypes, modulatorSources, modulatorTransformTypes, sampleTypes, setResetValue };
5020
+ export { ALL_CHANNELS_OR_DIFFERENT_ACTION, BasicGlobalZone, BasicInstrument, BasicInstrumentZone, BasicMIDI, BasicPreset, BasicPresetZone, BasicSample, BasicSoundBank, BasicZone, CONTROLLER_TABLE_SIZE, CUSTOM_CONTROLLER_TABLE_SIZE, type CachedVoiceList, type ChannelPressureCallback, type ChannelProperty, type ChannelPropertyChangeCallback, ChannelSnapshot, type ChorusProcessor, type ChorusProcessorSnapshot, type ControllerChangeCallback, type CustomController, DEFAULT_MASTER_PARAMETERS, DEFAULT_PERCUSSION, DEFAULT_WAV_WRITE_OPTIONS, type DLSChunkFourCC, type DLSDestination, type DLSInfoFourCC, type DLSLoop, type DLSLoopType, DLSLoopTypes, type DLSSource, type DLSTransform, type DLSWriteOptions, type DataEntryState, type DelayProcessor, type DelayProcessorSnapshot, type DesiredChannelTranspose, type DesiredControllerChange, type DesiredProgramChange, type DrumChangeCallback, type EffectChangeCallback, EmptySample, type FourCC, GENERATORS_AMOUNT, Generator, type GeneratorType, type GenericBankInfoFourCC, type GenericRIFFFourCC, type GenericRange, IndexedByteArray, type InsertionProcessor, type InsertionProcessorConstructor, type InsertionProcessorSnapshot, type InterpolationType, KeyModifier, MAX_GENERATOR, MIDIBuilder, type MIDIController, type MIDIFormat, type MIDILoop, type MIDILoopType, MIDIMessage, type MIDIMessageType, type MIDIPatch, type MIDIPatchNamed, MIDIPatchTools, MIDITrack, type MasterParameterChangeCallback, type MasterParameterType, Modulator, type ModulatorCurveType, ModulatorSource, type ModulatorSourceEnum, type ModulatorSourceIndex, type ModulatorTransformType, type MuteChannelCallback, NON_CC_INDEX_OFFSET, type NoteOffCallback, type NoteOnCallback, type NoteTime, type PitchWheelCallback, type PolyPressureCallback, type PresetList, type PresetListEntry, type ProgramChangeCallback, type ProgressFunction, type RMIDIWriteOptions, type RMIDInfoData, type RMIDInfoFourCC, type ReverbProcessor, type ReverbProcessorSnapshot, type SF2ChunkFourCC, type SF2InfoFourCC, type SF2VersionTag, type SampleEncodingFunction, type SampleLoopingMode, type SampleType, type SequencerEvent, type SequencerEventData, type SoundBankErrorCallback, type SoundBankInfoData, type SoundBankInfoFourCC, SoundBankLoader, type SoundBankManagerListEntry, type SoundFont2WriteOptions, SpessaSynthCoreUtils, SpessaSynthLogging, SpessaSynthProcessor, SpessaSynthSequencer, type StopAllCallback, type SynthMethodOptions, type SynthProcessorEvent, type SynthProcessorEventData, type SynthProcessorOptions, type SynthSystem, SynthesizerSnapshot, type TempoChange, type VoiceParameters, type WaveMetadata, type WaveWriteOptions, audioToWav, customControllers, customResetArray, dataEntryStates, defaultGeneratorValues, defaultMIDIControllerValues, dlsDestinations, dlsSources, drumReverbResetArray, generatorLimits, generatorTypes, interpolationTypes, midiControllers, midiMessageTypes, modulatorCurveTypes, modulatorSources, modulatorTransformTypes, sampleTypes, setResetValue };