spessasynth_core 4.4.0 → 4.4.2

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
@@ -1,10 +1,9 @@
1
- //#region src/utils/types.d.ts
2
1
  /**
3
2
  * Options for writing a WAVE file.
4
3
  *
5
4
  * @group Utilities
6
5
  */
7
- interface WaveWriteOptions {
6
+ export interface WaveWriteOptions {
8
7
  /**
9
8
  * If true, the gain of the entire song will be adjusted,
10
9
  * so the max sample is always 32,767 or min is always -32,768 (whichever is greater). Recommended.
@@ -37,7 +36,7 @@ interface WaveWriteOptions {
37
36
  *
38
37
  * @group Utilities
39
38
  */
40
- interface WaveMetadata {
39
+ export interface WaveMetadata {
41
40
  /**
42
41
  * The song's title.
43
42
  * This writes to the `INAM` chunk.
@@ -59,8 +58,6 @@ interface WaveMetadata {
59
58
  */
60
59
  genre: string;
61
60
  }
62
- //#endregion
63
- //#region src/utils/indexed_array.d.ts
64
61
  /**
65
62
  * Indexed_array.ts
66
63
  * purpose: extends Uint8Array with a currentIndex property.
@@ -70,7 +67,7 @@ interface WaveMetadata {
70
67
  *
71
68
  * @group Utilities
72
69
  */
73
- declare class IndexedByteArray extends Uint8Array {
70
+ export declare class IndexedByteArray extends Uint8Array {
74
71
  /**
75
72
  * The current index of the array.
76
73
  */
@@ -82,8 +79,6 @@ declare class IndexedByteArray extends Uint8Array {
82
79
  */
83
80
  slice(start?: number, end?: number): IndexedByteArray;
84
81
  }
85
- //#endregion
86
- //#region src/utils/byte_functions/big_endian.d.ts
87
82
  /**
88
83
  * Reads number as Big endian.
89
84
  * @param dataArray the array to read from.
@@ -92,8 +87,6 @@ declare class IndexedByteArray extends Uint8Array {
92
87
  * @returns the number.
93
88
  */
94
89
  declare function readBigEndian(dataArray: number[] | ArrayLike<number>, bytesAmount: number, offset?: number): number;
95
- //#endregion
96
- //#region src/utils/byte_functions/little_endian.d.ts
97
90
  /**
98
91
  * Reads the number as little endian from an IndexedByteArray.
99
92
  * @param dataArray the array to read from.
@@ -109,8 +102,6 @@ declare function readLittleEndianIndexed(dataArray: IndexedByteArray, bytesAmoun
109
102
  * @returns the number.
110
103
  */
111
104
  declare function readLittleEndian(dataArray: number[] | ArrayLike<number>, bytesAmount: number, offset?: number): number;
112
- //#endregion
113
- //#region src/utils/byte_functions/string.d.ts
114
105
  /**
115
106
  * Reads bytes as an ASCII string. This version works with any numeric array.
116
107
  * @param dataArray the array to read from.
@@ -126,16 +117,12 @@ declare function readBinaryString(dataArray: ArrayLike<number>, bytes?: number,
126
117
  * @returns the string.
127
118
  */
128
119
  declare function readBinaryStringIndexed(dataArray: IndexedByteArray, bytes: number): string;
129
- //#endregion
130
- //#region src/utils/byte_functions/variable_length_quantity.d.ts
131
120
  /**
132
121
  * Reads VLQ from a MIDI byte array.
133
122
  * @param midiByteArray the array to read from.
134
123
  * @returns the number.
135
124
  */
136
125
  declare function readVariableLengthQuantity(midiByteArray: IndexedByteArray): number;
137
- //#endregion
138
- //#region src/utils/write_wav.d.ts
139
126
  /**
140
127
  * Converts PCM audio data into a fully valid wave file.
141
128
  *
@@ -160,9 +147,7 @@ declare function readVariableLengthQuantity(midiByteArray: IndexedByteArray): nu
160
147
  *
161
148
  * @group Utilities
162
149
  */
163
- declare function audioToWav(audioData: Float32Array[], sampleRate: number, options?: Partial<WaveWriteOptions>): ArrayBuffer;
164
- //#endregion
165
- //#region src/utils/loggin.d.ts
150
+ export declare function audioToWav(audioData: Float32Array[], sampleRate: number, options?: Partial<WaveWriteOptions>): ArrayBuffer;
166
151
  /**
167
152
  * SpessaSynth can print out additional info to the console or print nothing at all.
168
153
  *
@@ -175,7 +160,7 @@ declare function audioToWav(audioData: Float32Array[], sampleRate: number, optio
175
160
  *
176
161
  * @group Utilities
177
162
  */
178
- declare class SpessaLog {
163
+ export declare class SpessaLog {
179
164
  /**
180
165
  * The most verbose log level, prints out a lot of small details.
181
166
  * Disabled by default.
@@ -235,8 +220,6 @@ declare class SpessaLog {
235
220
  */
236
221
  static groupEnd(): void;
237
222
  }
238
- //#endregion
239
- //#region src/soundbank/basic_soundbank/generator_types.d.ts
240
223
  /**
241
224
  * All SoundFont2 Generator enumerations.
242
225
  *
@@ -244,7 +227,7 @@ declare class SpessaLog {
244
227
  *
245
228
  * @group Sound Banks.Generators
246
229
  */
247
- declare const GeneratorTypes: Readonly<{
230
+ export declare const GeneratorTypes: Readonly<{
248
231
  readonly invalid: -1;
249
232
  readonly startAddrsOffset: 0;
250
233
  readonly endAddrOffset: 1;
@@ -312,26 +295,26 @@ declare const GeneratorTypes: Readonly<{
312
295
  *
313
296
  * @group Sound Banks.Generators
314
297
  */
315
- type GeneratorType = (typeof GeneratorTypes)[keyof typeof GeneratorTypes];
298
+ export type GeneratorType = (typeof GeneratorTypes)[keyof typeof GeneratorTypes];
316
299
  /**
317
300
  * The highest generator type number, including the non-standard generators.
318
301
  *
319
302
  * @group Sound Banks.Generators
320
303
  */
321
- declare const MAX_GENERATOR: number;
304
+ export declare const MAX_GENERATOR: number;
322
305
  /**
323
306
  * The amount of generator types, including the non-standard generators.
324
307
  * Useful for allocating arrays indexed by {@link GeneratorType}.
325
308
  *
326
309
  * @group Sound Banks.Generators
327
310
  */
328
- declare const GENERATORS_AMOUNT: number;
311
+ export declare const GENERATORS_AMOUNT: number;
329
312
  /**
330
313
  * Represents a single generator's range and default value.
331
314
  *
332
315
  * @group Sound Banks.Generators
333
316
  */
334
- interface GeneratorLimit {
317
+ export interface GeneratorLimit {
335
318
  /**
336
319
  * Minimum value for this generator type.
337
320
  */
@@ -354,9 +337,7 @@ interface GeneratorLimit {
354
337
  *
355
338
  * @group Sound Banks.Generators
356
339
  */
357
- declare const GeneratorLimits: Readonly<Record<GeneratorType, GeneratorLimit>>;
358
- //#endregion
359
- //#region src/soundbank/enums.d.ts
340
+ export declare const GeneratorLimits: Readonly<Record<GeneratorType, GeneratorLimit>>;
360
341
  /**
361
342
  * All SF2 Sample Types.
362
343
  *
@@ -364,7 +345,7 @@ declare const GeneratorLimits: Readonly<Record<GeneratorType, GeneratorLimit>>;
364
345
  *
365
346
  * @group Sound Banks.Samples
366
347
  */
367
- declare const SampleTypes: {
348
+ export declare const SampleTypes: {
368
349
  readonly monoSample: 1;
369
350
  readonly rightSample: 2;
370
351
  readonly leftSample: 4;
@@ -379,14 +360,14 @@ declare const SampleTypes: {
379
360
  *
380
361
  * @group Sound Banks.Samples
381
362
  */
382
- type SampleType = (typeof SampleTypes)[keyof typeof SampleTypes];
363
+ export type SampleType = (typeof SampleTypes)[keyof typeof SampleTypes];
383
364
  /**
384
365
  * All SF2 {@link Modulator} controller sources.
385
366
  * These values are mapped on the range from 0 to 1 (or -1 to 1 for bipolar transform) with the transform specified.
386
367
  *
387
368
  * @group Sound Banks.Modulators
388
369
  */
389
- declare const ModulatorControllerSources: {
370
+ export declare const ModulatorControllerSources: {
390
371
  /**
391
372
  * Value is equal to 1.
392
373
  */
@@ -425,13 +406,13 @@ declare const ModulatorControllerSources: {
425
406
  *
426
407
  * @group Sound Banks.Modulators
427
408
  */
428
- type ModulatorControllerSource = (typeof ModulatorControllerSources)[keyof typeof ModulatorControllerSources];
409
+ export type ModulatorControllerSource = (typeof ModulatorControllerSources)[keyof typeof ModulatorControllerSources];
429
410
  /**
430
411
  * All SF2 {@link Modulator} curve types.
431
412
  *
432
413
  * @group Sound Banks.Modulators
433
414
  */
434
- declare const ModulatorCurveTypes: {
415
+ export declare const ModulatorCurveTypes: {
435
416
  /**
436
417
  * Linear ramp.
437
418
  */
@@ -454,13 +435,13 @@ declare const ModulatorCurveTypes: {
454
435
  *
455
436
  * @group Sound Banks.Modulators
456
437
  */
457
- type ModulatorCurveType = (typeof ModulatorCurveTypes)[keyof typeof ModulatorCurveTypes];
438
+ export type ModulatorCurveType = (typeof ModulatorCurveTypes)[keyof typeof ModulatorCurveTypes];
458
439
  /**
459
440
  * The additional operation to perform when computing a {@link Modulator} value.
460
441
  *
461
442
  * @group Sound Banks.Modulators
462
443
  */
463
- declare const ModulatorTransformTypes: {
444
+ export declare const ModulatorTransformTypes: {
464
445
  /**
465
446
  * No operation.
466
447
  */
@@ -475,15 +456,13 @@ declare const ModulatorTransformTypes: {
475
456
  *
476
457
  * @group Sound Banks.Modulators
477
458
  */
478
- type ModulatorTransformType = (typeof ModulatorTransformTypes)[keyof typeof ModulatorTransformTypes];
479
- //#endregion
480
- //#region src/soundbank/basic_soundbank/modulator_source.d.ts
459
+ export type ModulatorTransformType = (typeof ModulatorTransformTypes)[keyof typeof ModulatorTransformTypes];
481
460
  /**
482
461
  * Represents a single {@link Modulator} source.
483
462
  *
484
463
  * @group Sound Banks.Modulators
485
464
  */
486
- declare class ModulatorSource {
465
+ export declare class ModulatorSource {
487
466
  /**
488
467
  * If this field is set to false, the controller should be mapped with a minimum value of 0 and a maximum value of 1. This is also
489
468
  * called Unipolar. Thus, it behaves similar to the Modulation Wheel controller of the MIDI specification.
@@ -521,8 +500,6 @@ declare class ModulatorSource {
521
500
  */
522
501
  isIdentical(source: ModulatorSource): boolean;
523
502
  }
524
- //#endregion
525
- //#region src/soundbank/basic_soundbank/modulator.d.ts
526
503
  /**
527
504
  * This class represents a single modulator (map from a source to a given synthesis parameter).
528
505
  *
@@ -532,7 +509,7 @@ declare class ModulatorSource {
532
509
  *
533
510
  * @group Sound Banks.Modulators
534
511
  */
535
- declare class Modulator {
512
+ export declare class Modulator {
536
513
  /**
537
514
  * The destination generator for this modulator.
538
515
  * This is the target parameter that will be changed.
@@ -582,14 +559,12 @@ declare class Modulator {
582
559
  static copyFrom(mod: Modulator): Modulator;
583
560
  toString(): string;
584
561
  }
585
- //#endregion
586
- //#region src/soundbank/basic_soundbank/generator.d.ts
587
562
  /**
588
563
  * Generator represents a single sound bank parameter.
589
564
  *
590
565
  * @group Sound Banks.Generators
591
566
  */
592
- declare class Generator {
567
+ export declare class Generator {
593
568
  /**
594
569
  * The generator's SF2 type.
595
570
  */
@@ -607,14 +582,12 @@ declare class Generator {
607
582
  constructor(type: GeneratorType, value: number, validate?: boolean);
608
583
  toString(): string;
609
584
  }
610
- //#endregion
611
- //#region src/soundbank/basic_soundbank/basic_zone.d.ts
612
585
  /**
613
586
  * Represents a single zone with parameters, modulators and a specified key and velocity range.
614
587
  *
615
588
  * @group Sound Banks.Zones
616
589
  */
617
- declare class BasicZone {
590
+ export declare class BasicZone {
618
591
  /**
619
592
  * The zone's velocity range.
620
593
  * min -1 means that it is a default value.
@@ -674,15 +647,18 @@ declare class BasicZone {
674
647
  * @returns The generator value or the provided fallback value.
675
648
  */
676
649
  getGenerator<K>(generatorType: GeneratorType, notFoundValue: number | K): number | K;
650
+ /**
651
+ * Copies the parameters from another zone.
652
+ * @param zone The zone to copy from.
653
+ */
654
+ copyFrom(zone: BasicZone): void;
677
655
  }
678
- //#endregion
679
- //#region src/soundbank/basic_soundbank/basic_instrument_zone.d.ts
680
656
  /**
681
657
  * Represents a single instrument zone with an associated {@link BasicSample}.
682
658
  *
683
659
  * @group Sound Banks.Zones
684
660
  */
685
- declare class BasicInstrumentZone extends BasicZone {
661
+ export declare class BasicInstrumentZone extends BasicZone {
686
662
  /**
687
663
  * The instrument this zone belongs to.
688
664
  */
@@ -701,14 +677,12 @@ declare class BasicInstrumentZone extends BasicZone {
701
677
  */
702
678
  set sample(sample: BasicSample);
703
679
  }
704
- //#endregion
705
- //#region src/soundbank/basic_soundbank/basic_preset_zone.d.ts
706
680
  /**
707
681
  * Represents a single preset zone with an associated {@link BasicInstrument}.
708
682
  *
709
683
  * @group Sound Banks.Zones
710
684
  */
711
- declare class BasicPresetZone extends BasicZone {
685
+ export declare class BasicPresetZone extends BasicZone {
712
686
  /**
713
687
  * The preset this zone belongs to.
714
688
  */
@@ -727,8 +701,6 @@ declare class BasicPresetZone extends BasicZone {
727
701
  */
728
702
  set instrument(instrument: BasicInstrument);
729
703
  }
730
- //#endregion
731
- //#region src/soundbank/basic_soundbank/midi_patch.d.ts
732
704
  /**
733
705
  * SpessaSynth 4.0 brings the full bank LSB support in the API.
734
706
  *
@@ -738,7 +710,7 @@ declare class BasicPresetZone extends BasicZone {
738
710
  *
739
711
  * @group Sound Banks.MIDI Patch System
740
712
  */
741
- interface MIDIPatch {
713
+ export interface MIDIPatch {
742
714
  /**
743
715
  * The MIDI program number.
744
716
  */
@@ -781,7 +753,7 @@ interface MIDIPatch {
781
753
  *
782
754
  * @group Sound Banks.MIDI Patch System
783
755
  */
784
- interface MIDIPatchFull extends MIDIPatch {
756
+ export interface MIDIPatchFull extends MIDIPatch {
785
757
  /**
786
758
  * The name of the patch.
787
759
  */
@@ -805,7 +777,7 @@ interface MIDIPatchFull extends MIDIPatch {
805
777
  *
806
778
  * @group Sound Banks.MIDI Patch System
807
779
  */
808
- declare class MIDIPatchTools {
780
+ export declare class MIDIPatchTools {
809
781
  /**
810
782
  * Converts a given {@link MIDIPatch} to a string.
811
783
  * The format is:
@@ -853,8 +825,6 @@ declare class MIDIPatchTools {
853
825
  static selectPatch<T extends MIDIPatchFull>(patches: T[], patch: MIDIPatch, system: MIDISystem): T;
854
826
  private static getAnyDrums;
855
827
  }
856
- //#endregion
857
- //#region src/soundbank/basic_soundbank/basic_soundbank.d.ts
858
828
  /**
859
829
  * This module handles parsing and writing SoundFont2 (`.sf2`, `.sf3` and `.sfogg`) files.
860
830
  * It represents a single sound bank.
@@ -874,7 +844,7 @@ declare class MIDIPatchTools {
874
844
  *
875
845
  * @group Sound Banks
876
846
  */
877
- declare class BasicSoundBank {
847
+ export declare class BasicSoundBank {
878
848
  /**
879
849
  * A Promise object indicating if the SF3/SF2Pack decoder is ready.
880
850
  * Make sure to await it if you are loading SF3/SF2Pack files.
@@ -1067,7 +1037,8 @@ declare class BasicSoundBank {
1067
1037
  /**
1068
1038
  * Trims the sound bank _in-place_ to only contain samples in a given MIDI file.
1069
1039
  *
1070
- * Absent presets will be removed from the sound bank,
1040
+
1041
+ * Absent presets will be removed from the sound bank,
1071
1042
  * and samples that don't get activated in the remaining presets will be removed as well.
1072
1043
  *
1073
1044
  * > **Note**
@@ -1119,15 +1090,13 @@ declare class BasicSoundBank {
1119
1090
  protected parseInternal(): void;
1120
1091
  protected printInfo(): void;
1121
1092
  }
1122
- //#endregion
1123
- //#region src/soundbank/basic_soundbank/basic_preset.d.ts
1124
1093
  /**
1125
1094
  * Represents a single preset.
1126
1095
  * This is what is used for MIDI playback.
1127
1096
  *
1128
1097
  * @group Sound Banks
1129
1098
  */
1130
- declare class BasicPreset implements MIDIPatchFull {
1099
+ export declare class BasicPreset implements MIDIPatchFull {
1131
1100
  /**
1132
1101
  * The parent soundbank instance
1133
1102
  * Currently used for determining default modulators and XG status
@@ -1198,6 +1167,19 @@ declare class BasicPreset implements MIDIPatchFull {
1198
1167
  * @param preset The preset to check.
1199
1168
  */
1200
1169
  matches(preset: MIDIPatch): boolean;
1170
+ /**
1171
+ * Returns the voice synthesis data for this preset.
1172
+ *
1173
+ * > **Note**
1174
+ * >
1175
+ * > The `E-mu` attenuation correction
1176
+ * > (`initialAttenuation` generator value being multiplied by `0.4`) is already performed.
1177
+ *
1178
+ * @param midiNote The MIDI note number.
1179
+ * @param velocity The MIDI velocity.
1180
+ * @returns The returned sound data.
1181
+ */
1182
+ getVoiceParameters(midiNote: number, velocity: number): VoiceParameters[];
1201
1183
  /**
1202
1184
  * Alias for {@link MIDIPatchTools.toMIDIString}
1203
1185
  */
@@ -1218,8 +1200,6 @@ declare class BasicPreset implements MIDIPatchFull {
1218
1200
  */
1219
1201
  toFlattenedInstrument(): BasicInstrument;
1220
1202
  }
1221
- //#endregion
1222
- //#region src/soundbank/basic_soundbank/basic_instrument.d.ts
1223
1203
  /**
1224
1204
  * This class represents a single instrument, a layer below the BasicPreset.
1225
1205
  *
@@ -1229,7 +1209,7 @@ declare class BasicPreset implements MIDIPatchFull {
1229
1209
  *
1230
1210
  * @group Sound Banks
1231
1211
  */
1232
- declare class BasicInstrument {
1212
+ export declare class BasicInstrument {
1233
1213
  /**
1234
1214
  * The name of this instrument.
1235
1215
  */
@@ -1261,6 +1241,11 @@ declare class BasicInstrument {
1261
1241
  * @param sample The sample to associate with the zone.
1262
1242
  */
1263
1243
  createZone(sample: BasicSample): BasicInstrumentZone;
1244
+ /**
1245
+ * Unlinks the instrument from a given preset.
1246
+ * @param preset The preset to unlink from.
1247
+ */
1248
+ unlinkFrom(preset: BasicPreset): void;
1264
1249
  /**
1265
1250
  * Deletes a given instrument zone if it has no uses.
1266
1251
  * @param index The index of the zone to delete.
@@ -1277,14 +1262,12 @@ declare class BasicInstrument {
1277
1262
  */
1278
1263
  globalize(): void;
1279
1264
  }
1280
- //#endregion
1281
- //#region src/soundbank/basic_soundbank/basic_sample.d.ts
1282
1265
  /**
1283
1266
  * A basic sample represents a single audio sample with associated parameters.
1284
1267
  *
1285
1268
  * @group Sound Banks.Samples
1286
1269
  */
1287
- declare class BasicSample {
1270
+ export declare class BasicSample {
1288
1271
  /**
1289
1272
  * The sample's name.
1290
1273
  */
@@ -1382,6 +1365,12 @@ declare class BasicSample {
1382
1365
  * How many instruments is this sample used by.
1383
1366
  */
1384
1367
  get useCount(): number;
1368
+ /**
1369
+ * Get raw data for writing the file, either a compressed bit stream or signed 16-bit little endian PCM data.
1370
+ * @param allowVorbis if vorbis file data is allowed.
1371
+ * @return either s16le or vorbis data.
1372
+ */
1373
+ getRawData(allowVorbis: boolean): Uint8Array;
1385
1374
  /**
1386
1375
  * Resamples the audio data _in-place_ to a given sample rate.
1387
1376
  * @param newSampleRate The new sample rate, in hertz.
@@ -1402,6 +1391,11 @@ declare class BasicSample {
1402
1391
  * @param type Either left, right or linked. The linked sample will be set appropriately as well.
1403
1392
  */
1404
1393
  setLinkedSample(sample: BasicSample, type: SampleType): void;
1394
+ /**
1395
+ * Unlinks the sample from a given instrument
1396
+ * @param instrument the instrument to unlink from
1397
+ */
1398
+ unlinkFrom(instrument: BasicInstrument): void;
1405
1399
  /**
1406
1400
  * Get the PCM Float32 audio data of this sample.
1407
1401
  * This either decodes the compressed data or passes the ready sampleData.
@@ -1434,11 +1428,9 @@ declare class BasicSample {
1434
1428
  *
1435
1429
  * @group Sound Banks.Samples
1436
1430
  */
1437
- declare class EmptySample extends BasicSample {
1431
+ export declare class EmptySample extends BasicSample {
1438
1432
  constructor();
1439
1433
  }
1440
- //#endregion
1441
- //#region src/midi/enums.d.ts
1442
1434
  /**
1443
1435
  * All MIDI 1.0 defined status bytes
1444
1436
  *
@@ -1448,7 +1440,7 @@ declare class EmptySample extends BasicSample {
1448
1440
  *
1449
1441
  * @group MIDI.Protocol
1450
1442
  */
1451
- declare const MIDIMessageTypes: {
1443
+ export declare const MIDIMessageTypes: {
1452
1444
  readonly noteOff: 128;
1453
1445
  readonly noteOn: 144;
1454
1446
  readonly polyPressure: 160;
@@ -1506,7 +1498,7 @@ type MIDIMessageType = (typeof MIDIMessageTypes)[keyof typeof MIDIMessageTypes];
1506
1498
  *
1507
1499
  * @group MIDI.Protocol
1508
1500
  */
1509
- declare const MIDIControllers: {
1501
+ export declare const MIDIControllers: {
1510
1502
  readonly bankSelect: 0;
1511
1503
  readonly modulationWheel: 1;
1512
1504
  readonly breathController: 2;
@@ -1647,7 +1639,7 @@ type MIDIController = (typeof MIDIControllers)[keyof typeof MIDIControllers];
1647
1639
  *
1648
1640
  * @group MIDI.Protocol
1649
1641
  */
1650
- declare const RegisteredParameterTypes: {
1642
+ export declare const RegisteredParameterTypes: {
1651
1643
  readonly pitchWheelRange: 0;
1652
1644
  readonly fineTuning: 1;
1653
1645
  readonly coarseTuning: 2;
@@ -1663,7 +1655,7 @@ declare const RegisteredParameterTypes: {
1663
1655
  *
1664
1656
  * @group MIDI.Protocol
1665
1657
  */
1666
- declare const NonRegisteredParameterTypesMSB: {
1658
+ export declare const NonRegisteredParameterTypesMSB: {
1667
1659
  readonly partParameter: 1;
1668
1660
  readonly drumPitch: 24;
1669
1661
  readonly drumPitchFine: 25;
@@ -1684,7 +1676,7 @@ declare const NonRegisteredParameterTypesMSB: {
1684
1676
  *
1685
1677
  * @group MIDI.Protocol
1686
1678
  */
1687
- declare const NonRegisteredParameterTypesLSB: {
1679
+ export declare const NonRegisteredParameterTypesLSB: {
1688
1680
  readonly vibratoRate: 8;
1689
1681
  readonly vibratoDepth: 9;
1690
1682
  readonly vibratoDelay: 10;
@@ -1694,15 +1686,13 @@ declare const NonRegisteredParameterTypesLSB: {
1694
1686
  readonly envelopeDecayTime: 100;
1695
1687
  readonly envelopeReleaseTime: 102;
1696
1688
  };
1697
- //#endregion
1698
- //#region src/soundbank/types.d.ts
1699
1689
  /**
1700
1690
  * Represents a channel in an SF2-compatible synthesizer.
1701
1691
  * Its data is used for computing {@link Modulator}s.
1702
1692
  *
1703
1693
  * @group Sound Banks.Modulators
1704
1694
  */
1705
- interface SF2Channel {
1695
+ export interface SF2Channel {
1706
1696
  /**
1707
1697
  * All MIDI controller values for modulation.
1708
1698
  */
@@ -1734,7 +1724,7 @@ interface SF2Channel {
1734
1724
  *
1735
1725
  * @group Sound Banks.Info
1736
1726
  */
1737
- interface SF2VersionTag {
1727
+ export interface SF2VersionTag {
1738
1728
  /**
1739
1729
  * The major revision number of the sound bank.
1740
1730
  */
@@ -1749,37 +1739,37 @@ interface SF2VersionTag {
1749
1739
  *
1750
1740
  * @group Utilities.FourCC
1751
1741
  */
1752
- type GenericBankInfoFourCC = "INAM" | "ICRD" | "IENG" | "IPRD" | "ICOP" | "ICMT" | "ISFT";
1742
+ export type GenericBankInfoFourCC = "INAM" | "ICRD" | "IENG" | "IPRD" | "ICOP" | "ICMT" | "ISFT";
1753
1743
  /**
1754
1744
  * RIFF Four Character Codes found in SF2 INFO chunk.
1755
1745
  *
1756
1746
  * @group Utilities.FourCC
1757
1747
  */
1758
- type SF2InfoFourCC = GenericBankInfoFourCC | "ifil" | "isng" | "irom" | "iver" | "DMOD" | "LIST";
1748
+ export type SF2InfoFourCC = GenericBankInfoFourCC | "ifil" | "isng" | "irom" | "iver" | "DMOD" | "LIST";
1759
1749
  /**
1760
1750
  * RIFF Four Character Codes found in the SF2 structure.
1761
1751
  *
1762
1752
  * @group Utilities.FourCC
1763
1753
  */
1764
- type SF2ChunkFourCC = "pdta" | "xdta" | "sdta" | "smpl" | "sm24" | "phdr" | "pbag" | "pmod" | "pgen" | "inst" | "ibag" | "imod" | "igen" | "shdr";
1754
+ export type SF2ChunkFourCC = "pdta" | "xdta" | "sdta" | "smpl" | "sm24" | "phdr" | "pbag" | "pmod" | "pgen" | "inst" | "ibag" | "imod" | "igen" | "shdr";
1765
1755
  /**
1766
1756
  * RIFF Four Character Codes found in the DLS INFO chunk.
1767
1757
  *
1768
1758
  * @group Utilities.FourCC
1769
1759
  */
1770
- type DLSInfoFourCC = GenericBankInfoFourCC | "ISBJ";
1760
+ export type DLSInfoFourCC = GenericBankInfoFourCC | "ISBJ";
1771
1761
  /**
1772
1762
  * RIFF Four Character Codes found in the DLS structure.
1773
1763
  *
1774
1764
  * @group Utilities.FourCC
1775
1765
  */
1776
- type DLSChunkFourCC = WAVFourCC | "dls " | "dlid" | "cdl " | "ptbl" | "vers" | "colh" | "wvpl" | "wsmp" | "data" | "lart" | "lar2" | "art2" | "art1" | "lrgn" | "rgnh" | "wlnk" | "lins" | "ins " | "insh" | "rgn " | "rgn2" | "pgal";
1766
+ export type DLSChunkFourCC = WAVFourCC | "dls " | "dlid" | "cdl " | "ptbl" | "vers" | "colh" | "wvpl" | "wsmp" | "data" | "lart" | "lar2" | "art2" | "art1" | "lrgn" | "rgnh" | "wlnk" | "lins" | "ins " | "insh" | "rgn " | "rgn2" | "pgal";
1777
1767
  /**
1778
1768
  * Metadata object representing information associated with a {@link BasicSoundBank}.
1779
1769
  *
1780
1770
  * @group Sound Banks.Info
1781
1771
  */
1782
- interface SoundBankInfoData {
1772
+ export interface SoundBankInfoData {
1783
1773
  /**
1784
1774
  * The sound bank's name.
1785
1775
  */
@@ -1839,7 +1829,7 @@ interface SoundBankInfoData {
1839
1829
  *
1840
1830
  * @group Sound Banks.Zones
1841
1831
  */
1842
- interface VoiceParameters {
1832
+ export interface VoiceParameters {
1843
1833
  /**
1844
1834
  * The summed generators.
1845
1835
  */
@@ -1868,27 +1858,27 @@ interface VoiceParameters {
1868
1858
  *
1869
1859
  * @group Sound Banks.Samples
1870
1860
  */
1871
- type SampleEncodingFunction = (audioData: Float32Array, sampleRate: number) => Promise<Uint8Array>;
1861
+ export type SampleEncodingFunction = (audioData: Float32Array, sampleRate: number) => Promise<Uint8Array>;
1872
1862
  /**
1873
1863
  * An index of the modulator source.
1874
1864
  * Either an SF2 modulator source or a MIDI controller.
1875
1865
  *
1876
1866
  * @group Sound Banks.Modulators
1877
1867
  */
1878
- type ModulatorSourceIndex = ModulatorControllerSource | MIDIController;
1868
+ export type ModulatorSourceIndex = ModulatorControllerSource | MIDIController;
1879
1869
  /**
1880
1870
  * A function to track progress during writing.
1881
1871
  * @param progress Estimated progress, from 0 to 1.
1882
1872
  *
1883
1873
  * @group Sound Banks.Writing
1884
1874
  */
1885
- type ProgressFunction = (progress: number) => unknown;
1875
+ export type ProgressFunction = (progress: number) => unknown;
1886
1876
  /**
1887
1877
  * Options for changing the {@link BasicSoundBank}'s sample format.
1888
1878
  *
1889
1879
  * @group Sound Banks.Samples
1890
1880
  */
1891
- type SetSampleFormatOptions = {
1881
+ export type SetSampleFormatOptions = {
1892
1882
  /**
1893
1883
  * A function to show progress for compressing. It can be undefined.
1894
1884
  */
@@ -1922,7 +1912,7 @@ type SetSampleFormatOptions = {
1922
1912
  *
1923
1913
  * @group Sound Banks.Writing
1924
1914
  */
1925
- interface SoundBankWriteOptions {
1915
+ export interface SoundBankWriteOptions {
1926
1916
  /**
1927
1917
  * The `ISFT` field to set when writing. If unset, `SpessaSynth` is written.
1928
1918
  * This field indicates the last software that was used to edit this sound bank.
@@ -1938,7 +1928,7 @@ interface SoundBankWriteOptions {
1938
1928
  *
1939
1929
  * @group Sound Banks.Writing
1940
1930
  */
1941
- interface SoundFont2WriteOptions extends SoundBankWriteOptions {
1931
+ export interface SoundFont2WriteOptions extends SoundBankWriteOptions {
1942
1932
  /**
1943
1933
  * If the DMOD chunk should be written. Recommended.
1944
1934
  * > **Note**
@@ -1960,7 +1950,7 @@ interface SoundFont2WriteOptions extends SoundBankWriteOptions {
1960
1950
  *
1961
1951
  * @group Sound Banks.Writing
1962
1952
  */
1963
- interface SFEWriteOptions extends SoundBankWriteOptions {
1953
+ export interface SFEWriteOptions extends SoundBankWriteOptions {
1964
1954
  /**
1965
1955
  * If the RIFS (64-bit RIFF chunks) should be used.
1966
1956
  * Increases maximum size from 4GB to effectively infinite.
@@ -1973,7 +1963,7 @@ interface SFEWriteOptions extends SoundBankWriteOptions {
1973
1963
  *
1974
1964
  * @group Sound Banks.Zones
1975
1965
  */
1976
- interface GenericRange {
1966
+ export interface GenericRange {
1977
1967
  /**
1978
1968
  * The minimum value.
1979
1969
  */
@@ -1991,7 +1981,7 @@ interface GenericRange {
1991
1981
  *
1992
1982
  * @group MIDI.Protocol
1993
1983
  */
1994
- type PresetsWithKeyCombinations<T extends MIDIPatchFull> = Map<T, Map<number, Set<number>>>;
1984
+ export type PresetsWithKeyCombinations<T extends MIDIPatchFull> = Map<T, Map<number, Set<number>>>;
1995
1985
  /**
1996
1986
  * One of the General MIDI systems.
1997
1987
  *
@@ -2002,9 +1992,7 @@ type PresetsWithKeyCombinations<T extends MIDIPatchFull> = Map<T, Map<number, Se
2002
1992
  *
2003
1993
  * @group MIDI.Protocol
2004
1994
  */
2005
- type MIDISystem = "gm" | "gm2" | "gs" | "xg";
2006
- //#endregion
2007
- //#region src/synthesizer/enums.d.ts
1995
+ export type MIDISystem = "gm" | "gm2" | "gs" | "xg";
2008
1996
  /**
2009
1997
  * The available interpolation types of the synthesizer.
2010
1998
  * Interpolation defines how sample points between the sample data are calculated.
@@ -2012,7 +2000,7 @@ type MIDISystem = "gm" | "gm2" | "gs" | "xg";
2012
2000
  *
2013
2001
  * @group Synthesizer.Options
2014
2002
  */
2015
- declare const InterpolationTypes: {
2003
+ export declare const InterpolationTypes: {
2016
2004
  /**
2017
2005
  * Linear interpolation. Fast with acceptable quality.
2018
2006
  */
@@ -2033,9 +2021,7 @@ declare const InterpolationTypes: {
2033
2021
  *
2034
2022
  * @group Synthesizer.Options
2035
2023
  */
2036
- type InterpolationType = (typeof InterpolationTypes)[keyof typeof InterpolationTypes];
2037
- //#endregion
2038
- //#region src/synthesizer/audio_engine/channel/parameters/system.d.ts
2024
+ export type InterpolationType = (typeof InterpolationTypes)[keyof typeof InterpolationTypes];
2039
2025
  /**
2040
2026
  * Channel System Parameters are API-only parameters
2041
2027
  * that affect a single MIDI channel.
@@ -2129,15 +2115,13 @@ interface ChannelSystemParameter {
2129
2115
  *
2130
2116
  * @group Synthesizer.Parameters
2131
2117
  */
2132
- declare const DEFAULT_CHANNEL_SYSTEM_PARAMETERS: ChannelSystemParameter;
2133
- //#endregion
2134
- //#region src/synthesizer/audio_engine/effects/gs/interface/gs_system_effect_parameter.d.ts
2118
+ export declare const DEFAULT_CHANNEL_SYSTEM_PARAMETERS: ChannelSystemParameter;
2135
2119
  /**
2136
2120
  * Parameters shared between all GS system effects.
2137
2121
  *
2138
2122
  * @group Synthesizer.GS Effects
2139
2123
  */
2140
- interface GSSystemEffectParameter {
2124
+ export interface GSSystemEffectParameter {
2141
2125
  /**
2142
2126
  * 0-127
2143
2127
  * This parameter sets the amount of the effect sent to the effect output.
@@ -2151,8 +2135,6 @@ interface GSSystemEffectParameter {
2151
2135
  */
2152
2136
  preLowpass: number;
2153
2137
  }
2154
- //#endregion
2155
- //#region src/synthesizer/audio_engine/effects/gs/interface/gs_reverb_processor.d.ts
2156
2138
  /**
2157
2139
  * GS-compatible reverb parameters.
2158
2140
  *
@@ -2160,7 +2142,7 @@ interface GSSystemEffectParameter {
2160
2142
  *
2161
2143
  * @group Synthesizer.GS Effects
2162
2144
  */
2163
- interface GSReverbParameter extends GSSystemEffectParameter {
2145
+ export interface GSReverbParameter extends GSSystemEffectParameter {
2164
2146
  /**
2165
2147
  * `0-7`
2166
2148
  *
@@ -2216,7 +2198,7 @@ interface GSReverbParameter extends GSSystemEffectParameter {
2216
2198
  *
2217
2199
  * @group Synthesizer.GS Effects
2218
2200
  */
2219
- interface GSReverbProcessor extends GSReverbParameter {
2201
+ export interface GSReverbProcessor extends GSReverbParameter {
2220
2202
  /**
2221
2203
  * Process the effect and **adds** it to the output.
2222
2204
  * @param input The input buffer to process. It always starts at index 0.
@@ -2231,8 +2213,6 @@ interface GSReverbProcessor extends GSReverbParameter {
2231
2213
  */
2232
2214
  getSnapshot(): GSReverbParameter;
2233
2215
  }
2234
- //#endregion
2235
- //#region src/synthesizer/audio_engine/effects/gs/interface/gs_chorus_processor.d.ts
2236
2216
  /**
2237
2217
  * GS-compatible chorus parameters.
2238
2218
  *
@@ -2240,7 +2220,7 @@ interface GSReverbProcessor extends GSReverbParameter {
2240
2220
  *
2241
2221
  * @group Synthesizer.GS Effects
2242
2222
  */
2243
- interface GSChorusParameter extends GSSystemEffectParameter {
2223
+ export interface GSChorusParameter extends GSSystemEffectParameter {
2244
2224
  /**
2245
2225
  * `0-127`
2246
2226
  *
@@ -2304,7 +2284,7 @@ interface GSChorusParameter extends GSSystemEffectParameter {
2304
2284
  *
2305
2285
  * @group Synthesizer.GS Effects
2306
2286
  */
2307
- interface GSChorusProcessor extends GSChorusParameter {
2287
+ export interface GSChorusProcessor extends GSChorusParameter {
2308
2288
  /**
2309
2289
  * Process the effect and **adds** it to the output.
2310
2290
  * @param input The input buffer to process. It always starts at index 0.
@@ -2321,8 +2301,6 @@ interface GSChorusProcessor extends GSChorusParameter {
2321
2301
  */
2322
2302
  getSnapshot(): GSChorusParameter;
2323
2303
  }
2324
- //#endregion
2325
- //#region src/synthesizer/audio_engine/effects/gs/interface/gs_delay_processor.d.ts
2326
2304
  /**
2327
2305
  * GS-compatible delay parameters.
2328
2306
  *
@@ -2330,7 +2308,7 @@ interface GSChorusProcessor extends GSChorusParameter {
2330
2308
  *
2331
2309
  * @group Synthesizer.GS Effects
2332
2310
  */
2333
- interface GSDelayParameter extends GSSystemEffectParameter {
2311
+ export interface GSDelayParameter extends GSSystemEffectParameter {
2334
2312
  /**
2335
2313
  * 0-115
2336
2314
  * 0.1ms-340ms-1000ms
@@ -2415,7 +2393,7 @@ interface GSDelayParameter extends GSSystemEffectParameter {
2415
2393
  *
2416
2394
  * @group Synthesizer.GS Effects
2417
2395
  */
2418
- interface GSDelayProcessor extends GSDelayParameter {
2396
+ export interface GSDelayProcessor extends GSDelayParameter {
2419
2397
  /**
2420
2398
  * Process the effect and **adds** it to the output.
2421
2399
  * @param input The input buffer to process. It always starts at index 0.
@@ -2431,14 +2409,12 @@ interface GSDelayProcessor extends GSDelayParameter {
2431
2409
  */
2432
2410
  getSnapshot(): GSDelayParameter;
2433
2411
  }
2434
- //#endregion
2435
- //#region src/synthesizer/audio_engine/effects/gs/interface/gs_insertion_processor.d.ts
2436
2412
  /**
2437
2413
  * Represents a GS-compatible Insertion EFX processor.
2438
2414
  *
2439
2415
  * @group Synthesizer.GS Effects
2440
2416
  */
2441
- interface GSInsertionProcessor {
2417
+ export interface GSInsertionProcessor {
2442
2418
  /**
2443
2419
  * The EFX type of this processor, stored as `MSB << 8 | LSB`.
2444
2420
  * For example `0x30`, `0x10` is `0x3010`.
@@ -2495,7 +2471,7 @@ interface GSInsertionProcessor {
2495
2471
  *
2496
2472
  * @group Synthesizer.GS Effects
2497
2473
  */
2498
- interface GSInsertionProcessorSnapshot {
2474
+ export interface GSInsertionProcessorSnapshot {
2499
2475
  /**
2500
2476
  * The EFX type of this processor, stored as `MSB << 8 | LSB`.
2501
2477
  * For example `0x30`, `0x10` is `0x3010`.
@@ -2515,14 +2491,12 @@ interface GSInsertionProcessorSnapshot {
2515
2491
  */
2516
2492
  params: Uint8Array;
2517
2493
  }
2518
- //#endregion
2519
- //#region src/synthesizer/audio_engine/effects/xg/interface/xg_effect_block.d.ts
2520
2494
  /**
2521
2495
  * A snapshot of a {@link XGEffectBlock}.
2522
2496
  *
2523
2497
  * @group Synthesizer.XG Effects
2524
2498
  */
2525
- interface XGEffectBlockSnapshot {
2499
+ export interface XGEffectBlockSnapshot {
2526
2500
  /**
2527
2501
  * The type of the processor.
2528
2502
  * Per XG spec, BASIC EFFECT (LSB = 0) will be used if the exact match is missing.
@@ -2549,7 +2523,7 @@ interface XGEffectBlockSnapshot {
2549
2523
  *
2550
2524
  * @group Synthesizer.XG Effects
2551
2525
  */
2552
- interface XGEffectBlock {
2526
+ export interface XGEffectBlock {
2553
2527
  /**
2554
2528
  * Sets the type of the processor.
2555
2529
  * Per XG spec, BASIC EFFECT (LSB = 0) should be used if the exact match is missing.
@@ -2585,14 +2559,12 @@ interface XGEffectBlock {
2585
2559
  */
2586
2560
  applySnapshot(snapshot: XGEffectBlockSnapshot): void;
2587
2561
  }
2588
- //#endregion
2589
- //#region src/synthesizer/audio_engine/effects/xg/interface/xg_system_effect_block.d.ts
2590
2562
  /**
2591
2563
  * Parameters for an XG system effect.
2592
2564
  *
2593
2565
  * @group Synthesizer.XG Effects
2594
2566
  */
2595
- interface XGSystemEffectParameter {
2567
+ export interface XGSystemEffectParameter {
2596
2568
  /**
2597
2569
  * The return (level) of the effect.
2598
2570
  * 0 is silence (-Inf dB), 64 is normal (0 dB) and 127 is double the volume (+6 dB).
@@ -2609,7 +2581,7 @@ interface XGSystemEffectParameter {
2609
2581
  *
2610
2582
  * @group Synthesizer.XG Effects
2611
2583
  */
2612
- interface XGSystemEffectBlockSnapshot extends XGSystemEffectParameter, XGEffectBlockSnapshot {}
2584
+ export interface XGSystemEffectBlockSnapshot extends XGSystemEffectParameter, XGEffectBlockSnapshot {}
2613
2585
  /**
2614
2586
  * This interface represents a single XG system effect block.
2615
2587
  *
@@ -2622,12 +2594,10 @@ interface XGSystemEffectBlockSnapshot extends XGSystemEffectParameter, XGEffectB
2622
2594
  *
2623
2595
  * @group Synthesizer.XG Effects
2624
2596
  */
2625
- interface XGSystemEffectBlock extends XGEffectBlock, XGSystemEffectParameter {
2597
+ export interface XGSystemEffectBlock extends XGEffectBlock, XGSystemEffectParameter {
2626
2598
  getSnapshot(): XGSystemEffectBlockSnapshot;
2627
2599
  applySnapshot(snapshot: XGSystemEffectBlockSnapshot): void;
2628
2600
  }
2629
- //#endregion
2630
- //#region src/synthesizer/audio_engine/effects/xg/interface/xg_reverb_block.d.ts
2631
2601
  /**
2632
2602
  * Reverb is an effect that adds reverberation to a sound, as you would hear in a concert
2633
2603
  * hall.
@@ -2649,7 +2619,7 @@ interface XGSystemEffectBlock extends XGEffectBlock, XGSystemEffectParameter {
2649
2619
  *
2650
2620
  * @group Synthesizer.XG Effects
2651
2621
  */
2652
- interface XGReverbBlock extends XGSystemEffectBlock {
2622
+ export interface XGReverbBlock extends XGSystemEffectBlock {
2653
2623
  /**
2654
2624
  * Process the effect and **adds** it to the output.
2655
2625
  * @param inputLeft The input buffer to process. It always starts at index 0.
@@ -2661,14 +2631,12 @@ interface XGReverbBlock extends XGSystemEffectBlock {
2661
2631
  */
2662
2632
  process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
2663
2633
  }
2664
- //#endregion
2665
- //#region src/synthesizer/audio_engine/effects/xg/interface/xg_chorus_block.d.ts
2666
2634
  /**
2667
2635
  * Parameters for the XG chorus effect.
2668
2636
  *
2669
2637
  * @group Synthesizer.XG Effects
2670
2638
  */
2671
- interface XGChorusParameter extends XGSystemEffectParameter {
2639
+ export interface XGChorusParameter extends XGSystemEffectParameter {
2672
2640
  /**
2673
2641
  * The amount of chorus being sent to the reverb effect.
2674
2642
  *
@@ -2681,7 +2649,7 @@ interface XGChorusParameter extends XGSystemEffectParameter {
2681
2649
  *
2682
2650
  * @group Synthesizer.XG Effects
2683
2651
  */
2684
- interface XGChorusBlockSnapshot extends XGChorusParameter, XGSystemEffectBlockSnapshot {}
2652
+ export interface XGChorusBlockSnapshot extends XGChorusParameter, XGSystemEffectBlockSnapshot {}
2685
2653
  /**
2686
2654
  * Chorus broadens the spatial image of the sound, adding depth and richness.
2687
2655
  *
@@ -2702,7 +2670,7 @@ interface XGChorusBlockSnapshot extends XGChorusParameter, XGSystemEffectBlockSn
2702
2670
  *
2703
2671
  * @group Synthesizer.XG Effects
2704
2672
  */
2705
- interface XGChorusBlock extends XGSystemEffectBlock, XGChorusParameter {
2673
+ export interface XGChorusBlock extends XGSystemEffectBlock, XGChorusParameter {
2706
2674
  /**
2707
2675
  * Process the effect and **adds** it to the output.
2708
2676
  * @param inputLeft The input buffer to process. It always starts at index 0.
@@ -2718,14 +2686,12 @@ interface XGChorusBlock extends XGSystemEffectBlock, XGChorusParameter {
2718
2686
  getSnapshot(): XGChorusBlockSnapshot;
2719
2687
  applySnapshot(snapshot: XGChorusBlockSnapshot): void;
2720
2688
  }
2721
- //#endregion
2722
- //#region src/synthesizer/audio_engine/effects/xg/interface/xg_insertion_block.d.ts
2723
2689
  /**
2724
2690
  * Parameters for the XG insertion effect.
2725
2691
  *
2726
2692
  * @group Synthesizer.XG Effects
2727
2693
  */
2728
- interface XGInsertionParameter {
2694
+ export interface XGInsertionParameter {
2729
2695
  /**
2730
2696
  * The channel routed through the insertion effect, 0-based.
2731
2697
  *
@@ -2738,7 +2704,7 @@ interface XGInsertionParameter {
2738
2704
  *
2739
2705
  * @group Synthesizer.XG Effects
2740
2706
  */
2741
- interface XGInsertionBlockSnapshot extends XGInsertionParameter, XGEffectBlockSnapshot {}
2707
+ export interface XGInsertionBlockSnapshot extends XGInsertionParameter, XGEffectBlockSnapshot {}
2742
2708
  /**
2743
2709
  * The Insertion effects provide additional effects for processing individual Parts.
2744
2710
  *
@@ -2764,7 +2730,7 @@ interface XGInsertionBlockSnapshot extends XGInsertionParameter, XGEffectBlockSn
2764
2730
  *
2765
2731
  * @group Synthesizer.XG Effects
2766
2732
  */
2767
- interface XGInsertionBlock extends XGInsertionParameter, XGEffectBlock {
2733
+ export interface XGInsertionBlock extends XGInsertionParameter, XGEffectBlock {
2768
2734
  /**
2769
2735
  * Process the effect in insertion mode and **overwrites** it to the input.
2770
2736
  * The DSP honors Dry/Wet in this case.
@@ -2777,14 +2743,12 @@ interface XGInsertionBlock extends XGInsertionParameter, XGEffectBlock {
2777
2743
  getSnapshot(): XGInsertionBlockSnapshot;
2778
2744
  applySnapshot(snapshot: XGInsertionBlockSnapshot): void;
2779
2745
  }
2780
- //#endregion
2781
- //#region src/synthesizer/audio_engine/effects/xg/interface/xg_variation_block.d.ts
2782
2746
  /**
2783
2747
  * Parameters for the XG variation effect.
2784
2748
  *
2785
2749
  * @group Synthesizer.XG Effects
2786
2750
  */
2787
- interface XGVariationParameter extends XGSystemEffectParameter, XGInsertionParameter {
2751
+ export interface XGVariationParameter extends XGSystemEffectParameter, XGInsertionParameter {
2788
2752
  /**
2789
2753
  * Indicates if variation is in the insertion mode (CONNECTION).
2790
2754
  * If `false`, then variation is in the `system` mode.
@@ -2820,7 +2784,7 @@ interface XGVariationParameter extends XGSystemEffectParameter, XGInsertionParam
2820
2784
  *
2821
2785
  * @group Synthesizer.XG Effects
2822
2786
  */
2823
- interface XGVariationBlockSnapshot extends XGVariationParameter, XGSystemEffectBlockSnapshot, XGInsertionBlockSnapshot {}
2787
+ export interface XGVariationBlockSnapshot extends XGVariationParameter, XGSystemEffectBlockSnapshot, XGInsertionBlockSnapshot {}
2824
2788
  /**
2825
2789
  * The Variation section provides a wealth of additional effects.
2826
2790
  * It features some of the same effects found in the
@@ -2847,7 +2811,7 @@ interface XGVariationBlockSnapshot extends XGVariationParameter, XGSystemEffectB
2847
2811
  *
2848
2812
  * @group Synthesizer.XG Effects
2849
2813
  */
2850
- interface XGVariationBlock extends XGVariationParameter, XGSystemEffectBlock, XGInsertionBlock {
2814
+ export interface XGVariationBlock extends XGVariationParameter, XGSystemEffectBlock, XGInsertionBlock {
2851
2815
  /**
2852
2816
  * Process the effect in _system_ mode and **adds** it to the output.
2853
2817
  * Feeds the chorus and reverb buffers according to the send amounts.
@@ -2868,8 +2832,6 @@ interface XGVariationBlock extends XGVariationParameter, XGSystemEffectBlock, XG
2868
2832
  getSnapshot(): XGVariationBlockSnapshot;
2869
2833
  applySnapshot(snapshot: XGVariationBlockSnapshot): void;
2870
2834
  }
2871
- //#endregion
2872
- //#region src/synthesizer/audio_engine/parameters/system.d.ts
2873
2835
  /**
2874
2836
  * Global System Parameters are API-only parameters
2875
2837
  * that affect the entire synthesizer.
@@ -3020,6 +2982,15 @@ interface GlobalSystemParameter {
3020
2982
  * Synthesizer's device ID for system exclusive messages. Set to -1 to accept all.
3021
2983
  */
3022
2984
  deviceID: number;
2985
+ /**
2986
+ * Some MIDI synths (most notably Microsoft GS Wavetable Synth) incorrectly treat the "coarse tune" RPN
2987
+ * as semitone pitch change instead of true key shift.
2988
+ *
2989
+ * When this parameter is enabled,
2990
+ * {@link GlobalMIDIParameter.keyShift} and {@link ChannelMIDIParameter.keyShift}
2991
+ * are treated as semitone pitch changes.
2992
+ */
2993
+ pitchBasedKeyShift: boolean;
3023
2994
  /**
3024
2995
  * The master gain.
3025
2996
  * From 0 to any number. 1 is 100% volume.
@@ -3083,9 +3054,7 @@ interface GlobalSystemParameter {
3083
3054
  *
3084
3055
  * @group Synthesizer.Parameters
3085
3056
  */
3086
- declare const DEFAULT_GLOBAL_SYSTEM_PARAMETERS: GlobalSystemParameter;
3087
- //#endregion
3088
- //#region src/synthesizer/audio_engine/sound_bank_manager.d.ts
3057
+ export declare const DEFAULT_GLOBAL_SYSTEM_PARAMETERS: GlobalSystemParameter;
3089
3058
  /**
3090
3059
  * Manages the sound banks of the parent {@link SpessaSynthProcessor}.
3091
3060
  *
@@ -3093,7 +3062,7 @@ declare const DEFAULT_GLOBAL_SYSTEM_PARAMETERS: GlobalSystemParameter;
3093
3062
  *
3094
3063
  * @group Synthesizer.Sound Bank Integration
3095
3064
  */
3096
- declare class SoundBankManager {
3065
+ export declare class SoundBankManager {
3097
3066
  /**
3098
3067
  * All the sound banks, ordered from the most important to the least.
3099
3068
  */
@@ -3141,14 +3110,12 @@ declare class SoundBankManager {
3141
3110
  addSoundBank(bank: BasicSoundBank, id: string, bankOffset?: number): void;
3142
3111
  private generatePresetList;
3143
3112
  }
3144
- //#endregion
3145
- //#region src/midi/midi_message.d.ts
3146
3113
  /**
3147
3114
  * This class represents a single MIDI 1.0 message.
3148
3115
  *
3149
3116
  * @group MIDI.Protocol
3150
3117
  */
3151
- declare class MIDIMessage {
3118
+ export declare class MIDIMessage {
3152
3119
  /**
3153
3120
  * Absolute number of MIDI ticks from the start of the track.
3154
3121
  * This is only relevant in MIDI sequences.
@@ -3231,8 +3198,6 @@ declare class MIDIMessage {
3231
3198
  */
3232
3199
  static nonRegisteredParameter(ticks: number, channel: number, parameter: number, value: number): MIDIMessage[];
3233
3200
  }
3234
- //#endregion
3235
- //#region src/synthesizer/audio_engine/channel/awe32_nrpn.d.ts
3236
3201
  /**
3237
3202
  * Handlers for tuning SF2 generators with NRPN.
3238
3203
  *
@@ -3259,15 +3224,13 @@ interface ChannelGenerators {
3259
3224
  */
3260
3225
  overridesEnabled: boolean;
3261
3226
  }
3262
- //#endregion
3263
- //#region src/synthesizer/audio_engine/channel/types.d.ts
3264
3227
  /**
3265
3228
  * Represents the [custom channel vibrato](../../../../docs/extra/midi-implementation.md#custom-vibrato)
3266
3229
  * of the channel.
3267
3230
  *
3268
3231
  * @group Synthesizer.Channel
3269
3232
  */
3270
- interface CustomChannelVibrato {
3233
+ export interface CustomChannelVibrato {
3271
3234
  /**
3272
3235
  * Vibrato depth, in cents.
3273
3236
  */
@@ -3281,8 +3244,6 @@ interface CustomChannelVibrato {
3281
3244
  */
3282
3245
  rate: number;
3283
3246
  }
3284
- //#endregion
3285
- //#region src/synthesizer/audio_engine/channel/channel_snapshot.d.ts
3286
3247
  /**
3287
3248
  * This interface is a snapshot of a {@link MIDIChannel},
3288
3249
  * capturing its current state, which can be saved and restored.
@@ -3369,8 +3330,6 @@ interface ChannelSnapshot {
3369
3330
  */
3370
3331
  channel: number;
3371
3332
  }
3372
- //#endregion
3373
- //#region src/synthesizer/audio_engine/synthesizer_snapshot.d.ts
3374
3333
  /**
3375
3334
  * This interface is a snapshot of a {@link SpessaSynthProcessor},
3376
3335
  * capturing its current state, which can be saved and restored.
@@ -3435,8 +3394,6 @@ interface SynthesizerSnapshot {
3435
3394
  */
3436
3395
  userDrumSets: UserDrumSetParameter[][];
3437
3396
  }
3438
- //#endregion
3439
- //#region src/synthesizer/processor.d.ts
3440
3397
  /**
3441
3398
  * The core synthesis engine of SpessaSynth.
3442
3399
  * This module converts sound bank and MIDI data into PCM audio data.
@@ -3470,7 +3427,7 @@ interface SynthesizerSnapshot {
3470
3427
  *
3471
3428
  * @group Synthesizer
3472
3429
  */
3473
- declare class SpessaSynthProcessor {
3430
+ export declare class SpessaSynthProcessor {
3474
3431
  /**
3475
3432
  * A `Promise` that must be awaited before
3476
3433
  * the processor can be used with a compressed sound bank.
@@ -3755,8 +3712,6 @@ declare class SpessaSynthProcessor {
3755
3712
  private getDefaultPresets;
3756
3713
  private getCachedVoiceIndex;
3757
3714
  }
3758
- //#endregion
3759
- //#region src/synthesizer/audio_engine/parameters/midi.d.ts
3760
3715
  /**
3761
3716
  * Global MIDI Parameters are MIDI-only parameters
3762
3717
  * that affect the entire synthesizer.
@@ -3824,15 +3779,13 @@ interface GlobalMIDIParameter {
3824
3779
  *
3825
3780
  * @group Synthesizer.Parameters
3826
3781
  */
3827
- declare const DEFAULT_GLOBAL_MIDI_PARAMETERS: GlobalMIDIParameter;
3828
- //#endregion
3829
- //#region src/midi/midi_tools/analyzed_message.d.ts
3782
+ export declare const DEFAULT_GLOBAL_MIDI_PARAMETERS: GlobalMIDIParameter;
3830
3783
  /**
3831
3784
  * Represents an analyzed global MIDI parameter change message.
3832
3785
  *
3833
3786
  * @group MIDI.Protocol
3834
3787
  */
3835
- type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
3788
+ export type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
3836
3789
  /**
3837
3790
  * The message type identifier.
3838
3791
  */
@@ -3845,7 +3798,7 @@ type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
3845
3798
  * The new value of the global MIDI parameter.
3846
3799
  */
3847
3800
  value: GlobalMIDIParameter[P];
3848
- } }[keyof GlobalMIDIParameter];
3801
+ }; }[keyof GlobalMIDIParameter];
3849
3802
  /**
3850
3803
  * Represents an analyzed channel MIDI parameter change message.
3851
3804
  *
@@ -3855,7 +3808,7 @@ type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
3855
3808
  *
3856
3809
  * @group MIDI.Protocol
3857
3810
  */
3858
- type ChannelMIDIParameterMessage = { [P in keyof ChannelMIDIParameter]: {
3811
+ export type ChannelMIDIParameterMessage = { [P in keyof ChannelMIDIParameter]: {
3859
3812
  /**
3860
3813
  * The message type identifier.
3861
3814
  */
@@ -3872,13 +3825,13 @@ type ChannelMIDIParameterMessage = { [P in keyof ChannelMIDIParameter]: {
3872
3825
  * The MIDI channel number (it may be above 15 for multi-port MIDI setups).
3873
3826
  */
3874
3827
  channel: number;
3875
- } }[keyof ChannelMIDIParameter];
3828
+ }; }[keyof ChannelMIDIParameter];
3876
3829
  /**
3877
3830
  * Represents an analyzed channel GS Reverb Processor change.
3878
3831
  *
3879
3832
  * @group MIDI.Protocol
3880
3833
  */
3881
- type GSReverbParameterMessage = { [P in keyof GSReverbParameter]: {
3834
+ export type GSReverbParameterMessage = { [P in keyof GSReverbParameter]: {
3882
3835
  /**
3883
3836
  * The message type identifier.
3884
3837
  */
@@ -3891,7 +3844,7 @@ type GSReverbParameterMessage = { [P in keyof GSReverbParameter]: {
3891
3844
  * The new value of the GS reverb parameter.
3892
3845
  */
3893
3846
  value: GSReverbParameter[P];
3894
- } }[keyof GSReverbParameter] | {
3847
+ }; }[keyof GSReverbParameter] | {
3895
3848
  /**
3896
3849
  * The message type identifier.
3897
3850
  */
@@ -3910,7 +3863,7 @@ type GSReverbParameterMessage = { [P in keyof GSReverbParameter]: {
3910
3863
  *
3911
3864
  * @group MIDI.Protocol
3912
3865
  */
3913
- type GSChorusParameterMessage = { [P in keyof GSChorusParameter]: {
3866
+ export type GSChorusParameterMessage = { [P in keyof GSChorusParameter]: {
3914
3867
  /**
3915
3868
  * The message type identifier.
3916
3869
  */
@@ -3923,7 +3876,7 @@ type GSChorusParameterMessage = { [P in keyof GSChorusParameter]: {
3923
3876
  * The new value of the GS chorus parameter.
3924
3877
  */
3925
3878
  value: GSChorusParameter[P];
3926
- } }[keyof GSChorusParameter] | {
3879
+ }; }[keyof GSChorusParameter] | {
3927
3880
  /**
3928
3881
  * The message type identifier.
3929
3882
  */
@@ -3942,7 +3895,7 @@ type GSChorusParameterMessage = { [P in keyof GSChorusParameter]: {
3942
3895
  *
3943
3896
  * @group MIDI.Protocol
3944
3897
  */
3945
- type GSDelayParameterMessage = { [P in keyof GSDelayParameter]: {
3898
+ export type GSDelayParameterMessage = { [P in keyof GSDelayParameter]: {
3946
3899
  /**
3947
3900
  * The message type identifier.
3948
3901
  */
@@ -3955,7 +3908,7 @@ type GSDelayParameterMessage = { [P in keyof GSDelayParameter]: {
3955
3908
  * The new value of the GS delay parameter.
3956
3909
  */
3957
3910
  value: GSDelayParameter[P];
3958
- } }[keyof GSDelayParameter] | {
3911
+ }; }[keyof GSDelayParameter] | {
3959
3912
  /**
3960
3913
  * The message type identifier.
3961
3914
  */
@@ -3974,7 +3927,7 @@ type GSDelayParameterMessage = { [P in keyof GSDelayParameter]: {
3974
3927
  *
3975
3928
  * @group MIDI.Protocol
3976
3929
  */
3977
- type GSInsertionParameterMessage = {
3930
+ export type GSInsertionParameterMessage = {
3978
3931
  /**
3979
3932
  * An insertion effect processor parameter message (Roland GS).
3980
3933
  */
@@ -4020,7 +3973,7 @@ type GSInsertionParameterMessage = {
4020
3973
  *
4021
3974
  * @group MIDI.Protocol
4022
3975
  */
4023
- type XGReverbParameterMessage = {
3976
+ export type XGReverbParameterMessage = {
4024
3977
  /**
4025
3978
  * A reverb effect processor parameter message (Yamaha XG).
4026
3979
  */
@@ -4066,7 +4019,7 @@ type XGReverbParameterMessage = {
4066
4019
  *
4067
4020
  * @group MIDI.Protocol
4068
4021
  */
4069
- type XGChorusParameterMessage = {
4022
+ export type XGChorusParameterMessage = {
4070
4023
  /**
4071
4024
  * A chorus effect processor parameter message (Yamaha XG).
4072
4025
  */
@@ -4114,7 +4067,7 @@ type XGChorusParameterMessage = {
4114
4067
  *
4115
4068
  * @group MIDI.Protocol
4116
4069
  */
4117
- type XGVariationConnection = "system" | "insertion";
4070
+ export type XGVariationConnection = "system" | "insertion";
4118
4071
  /**
4119
4072
  * Represents an analyzed Yamaha XG Variation Processor change.
4120
4073
  *
@@ -4124,7 +4077,7 @@ type XGVariationConnection = "system" | "insertion";
4124
4077
  *
4125
4078
  * @group MIDI.Protocol
4126
4079
  */
4127
- type XGVariationParameterMessage = {
4080
+ export type XGVariationParameterMessage = {
4128
4081
  /**
4129
4082
  * A variation effect processor parameter message (Yamaha XG).
4130
4083
  */
@@ -4189,7 +4142,7 @@ type XGVariationParameterMessage = {
4189
4142
  *
4190
4143
  * @group MIDI.Protocol
4191
4144
  */
4192
- type XGInsertionParameterMessage = {
4145
+ export type XGInsertionParameterMessage = {
4193
4146
  /**
4194
4147
  * An insertion effect processor parameter message (Yamaha XG).
4195
4148
  */
@@ -4254,7 +4207,7 @@ type XGInsertionParameterMessage = {
4254
4207
  *
4255
4208
  * @group MIDI.Protocol
4256
4209
  */
4257
- type ChannelDrumSetupMessage = { [K in keyof DrumParameter]: {
4210
+ export type ChannelDrumSetupMessage = { [K in keyof DrumParameter]: {
4258
4211
  /**
4259
4212
  * A drum setup parameter message, set by NRPN.
4260
4213
  */
@@ -4275,13 +4228,13 @@ type ChannelDrumSetupMessage = { [K in keyof DrumParameter]: {
4275
4228
  * The value for the drum parameter.
4276
4229
  */
4277
4230
  value: DrumParameter[K];
4278
- } }[keyof DrumParameter];
4231
+ }; }[keyof DrumParameter];
4279
4232
  /**
4280
4233
  * Represents an analyzed map drum setup parameter change, set via System Exclusive.
4281
4234
  *
4282
4235
  * @group MIDI.Protocol
4283
4236
  */
4284
- type MapDrumSetupMessage = { [K in keyof DrumParameter]: {
4237
+ export type MapDrumSetupMessage = { [K in keyof DrumParameter]: {
4285
4238
  /**
4286
4239
  * A drum setup parameter message, set by SysEx.
4287
4240
  */
@@ -4303,7 +4256,7 @@ type MapDrumSetupMessage = { [K in keyof DrumParameter]: {
4303
4256
  * GS `pitchCoarse` is converted to semitones assuming the SC-88 resolution (50 cents per step).
4304
4257
  */
4305
4258
  value: DrumParameter[K];
4306
- } }[keyof DrumParameter];
4259
+ }; }[keyof DrumParameter];
4307
4260
  /**
4308
4261
  * The analysis result of an RPN (Registered Parameter Number) or NRPN (Non-Registered Parameter Number) MIDI message.
4309
4262
  *
@@ -4313,7 +4266,7 @@ type MapDrumSetupMessage = { [K in keyof DrumParameter]: {
4313
4266
  *
4314
4267
  * @group MIDI.Protocol
4315
4268
  */
4316
- type AnalyzedParameter = {
4269
+ export type AnalyzedParameter = {
4317
4270
  /**
4318
4271
  * An unhandled or unrecognized parameter message.
4319
4272
  */
@@ -4344,7 +4297,7 @@ type AnalyzedParameter = {
4344
4297
  *
4345
4298
  * @group MIDI.Protocol
4346
4299
  */
4347
- type AnalyzedMIDIMessage = AnalyzedParameter | GSReverbParameterMessage | GSChorusParameterMessage | GSDelayParameterMessage | GSInsertionParameterMessage | XGReverbParameterMessage | XGChorusParameterMessage | XGVariationParameterMessage | XGInsertionParameterMessage | {
4300
+ export type AnalyzedMIDIMessage = AnalyzedParameter | GSReverbParameterMessage | GSChorusParameterMessage | GSDelayParameterMessage | GSInsertionParameterMessage | XGReverbParameterMessage | XGChorusParameterMessage | XGVariationParameterMessage | XGInsertionParameterMessage | {
4348
4301
  /**
4349
4302
  * A MIDI program change message configured via System Exclusive.
4350
4303
  */
@@ -4384,21 +4337,19 @@ type AnalyzedMIDIMessage = AnalyzedParameter | GSReverbParameterMessage | GSChor
4384
4337
  * `pitchCoarse` is in GS steps, see {@link UserDrumSetParameter.pitchCoarse}.
4385
4338
  */
4386
4339
  value: UserDrumSetParameter[K];
4387
- } }[keyof UserDrumSetParameter] | MapDrumSetupMessage;
4340
+ }; }[keyof UserDrumSetParameter] | MapDrumSetupMessage;
4388
4341
  /**
4389
4342
  * The analysis result of a System Exclusive (SysEx) MIDI message.
4390
4343
  *
4391
4344
  * @group MIDI.Protocol
4392
4345
  */
4393
- type AnalyzedSysExMessage = Exclude<AnalyzedMIDIMessage, ChannelDrumSetupMessage>;
4394
- //#endregion
4395
- //#region src/synthesizer/events.d.ts
4346
+ export type AnalyzedSysExMessage = Exclude<AnalyzedMIDIMessage, ChannelDrumSetupMessage>;
4396
4347
  /**
4397
4348
  * A shared interface for all channel events.
4398
4349
  *
4399
4350
  * @group Synthesizer.Events
4400
4351
  */
4401
- interface ChannelEvent {
4352
+ export interface ChannelEvent {
4402
4353
  /**
4403
4354
  * The MIDI channel number for this event.
4404
4355
  * Usually it ranges from 0 to 15, but it depends on the
@@ -4427,7 +4378,7 @@ interface ChannelEvent {
4427
4378
  *
4428
4379
  * @group Synthesizer.Events
4429
4380
  */
4430
- interface NoteOnEvent extends ChannelEvent {
4381
+ export interface NoteOnEvent extends ChannelEvent {
4431
4382
  /**
4432
4383
  * The MIDI key number of the note that was pressed. Ranges from 0 to 127.
4433
4384
  */
@@ -4442,7 +4393,7 @@ interface NoteOnEvent extends ChannelEvent {
4442
4393
  *
4443
4394
  * @group Synthesizer.Events
4444
4395
  */
4445
- interface NoteOffEvent extends ChannelEvent {
4396
+ export interface NoteOffEvent extends ChannelEvent {
4446
4397
  /**
4447
4398
  * The MIDI key number of the note that was released. Ranges from 0 to 127.
4448
4399
  */
@@ -4462,7 +4413,7 @@ interface NoteOffEvent extends ChannelEvent {
4462
4413
  *
4463
4414
  * @group Synthesizer.Events
4464
4415
  */
4465
- interface ProgramChangeEvent extends MIDIPatchFull, ChannelEvent {}
4416
+ export interface ProgramChangeEvent extends MIDIPatchFull, ChannelEvent {}
4466
4417
  /**
4467
4418
  * This event is triggered when a controller is changed on any channel (usually MIDI controller change),
4468
4419
  * though [some system exclusives can change it too.](../../docs/extra/midi-implementation.md)
@@ -4475,7 +4426,7 @@ interface ProgramChangeEvent extends MIDIPatchFull, ChannelEvent {}
4475
4426
  *
4476
4427
  * @group Synthesizer.Events
4477
4428
  */
4478
- interface ControllerChangeEvent extends ChannelEvent {
4429
+ export interface ControllerChangeEvent extends ChannelEvent {
4479
4430
  /**
4480
4431
  * The MIDI controller number. Ranges from 0 to 127.
4481
4432
  */
@@ -4491,7 +4442,7 @@ interface ControllerChangeEvent extends ChannelEvent {
4491
4442
  *
4492
4443
  * @group Synthesizer.Events
4493
4444
  */
4494
- interface PolyPressureEvent extends ChannelEvent {
4445
+ export interface PolyPressureEvent extends ChannelEvent {
4495
4446
  /**
4496
4447
  * The MIDI key number of the note that was affected.
4497
4448
  * Ranges from 0 to 127.
@@ -4509,7 +4460,7 @@ interface PolyPressureEvent extends ChannelEvent {
4509
4460
  *
4510
4461
  * @group Synthesizer.Events
4511
4462
  */
4512
- interface StopAllEvent extends ChannelEvent {
4463
+ export interface StopAllEvent extends ChannelEvent {
4513
4464
  /**
4514
4465
  * If the channel was force stopped. (no release time)
4515
4466
  */
@@ -4521,7 +4472,7 @@ interface StopAllEvent extends ChannelEvent {
4521
4472
  *
4522
4473
  * @group Synthesizer.Events
4523
4474
  */
4524
- type ChannelMIDIParameterChangeEvent = { [P in keyof ChannelMIDIParameter]: ChannelEvent & {
4475
+ export type ChannelMIDIParameterChangeEvent = { [P in keyof ChannelMIDIParameter]: ChannelEvent & {
4525
4476
  /**
4526
4477
  * The parameter that was changed.
4527
4478
  */
@@ -4530,7 +4481,7 @@ type ChannelMIDIParameterChangeEvent = { [P in keyof ChannelMIDIParameter]: Chan
4530
4481
  * The new value of this parameter.
4531
4482
  */
4532
4483
  value: ChannelMIDIParameter[P];
4533
- } }[keyof ChannelMIDIParameter];
4484
+ }; }[keyof ChannelMIDIParameter];
4534
4485
  /**
4535
4486
  * The system exclusive data with the message.
4536
4487
  *
@@ -4540,13 +4491,13 @@ type ChannelMIDIParameterChangeEvent = { [P in keyof ChannelMIDIParameter]: Chan
4540
4491
  *
4541
4492
  * @group Synthesizer.Events
4542
4493
  */
4543
- type DisplayMessageData = number[];
4494
+ export type DisplayMessageData = number[];
4544
4495
  /**
4545
4496
  * This event is triggered when a {@link GlobalMIDIParameter} changes.
4546
4497
  *
4547
4498
  * @group Synthesizer.Events
4548
4499
  */
4549
- type GlobalMIDIParameterChangeEvent = { [P in keyof GlobalMIDIParameter]: {
4500
+ export type GlobalMIDIParameterChangeEvent = { [P in keyof GlobalMIDIParameter]: {
4550
4501
  /**
4551
4502
  * The parameter that was changed.
4552
4503
  */
@@ -4555,13 +4506,13 @@ type GlobalMIDIParameterChangeEvent = { [P in keyof GlobalMIDIParameter]: {
4555
4506
  * The new value of this parameter.
4556
4507
  */
4557
4508
  value: GlobalMIDIParameter[P];
4558
- } }[keyof GlobalMIDIParameter];
4509
+ }; }[keyof GlobalMIDIParameter];
4559
4510
  /**
4560
4511
  * The parameter names of an effect processor, or `macro` for the effect's macro.
4561
4512
  *
4562
4513
  * @group Synthesizer.Events
4563
4514
  */
4564
- type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
4515
+ export type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
4565
4516
  /**
4566
4517
  * This event is triggered when an effect processor has one of its parameters changed.
4567
4518
  *
@@ -4579,7 +4530,7 @@ type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
4579
4530
  *
4580
4531
  * @group Synthesizer.Events
4581
4532
  */
4582
- type EffectChangeEvent = {
4533
+ export type EffectChangeEvent = {
4583
4534
  /**
4584
4535
  * The effect that was changed: Roland GS reverb.
4585
4536
  */
@@ -4727,7 +4678,7 @@ type EffectChangeEvent = {
4727
4678
  *
4728
4679
  * @group Synthesizer.Events
4729
4680
  */
4730
- type UserDrumSetChangeEvent = { [P in keyof UserDrumSetParameter]: {
4681
+ export type UserDrumSetChangeEvent = { [P in keyof UserDrumSetParameter]: {
4731
4682
  /**
4732
4683
  * The drum set that was changed. 0 means User Drum Set 1, and 1 means User Drum Set 2.
4733
4684
  */
@@ -4744,7 +4695,7 @@ type UserDrumSetChangeEvent = { [P in keyof UserDrumSetParameter]: {
4744
4695
  * The new value of this parameter.
4745
4696
  */
4746
4697
  value: UserDrumSetParameter[P];
4747
- } }[keyof UserDrumSetParameter];
4698
+ }; }[keyof UserDrumSetParameter];
4748
4699
  /**
4749
4700
  *
4750
4701
  * {@link SynthesizerEvent} represents an event that {@link SpessaSynthProcessor} emits.
@@ -4782,7 +4733,7 @@ type UserDrumSetChangeEvent = { [P in keyof UserDrumSetParameter]: {
4782
4733
  *
4783
4734
  * @group Synthesizer.Events
4784
4735
  */
4785
- interface SynthesizerEvent {
4736
+ export interface SynthesizerEvent {
4786
4737
  /**
4787
4738
  * This event is triggered when a note is pressed on any channel.
4788
4739
  */
@@ -4905,12 +4856,10 @@ interface SynthesizerEvent {
4905
4856
  *
4906
4857
  * @group Synthesizer.Events
4907
4858
  */
4908
- type SynthesizerEventCallback = { [K in keyof SynthesizerEvent]: {
4859
+ export type SynthesizerEventCallback = { [K in keyof SynthesizerEvent]: {
4909
4860
  type: K;
4910
4861
  data: SynthesizerEvent[K];
4911
- } }[keyof SynthesizerEvent];
4912
- //#endregion
4913
- //#region src/synthesizer/audio_engine/effects/xg/implementation/dsp/effect_processor.d.ts
4862
+ }; }[keyof SynthesizerEvent];
4914
4863
  /**
4915
4864
  * The raw DSP processor for Yamaha XG effects.
4916
4865
  * Reverb, Chorus, Variation and Insertion all use it.
@@ -4968,8 +4917,6 @@ interface DefaultXGEffectProcessorConstructor {
4968
4917
  */
4969
4918
  new (sampleRate: number, maxBufferSize: number, memory: Float32Array, variation: boolean): DefaultXGEffectProcessor;
4970
4919
  }
4971
- //#endregion
4972
- //#region src/synthesizer/audio_engine/effects/xg/implementation/effect.d.ts
4973
4920
  /**
4974
4921
  * The default implementation for {@link XGEffectBlock}.
4975
4922
  *
@@ -4979,7 +4926,7 @@ interface DefaultXGEffectProcessorConstructor {
4979
4926
  *
4980
4927
  * @group Synthesizer.XG Effects
4981
4928
  */
4982
- declare abstract class DefaultXGEffect implements XGEffectBlock {
4929
+ export declare abstract class DefaultXGEffect implements XGEffectBlock {
4983
4930
  /**
4984
4931
  * The currently used processor.
4985
4932
  */
@@ -5015,8 +4962,6 @@ declare abstract class DefaultXGEffect implements XGEffectBlock {
5015
4962
  };
5016
4963
  applySnapshot(snapshot: XGEffectBlockSnapshot): void;
5017
4964
  }
5018
- //#endregion
5019
- //#region src/synthesizer/audio_engine/effects/xg/implementation/system_effect.d.ts
5020
4965
  /**
5021
4966
  * The default implementation for {@link XGSystemEffectBlock}.
5022
4967
  *
@@ -5024,7 +4969,7 @@ declare abstract class DefaultXGEffect implements XGEffectBlock {
5024
4969
  *
5025
4970
  * @group Synthesizer.XG Effects
5026
4971
  */
5027
- declare abstract class DefaultXGSystemEffect extends DefaultXGEffect implements XGSystemEffectBlock {
4972
+ export declare abstract class DefaultXGSystemEffect extends DefaultXGEffect implements XGSystemEffectBlock {
5028
4973
  return: number;
5029
4974
  pan: number;
5030
4975
  reset(): void;
@@ -5039,15 +4984,13 @@ declare abstract class DefaultXGSystemEffect extends DefaultXGEffect implements
5039
4984
  */
5040
4985
  protected mixSystemEffect(outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
5041
4986
  }
5042
- //#endregion
5043
- //#region src/synthesizer/audio_engine/effects/xg/implementation/reverb.d.ts
5044
4987
  /**
5045
4988
  * The default implementation for {@link XGReverbBlock}.
5046
4989
  *
5047
4990
  * @group Synthesizer.XG Effects
5048
4991
  * @sealed
5049
4992
  */
5050
- declare class DefaultXGReverb extends DefaultXGSystemEffect implements XGReverbBlock {
4993
+ export declare class DefaultXGReverb extends DefaultXGSystemEffect implements XGReverbBlock {
5051
4994
  /**
5052
4995
  * Constructs a new default XG reverb processor.
5053
4996
  * @param sampleRate The sample rate, in Hertz.
@@ -5057,15 +5000,13 @@ declare class DefaultXGReverb extends DefaultXGSystemEffect implements XGReverbB
5057
5000
  constructor(sampleRate: number, maxBufferSize: number);
5058
5001
  process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
5059
5002
  }
5060
- //#endregion
5061
- //#region src/synthesizer/audio_engine/effects/xg/implementation/chorus.d.ts
5062
5003
  /**
5063
5004
  * The default implementation for {@link XGChorusBlock}.
5064
5005
  *
5065
5006
  * @group Synthesizer.XG Effects
5066
5007
  * @sealed
5067
5008
  */
5068
- declare class DefaultXGChorus extends DefaultXGSystemEffect implements XGChorusBlock {
5009
+ export declare class DefaultXGChorus extends DefaultXGSystemEffect implements XGChorusBlock {
5069
5010
  sendToReverb: number;
5070
5011
  /**
5071
5012
  * Constructs a new default XG chorus processor.
@@ -5085,15 +5026,13 @@ declare class DefaultXGChorus extends DefaultXGSystemEffect implements XGChorusB
5085
5026
  };
5086
5027
  applySnapshot(snapshot: XGChorusBlockSnapshot): void;
5087
5028
  }
5088
- //#endregion
5089
- //#region src/synthesizer/audio_engine/effects/xg/implementation/variation.d.ts
5090
5029
  /**
5091
5030
  * The default implementation for {@link XGVariationBlock}.
5092
5031
  *
5093
5032
  * @group Synthesizer.XG Effects
5094
5033
  * @sealed
5095
5034
  */
5096
- declare class DefaultXGVariation extends DefaultXGSystemEffect implements XGVariationBlock {
5035
+ export declare class DefaultXGVariation extends DefaultXGSystemEffect implements XGVariationBlock {
5097
5036
  insertionMode: boolean;
5098
5037
  partNumber: number;
5099
5038
  sendToReverb: number;
@@ -5120,15 +5059,13 @@ declare class DefaultXGVariation extends DefaultXGSystemEffect implements XGVari
5120
5059
  };
5121
5060
  applySnapshot(snapshot: XGVariationBlockSnapshot): void;
5122
5061
  }
5123
- //#endregion
5124
- //#region src/synthesizer/audio_engine/effects/xg/implementation/insertion.d.ts
5125
5062
  /**
5126
5063
  * The default implementation for {@link XGInsertionBlock}.
5127
5064
  *
5128
5065
  * @group Synthesizer.XG Effects
5129
5066
  * @sealed
5130
5067
  */
5131
- declare class DefaultXGInsertion extends DefaultXGEffect implements XGInsertionBlock {
5068
+ export declare class DefaultXGInsertion extends DefaultXGEffect implements XGInsertionBlock {
5132
5069
  partNumber: number;
5133
5070
  /**
5134
5071
  * Constructs a new default XG insertion processor.
@@ -5146,14 +5083,12 @@ declare class DefaultXGInsertion extends DefaultXGEffect implements XGInsertionB
5146
5083
  };
5147
5084
  applySnapshot(snapshot: XGInsertionBlockSnapshot): void;
5148
5085
  }
5149
- //#endregion
5150
- //#region src/synthesizer/types.d.ts
5151
5086
  /**
5152
5087
  * Represents a single entry in the {@link SoundBankManager} list.
5153
5088
  *
5154
5089
  * @group Synthesizer.Sound Bank Integration
5155
5090
  */
5156
- interface SoundBankManagerListEntry {
5091
+ export interface SoundBankManagerListEntry {
5157
5092
  /**
5158
5093
  * The unique string identifier of the sound bank,
5159
5094
  * used to specify which one to add/remove.
@@ -5174,7 +5109,7 @@ interface SoundBankManagerListEntry {
5174
5109
  *
5175
5110
  * @group Synthesizer.Options
5176
5111
  */
5177
- interface SynthMethodOptions {
5112
+ export interface SynthMethodOptions {
5178
5113
  /**
5179
5114
  * The {@link SpessaSynthProcessor.currentTime} when the event should execute, in seconds.
5180
5115
  */
@@ -5185,7 +5120,7 @@ interface SynthMethodOptions {
5185
5120
  *
5186
5121
  * @group Synthesizer.Options
5187
5122
  */
5188
- interface SynthProcessorOptions {
5123
+ export interface SynthProcessorOptions {
5189
5124
  /**
5190
5125
  * The maximum buffer size the synthesizer can render at once.
5191
5126
  * Attempting to `.process()` more samples than this will result in an error.
@@ -5264,7 +5199,7 @@ interface SynthProcessorOptions {
5264
5199
  *
5265
5200
  * @group Synthesizer.Sound Bank Integration
5266
5201
  */
5267
- interface SynthesizerPatch extends MIDIPatchFull {
5202
+ export interface SynthesizerPatch extends MIDIPatchFull {
5268
5203
  /**
5269
5204
  * Returns the voice synthesis data for this preset.
5270
5205
  * @param midiNote the MIDI note number.
@@ -5273,8 +5208,6 @@ interface SynthesizerPatch extends MIDIPatchFull {
5273
5208
  */
5274
5209
  getVoiceParameters(midiNote: number, velocity: number): VoiceParameters[];
5275
5210
  }
5276
- //#endregion
5277
- //#region src/synthesizer/audio_engine/channel/midi_channel.d.ts
5278
5211
  /**
5279
5212
  * This class represents a single MIDI channel within a {@link SpessaSynthProcessor}.
5280
5213
  *
@@ -5282,7 +5215,7 @@ interface SynthesizerPatch extends MIDIPatchFull {
5282
5215
  *
5283
5216
  * @group Synthesizer.Channel
5284
5217
  */
5285
- declare class MIDIChannel {
5218
+ export declare class MIDIChannel {
5286
5219
  /**
5287
5220
  * The currently selected MIDI patch of the channel.
5288
5221
  * > **Note**
@@ -5387,8 +5320,6 @@ declare class MIDIChannel {
5387
5320
  */
5388
5321
  stopAllNotes(force?: boolean): void;
5389
5322
  }
5390
- //#endregion
5391
- //#region src/synthesizer/audio_engine/channel/parameters/midi.d.ts
5392
5323
  /**
5393
5324
  * Channel MIDI Parameters are MIDI-only parameters
5394
5325
  * that affect a single MIDI channel.
@@ -5578,9 +5509,7 @@ interface ChannelMIDIParameter {
5578
5509
  *
5579
5510
  * @group Synthesizer.Parameters
5580
5511
  */
5581
- declare const DEFAULT_CHANNEL_MIDI_PARAMETERS: ChannelMIDIParameter;
5582
- //#endregion
5583
- //#region src/midi/midi_tools/midi_editor.d.ts
5512
+ export declare const DEFAULT_CHANNEL_MIDI_PARAMETERS: ChannelMIDIParameter;
5584
5513
  /**
5585
5514
  * Represents a value that means "clear this parameter" instead of "replace this parameter with".
5586
5515
  * Essentially:
@@ -5624,7 +5553,7 @@ interface ChannelModification {
5624
5553
  * before the channel's first note-on, re-applying it after every system reset,
5625
5554
  * effectively locking it to the set value.
5626
5555
  */
5627
- midiParams?: { [P in keyof ChannelMIDIParameter]?: ClearableParameter<ChannelMIDIParameter[P]> };
5556
+ midiParams?: { [P in keyof ChannelMIDIParameter]?: ClearableParameter<ChannelMIDIParameter[P]>; };
5628
5557
  /**
5629
5558
  * The channel key shift in semitones.
5630
5559
  * Note on/off and poly pressure MIDI note numbers are shifted.
@@ -5676,7 +5605,7 @@ interface ChannelModification {
5676
5605
  *
5677
5606
  * @group MIDI.Editing
5678
5607
  */
5679
- type UserDrumModification = Map<number, ClearableParameter<{ [P in keyof UserDrumSetParameter]?: ClearableParameter<UserDrumSetParameter[P]> }>>;
5608
+ type UserDrumModification = Map<number, ClearableParameter<{ [P in keyof UserDrumSetParameter]?: ClearableParameter<UserDrumSetParameter[P]>; }>>;
5680
5609
  /**
5681
5610
  * All drum note modifications for a single channel.
5682
5611
  * - Key: the MIDI drum key/note number to modify.
@@ -5697,7 +5626,7 @@ type UserDrumModification = Map<number, ClearableParameter<{ [P in keyof UserDru
5697
5626
  *
5698
5627
  * @group MIDI.Editing
5699
5628
  */
5700
- type ChannelDrumModification = Map<number, ClearableParameter<{ [P in keyof DrumParameter]?: ClearableParameter<DrumParameter[P]> }>>;
5629
+ type ChannelDrumModification = Map<number, ClearableParameter<{ [P in keyof DrumParameter]?: ClearableParameter<DrumParameter[P]>; }>>;
5701
5630
  /**
5702
5631
  * Options editing a MIDI sequence using {@link BasicMIDI.modify}.
5703
5632
  *
@@ -5742,7 +5671,7 @@ interface ModifyMIDIOptions {
5742
5671
  * > to keep the GM reset (and replace all others with GM).
5743
5672
  * > This is done to allow the bank selections and other parameters to work.
5744
5673
  */
5745
- midiParams?: { [P in keyof GlobalMIDIParameter]?: ClearableParameter<GlobalMIDIParameter[P]> };
5674
+ midiParams?: { [P in keyof GlobalMIDIParameter]?: ClearableParameter<GlobalMIDIParameter[P]>; };
5746
5675
  /**
5747
5676
  * The desired GS reverb parameters.
5748
5677
  * - `"clear"` - all existing parameter change MIDI messages are removed.
@@ -5806,14 +5735,12 @@ interface ModifyMIDIOptions {
5806
5735
  */
5807
5736
  fallbackReset?: MIDISystem;
5808
5737
  }
5809
- //#endregion
5810
- //#region src/midi/types.d.ts
5811
5738
  /**
5812
5739
  * RMIDInfoData type represents metadata for an RMIDI file.
5813
5740
  *
5814
5741
  * @group MIDI.Sequence
5815
5742
  */
5816
- interface RMIDInfoData {
5743
+ export interface RMIDInfoData {
5817
5744
  /**
5818
5745
  * The name of the song.
5819
5746
  */
@@ -5872,7 +5799,7 @@ interface RMIDInfoData {
5872
5799
  /**
5873
5800
  * @group MIDI.Sequence
5874
5801
  */
5875
- interface TempoChange {
5802
+ export interface TempoChange {
5876
5803
  /**
5877
5804
  * MIDI ticks of the change, absolute value from the start of the MIDI file.
5878
5805
  */
@@ -5887,7 +5814,7 @@ interface TempoChange {
5887
5814
  *
5888
5815
  * @group MIDI.Sequence
5889
5816
  */
5890
- interface MIDILoop {
5817
+ export interface MIDILoop {
5891
5818
  /**
5892
5819
  * Start of the loop, in MIDI ticks.
5893
5820
  */
@@ -5915,11 +5842,11 @@ interface MIDILoop {
5915
5842
  *
5916
5843
  * @group MIDI.Sequence
5917
5844
  */
5918
- type MIDIFormat = 0 | 1 | 2;
5845
+ export type MIDIFormat = 0 | 1 | 2;
5919
5846
  /**
5920
5847
  * @group MIDI.Sequence
5921
5848
  */
5922
- interface NoteTime {
5849
+ export interface NoteTime {
5923
5850
  /**
5924
5851
  * The MIDI note number.
5925
5852
  */
@@ -5942,7 +5869,7 @@ interface NoteTime {
5942
5869
  *
5943
5870
  * @group MIDI.Files
5944
5871
  */
5945
- interface RMIDIWriteOptions {
5872
+ export interface RMIDIWriteOptions {
5946
5873
  /**
5947
5874
  * The bank offset to apply to the file. Defaults to `0`.
5948
5875
  * [See this for more info](https://github.com/spessasus/sf2-rmidi-specification#dbnk-chunk)
@@ -5976,11 +5903,11 @@ interface RMIDIWriteOptions {
5976
5903
  *
5977
5904
  * @group Utilities.FourCC
5978
5905
  */
5979
- type RMIDInfoFourCC = "INAM" | "IPRD" | "IALB" | "IART" | "IGNR" | "IPIC" | "ICOP" | "ICRD" | "ICRT" | "ICMT" | "IENG" | "ISFT" | "ISBJ" | "IENC" | "MENC" | "DBNK";
5906
+ export type RMIDInfoFourCC = "INAM" | "IPRD" | "IALB" | "IART" | "IGNR" | "IPIC" | "ICOP" | "ICRD" | "ICRT" | "ICMT" | "IENG" | "ISFT" | "ISBJ" | "IENC" | "MENC" | "DBNK";
5980
5907
  /**
5981
5908
  * @group MIDI.Sequence
5982
5909
  */
5983
- interface TimelineEvent {
5910
+ export interface TimelineEvent {
5984
5911
  /**
5985
5912
  * The track number of this event.
5986
5913
  */
@@ -5995,13 +5922,13 @@ interface TimelineEvent {
5995
5922
  *
5996
5923
  * @group MIDI.Protocol
5997
5924
  */
5998
- type SysExAcceptedArray = number[] | Uint8Array | Int8Array | Uint8ClampedArray;
5925
+ export type SysExAcceptedArray = number[] | Uint8Array | Int8Array | Uint8ClampedArray;
5999
5926
  /**
6000
5927
  * An interface that represents a virtual sound bank which can return a preset.
6001
5928
  *
6002
5929
  * @group Sound Banks
6003
5930
  */
6004
- interface CallableSoundBank<T extends MIDIPatchFull> {
5931
+ export interface CallableSoundBank<T extends MIDIPatchFull> {
6005
5932
  /**
6006
5933
  * Returns the matching {@link BasicPreset} instance.
6007
5934
  * This uses the {@link MIDIPatchTools.selectPatch} algorithm for selecting the optimal preset.
@@ -6016,7 +5943,7 @@ interface CallableSoundBank<T extends MIDIPatchFull> {
6016
5943
  *
6017
5944
  * @group Synthesizer.Drum Sets
6018
5945
  */
6019
- interface DrumParameter {
5946
+ export interface DrumParameter {
6020
5947
  /**
6021
5948
  * Pitch offset in semitones. Relative value.
6022
5949
  * May be floating point! (GS half-semitone coarse tune resolution)
@@ -6071,7 +5998,7 @@ interface DrumParameter {
6071
5998
  *
6072
5999
  * @group Synthesizer.Drum Sets
6073
6000
  */
6074
- interface UserDrumSetParameter extends DrumParameter {
6001
+ export interface UserDrumSetParameter extends DrumParameter {
6075
6002
  /**
6076
6003
  * Pitch offset in GS steps (the PLAY NOTE NUMBER relative to 60). Relative value.
6077
6004
  * A step is 50 cents, or 100 cents when `sourceDrumSet` is 1 (SC-55 map).
@@ -6091,8 +6018,6 @@ interface UserDrumSetParameter extends DrumParameter {
6091
6018
  */
6092
6019
  sourceNoteNumber: number;
6093
6020
  }
6094
- //#endregion
6095
- //#region src/utils/riff_chunk.d.ts
6096
6021
  /**
6097
6022
  * General RIFF (and RIFF64) Four Character Codes defined in the RIFF spec.
6098
6023
  *
@@ -6111,9 +6036,7 @@ type WAVFourCC = "wave" | "cue " | "fmt ";
6111
6036
  * @group Utilities.FourCC
6112
6037
  */
6113
6038
  type FourCC = GenericRIFFFourCC | SF2InfoFourCC | SF2ChunkFourCC | DLSInfoFourCC | DLSChunkFourCC | RMIDInfoFourCC | WAVFourCC;
6114
- //#endregion
6115
- //#region src/utils/exports.d.ts
6116
- declare const SpessaSynthCoreUtils: {
6039
+ export declare const SpessaSynthCoreUtils: {
6117
6040
  ConsoleColors: {
6118
6041
  warn: string;
6119
6042
  unrecognized: string;
@@ -6128,14 +6051,12 @@ declare const SpessaSynthCoreUtils: {
6128
6051
  readBinaryStringIndexed: typeof readBinaryStringIndexed;
6129
6052
  readVariableLengthQuantity: typeof readVariableLengthQuantity;
6130
6053
  };
6131
- //#endregion
6132
- //#region src/midi/midi_track.d.ts
6133
6054
  /**
6134
6055
  * This class represents a single MIDI track in a {@link BasicMIDI} sequence.
6135
6056
  *
6136
6057
  * @group MIDI.Sequence
6137
6058
  */
6138
- declare class MIDITrack {
6059
+ export declare class MIDITrack {
6139
6060
  /**
6140
6061
  * The name of this track.
6141
6062
  * Empty if the track has no name.
@@ -6182,8 +6103,6 @@ declare class MIDITrack {
6182
6103
  */
6183
6104
  pushEvents(...events: MIDIMessage[]): void;
6184
6105
  }
6185
- //#endregion
6186
- //#region src/midi/basic_midi.d.ts
6187
6106
  /**
6188
6107
  * BasicMIDI is the base of a complete MIDI file.
6189
6108
  * It represents a single MIDI sequence, with an optional sound bank attached to it.
@@ -6192,7 +6111,7 @@ declare class MIDITrack {
6192
6111
  *
6193
6112
  * @group MIDI
6194
6113
  */
6195
- declare class BasicMIDI {
6114
+ export declare class BasicMIDI {
6196
6115
  /**
6197
6116
  * The tracks in the sequence, represented as an array of {@link MIDITrack}.
6198
6117
  */
@@ -6668,14 +6587,12 @@ declare class BasicMIDI {
6668
6587
  */
6669
6588
  protected parseInternal(): void;
6670
6589
  }
6671
- //#endregion
6672
- //#region src/midi/midi_tools/midi_builder.d.ts
6673
6590
  /**
6674
6591
  * Options for initializing the MIDI Builder.
6675
6592
  *
6676
6593
  * @group MIDI.Files
6677
6594
  */
6678
- interface MIDIBuilderOptions {
6595
+ export interface MIDIBuilderOptions {
6679
6596
  /**
6680
6597
  * The MIDI file's tick precision (how many ticks fit in a quarter note).
6681
6598
  * Defaults to 480.
@@ -6712,7 +6629,7 @@ interface MIDIBuilderOptions {
6712
6629
  *
6713
6630
  * @group MIDI.Files
6714
6631
  */
6715
- declare class MIDIBuilder extends BasicMIDI {
6632
+ export declare class MIDIBuilder extends BasicMIDI {
6716
6633
  private encoder;
6717
6634
  /**
6718
6635
  * Creates a new MIDI file.
@@ -6827,14 +6744,12 @@ declare class MIDIBuilder extends BasicMIDI {
6827
6744
  */
6828
6745
  nonRegisteredParameter(ticks: number, track: number, channel: number, parameter: number, value: number): void;
6829
6746
  }
6830
- //#endregion
6831
- //#region src/midi/midi_tools/midi_utils.d.ts
6832
6747
  /**
6833
6748
  * This class contains useful utilities for manipulating and parsing System Exclusive and other MIDI 1.0 messages.
6834
6749
  *
6835
6750
  * @group MIDI.Protocol
6836
6751
  */
6837
- declare class MIDIUtils {
6752
+ export declare class MIDIUtils {
6838
6753
  private constructor();
6839
6754
  /**
6840
6755
  * Analyzes a MIDI System Exclusive message
@@ -7093,14 +7008,12 @@ declare class MIDIUtils {
7093
7008
  private static analyzeGS;
7094
7009
  private static handleSingleUserDrum;
7095
7010
  }
7096
- //#endregion
7097
- //#region src/midi/drum_parameters.d.ts
7098
7011
  /**
7099
7012
  * This class contains various utilities for manipulating {@link DrumParameter}s.
7100
7013
  *
7101
7014
  * @group Synthesizer.Drum Sets
7102
7015
  */
7103
- declare class DrumParameterUtils {
7016
+ export declare class DrumParameterUtils {
7104
7017
  /**
7105
7018
  * Default drum parameter data.
7106
7019
  */
@@ -7134,8 +7047,6 @@ declare class DrumParameterUtils {
7134
7047
  */
7135
7048
  static copyIntoUser(source: UserDrumSetParameter, dest: UserDrumSetParameter): void;
7136
7049
  }
7137
- //#endregion
7138
- //#region src/sequencer/types.d.ts
7139
7050
  /**
7140
7051
  * {@link SequencerEvent} represents an event that {@link SpessaSynthSequencer} emits.
7141
7052
  *
@@ -7143,7 +7054,7 @@ declare class DrumParameterUtils {
7143
7054
  *
7144
7055
  * @group Sequencer
7145
7056
  */
7146
- interface SequencerEvent {
7057
+ export interface SequencerEvent {
7147
7058
  /**
7148
7059
  * This event is called when a MIDI message is sent and {@link SpessaSynthSequencer.externalMIDIPlayback `externalMIDIPlayback`} is true.
7149
7060
  */
@@ -7227,18 +7138,16 @@ interface SequencerEvent {
7227
7138
  *
7228
7139
  * @group Sequencer
7229
7140
  */
7230
- type SequencerEventCallback = { [K in keyof SequencerEvent]: {
7141
+ export type SequencerEventCallback = { [K in keyof SequencerEvent]: {
7231
7142
  type: K;
7232
7143
  data: SequencerEvent[K];
7233
- } }[keyof SequencerEvent];
7234
- //#endregion
7235
- //#region src/sequencer/sequencer.d.ts
7144
+ }; }[keyof SequencerEvent];
7236
7145
  /**
7237
7146
  * This module is responsible for playing back {@link BasicMIDI} sequences to {@link SpessaSynthProcessor}.
7238
7147
  *
7239
7148
  * @group Sequencer
7240
7149
  */
7241
- declare class SpessaSynthSequencer {
7150
+ export declare class SpessaSynthSequencer {
7242
7151
  /**
7243
7152
  * Sequencer's current song list.
7244
7153
  */
@@ -7402,14 +7311,12 @@ declare class SpessaSynthSequencer {
7402
7311
  */
7403
7312
  loadNewSongList(midiBuffers: BasicMIDI[]): void;
7404
7313
  }
7405
- //#endregion
7406
- //#region src/synthesizer/audio_engine/effects/gs/implementation/reverb.d.ts
7407
7314
  /**
7408
7315
  * The default GS Reverb implementation for {@link SpessaSynthProcessor}.
7409
7316
  *
7410
7317
  * @group Synthesizer.GS Effects
7411
7318
  */
7412
- declare class DefaultGSReverb implements GSReverbProcessor {
7319
+ export declare class DefaultGSReverb implements GSReverbProcessor {
7413
7320
  /**
7414
7321
  * Dattorro reverb processor.
7415
7322
  * @private
@@ -7530,14 +7437,12 @@ declare class DefaultGSReverb implements GSReverbProcessor {
7530
7437
  private updateGain;
7531
7438
  private updateTime;
7532
7439
  }
7533
- //#endregion
7534
- //#region src/synthesizer/audio_engine/effects/gs/implementation/chorus.d.ts
7535
7440
  /**
7536
7441
  * The default GS Chorus implementation for {@link SpessaSynthProcessor}.
7537
7442
  *
7538
7443
  * @group Synthesizer.GS Effects
7539
7444
  */
7540
- declare class DefaultGSChorus implements GSChorusProcessor {
7445
+ export declare class DefaultGSChorus implements GSChorusProcessor {
7541
7446
  /**
7542
7447
  * Cutoff frequency
7543
7448
  * @private
@@ -7599,14 +7504,12 @@ declare class DefaultGSChorus implements GSChorusProcessor {
7599
7504
  process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
7600
7505
  getSnapshot(): GSChorusParameter;
7601
7506
  }
7602
- //#endregion
7603
- //#region src/synthesizer/audio_engine/effects/gs/implementation/delay.d.ts
7604
7507
  /**
7605
7508
  * The default GS Delay implementation for {@link SpessaSynthProcessor}.
7606
7509
  *
7607
7510
  * @group Synthesizer.GS Effects
7608
7511
  */
7609
- declare class DefaultGSDelay implements GSDelayProcessor {
7512
+ export declare class DefaultGSDelay implements GSDelayProcessor {
7610
7513
  /**
7611
7514
  * Cutoff frequency
7612
7515
  * @private
@@ -7697,62 +7600,56 @@ declare class DefaultGSDelay implements GSDelayProcessor {
7697
7600
  private updateDelayTimes;
7698
7601
  private updateGain;
7699
7602
  }
7700
- //#endregion
7701
- //#region src/synthesizer/audio_engine/synth_constants.d.ts
7702
7603
  /**
7703
7604
  * Synthesizer's default voice cap.
7704
7605
  *
7705
7606
  * @group Synthesizer.Constants
7706
7607
  */
7707
- declare const VOICE_CAP = 350;
7608
+ export declare const VOICE_CAP = 350;
7708
7609
  /**
7709
7610
  * Default MIDI drum channel number, 0 based index.
7710
7611
  *
7711
7612
  * @group Synthesizer.Constants
7712
7613
  */
7713
- declare const MIDI_DRUM_CHANNEL = 9;
7614
+ export declare const MIDI_DRUM_CHANNEL = 9;
7714
7615
  /**
7715
7616
  * Default bank select and SysEx mode.
7716
7617
  *
7717
7618
  * @group Synthesizer.Constants
7718
7619
  */
7719
- declare const DEFAULT_SYNTH_MODE: MIDISystem;
7620
+ export declare const DEFAULT_SYNTH_MODE: MIDISystem;
7720
7621
  /**
7721
7622
  * This gain factor ensures that spessasynth doesn't stay too loud.
7722
7623
  * You can set the `gain` system parameter to an inverse of it to negate the effect.
7723
7624
  *
7724
7625
  * @group Synthesizer.Constants
7725
7626
  */
7726
- declare const SPESSASYNTH_GAIN_FACTOR = 0.6;
7627
+ export declare const SPESSASYNTH_GAIN_FACTOR = 0.6;
7727
7628
  /**
7728
7629
  * The default buffer size for the synthesizer.
7729
7630
  *
7730
7631
  * @group Synthesizer.Constants
7731
7632
  */
7732
- declare const SPESSA_BUFSIZE = 128;
7733
- //#endregion
7734
- //#region src/synthesizer/audio_engine/channel/reset.d.ts
7633
+ export declare const SPESSA_BUFSIZE = 128;
7735
7634
  /**
7736
7635
  * An array with the default MIDI controller values.
7737
7636
  * Note that these are 14-bit, requiring a 7-bit shift to the right for 7-bit values!
7738
7637
  *
7739
7638
  * @group Synthesizer.Constants
7740
7639
  */
7741
- declare const DEFAULT_MIDI_CONTROLLERS: Readonly<Int16Array>;
7640
+ export declare const DEFAULT_MIDI_CONTROLLERS: Readonly<Int16Array>;
7742
7641
  /**
7743
7642
  * Default reverb level for each drum instrument.
7744
7643
  *
7745
7644
  * @group Synthesizer.Drum Sets
7746
7645
  */
7747
- declare const DEFAULT_DRUM_REVERB: Int8Array<ArrayBuffer>;
7748
- //#endregion
7749
- //#region src/soundbank/sound_bank_loader.d.ts
7646
+ export declare const DEFAULT_DRUM_REVERB: Int8Array<ArrayBuffer>;
7750
7647
  /**
7751
7648
  * A helper class for loading sound bank files as {@link BasicSoundBank} instances.
7752
7649
  *
7753
7650
  * @group Sound Banks
7754
7651
  */
7755
- declare class SoundBankLoader {
7652
+ export declare class SoundBankLoader {
7756
7653
  /**
7757
7654
  * Loads a sound bank from a file buffer.
7758
7655
  * @param buffer The binary file buffer to load.
@@ -7760,6 +7657,5 @@ declare class SoundBankLoader {
7760
7657
  */
7761
7658
  static fromArrayBuffer(buffer: ArrayBuffer): BasicSoundBank;
7762
7659
  }
7763
- //#endregion
7764
- export { AnalyzedMIDIMessage, AnalyzedParameter, AnalyzedSysExMessage, BasicInstrument, BasicInstrumentZone, BasicMIDI, BasicPreset, BasicPresetZone, BasicSample, BasicSoundBank, BasicZone, CallableSoundBank, type ChannelDrumModification, ChannelDrumSetupMessage, ChannelEvent, type ChannelGenerators, type ChannelMIDIParameter, ChannelMIDIParameterChangeEvent, ChannelMIDIParameterMessage, type ChannelModification, type ChannelSnapshot, type ChannelSystemParameter, type ClearableParameter, ControllerChangeEvent, CustomChannelVibrato, DEFAULT_CHANNEL_MIDI_PARAMETERS, DEFAULT_CHANNEL_SYSTEM_PARAMETERS, DEFAULT_DRUM_REVERB, DEFAULT_GLOBAL_MIDI_PARAMETERS, DEFAULT_GLOBAL_SYSTEM_PARAMETERS, DEFAULT_MIDI_CONTROLLERS, DEFAULT_SYNTH_MODE, DLSChunkFourCC, DLSInfoFourCC, DefaultGSChorus, DefaultGSDelay, DefaultGSReverb, DefaultXGChorus, DefaultXGEffect, DefaultXGInsertion, DefaultXGReverb, DefaultXGSystemEffect, DefaultXGVariation, DisplayMessageData, DrumParameter, DrumParameterUtils, EffectChangeEvent, EmptySample, FXType, type FourCC, GENERATORS_AMOUNT, GSChorusParameter, GSChorusParameterMessage, GSChorusProcessor, GSDelayParameter, GSDelayParameterMessage, GSDelayProcessor, GSInsertionParameterMessage, GSInsertionProcessor, GSInsertionProcessorSnapshot, GSReverbParameter, GSReverbParameterMessage, GSReverbProcessor, GSSystemEffectParameter, Generator, GeneratorLimit, GeneratorLimits, GeneratorType, GeneratorTypes, GenericBankInfoFourCC, type GenericRIFFFourCC, GenericRange, type GlobalMIDIParameter, GlobalMIDIParameterChangeEvent, GlobalMIDIParameterMessage, type GlobalSystemParameter, IndexedByteArray, InterpolationType, InterpolationTypes, MAX_GENERATOR, MIDIBuilder, MIDIBuilderOptions, MIDIChannel, type MIDIController, MIDIControllers, MIDIFormat, MIDILoop, MIDIMessage, type MIDIMessageType, MIDIMessageTypes, MIDIPatch, MIDIPatchFull, MIDIPatchTools, MIDISystem, MIDITrack, MIDIUtils, MIDI_DRUM_CHANNEL, MapDrumSetupMessage, type ModifyMIDIOptions, Modulator, ModulatorControllerSource, ModulatorControllerSources, ModulatorCurveType, ModulatorCurveTypes, ModulatorSource, ModulatorSourceIndex, ModulatorTransformType, ModulatorTransformTypes, NonRegisteredParameterTypesLSB, NonRegisteredParameterTypesMSB, NoteOffEvent, NoteOnEvent, NoteTime, PolyPressureEvent, PresetsWithKeyCombinations, ProgramChangeEvent, ProgressFunction, RMIDIWriteOptions, RMIDInfoData, RMIDInfoFourCC, RegisteredParameterTypes, SF2Channel, SF2ChunkFourCC, SF2InfoFourCC, SF2VersionTag, SFEWriteOptions, SPESSASYNTH_GAIN_FACTOR, SPESSA_BUFSIZE, SampleEncodingFunction, SampleType, SampleTypes, SequencerEvent, SequencerEventCallback, SetSampleFormatOptions, SoundBankInfoData, SoundBankLoader, SoundBankManager, SoundBankManagerListEntry, SoundBankWriteOptions, SoundFont2WriteOptions, SpessaLog, SpessaSynthCoreUtils, SpessaSynthProcessor, SpessaSynthSequencer, StopAllEvent, SynthMethodOptions, SynthProcessorOptions, SynthesizerEvent, SynthesizerEventCallback, SynthesizerPatch, type SynthesizerSnapshot, SysExAcceptedArray, TempoChange, TimelineEvent, type UserDrumModification, UserDrumSetChangeEvent, UserDrumSetParameter, VOICE_CAP, VoiceParameters, type WAVFourCC, WaveMetadata, WaveWriteOptions, XGChorusBlock, XGChorusBlockSnapshot, XGChorusParameter, XGChorusParameterMessage, XGEffectBlock, XGEffectBlockSnapshot, XGInsertionBlock, XGInsertionBlockSnapshot, XGInsertionParameter, XGInsertionParameterMessage, XGReverbBlock, XGReverbParameterMessage, XGSystemEffectBlock, XGSystemEffectBlockSnapshot, XGSystemEffectParameter, XGVariationBlock, XGVariationBlockSnapshot, XGVariationConnection, XGVariationParameter, XGVariationParameterMessage, audioToWav };
7660
+ export type { ChannelDrumModification, ChannelGenerators, ChannelMIDIParameter, ChannelModification, ChannelSnapshot, ChannelSystemParameter, ClearableParameter, FourCC, GenericRIFFFourCC, GlobalMIDIParameter, GlobalSystemParameter, MIDIController, MIDIMessageType, ModifyMIDIOptions, SynthesizerSnapshot, UserDrumModification, WAVFourCC };
7765
7661
  //# sourceMappingURL=index.d.ts.map