spessasynth_core 4.4.1 → 4.4.3
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 +389 -394
- package/dist/index.js +5639 -5902
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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.
|
|
@@ -680,14 +653,12 @@ declare class BasicZone {
|
|
|
680
653
|
*/
|
|
681
654
|
copyFrom(zone: BasicZone): void;
|
|
682
655
|
}
|
|
683
|
-
//#endregion
|
|
684
|
-
//#region src/soundbank/basic_soundbank/basic_instrument_zone.d.ts
|
|
685
656
|
/**
|
|
686
657
|
* Represents a single instrument zone with an associated {@link BasicSample}.
|
|
687
658
|
*
|
|
688
659
|
* @group Sound Banks.Zones
|
|
689
660
|
*/
|
|
690
|
-
declare class BasicInstrumentZone extends BasicZone {
|
|
661
|
+
export declare class BasicInstrumentZone extends BasicZone {
|
|
691
662
|
/**
|
|
692
663
|
* The instrument this zone belongs to.
|
|
693
664
|
*/
|
|
@@ -706,14 +677,12 @@ declare class BasicInstrumentZone extends BasicZone {
|
|
|
706
677
|
*/
|
|
707
678
|
set sample(sample: BasicSample);
|
|
708
679
|
}
|
|
709
|
-
//#endregion
|
|
710
|
-
//#region src/soundbank/basic_soundbank/basic_preset_zone.d.ts
|
|
711
680
|
/**
|
|
712
681
|
* Represents a single preset zone with an associated {@link BasicInstrument}.
|
|
713
682
|
*
|
|
714
683
|
* @group Sound Banks.Zones
|
|
715
684
|
*/
|
|
716
|
-
declare class BasicPresetZone extends BasicZone {
|
|
685
|
+
export declare class BasicPresetZone extends BasicZone {
|
|
717
686
|
/**
|
|
718
687
|
* The preset this zone belongs to.
|
|
719
688
|
*/
|
|
@@ -732,8 +701,6 @@ declare class BasicPresetZone extends BasicZone {
|
|
|
732
701
|
*/
|
|
733
702
|
set instrument(instrument: BasicInstrument);
|
|
734
703
|
}
|
|
735
|
-
//#endregion
|
|
736
|
-
//#region src/soundbank/basic_soundbank/midi_patch.d.ts
|
|
737
704
|
/**
|
|
738
705
|
* SpessaSynth 4.0 brings the full bank LSB support in the API.
|
|
739
706
|
*
|
|
@@ -743,7 +710,7 @@ declare class BasicPresetZone extends BasicZone {
|
|
|
743
710
|
*
|
|
744
711
|
* @group Sound Banks.MIDI Patch System
|
|
745
712
|
*/
|
|
746
|
-
interface MIDIPatch {
|
|
713
|
+
export interface MIDIPatch {
|
|
747
714
|
/**
|
|
748
715
|
* The MIDI program number.
|
|
749
716
|
*/
|
|
@@ -786,7 +753,7 @@ interface MIDIPatch {
|
|
|
786
753
|
*
|
|
787
754
|
* @group Sound Banks.MIDI Patch System
|
|
788
755
|
*/
|
|
789
|
-
interface MIDIPatchFull extends MIDIPatch {
|
|
756
|
+
export interface MIDIPatchFull extends MIDIPatch {
|
|
790
757
|
/**
|
|
791
758
|
* The name of the patch.
|
|
792
759
|
*/
|
|
@@ -810,7 +777,7 @@ interface MIDIPatchFull extends MIDIPatch {
|
|
|
810
777
|
*
|
|
811
778
|
* @group Sound Banks.MIDI Patch System
|
|
812
779
|
*/
|
|
813
|
-
declare class MIDIPatchTools {
|
|
780
|
+
export declare class MIDIPatchTools {
|
|
814
781
|
/**
|
|
815
782
|
* Converts a given {@link MIDIPatch} to a string.
|
|
816
783
|
* The format is:
|
|
@@ -858,8 +825,6 @@ declare class MIDIPatchTools {
|
|
|
858
825
|
static selectPatch<T extends MIDIPatchFull>(patches: T[], patch: MIDIPatch, system: MIDISystem): T;
|
|
859
826
|
private static getAnyDrums;
|
|
860
827
|
}
|
|
861
|
-
//#endregion
|
|
862
|
-
//#region src/soundbank/basic_soundbank/basic_soundbank.d.ts
|
|
863
828
|
/**
|
|
864
829
|
* This module handles parsing and writing SoundFont2 (`.sf2`, `.sf3` and `.sfogg`) files.
|
|
865
830
|
* It represents a single sound bank.
|
|
@@ -879,7 +844,7 @@ declare class MIDIPatchTools {
|
|
|
879
844
|
*
|
|
880
845
|
* @group Sound Banks
|
|
881
846
|
*/
|
|
882
|
-
declare class BasicSoundBank {
|
|
847
|
+
export declare class BasicSoundBank {
|
|
883
848
|
/**
|
|
884
849
|
* A Promise object indicating if the SF3/SF2Pack decoder is ready.
|
|
885
850
|
* Make sure to await it if you are loading SF3/SF2Pack files.
|
|
@@ -1072,7 +1037,8 @@ declare class BasicSoundBank {
|
|
|
1072
1037
|
/**
|
|
1073
1038
|
* Trims the sound bank _in-place_ to only contain samples in a given MIDI file.
|
|
1074
1039
|
*
|
|
1075
|
-
|
|
1040
|
+
|
|
1041
|
+
* Absent presets will be removed from the sound bank,
|
|
1076
1042
|
* and samples that don't get activated in the remaining presets will be removed as well.
|
|
1077
1043
|
*
|
|
1078
1044
|
* > **Note**
|
|
@@ -1124,15 +1090,13 @@ declare class BasicSoundBank {
|
|
|
1124
1090
|
protected parseInternal(): void;
|
|
1125
1091
|
protected printInfo(): void;
|
|
1126
1092
|
}
|
|
1127
|
-
//#endregion
|
|
1128
|
-
//#region src/soundbank/basic_soundbank/basic_preset.d.ts
|
|
1129
1093
|
/**
|
|
1130
1094
|
* Represents a single preset.
|
|
1131
1095
|
* This is what is used for MIDI playback.
|
|
1132
1096
|
*
|
|
1133
1097
|
* @group Sound Banks
|
|
1134
1098
|
*/
|
|
1135
|
-
declare class BasicPreset implements MIDIPatchFull {
|
|
1099
|
+
export declare class BasicPreset implements MIDIPatchFull {
|
|
1136
1100
|
/**
|
|
1137
1101
|
* The parent soundbank instance
|
|
1138
1102
|
* Currently used for determining default modulators and XG status
|
|
@@ -1236,8 +1200,6 @@ declare class BasicPreset implements MIDIPatchFull {
|
|
|
1236
1200
|
*/
|
|
1237
1201
|
toFlattenedInstrument(): BasicInstrument;
|
|
1238
1202
|
}
|
|
1239
|
-
//#endregion
|
|
1240
|
-
//#region src/soundbank/basic_soundbank/basic_instrument.d.ts
|
|
1241
1203
|
/**
|
|
1242
1204
|
* This class represents a single instrument, a layer below the BasicPreset.
|
|
1243
1205
|
*
|
|
@@ -1247,7 +1209,7 @@ declare class BasicPreset implements MIDIPatchFull {
|
|
|
1247
1209
|
*
|
|
1248
1210
|
* @group Sound Banks
|
|
1249
1211
|
*/
|
|
1250
|
-
declare class BasicInstrument {
|
|
1212
|
+
export declare class BasicInstrument {
|
|
1251
1213
|
/**
|
|
1252
1214
|
* The name of this instrument.
|
|
1253
1215
|
*/
|
|
@@ -1300,14 +1262,12 @@ declare class BasicInstrument {
|
|
|
1300
1262
|
*/
|
|
1301
1263
|
globalize(): void;
|
|
1302
1264
|
}
|
|
1303
|
-
//#endregion
|
|
1304
|
-
//#region src/soundbank/basic_soundbank/basic_sample.d.ts
|
|
1305
1265
|
/**
|
|
1306
1266
|
* A basic sample represents a single audio sample with associated parameters.
|
|
1307
1267
|
*
|
|
1308
1268
|
* @group Sound Banks.Samples
|
|
1309
1269
|
*/
|
|
1310
|
-
declare class BasicSample {
|
|
1270
|
+
export declare class BasicSample {
|
|
1311
1271
|
/**
|
|
1312
1272
|
* The sample's name.
|
|
1313
1273
|
*/
|
|
@@ -1468,11 +1428,9 @@ declare class BasicSample {
|
|
|
1468
1428
|
*
|
|
1469
1429
|
* @group Sound Banks.Samples
|
|
1470
1430
|
*/
|
|
1471
|
-
declare class EmptySample extends BasicSample {
|
|
1431
|
+
export declare class EmptySample extends BasicSample {
|
|
1472
1432
|
constructor();
|
|
1473
1433
|
}
|
|
1474
|
-
//#endregion
|
|
1475
|
-
//#region src/midi/enums.d.ts
|
|
1476
1434
|
/**
|
|
1477
1435
|
* All MIDI 1.0 defined status bytes
|
|
1478
1436
|
*
|
|
@@ -1482,7 +1440,7 @@ declare class EmptySample extends BasicSample {
|
|
|
1482
1440
|
*
|
|
1483
1441
|
* @group MIDI.Protocol
|
|
1484
1442
|
*/
|
|
1485
|
-
declare const MIDIMessageTypes: {
|
|
1443
|
+
export declare const MIDIMessageTypes: {
|
|
1486
1444
|
readonly noteOff: 128;
|
|
1487
1445
|
readonly noteOn: 144;
|
|
1488
1446
|
readonly polyPressure: 160;
|
|
@@ -1540,7 +1498,7 @@ type MIDIMessageType = (typeof MIDIMessageTypes)[keyof typeof MIDIMessageTypes];
|
|
|
1540
1498
|
*
|
|
1541
1499
|
* @group MIDI.Protocol
|
|
1542
1500
|
*/
|
|
1543
|
-
declare const MIDIControllers: {
|
|
1501
|
+
export declare const MIDIControllers: {
|
|
1544
1502
|
readonly bankSelect: 0;
|
|
1545
1503
|
readonly modulationWheel: 1;
|
|
1546
1504
|
readonly breathController: 2;
|
|
@@ -1681,7 +1639,7 @@ type MIDIController = (typeof MIDIControllers)[keyof typeof MIDIControllers];
|
|
|
1681
1639
|
*
|
|
1682
1640
|
* @group MIDI.Protocol
|
|
1683
1641
|
*/
|
|
1684
|
-
declare const RegisteredParameterTypes: {
|
|
1642
|
+
export declare const RegisteredParameterTypes: {
|
|
1685
1643
|
readonly pitchWheelRange: 0;
|
|
1686
1644
|
readonly fineTuning: 1;
|
|
1687
1645
|
readonly coarseTuning: 2;
|
|
@@ -1697,7 +1655,7 @@ declare const RegisteredParameterTypes: {
|
|
|
1697
1655
|
*
|
|
1698
1656
|
* @group MIDI.Protocol
|
|
1699
1657
|
*/
|
|
1700
|
-
declare const NonRegisteredParameterTypesMSB: {
|
|
1658
|
+
export declare const NonRegisteredParameterTypesMSB: {
|
|
1701
1659
|
readonly partParameter: 1;
|
|
1702
1660
|
readonly drumPitch: 24;
|
|
1703
1661
|
readonly drumPitchFine: 25;
|
|
@@ -1718,7 +1676,7 @@ declare const NonRegisteredParameterTypesMSB: {
|
|
|
1718
1676
|
*
|
|
1719
1677
|
* @group MIDI.Protocol
|
|
1720
1678
|
*/
|
|
1721
|
-
declare const NonRegisteredParameterTypesLSB: {
|
|
1679
|
+
export declare const NonRegisteredParameterTypesLSB: {
|
|
1722
1680
|
readonly vibratoRate: 8;
|
|
1723
1681
|
readonly vibratoDepth: 9;
|
|
1724
1682
|
readonly vibratoDelay: 10;
|
|
@@ -1728,15 +1686,13 @@ declare const NonRegisteredParameterTypesLSB: {
|
|
|
1728
1686
|
readonly envelopeDecayTime: 100;
|
|
1729
1687
|
readonly envelopeReleaseTime: 102;
|
|
1730
1688
|
};
|
|
1731
|
-
//#endregion
|
|
1732
|
-
//#region src/soundbank/types.d.ts
|
|
1733
1689
|
/**
|
|
1734
1690
|
* Represents a channel in an SF2-compatible synthesizer.
|
|
1735
1691
|
* Its data is used for computing {@link Modulator}s.
|
|
1736
1692
|
*
|
|
1737
1693
|
* @group Sound Banks.Modulators
|
|
1738
1694
|
*/
|
|
1739
|
-
interface SF2Channel {
|
|
1695
|
+
export interface SF2Channel {
|
|
1740
1696
|
/**
|
|
1741
1697
|
* All MIDI controller values for modulation.
|
|
1742
1698
|
*/
|
|
@@ -1768,7 +1724,7 @@ interface SF2Channel {
|
|
|
1768
1724
|
*
|
|
1769
1725
|
* @group Sound Banks.Info
|
|
1770
1726
|
*/
|
|
1771
|
-
interface SF2VersionTag {
|
|
1727
|
+
export interface SF2VersionTag {
|
|
1772
1728
|
/**
|
|
1773
1729
|
* The major revision number of the sound bank.
|
|
1774
1730
|
*/
|
|
@@ -1783,37 +1739,37 @@ interface SF2VersionTag {
|
|
|
1783
1739
|
*
|
|
1784
1740
|
* @group Utilities.FourCC
|
|
1785
1741
|
*/
|
|
1786
|
-
type GenericBankInfoFourCC = "INAM" | "ICRD" | "IENG" | "IPRD" | "ICOP" | "ICMT" | "ISFT";
|
|
1742
|
+
export type GenericBankInfoFourCC = "INAM" | "ICRD" | "IENG" | "IPRD" | "ICOP" | "ICMT" | "ISFT";
|
|
1787
1743
|
/**
|
|
1788
1744
|
* RIFF Four Character Codes found in SF2 INFO chunk.
|
|
1789
1745
|
*
|
|
1790
1746
|
* @group Utilities.FourCC
|
|
1791
1747
|
*/
|
|
1792
|
-
type SF2InfoFourCC = GenericBankInfoFourCC | "ifil" | "isng" | "irom" | "iver" | "DMOD" | "LIST";
|
|
1748
|
+
export type SF2InfoFourCC = GenericBankInfoFourCC | "ifil" | "isng" | "irom" | "iver" | "DMOD" | "LIST";
|
|
1793
1749
|
/**
|
|
1794
1750
|
* RIFF Four Character Codes found in the SF2 structure.
|
|
1795
1751
|
*
|
|
1796
1752
|
* @group Utilities.FourCC
|
|
1797
1753
|
*/
|
|
1798
|
-
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";
|
|
1799
1755
|
/**
|
|
1800
1756
|
* RIFF Four Character Codes found in the DLS INFO chunk.
|
|
1801
1757
|
*
|
|
1802
1758
|
* @group Utilities.FourCC
|
|
1803
1759
|
*/
|
|
1804
|
-
type DLSInfoFourCC = GenericBankInfoFourCC | "ISBJ";
|
|
1760
|
+
export type DLSInfoFourCC = GenericBankInfoFourCC | "ISBJ";
|
|
1805
1761
|
/**
|
|
1806
1762
|
* RIFF Four Character Codes found in the DLS structure.
|
|
1807
1763
|
*
|
|
1808
1764
|
* @group Utilities.FourCC
|
|
1809
1765
|
*/
|
|
1810
|
-
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";
|
|
1811
1767
|
/**
|
|
1812
1768
|
* Metadata object representing information associated with a {@link BasicSoundBank}.
|
|
1813
1769
|
*
|
|
1814
1770
|
* @group Sound Banks.Info
|
|
1815
1771
|
*/
|
|
1816
|
-
interface SoundBankInfoData {
|
|
1772
|
+
export interface SoundBankInfoData {
|
|
1817
1773
|
/**
|
|
1818
1774
|
* The sound bank's name.
|
|
1819
1775
|
*/
|
|
@@ -1873,7 +1829,7 @@ interface SoundBankInfoData {
|
|
|
1873
1829
|
*
|
|
1874
1830
|
* @group Sound Banks.Zones
|
|
1875
1831
|
*/
|
|
1876
|
-
interface VoiceParameters {
|
|
1832
|
+
export interface VoiceParameters {
|
|
1877
1833
|
/**
|
|
1878
1834
|
* The summed generators.
|
|
1879
1835
|
*/
|
|
@@ -1902,27 +1858,27 @@ interface VoiceParameters {
|
|
|
1902
1858
|
*
|
|
1903
1859
|
* @group Sound Banks.Samples
|
|
1904
1860
|
*/
|
|
1905
|
-
type SampleEncodingFunction = (audioData: Float32Array, sampleRate: number) => Promise<Uint8Array>;
|
|
1861
|
+
export type SampleEncodingFunction = (audioData: Float32Array, sampleRate: number) => Promise<Uint8Array>;
|
|
1906
1862
|
/**
|
|
1907
1863
|
* An index of the modulator source.
|
|
1908
1864
|
* Either an SF2 modulator source or a MIDI controller.
|
|
1909
1865
|
*
|
|
1910
1866
|
* @group Sound Banks.Modulators
|
|
1911
1867
|
*/
|
|
1912
|
-
type ModulatorSourceIndex = ModulatorControllerSource | MIDIController;
|
|
1868
|
+
export type ModulatorSourceIndex = ModulatorControllerSource | MIDIController;
|
|
1913
1869
|
/**
|
|
1914
1870
|
* A function to track progress during writing.
|
|
1915
1871
|
* @param progress Estimated progress, from 0 to 1.
|
|
1916
1872
|
*
|
|
1917
1873
|
* @group Sound Banks.Writing
|
|
1918
1874
|
*/
|
|
1919
|
-
type ProgressFunction = (progress: number) => unknown;
|
|
1875
|
+
export type ProgressFunction = (progress: number) => unknown;
|
|
1920
1876
|
/**
|
|
1921
1877
|
* Options for changing the {@link BasicSoundBank}'s sample format.
|
|
1922
1878
|
*
|
|
1923
1879
|
* @group Sound Banks.Samples
|
|
1924
1880
|
*/
|
|
1925
|
-
type SetSampleFormatOptions = {
|
|
1881
|
+
export type SetSampleFormatOptions = {
|
|
1926
1882
|
/**
|
|
1927
1883
|
* A function to show progress for compressing. It can be undefined.
|
|
1928
1884
|
*/
|
|
@@ -1956,7 +1912,7 @@ type SetSampleFormatOptions = {
|
|
|
1956
1912
|
*
|
|
1957
1913
|
* @group Sound Banks.Writing
|
|
1958
1914
|
*/
|
|
1959
|
-
interface SoundBankWriteOptions {
|
|
1915
|
+
export interface SoundBankWriteOptions {
|
|
1960
1916
|
/**
|
|
1961
1917
|
* The `ISFT` field to set when writing. If unset, `SpessaSynth` is written.
|
|
1962
1918
|
* This field indicates the last software that was used to edit this sound bank.
|
|
@@ -1972,7 +1928,7 @@ interface SoundBankWriteOptions {
|
|
|
1972
1928
|
*
|
|
1973
1929
|
* @group Sound Banks.Writing
|
|
1974
1930
|
*/
|
|
1975
|
-
interface SoundFont2WriteOptions extends SoundBankWriteOptions {
|
|
1931
|
+
export interface SoundFont2WriteOptions extends SoundBankWriteOptions {
|
|
1976
1932
|
/**
|
|
1977
1933
|
* If the DMOD chunk should be written. Recommended.
|
|
1978
1934
|
* > **Note**
|
|
@@ -1994,7 +1950,7 @@ interface SoundFont2WriteOptions extends SoundBankWriteOptions {
|
|
|
1994
1950
|
*
|
|
1995
1951
|
* @group Sound Banks.Writing
|
|
1996
1952
|
*/
|
|
1997
|
-
interface SFEWriteOptions extends SoundBankWriteOptions {
|
|
1953
|
+
export interface SFEWriteOptions extends SoundBankWriteOptions {
|
|
1998
1954
|
/**
|
|
1999
1955
|
* If the RIFS (64-bit RIFF chunks) should be used.
|
|
2000
1956
|
* Increases maximum size from 4GB to effectively infinite.
|
|
@@ -2007,7 +1963,7 @@ interface SFEWriteOptions extends SoundBankWriteOptions {
|
|
|
2007
1963
|
*
|
|
2008
1964
|
* @group Sound Banks.Zones
|
|
2009
1965
|
*/
|
|
2010
|
-
interface GenericRange {
|
|
1966
|
+
export interface GenericRange {
|
|
2011
1967
|
/**
|
|
2012
1968
|
* The minimum value.
|
|
2013
1969
|
*/
|
|
@@ -2025,7 +1981,7 @@ interface GenericRange {
|
|
|
2025
1981
|
*
|
|
2026
1982
|
* @group MIDI.Protocol
|
|
2027
1983
|
*/
|
|
2028
|
-
type PresetsWithKeyCombinations<T extends MIDIPatchFull> = Map<T, Map<number, Set<number>>>;
|
|
1984
|
+
export type PresetsWithKeyCombinations<T extends MIDIPatchFull> = Map<T, Map<number, Set<number>>>;
|
|
2029
1985
|
/**
|
|
2030
1986
|
* One of the General MIDI systems.
|
|
2031
1987
|
*
|
|
@@ -2036,9 +1992,7 @@ type PresetsWithKeyCombinations<T extends MIDIPatchFull> = Map<T, Map<number, Se
|
|
|
2036
1992
|
*
|
|
2037
1993
|
* @group MIDI.Protocol
|
|
2038
1994
|
*/
|
|
2039
|
-
type MIDISystem = "gm" | "gm2" | "gs" | "xg";
|
|
2040
|
-
//#endregion
|
|
2041
|
-
//#region src/synthesizer/enums.d.ts
|
|
1995
|
+
export type MIDISystem = "gm" | "gm2" | "gs" | "xg";
|
|
2042
1996
|
/**
|
|
2043
1997
|
* The available interpolation types of the synthesizer.
|
|
2044
1998
|
* Interpolation defines how sample points between the sample data are calculated.
|
|
@@ -2046,7 +2000,7 @@ type MIDISystem = "gm" | "gm2" | "gs" | "xg";
|
|
|
2046
2000
|
*
|
|
2047
2001
|
* @group Synthesizer.Options
|
|
2048
2002
|
*/
|
|
2049
|
-
declare const InterpolationTypes: {
|
|
2003
|
+
export declare const InterpolationTypes: {
|
|
2050
2004
|
/**
|
|
2051
2005
|
* Linear interpolation. Fast with acceptable quality.
|
|
2052
2006
|
*/
|
|
@@ -2067,9 +2021,7 @@ declare const InterpolationTypes: {
|
|
|
2067
2021
|
*
|
|
2068
2022
|
* @group Synthesizer.Options
|
|
2069
2023
|
*/
|
|
2070
|
-
type InterpolationType = (typeof InterpolationTypes)[keyof typeof InterpolationTypes];
|
|
2071
|
-
//#endregion
|
|
2072
|
-
//#region src/synthesizer/audio_engine/channel/parameters/system.d.ts
|
|
2024
|
+
export type InterpolationType = (typeof InterpolationTypes)[keyof typeof InterpolationTypes];
|
|
2073
2025
|
/**
|
|
2074
2026
|
* Channel System Parameters are API-only parameters
|
|
2075
2027
|
* that affect a single MIDI channel.
|
|
@@ -2163,15 +2115,13 @@ interface ChannelSystemParameter {
|
|
|
2163
2115
|
*
|
|
2164
2116
|
* @group Synthesizer.Parameters
|
|
2165
2117
|
*/
|
|
2166
|
-
declare const DEFAULT_CHANNEL_SYSTEM_PARAMETERS: ChannelSystemParameter;
|
|
2167
|
-
//#endregion
|
|
2168
|
-
//#region src/synthesizer/audio_engine/effects/gs/interface/gs_system_effect_parameter.d.ts
|
|
2118
|
+
export declare const DEFAULT_CHANNEL_SYSTEM_PARAMETERS: ChannelSystemParameter;
|
|
2169
2119
|
/**
|
|
2170
2120
|
* Parameters shared between all GS system effects.
|
|
2171
2121
|
*
|
|
2172
2122
|
* @group Synthesizer.GS Effects
|
|
2173
2123
|
*/
|
|
2174
|
-
interface GSSystemEffectParameter {
|
|
2124
|
+
export interface GSSystemEffectParameter {
|
|
2175
2125
|
/**
|
|
2176
2126
|
* 0-127
|
|
2177
2127
|
* This parameter sets the amount of the effect sent to the effect output.
|
|
@@ -2185,8 +2135,6 @@ interface GSSystemEffectParameter {
|
|
|
2185
2135
|
*/
|
|
2186
2136
|
preLowpass: number;
|
|
2187
2137
|
}
|
|
2188
|
-
//#endregion
|
|
2189
|
-
//#region src/synthesizer/audio_engine/effects/gs/interface/gs_reverb_processor.d.ts
|
|
2190
2138
|
/**
|
|
2191
2139
|
* GS-compatible reverb parameters.
|
|
2192
2140
|
*
|
|
@@ -2194,7 +2142,7 @@ interface GSSystemEffectParameter {
|
|
|
2194
2142
|
*
|
|
2195
2143
|
* @group Synthesizer.GS Effects
|
|
2196
2144
|
*/
|
|
2197
|
-
interface GSReverbParameter extends GSSystemEffectParameter {
|
|
2145
|
+
export interface GSReverbParameter extends GSSystemEffectParameter {
|
|
2198
2146
|
/**
|
|
2199
2147
|
* `0-7`
|
|
2200
2148
|
*
|
|
@@ -2250,7 +2198,7 @@ interface GSReverbParameter extends GSSystemEffectParameter {
|
|
|
2250
2198
|
*
|
|
2251
2199
|
* @group Synthesizer.GS Effects
|
|
2252
2200
|
*/
|
|
2253
|
-
interface GSReverbProcessor extends GSReverbParameter {
|
|
2201
|
+
export interface GSReverbProcessor extends GSReverbParameter {
|
|
2254
2202
|
/**
|
|
2255
2203
|
* Process the effect and **adds** it to the output.
|
|
2256
2204
|
* @param input The input buffer to process. It always starts at index 0.
|
|
@@ -2264,9 +2212,12 @@ interface GSReverbProcessor extends GSReverbParameter {
|
|
|
2264
2212
|
* Gets a snapshot of this effect processor instance.
|
|
2265
2213
|
*/
|
|
2266
2214
|
getSnapshot(): GSReverbParameter;
|
|
2215
|
+
/**
|
|
2216
|
+
* Restores this effect processor instance from a snapshot.
|
|
2217
|
+
* @param snapshot The snapshot to restore.
|
|
2218
|
+
*/
|
|
2219
|
+
applySnapshot(snapshot: GSReverbParameter): void;
|
|
2267
2220
|
}
|
|
2268
|
-
//#endregion
|
|
2269
|
-
//#region src/synthesizer/audio_engine/effects/gs/interface/gs_chorus_processor.d.ts
|
|
2270
2221
|
/**
|
|
2271
2222
|
* GS-compatible chorus parameters.
|
|
2272
2223
|
*
|
|
@@ -2274,7 +2225,7 @@ interface GSReverbProcessor extends GSReverbParameter {
|
|
|
2274
2225
|
*
|
|
2275
2226
|
* @group Synthesizer.GS Effects
|
|
2276
2227
|
*/
|
|
2277
|
-
interface GSChorusParameter extends GSSystemEffectParameter {
|
|
2228
|
+
export interface GSChorusParameter extends GSSystemEffectParameter {
|
|
2278
2229
|
/**
|
|
2279
2230
|
* `0-127`
|
|
2280
2231
|
*
|
|
@@ -2338,7 +2289,7 @@ interface GSChorusParameter extends GSSystemEffectParameter {
|
|
|
2338
2289
|
*
|
|
2339
2290
|
* @group Synthesizer.GS Effects
|
|
2340
2291
|
*/
|
|
2341
|
-
interface GSChorusProcessor extends GSChorusParameter {
|
|
2292
|
+
export interface GSChorusProcessor extends GSChorusParameter {
|
|
2342
2293
|
/**
|
|
2343
2294
|
* Process the effect and **adds** it to the output.
|
|
2344
2295
|
* @param input The input buffer to process. It always starts at index 0.
|
|
@@ -2354,9 +2305,12 @@ interface GSChorusProcessor extends GSChorusParameter {
|
|
|
2354
2305
|
* Gets a snapshot of this effect processor instance.
|
|
2355
2306
|
*/
|
|
2356
2307
|
getSnapshot(): GSChorusParameter;
|
|
2308
|
+
/**
|
|
2309
|
+
* Restores this effect processor instance from a snapshot.
|
|
2310
|
+
* @param snapshot The snapshot to restore.
|
|
2311
|
+
*/
|
|
2312
|
+
applySnapshot(snapshot: GSChorusParameter): void;
|
|
2357
2313
|
}
|
|
2358
|
-
//#endregion
|
|
2359
|
-
//#region src/synthesizer/audio_engine/effects/gs/interface/gs_delay_processor.d.ts
|
|
2360
2314
|
/**
|
|
2361
2315
|
* GS-compatible delay parameters.
|
|
2362
2316
|
*
|
|
@@ -2364,7 +2318,7 @@ interface GSChorusProcessor extends GSChorusParameter {
|
|
|
2364
2318
|
*
|
|
2365
2319
|
* @group Synthesizer.GS Effects
|
|
2366
2320
|
*/
|
|
2367
|
-
interface GSDelayParameter extends GSSystemEffectParameter {
|
|
2321
|
+
export interface GSDelayParameter extends GSSystemEffectParameter {
|
|
2368
2322
|
/**
|
|
2369
2323
|
* 0-115
|
|
2370
2324
|
* 0.1ms-340ms-1000ms
|
|
@@ -2449,7 +2403,7 @@ interface GSDelayParameter extends GSSystemEffectParameter {
|
|
|
2449
2403
|
*
|
|
2450
2404
|
* @group Synthesizer.GS Effects
|
|
2451
2405
|
*/
|
|
2452
|
-
interface GSDelayProcessor extends GSDelayParameter {
|
|
2406
|
+
export interface GSDelayProcessor extends GSDelayParameter {
|
|
2453
2407
|
/**
|
|
2454
2408
|
* Process the effect and **adds** it to the output.
|
|
2455
2409
|
* @param input The input buffer to process. It always starts at index 0.
|
|
@@ -2464,52 +2418,112 @@ interface GSDelayProcessor extends GSDelayParameter {
|
|
|
2464
2418
|
* Gets a snapshot of this effect processor instance.
|
|
2465
2419
|
*/
|
|
2466
2420
|
getSnapshot(): GSDelayParameter;
|
|
2421
|
+
/**
|
|
2422
|
+
* Restores this effect processor instance from a snapshot.
|
|
2423
|
+
* @param snapshot The snapshot to restore.
|
|
2424
|
+
*/
|
|
2425
|
+
applySnapshot(snapshot: GSDelayParameter): void;
|
|
2467
2426
|
}
|
|
2468
|
-
//#endregion
|
|
2469
|
-
//#region src/synthesizer/audio_engine/effects/gs/interface/gs_insertion_processor.d.ts
|
|
2470
2427
|
/**
|
|
2471
|
-
*
|
|
2428
|
+
* GS-compatible insertion effect (EFX) parameters.
|
|
2472
2429
|
*
|
|
2473
2430
|
* @group Synthesizer.GS Effects
|
|
2474
2431
|
*/
|
|
2475
|
-
interface
|
|
2476
|
-
/**
|
|
2477
|
-
* The EFX type of this processor, stored as `MSB << 8 | LSB`.
|
|
2478
|
-
* For example `0x30`, `0x10` is `0x3010`.
|
|
2479
|
-
*/
|
|
2480
|
-
readonly type: number;
|
|
2432
|
+
export interface GSInsertionParameter {
|
|
2481
2433
|
/**
|
|
2482
|
-
* `0-
|
|
2434
|
+
* `0-127`
|
|
2483
2435
|
*
|
|
2484
2436
|
* This parameter sets the amount of insertion sound that will be sent to the reverb.
|
|
2485
2437
|
* Higher values result in more sound being sent.
|
|
2486
2438
|
*/
|
|
2487
2439
|
sendLevelToReverb: number;
|
|
2488
2440
|
/**
|
|
2489
|
-
* `0-
|
|
2441
|
+
* `0-127`
|
|
2490
2442
|
*
|
|
2491
2443
|
* This parameter sets the amount of insertion sound that will be sent to the chorus.
|
|
2492
2444
|
* Higher values result in more sound being sent.
|
|
2493
2445
|
*/
|
|
2494
2446
|
sendLevelToChorus: number;
|
|
2495
2447
|
/**
|
|
2496
|
-
* `0-
|
|
2448
|
+
* `0-127`
|
|
2497
2449
|
*
|
|
2498
2450
|
* This parameter sets the amount of insertion sound that will be sent to the delay.
|
|
2499
2451
|
* Higher values result in more sound being sent.
|
|
2500
2452
|
*/
|
|
2501
2453
|
sendLevelToDelay: number;
|
|
2454
|
+
}
|
|
2455
|
+
/**
|
|
2456
|
+
* A snapshot of a {@link GSInsertionBlock}.
|
|
2457
|
+
*
|
|
2458
|
+
* @group Synthesizer.GS Effects
|
|
2459
|
+
*/
|
|
2460
|
+
export interface GSInsertionBlockSnapshot extends GSInsertionParameter {
|
|
2461
|
+
/**
|
|
2462
|
+
* The EFX type of this block, stored as `MSB << 8 | LSB`.
|
|
2463
|
+
* For example `0x30`, `0x10` is `0x3010`.
|
|
2464
|
+
*
|
|
2465
|
+
* This is the requested type, even if the block does not support it.
|
|
2466
|
+
*
|
|
2467
|
+
* > **Tip**
|
|
2468
|
+
* >
|
|
2469
|
+
* > Refer to [SC-8850 Owner's Manual](https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf) (p.88, 237) for more information.
|
|
2470
|
+
*/
|
|
2471
|
+
type: number;
|
|
2472
|
+
/**
|
|
2473
|
+
* The 20 EFX parameters (0-19). Their meaning depends on the effect type.
|
|
2474
|
+
*
|
|
2475
|
+
* Value `255` means the parameter has not been changed since the type was set, so it uses the type default.
|
|
2476
|
+
*/
|
|
2477
|
+
params: Uint8Array;
|
|
2478
|
+
}
|
|
2479
|
+
/**
|
|
2480
|
+
* The Insertion effect (EFX) processes the parts (channels) that have EFX assigned
|
|
2481
|
+
* (see {@link ChannelMIDIParameter.efxAssign}) and is routed straight to the output.
|
|
2482
|
+
* It can additionally send its output to the reverb, chorus and delay.
|
|
2483
|
+
*
|
|
2484
|
+
* This is a Roland GS-compatible insertion interface.
|
|
2485
|
+
*
|
|
2486
|
+
* It is used when {@link GlobalMIDIParameter.system} is `gm` `gm2` or `gs`,
|
|
2487
|
+
* but it is only enabled when an insertion parameter is set via a system exclusive message.
|
|
2488
|
+
*
|
|
2489
|
+
* {@link SpessaSynthProcessor} allows you to supply a custom insertion block.
|
|
2490
|
+
* A custom insertion block must implement this interface.
|
|
2491
|
+
*
|
|
2492
|
+
* ### Editing the parameters
|
|
2493
|
+
*
|
|
2494
|
+
* Editing the parameters can be done via GS system exclusive messages.
|
|
2495
|
+
*
|
|
2496
|
+
* > **Tip**
|
|
2497
|
+
* >
|
|
2498
|
+
* > Refer to [SC-8850 Owner's Manual](https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf) (p.88, 237) for more information.
|
|
2499
|
+
*
|
|
2500
|
+
* @group Synthesizer.GS Effects
|
|
2501
|
+
*/
|
|
2502
|
+
export interface GSInsertionBlock extends GSInsertionParameter {
|
|
2503
|
+
/**
|
|
2504
|
+
* Sets the EFX type of the block.
|
|
2505
|
+
*
|
|
2506
|
+
* Type change resets the parameters and the send levels to their defaults.
|
|
2507
|
+
* Behavior for unsupported types is up to the implementation.
|
|
2508
|
+
*
|
|
2509
|
+
* @param type The 16-bit type value to use, `MSB << 8 | LSB`.
|
|
2510
|
+
*/
|
|
2511
|
+
setType(type: number): void;
|
|
2512
|
+
/**
|
|
2513
|
+
* Gets the current 16-bit type of the block.
|
|
2514
|
+
* @returns The 16-bit (`MSB << 8 | LSB`) type requested by the last {@link setType} call.
|
|
2515
|
+
*/
|
|
2516
|
+
getType(): number;
|
|
2502
2517
|
/**
|
|
2503
|
-
* Resets
|
|
2504
|
-
* This does not need to reset send levels.
|
|
2518
|
+
* Resets this block to default values, including the EFX type and the send levels.
|
|
2505
2519
|
*/
|
|
2506
2520
|
reset(): void;
|
|
2507
2521
|
/**
|
|
2508
|
-
* Sets
|
|
2509
|
-
* @param
|
|
2510
|
-
* @param value The
|
|
2522
|
+
* Sets the given EFX parameter to the given value.
|
|
2523
|
+
* @param param The parameter number (0-based, 0-19).
|
|
2524
|
+
* @param value The 7-bit value.
|
|
2511
2525
|
*/
|
|
2512
|
-
setParameter(
|
|
2526
|
+
setParameter(param: number, value: number): void;
|
|
2513
2527
|
/**
|
|
2514
2528
|
* Process the effect and **adds** it to the output.
|
|
2515
2529
|
* @param inputLeft The left input buffer to process. It always starts at index 0.
|
|
@@ -2523,40 +2537,22 @@ interface GSInsertionProcessor {
|
|
|
2523
2537
|
* @param sampleCount The amount of samples to mix. This will never be larger than {@link SynthProcessorOptions.maxBufferSize} of the parent {@link SpessaSynthProcessor} instance.
|
|
2524
2538
|
*/
|
|
2525
2539
|
process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputChorus: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
|
|
2526
|
-
}
|
|
2527
|
-
/**
|
|
2528
|
-
* Represents stored GS-compatible insertion processor data.
|
|
2529
|
-
*
|
|
2530
|
-
* @group Synthesizer.GS Effects
|
|
2531
|
-
*/
|
|
2532
|
-
interface GSInsertionProcessorSnapshot {
|
|
2533
2540
|
/**
|
|
2534
|
-
*
|
|
2535
|
-
* For example `0x30`, `0x10` is `0x3010`.
|
|
2536
|
-
*
|
|
2537
|
-
* > **Tip**
|
|
2538
|
-
* >
|
|
2539
|
-
* > Refer to [SC-8850 Owner's Manual](https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf) (p.88, 237) for more information.
|
|
2541
|
+
* Gets a snapshot of this insertion block.
|
|
2540
2542
|
*/
|
|
2541
|
-
|
|
2543
|
+
getSnapshot(): GSInsertionBlockSnapshot;
|
|
2542
2544
|
/**
|
|
2543
|
-
*
|
|
2544
|
-
*
|
|
2545
|
-
* the length totaling to 23.
|
|
2546
|
-
*
|
|
2547
|
-
* Value `255` means "no change" for that parameter.
|
|
2548
|
-
*
|
|
2545
|
+
* Restores this insertion block from a snapshot.
|
|
2546
|
+
* @param snapshot The snapshot to restore.
|
|
2549
2547
|
*/
|
|
2550
|
-
|
|
2548
|
+
applySnapshot(snapshot: GSInsertionBlockSnapshot): void;
|
|
2551
2549
|
}
|
|
2552
|
-
//#endregion
|
|
2553
|
-
//#region src/synthesizer/audio_engine/effects/xg/interface/xg_effect_block.d.ts
|
|
2554
2550
|
/**
|
|
2555
2551
|
* A snapshot of a {@link XGEffectBlock}.
|
|
2556
2552
|
*
|
|
2557
2553
|
* @group Synthesizer.XG Effects
|
|
2558
2554
|
*/
|
|
2559
|
-
interface XGEffectBlockSnapshot {
|
|
2555
|
+
export interface XGEffectBlockSnapshot {
|
|
2560
2556
|
/**
|
|
2561
2557
|
* The type of the processor.
|
|
2562
2558
|
* Per XG spec, BASIC EFFECT (LSB = 0) will be used if the exact match is missing.
|
|
@@ -2583,7 +2579,7 @@ interface XGEffectBlockSnapshot {
|
|
|
2583
2579
|
*
|
|
2584
2580
|
* @group Synthesizer.XG Effects
|
|
2585
2581
|
*/
|
|
2586
|
-
interface XGEffectBlock {
|
|
2582
|
+
export interface XGEffectBlock {
|
|
2587
2583
|
/**
|
|
2588
2584
|
* Sets the type of the processor.
|
|
2589
2585
|
* Per XG spec, BASIC EFFECT (LSB = 0) should be used if the exact match is missing.
|
|
@@ -2619,14 +2615,12 @@ interface XGEffectBlock {
|
|
|
2619
2615
|
*/
|
|
2620
2616
|
applySnapshot(snapshot: XGEffectBlockSnapshot): void;
|
|
2621
2617
|
}
|
|
2622
|
-
//#endregion
|
|
2623
|
-
//#region src/synthesizer/audio_engine/effects/xg/interface/xg_system_effect_block.d.ts
|
|
2624
2618
|
/**
|
|
2625
2619
|
* Parameters for an XG system effect.
|
|
2626
2620
|
*
|
|
2627
2621
|
* @group Synthesizer.XG Effects
|
|
2628
2622
|
*/
|
|
2629
|
-
interface XGSystemEffectParameter {
|
|
2623
|
+
export interface XGSystemEffectParameter {
|
|
2630
2624
|
/**
|
|
2631
2625
|
* The return (level) of the effect.
|
|
2632
2626
|
* 0 is silence (-Inf dB), 64 is normal (0 dB) and 127 is double the volume (+6 dB).
|
|
@@ -2643,7 +2637,7 @@ interface XGSystemEffectParameter {
|
|
|
2643
2637
|
*
|
|
2644
2638
|
* @group Synthesizer.XG Effects
|
|
2645
2639
|
*/
|
|
2646
|
-
interface XGSystemEffectBlockSnapshot extends XGSystemEffectParameter, XGEffectBlockSnapshot {}
|
|
2640
|
+
export interface XGSystemEffectBlockSnapshot extends XGSystemEffectParameter, XGEffectBlockSnapshot {}
|
|
2647
2641
|
/**
|
|
2648
2642
|
* This interface represents a single XG system effect block.
|
|
2649
2643
|
*
|
|
@@ -2656,12 +2650,10 @@ interface XGSystemEffectBlockSnapshot extends XGSystemEffectParameter, XGEffectB
|
|
|
2656
2650
|
*
|
|
2657
2651
|
* @group Synthesizer.XG Effects
|
|
2658
2652
|
*/
|
|
2659
|
-
interface XGSystemEffectBlock extends XGEffectBlock, XGSystemEffectParameter {
|
|
2653
|
+
export interface XGSystemEffectBlock extends XGEffectBlock, XGSystemEffectParameter {
|
|
2660
2654
|
getSnapshot(): XGSystemEffectBlockSnapshot;
|
|
2661
2655
|
applySnapshot(snapshot: XGSystemEffectBlockSnapshot): void;
|
|
2662
2656
|
}
|
|
2663
|
-
//#endregion
|
|
2664
|
-
//#region src/synthesizer/audio_engine/effects/xg/interface/xg_reverb_block.d.ts
|
|
2665
2657
|
/**
|
|
2666
2658
|
* Reverb is an effect that adds reverberation to a sound, as you would hear in a concert
|
|
2667
2659
|
* hall.
|
|
@@ -2683,7 +2675,7 @@ interface XGSystemEffectBlock extends XGEffectBlock, XGSystemEffectParameter {
|
|
|
2683
2675
|
*
|
|
2684
2676
|
* @group Synthesizer.XG Effects
|
|
2685
2677
|
*/
|
|
2686
|
-
interface XGReverbBlock extends XGSystemEffectBlock {
|
|
2678
|
+
export interface XGReverbBlock extends XGSystemEffectBlock {
|
|
2687
2679
|
/**
|
|
2688
2680
|
* Process the effect and **adds** it to the output.
|
|
2689
2681
|
* @param inputLeft The input buffer to process. It always starts at index 0.
|
|
@@ -2695,14 +2687,12 @@ interface XGReverbBlock extends XGSystemEffectBlock {
|
|
|
2695
2687
|
*/
|
|
2696
2688
|
process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
|
|
2697
2689
|
}
|
|
2698
|
-
//#endregion
|
|
2699
|
-
//#region src/synthesizer/audio_engine/effects/xg/interface/xg_chorus_block.d.ts
|
|
2700
2690
|
/**
|
|
2701
2691
|
* Parameters for the XG chorus effect.
|
|
2702
2692
|
*
|
|
2703
2693
|
* @group Synthesizer.XG Effects
|
|
2704
2694
|
*/
|
|
2705
|
-
interface XGChorusParameter extends XGSystemEffectParameter {
|
|
2695
|
+
export interface XGChorusParameter extends XGSystemEffectParameter {
|
|
2706
2696
|
/**
|
|
2707
2697
|
* The amount of chorus being sent to the reverb effect.
|
|
2708
2698
|
*
|
|
@@ -2715,7 +2705,7 @@ interface XGChorusParameter extends XGSystemEffectParameter {
|
|
|
2715
2705
|
*
|
|
2716
2706
|
* @group Synthesizer.XG Effects
|
|
2717
2707
|
*/
|
|
2718
|
-
interface XGChorusBlockSnapshot extends XGChorusParameter, XGSystemEffectBlockSnapshot {}
|
|
2708
|
+
export interface XGChorusBlockSnapshot extends XGChorusParameter, XGSystemEffectBlockSnapshot {}
|
|
2719
2709
|
/**
|
|
2720
2710
|
* Chorus broadens the spatial image of the sound, adding depth and richness.
|
|
2721
2711
|
*
|
|
@@ -2736,7 +2726,7 @@ interface XGChorusBlockSnapshot extends XGChorusParameter, XGSystemEffectBlockSn
|
|
|
2736
2726
|
*
|
|
2737
2727
|
* @group Synthesizer.XG Effects
|
|
2738
2728
|
*/
|
|
2739
|
-
interface XGChorusBlock extends XGSystemEffectBlock, XGChorusParameter {
|
|
2729
|
+
export interface XGChorusBlock extends XGSystemEffectBlock, XGChorusParameter {
|
|
2740
2730
|
/**
|
|
2741
2731
|
* Process the effect and **adds** it to the output.
|
|
2742
2732
|
* @param inputLeft The input buffer to process. It always starts at index 0.
|
|
@@ -2752,14 +2742,12 @@ interface XGChorusBlock extends XGSystemEffectBlock, XGChorusParameter {
|
|
|
2752
2742
|
getSnapshot(): XGChorusBlockSnapshot;
|
|
2753
2743
|
applySnapshot(snapshot: XGChorusBlockSnapshot): void;
|
|
2754
2744
|
}
|
|
2755
|
-
//#endregion
|
|
2756
|
-
//#region src/synthesizer/audio_engine/effects/xg/interface/xg_insertion_block.d.ts
|
|
2757
2745
|
/**
|
|
2758
2746
|
* Parameters for the XG insertion effect.
|
|
2759
2747
|
*
|
|
2760
2748
|
* @group Synthesizer.XG Effects
|
|
2761
2749
|
*/
|
|
2762
|
-
interface XGInsertionParameter {
|
|
2750
|
+
export interface XGInsertionParameter {
|
|
2763
2751
|
/**
|
|
2764
2752
|
* The channel routed through the insertion effect, 0-based.
|
|
2765
2753
|
*
|
|
@@ -2772,7 +2760,7 @@ interface XGInsertionParameter {
|
|
|
2772
2760
|
*
|
|
2773
2761
|
* @group Synthesizer.XG Effects
|
|
2774
2762
|
*/
|
|
2775
|
-
interface XGInsertionBlockSnapshot extends XGInsertionParameter, XGEffectBlockSnapshot {}
|
|
2763
|
+
export interface XGInsertionBlockSnapshot extends XGInsertionParameter, XGEffectBlockSnapshot {}
|
|
2776
2764
|
/**
|
|
2777
2765
|
* The Insertion effects provide additional effects for processing individual Parts.
|
|
2778
2766
|
*
|
|
@@ -2798,7 +2786,7 @@ interface XGInsertionBlockSnapshot extends XGInsertionParameter, XGEffectBlockSn
|
|
|
2798
2786
|
*
|
|
2799
2787
|
* @group Synthesizer.XG Effects
|
|
2800
2788
|
*/
|
|
2801
|
-
interface XGInsertionBlock extends XGInsertionParameter, XGEffectBlock {
|
|
2789
|
+
export interface XGInsertionBlock extends XGInsertionParameter, XGEffectBlock {
|
|
2802
2790
|
/**
|
|
2803
2791
|
* Process the effect in insertion mode and **overwrites** it to the input.
|
|
2804
2792
|
* The DSP honors Dry/Wet in this case.
|
|
@@ -2811,14 +2799,12 @@ interface XGInsertionBlock extends XGInsertionParameter, XGEffectBlock {
|
|
|
2811
2799
|
getSnapshot(): XGInsertionBlockSnapshot;
|
|
2812
2800
|
applySnapshot(snapshot: XGInsertionBlockSnapshot): void;
|
|
2813
2801
|
}
|
|
2814
|
-
//#endregion
|
|
2815
|
-
//#region src/synthesizer/audio_engine/effects/xg/interface/xg_variation_block.d.ts
|
|
2816
2802
|
/**
|
|
2817
2803
|
* Parameters for the XG variation effect.
|
|
2818
2804
|
*
|
|
2819
2805
|
* @group Synthesizer.XG Effects
|
|
2820
2806
|
*/
|
|
2821
|
-
interface XGVariationParameter extends XGSystemEffectParameter, XGInsertionParameter {
|
|
2807
|
+
export interface XGVariationParameter extends XGSystemEffectParameter, XGInsertionParameter {
|
|
2822
2808
|
/**
|
|
2823
2809
|
* Indicates if variation is in the insertion mode (CONNECTION).
|
|
2824
2810
|
* If `false`, then variation is in the `system` mode.
|
|
@@ -2854,7 +2840,7 @@ interface XGVariationParameter extends XGSystemEffectParameter, XGInsertionParam
|
|
|
2854
2840
|
*
|
|
2855
2841
|
* @group Synthesizer.XG Effects
|
|
2856
2842
|
*/
|
|
2857
|
-
interface XGVariationBlockSnapshot extends XGVariationParameter, XGSystemEffectBlockSnapshot, XGInsertionBlockSnapshot {}
|
|
2843
|
+
export interface XGVariationBlockSnapshot extends XGVariationParameter, XGSystemEffectBlockSnapshot, XGInsertionBlockSnapshot {}
|
|
2858
2844
|
/**
|
|
2859
2845
|
* The Variation section provides a wealth of additional effects.
|
|
2860
2846
|
* It features some of the same effects found in the
|
|
@@ -2881,7 +2867,7 @@ interface XGVariationBlockSnapshot extends XGVariationParameter, XGSystemEffectB
|
|
|
2881
2867
|
*
|
|
2882
2868
|
* @group Synthesizer.XG Effects
|
|
2883
2869
|
*/
|
|
2884
|
-
interface XGVariationBlock extends XGVariationParameter, XGSystemEffectBlock, XGInsertionBlock {
|
|
2870
|
+
export interface XGVariationBlock extends XGVariationParameter, XGSystemEffectBlock, XGInsertionBlock {
|
|
2885
2871
|
/**
|
|
2886
2872
|
* Process the effect in _system_ mode and **adds** it to the output.
|
|
2887
2873
|
* Feeds the chorus and reverb buffers according to the send amounts.
|
|
@@ -2902,8 +2888,6 @@ interface XGVariationBlock extends XGVariationParameter, XGSystemEffectBlock, XG
|
|
|
2902
2888
|
getSnapshot(): XGVariationBlockSnapshot;
|
|
2903
2889
|
applySnapshot(snapshot: XGVariationBlockSnapshot): void;
|
|
2904
2890
|
}
|
|
2905
|
-
//#endregion
|
|
2906
|
-
//#region src/synthesizer/audio_engine/parameters/system.d.ts
|
|
2907
2891
|
/**
|
|
2908
2892
|
* Global System Parameters are API-only parameters
|
|
2909
2893
|
* that affect the entire synthesizer.
|
|
@@ -3054,6 +3038,15 @@ interface GlobalSystemParameter {
|
|
|
3054
3038
|
* Synthesizer's device ID for system exclusive messages. Set to -1 to accept all.
|
|
3055
3039
|
*/
|
|
3056
3040
|
deviceID: number;
|
|
3041
|
+
/**
|
|
3042
|
+
* Some MIDI synths (most notably Microsoft GS Wavetable Synth) incorrectly treat the "coarse tune" RPN
|
|
3043
|
+
* as semitone pitch change instead of true key shift.
|
|
3044
|
+
*
|
|
3045
|
+
* When this parameter is enabled,
|
|
3046
|
+
* {@link GlobalMIDIParameter.keyShift} and {@link ChannelMIDIParameter.keyShift}
|
|
3047
|
+
* are treated as semitone pitch changes.
|
|
3048
|
+
*/
|
|
3049
|
+
pitchBasedKeyShift: boolean;
|
|
3057
3050
|
/**
|
|
3058
3051
|
* The master gain.
|
|
3059
3052
|
* From 0 to any number. 1 is 100% volume.
|
|
@@ -3117,9 +3110,7 @@ interface GlobalSystemParameter {
|
|
|
3117
3110
|
*
|
|
3118
3111
|
* @group Synthesizer.Parameters
|
|
3119
3112
|
*/
|
|
3120
|
-
declare const DEFAULT_GLOBAL_SYSTEM_PARAMETERS: GlobalSystemParameter;
|
|
3121
|
-
//#endregion
|
|
3122
|
-
//#region src/synthesizer/audio_engine/sound_bank_manager.d.ts
|
|
3113
|
+
export declare const DEFAULT_GLOBAL_SYSTEM_PARAMETERS: GlobalSystemParameter;
|
|
3123
3114
|
/**
|
|
3124
3115
|
* Manages the sound banks of the parent {@link SpessaSynthProcessor}.
|
|
3125
3116
|
*
|
|
@@ -3127,7 +3118,7 @@ declare const DEFAULT_GLOBAL_SYSTEM_PARAMETERS: GlobalSystemParameter;
|
|
|
3127
3118
|
*
|
|
3128
3119
|
* @group Synthesizer.Sound Bank Integration
|
|
3129
3120
|
*/
|
|
3130
|
-
declare class SoundBankManager {
|
|
3121
|
+
export declare class SoundBankManager {
|
|
3131
3122
|
/**
|
|
3132
3123
|
* All the sound banks, ordered from the most important to the least.
|
|
3133
3124
|
*/
|
|
@@ -3175,14 +3166,12 @@ declare class SoundBankManager {
|
|
|
3175
3166
|
addSoundBank(bank: BasicSoundBank, id: string, bankOffset?: number): void;
|
|
3176
3167
|
private generatePresetList;
|
|
3177
3168
|
}
|
|
3178
|
-
//#endregion
|
|
3179
|
-
//#region src/midi/midi_message.d.ts
|
|
3180
3169
|
/**
|
|
3181
3170
|
* This class represents a single MIDI 1.0 message.
|
|
3182
3171
|
*
|
|
3183
3172
|
* @group MIDI.Protocol
|
|
3184
3173
|
*/
|
|
3185
|
-
declare class MIDIMessage {
|
|
3174
|
+
export declare class MIDIMessage {
|
|
3186
3175
|
/**
|
|
3187
3176
|
* Absolute number of MIDI ticks from the start of the track.
|
|
3188
3177
|
* This is only relevant in MIDI sequences.
|
|
@@ -3265,8 +3254,6 @@ declare class MIDIMessage {
|
|
|
3265
3254
|
*/
|
|
3266
3255
|
static nonRegisteredParameter(ticks: number, channel: number, parameter: number, value: number): MIDIMessage[];
|
|
3267
3256
|
}
|
|
3268
|
-
//#endregion
|
|
3269
|
-
//#region src/synthesizer/audio_engine/channel/awe32_nrpn.d.ts
|
|
3270
3257
|
/**
|
|
3271
3258
|
* Handlers for tuning SF2 generators with NRPN.
|
|
3272
3259
|
*
|
|
@@ -3293,15 +3280,13 @@ interface ChannelGenerators {
|
|
|
3293
3280
|
*/
|
|
3294
3281
|
overridesEnabled: boolean;
|
|
3295
3282
|
}
|
|
3296
|
-
//#endregion
|
|
3297
|
-
//#region src/synthesizer/audio_engine/channel/types.d.ts
|
|
3298
3283
|
/**
|
|
3299
3284
|
* Represents the [custom channel vibrato](../../../../docs/extra/midi-implementation.md#custom-vibrato)
|
|
3300
3285
|
* of the channel.
|
|
3301
3286
|
*
|
|
3302
3287
|
* @group Synthesizer.Channel
|
|
3303
3288
|
*/
|
|
3304
|
-
interface CustomChannelVibrato {
|
|
3289
|
+
export interface CustomChannelVibrato {
|
|
3305
3290
|
/**
|
|
3306
3291
|
* Vibrato depth, in cents.
|
|
3307
3292
|
*/
|
|
@@ -3315,8 +3300,6 @@ interface CustomChannelVibrato {
|
|
|
3315
3300
|
*/
|
|
3316
3301
|
rate: number;
|
|
3317
3302
|
}
|
|
3318
|
-
//#endregion
|
|
3319
|
-
//#region src/synthesizer/audio_engine/channel/channel_snapshot.d.ts
|
|
3320
3303
|
/**
|
|
3321
3304
|
* This interface is a snapshot of a {@link MIDIChannel},
|
|
3322
3305
|
* capturing its current state, which can be saved and restored.
|
|
@@ -3403,8 +3386,6 @@ interface ChannelSnapshot {
|
|
|
3403
3386
|
*/
|
|
3404
3387
|
channel: number;
|
|
3405
3388
|
}
|
|
3406
|
-
//#endregion
|
|
3407
|
-
//#region src/synthesizer/audio_engine/synthesizer_snapshot.d.ts
|
|
3408
3389
|
/**
|
|
3409
3390
|
* This interface is a snapshot of a {@link SpessaSynthProcessor},
|
|
3410
3391
|
* capturing its current state, which can be saved and restored.
|
|
@@ -3445,9 +3426,9 @@ interface SynthesizerSnapshot {
|
|
|
3445
3426
|
*/
|
|
3446
3427
|
gsDelayProcessor: GSDelayParameter;
|
|
3447
3428
|
/**
|
|
3448
|
-
* A snapshot of the insertion
|
|
3429
|
+
* A snapshot of the GS insertion block.
|
|
3449
3430
|
*/
|
|
3450
|
-
|
|
3431
|
+
gsInsertionBlock: GSInsertionBlockSnapshot;
|
|
3451
3432
|
/**
|
|
3452
3433
|
* A snapshot of the XG reverb block.
|
|
3453
3434
|
*/
|
|
@@ -3469,8 +3450,6 @@ interface SynthesizerSnapshot {
|
|
|
3469
3450
|
*/
|
|
3470
3451
|
userDrumSets: UserDrumSetParameter[][];
|
|
3471
3452
|
}
|
|
3472
|
-
//#endregion
|
|
3473
|
-
//#region src/synthesizer/processor.d.ts
|
|
3474
3453
|
/**
|
|
3475
3454
|
* The core synthesis engine of SpessaSynth.
|
|
3476
3455
|
* This module converts sound bank and MIDI data into PCM audio data.
|
|
@@ -3488,6 +3467,7 @@ interface SynthesizerSnapshot {
|
|
|
3488
3467
|
* - {@link GSReverbProcessor} - How to implement your own GS reverb processor.
|
|
3489
3468
|
* - {@link GSChorusProcessor} - How to implement your own GS chorus processor.
|
|
3490
3469
|
* - {@link GSDelayProcessor} - How to implement your own GS delay processor.
|
|
3470
|
+
* - {@link GSInsertionBlock} - How to implement your own GS insertion processor.
|
|
3491
3471
|
*
|
|
3492
3472
|
* #### XG
|
|
3493
3473
|
*
|
|
@@ -3504,7 +3484,7 @@ interface SynthesizerSnapshot {
|
|
|
3504
3484
|
*
|
|
3505
3485
|
* @group Synthesizer
|
|
3506
3486
|
*/
|
|
3507
|
-
declare class SpessaSynthProcessor {
|
|
3487
|
+
export declare class SpessaSynthProcessor {
|
|
3508
3488
|
/**
|
|
3509
3489
|
* A `Promise` that must be awaited before
|
|
3510
3490
|
* the processor can be used with a compressed sound bank.
|
|
@@ -3777,7 +3757,6 @@ declare class SpessaSynthProcessor {
|
|
|
3777
3757
|
*/
|
|
3778
3758
|
private processXGInsertion;
|
|
3779
3759
|
private createMIDIChannelInternal;
|
|
3780
|
-
private registerInsertionProcessor;
|
|
3781
3760
|
private processMessageInternal;
|
|
3782
3761
|
/**
|
|
3783
3762
|
* Assigns priorities to the voices.
|
|
@@ -3789,8 +3768,6 @@ declare class SpessaSynthProcessor {
|
|
|
3789
3768
|
private getDefaultPresets;
|
|
3790
3769
|
private getCachedVoiceIndex;
|
|
3791
3770
|
}
|
|
3792
|
-
//#endregion
|
|
3793
|
-
//#region src/synthesizer/audio_engine/parameters/midi.d.ts
|
|
3794
3771
|
/**
|
|
3795
3772
|
* Global MIDI Parameters are MIDI-only parameters
|
|
3796
3773
|
* that affect the entire synthesizer.
|
|
@@ -3858,15 +3835,13 @@ interface GlobalMIDIParameter {
|
|
|
3858
3835
|
*
|
|
3859
3836
|
* @group Synthesizer.Parameters
|
|
3860
3837
|
*/
|
|
3861
|
-
declare const DEFAULT_GLOBAL_MIDI_PARAMETERS: GlobalMIDIParameter;
|
|
3862
|
-
//#endregion
|
|
3863
|
-
//#region src/midi/midi_tools/analyzed_message.d.ts
|
|
3838
|
+
export declare const DEFAULT_GLOBAL_MIDI_PARAMETERS: GlobalMIDIParameter;
|
|
3864
3839
|
/**
|
|
3865
3840
|
* Represents an analyzed global MIDI parameter change message.
|
|
3866
3841
|
*
|
|
3867
3842
|
* @group MIDI.Protocol
|
|
3868
3843
|
*/
|
|
3869
|
-
type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
|
|
3844
|
+
export type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
|
|
3870
3845
|
/**
|
|
3871
3846
|
* The message type identifier.
|
|
3872
3847
|
*/
|
|
@@ -3879,7 +3854,7 @@ type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
|
|
|
3879
3854
|
* The new value of the global MIDI parameter.
|
|
3880
3855
|
*/
|
|
3881
3856
|
value: GlobalMIDIParameter[P];
|
|
3882
|
-
} }[keyof GlobalMIDIParameter];
|
|
3857
|
+
}; }[keyof GlobalMIDIParameter];
|
|
3883
3858
|
/**
|
|
3884
3859
|
* Represents an analyzed channel MIDI parameter change message.
|
|
3885
3860
|
*
|
|
@@ -3889,7 +3864,7 @@ type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
|
|
|
3889
3864
|
*
|
|
3890
3865
|
* @group MIDI.Protocol
|
|
3891
3866
|
*/
|
|
3892
|
-
type ChannelMIDIParameterMessage = { [P in keyof ChannelMIDIParameter]: {
|
|
3867
|
+
export type ChannelMIDIParameterMessage = { [P in keyof ChannelMIDIParameter]: {
|
|
3893
3868
|
/**
|
|
3894
3869
|
* The message type identifier.
|
|
3895
3870
|
*/
|
|
@@ -3906,13 +3881,13 @@ type ChannelMIDIParameterMessage = { [P in keyof ChannelMIDIParameter]: {
|
|
|
3906
3881
|
* The MIDI channel number (it may be above 15 for multi-port MIDI setups).
|
|
3907
3882
|
*/
|
|
3908
3883
|
channel: number;
|
|
3909
|
-
} }[keyof ChannelMIDIParameter];
|
|
3884
|
+
}; }[keyof ChannelMIDIParameter];
|
|
3910
3885
|
/**
|
|
3911
3886
|
* Represents an analyzed channel GS Reverb Processor change.
|
|
3912
3887
|
*
|
|
3913
3888
|
* @group MIDI.Protocol
|
|
3914
3889
|
*/
|
|
3915
|
-
type GSReverbParameterMessage = { [P in keyof GSReverbParameter]: {
|
|
3890
|
+
export type GSReverbParameterMessage = { [P in keyof GSReverbParameter]: {
|
|
3916
3891
|
/**
|
|
3917
3892
|
* The message type identifier.
|
|
3918
3893
|
*/
|
|
@@ -3925,7 +3900,7 @@ type GSReverbParameterMessage = { [P in keyof GSReverbParameter]: {
|
|
|
3925
3900
|
* The new value of the GS reverb parameter.
|
|
3926
3901
|
*/
|
|
3927
3902
|
value: GSReverbParameter[P];
|
|
3928
|
-
} }[keyof GSReverbParameter] | {
|
|
3903
|
+
}; }[keyof GSReverbParameter] | {
|
|
3929
3904
|
/**
|
|
3930
3905
|
* The message type identifier.
|
|
3931
3906
|
*/
|
|
@@ -3944,7 +3919,7 @@ type GSReverbParameterMessage = { [P in keyof GSReverbParameter]: {
|
|
|
3944
3919
|
*
|
|
3945
3920
|
* @group MIDI.Protocol
|
|
3946
3921
|
*/
|
|
3947
|
-
type GSChorusParameterMessage = { [P in keyof GSChorusParameter]: {
|
|
3922
|
+
export type GSChorusParameterMessage = { [P in keyof GSChorusParameter]: {
|
|
3948
3923
|
/**
|
|
3949
3924
|
* The message type identifier.
|
|
3950
3925
|
*/
|
|
@@ -3957,7 +3932,7 @@ type GSChorusParameterMessage = { [P in keyof GSChorusParameter]: {
|
|
|
3957
3932
|
* The new value of the GS chorus parameter.
|
|
3958
3933
|
*/
|
|
3959
3934
|
value: GSChorusParameter[P];
|
|
3960
|
-
} }[keyof GSChorusParameter] | {
|
|
3935
|
+
}; }[keyof GSChorusParameter] | {
|
|
3961
3936
|
/**
|
|
3962
3937
|
* The message type identifier.
|
|
3963
3938
|
*/
|
|
@@ -3976,7 +3951,7 @@ type GSChorusParameterMessage = { [P in keyof GSChorusParameter]: {
|
|
|
3976
3951
|
*
|
|
3977
3952
|
* @group MIDI.Protocol
|
|
3978
3953
|
*/
|
|
3979
|
-
type GSDelayParameterMessage = { [P in keyof GSDelayParameter]: {
|
|
3954
|
+
export type GSDelayParameterMessage = { [P in keyof GSDelayParameter]: {
|
|
3980
3955
|
/**
|
|
3981
3956
|
* The message type identifier.
|
|
3982
3957
|
*/
|
|
@@ -3989,7 +3964,7 @@ type GSDelayParameterMessage = { [P in keyof GSDelayParameter]: {
|
|
|
3989
3964
|
* The new value of the GS delay parameter.
|
|
3990
3965
|
*/
|
|
3991
3966
|
value: GSDelayParameter[P];
|
|
3992
|
-
} }[keyof GSDelayParameter] | {
|
|
3967
|
+
}; }[keyof GSDelayParameter] | {
|
|
3993
3968
|
/**
|
|
3994
3969
|
* The message type identifier.
|
|
3995
3970
|
*/
|
|
@@ -4008,7 +3983,7 @@ type GSDelayParameterMessage = { [P in keyof GSDelayParameter]: {
|
|
|
4008
3983
|
*
|
|
4009
3984
|
* @group MIDI.Protocol
|
|
4010
3985
|
*/
|
|
4011
|
-
type GSInsertionParameterMessage = {
|
|
3986
|
+
export type GSInsertionParameterMessage = {
|
|
4012
3987
|
/**
|
|
4013
3988
|
* An insertion effect processor parameter message (Roland GS).
|
|
4014
3989
|
*/
|
|
@@ -4054,7 +4029,7 @@ type GSInsertionParameterMessage = {
|
|
|
4054
4029
|
*
|
|
4055
4030
|
* @group MIDI.Protocol
|
|
4056
4031
|
*/
|
|
4057
|
-
type XGReverbParameterMessage = {
|
|
4032
|
+
export type XGReverbParameterMessage = {
|
|
4058
4033
|
/**
|
|
4059
4034
|
* A reverb effect processor parameter message (Yamaha XG).
|
|
4060
4035
|
*/
|
|
@@ -4100,7 +4075,7 @@ type XGReverbParameterMessage = {
|
|
|
4100
4075
|
*
|
|
4101
4076
|
* @group MIDI.Protocol
|
|
4102
4077
|
*/
|
|
4103
|
-
type XGChorusParameterMessage = {
|
|
4078
|
+
export type XGChorusParameterMessage = {
|
|
4104
4079
|
/**
|
|
4105
4080
|
* A chorus effect processor parameter message (Yamaha XG).
|
|
4106
4081
|
*/
|
|
@@ -4148,7 +4123,7 @@ type XGChorusParameterMessage = {
|
|
|
4148
4123
|
*
|
|
4149
4124
|
* @group MIDI.Protocol
|
|
4150
4125
|
*/
|
|
4151
|
-
type XGVariationConnection = "system" | "insertion";
|
|
4126
|
+
export type XGVariationConnection = "system" | "insertion";
|
|
4152
4127
|
/**
|
|
4153
4128
|
* Represents an analyzed Yamaha XG Variation Processor change.
|
|
4154
4129
|
*
|
|
@@ -4158,7 +4133,7 @@ type XGVariationConnection = "system" | "insertion";
|
|
|
4158
4133
|
*
|
|
4159
4134
|
* @group MIDI.Protocol
|
|
4160
4135
|
*/
|
|
4161
|
-
type XGVariationParameterMessage = {
|
|
4136
|
+
export type XGVariationParameterMessage = {
|
|
4162
4137
|
/**
|
|
4163
4138
|
* A variation effect processor parameter message (Yamaha XG).
|
|
4164
4139
|
*/
|
|
@@ -4223,7 +4198,7 @@ type XGVariationParameterMessage = {
|
|
|
4223
4198
|
*
|
|
4224
4199
|
* @group MIDI.Protocol
|
|
4225
4200
|
*/
|
|
4226
|
-
type XGInsertionParameterMessage = {
|
|
4201
|
+
export type XGInsertionParameterMessage = {
|
|
4227
4202
|
/**
|
|
4228
4203
|
* An insertion effect processor parameter message (Yamaha XG).
|
|
4229
4204
|
*/
|
|
@@ -4288,7 +4263,7 @@ type XGInsertionParameterMessage = {
|
|
|
4288
4263
|
*
|
|
4289
4264
|
* @group MIDI.Protocol
|
|
4290
4265
|
*/
|
|
4291
|
-
type ChannelDrumSetupMessage = { [K in keyof DrumParameter]: {
|
|
4266
|
+
export type ChannelDrumSetupMessage = { [K in keyof DrumParameter]: {
|
|
4292
4267
|
/**
|
|
4293
4268
|
* A drum setup parameter message, set by NRPN.
|
|
4294
4269
|
*/
|
|
@@ -4309,13 +4284,13 @@ type ChannelDrumSetupMessage = { [K in keyof DrumParameter]: {
|
|
|
4309
4284
|
* The value for the drum parameter.
|
|
4310
4285
|
*/
|
|
4311
4286
|
value: DrumParameter[K];
|
|
4312
|
-
} }[keyof DrumParameter];
|
|
4287
|
+
}; }[keyof DrumParameter];
|
|
4313
4288
|
/**
|
|
4314
4289
|
* Represents an analyzed map drum setup parameter change, set via System Exclusive.
|
|
4315
4290
|
*
|
|
4316
4291
|
* @group MIDI.Protocol
|
|
4317
4292
|
*/
|
|
4318
|
-
type MapDrumSetupMessage = { [K in keyof DrumParameter]: {
|
|
4293
|
+
export type MapDrumSetupMessage = { [K in keyof DrumParameter]: {
|
|
4319
4294
|
/**
|
|
4320
4295
|
* A drum setup parameter message, set by SysEx.
|
|
4321
4296
|
*/
|
|
@@ -4337,7 +4312,7 @@ type MapDrumSetupMessage = { [K in keyof DrumParameter]: {
|
|
|
4337
4312
|
* GS `pitchCoarse` is converted to semitones assuming the SC-88 resolution (50 cents per step).
|
|
4338
4313
|
*/
|
|
4339
4314
|
value: DrumParameter[K];
|
|
4340
|
-
} }[keyof DrumParameter];
|
|
4315
|
+
}; }[keyof DrumParameter];
|
|
4341
4316
|
/**
|
|
4342
4317
|
* The analysis result of an RPN (Registered Parameter Number) or NRPN (Non-Registered Parameter Number) MIDI message.
|
|
4343
4318
|
*
|
|
@@ -4347,7 +4322,7 @@ type MapDrumSetupMessage = { [K in keyof DrumParameter]: {
|
|
|
4347
4322
|
*
|
|
4348
4323
|
* @group MIDI.Protocol
|
|
4349
4324
|
*/
|
|
4350
|
-
type AnalyzedParameter = {
|
|
4325
|
+
export type AnalyzedParameter = {
|
|
4351
4326
|
/**
|
|
4352
4327
|
* An unhandled or unrecognized parameter message.
|
|
4353
4328
|
*/
|
|
@@ -4378,7 +4353,7 @@ type AnalyzedParameter = {
|
|
|
4378
4353
|
*
|
|
4379
4354
|
* @group MIDI.Protocol
|
|
4380
4355
|
*/
|
|
4381
|
-
type AnalyzedMIDIMessage = AnalyzedParameter | GSReverbParameterMessage | GSChorusParameterMessage | GSDelayParameterMessage | GSInsertionParameterMessage | XGReverbParameterMessage | XGChorusParameterMessage | XGVariationParameterMessage | XGInsertionParameterMessage | {
|
|
4356
|
+
export type AnalyzedMIDIMessage = AnalyzedParameter | GSReverbParameterMessage | GSChorusParameterMessage | GSDelayParameterMessage | GSInsertionParameterMessage | XGReverbParameterMessage | XGChorusParameterMessage | XGVariationParameterMessage | XGInsertionParameterMessage | {
|
|
4382
4357
|
/**
|
|
4383
4358
|
* A MIDI program change message configured via System Exclusive.
|
|
4384
4359
|
*/
|
|
@@ -4418,21 +4393,19 @@ type AnalyzedMIDIMessage = AnalyzedParameter | GSReverbParameterMessage | GSChor
|
|
|
4418
4393
|
* `pitchCoarse` is in GS steps, see {@link UserDrumSetParameter.pitchCoarse}.
|
|
4419
4394
|
*/
|
|
4420
4395
|
value: UserDrumSetParameter[K];
|
|
4421
|
-
} }[keyof UserDrumSetParameter] | MapDrumSetupMessage;
|
|
4396
|
+
}; }[keyof UserDrumSetParameter] | MapDrumSetupMessage;
|
|
4422
4397
|
/**
|
|
4423
4398
|
* The analysis result of a System Exclusive (SysEx) MIDI message.
|
|
4424
4399
|
*
|
|
4425
4400
|
* @group MIDI.Protocol
|
|
4426
4401
|
*/
|
|
4427
|
-
type AnalyzedSysExMessage = Exclude<AnalyzedMIDIMessage, ChannelDrumSetupMessage>;
|
|
4428
|
-
//#endregion
|
|
4429
|
-
//#region src/synthesizer/events.d.ts
|
|
4402
|
+
export type AnalyzedSysExMessage = Exclude<AnalyzedMIDIMessage, ChannelDrumSetupMessage>;
|
|
4430
4403
|
/**
|
|
4431
4404
|
* A shared interface for all channel events.
|
|
4432
4405
|
*
|
|
4433
4406
|
* @group Synthesizer.Events
|
|
4434
4407
|
*/
|
|
4435
|
-
interface ChannelEvent {
|
|
4408
|
+
export interface ChannelEvent {
|
|
4436
4409
|
/**
|
|
4437
4410
|
* The MIDI channel number for this event.
|
|
4438
4411
|
* Usually it ranges from 0 to 15, but it depends on the
|
|
@@ -4461,7 +4434,7 @@ interface ChannelEvent {
|
|
|
4461
4434
|
*
|
|
4462
4435
|
* @group Synthesizer.Events
|
|
4463
4436
|
*/
|
|
4464
|
-
interface NoteOnEvent extends ChannelEvent {
|
|
4437
|
+
export interface NoteOnEvent extends ChannelEvent {
|
|
4465
4438
|
/**
|
|
4466
4439
|
* The MIDI key number of the note that was pressed. Ranges from 0 to 127.
|
|
4467
4440
|
*/
|
|
@@ -4476,7 +4449,7 @@ interface NoteOnEvent extends ChannelEvent {
|
|
|
4476
4449
|
*
|
|
4477
4450
|
* @group Synthesizer.Events
|
|
4478
4451
|
*/
|
|
4479
|
-
interface NoteOffEvent extends ChannelEvent {
|
|
4452
|
+
export interface NoteOffEvent extends ChannelEvent {
|
|
4480
4453
|
/**
|
|
4481
4454
|
* The MIDI key number of the note that was released. Ranges from 0 to 127.
|
|
4482
4455
|
*/
|
|
@@ -4496,7 +4469,7 @@ interface NoteOffEvent extends ChannelEvent {
|
|
|
4496
4469
|
*
|
|
4497
4470
|
* @group Synthesizer.Events
|
|
4498
4471
|
*/
|
|
4499
|
-
interface ProgramChangeEvent extends MIDIPatchFull, ChannelEvent {}
|
|
4472
|
+
export interface ProgramChangeEvent extends MIDIPatchFull, ChannelEvent {}
|
|
4500
4473
|
/**
|
|
4501
4474
|
* This event is triggered when a controller is changed on any channel (usually MIDI controller change),
|
|
4502
4475
|
* though [some system exclusives can change it too.](../../docs/extra/midi-implementation.md)
|
|
@@ -4509,7 +4482,7 @@ interface ProgramChangeEvent extends MIDIPatchFull, ChannelEvent {}
|
|
|
4509
4482
|
*
|
|
4510
4483
|
* @group Synthesizer.Events
|
|
4511
4484
|
*/
|
|
4512
|
-
interface ControllerChangeEvent extends ChannelEvent {
|
|
4485
|
+
export interface ControllerChangeEvent extends ChannelEvent {
|
|
4513
4486
|
/**
|
|
4514
4487
|
* The MIDI controller number. Ranges from 0 to 127.
|
|
4515
4488
|
*/
|
|
@@ -4525,7 +4498,7 @@ interface ControllerChangeEvent extends ChannelEvent {
|
|
|
4525
4498
|
*
|
|
4526
4499
|
* @group Synthesizer.Events
|
|
4527
4500
|
*/
|
|
4528
|
-
interface PolyPressureEvent extends ChannelEvent {
|
|
4501
|
+
export interface PolyPressureEvent extends ChannelEvent {
|
|
4529
4502
|
/**
|
|
4530
4503
|
* The MIDI key number of the note that was affected.
|
|
4531
4504
|
* Ranges from 0 to 127.
|
|
@@ -4543,7 +4516,7 @@ interface PolyPressureEvent extends ChannelEvent {
|
|
|
4543
4516
|
*
|
|
4544
4517
|
* @group Synthesizer.Events
|
|
4545
4518
|
*/
|
|
4546
|
-
interface StopAllEvent extends ChannelEvent {
|
|
4519
|
+
export interface StopAllEvent extends ChannelEvent {
|
|
4547
4520
|
/**
|
|
4548
4521
|
* If the channel was force stopped. (no release time)
|
|
4549
4522
|
*/
|
|
@@ -4555,7 +4528,7 @@ interface StopAllEvent extends ChannelEvent {
|
|
|
4555
4528
|
*
|
|
4556
4529
|
* @group Synthesizer.Events
|
|
4557
4530
|
*/
|
|
4558
|
-
type ChannelMIDIParameterChangeEvent = { [P in keyof ChannelMIDIParameter]: ChannelEvent & {
|
|
4531
|
+
export type ChannelMIDIParameterChangeEvent = { [P in keyof ChannelMIDIParameter]: ChannelEvent & {
|
|
4559
4532
|
/**
|
|
4560
4533
|
* The parameter that was changed.
|
|
4561
4534
|
*/
|
|
@@ -4564,7 +4537,7 @@ type ChannelMIDIParameterChangeEvent = { [P in keyof ChannelMIDIParameter]: Chan
|
|
|
4564
4537
|
* The new value of this parameter.
|
|
4565
4538
|
*/
|
|
4566
4539
|
value: ChannelMIDIParameter[P];
|
|
4567
|
-
} }[keyof ChannelMIDIParameter];
|
|
4540
|
+
}; }[keyof ChannelMIDIParameter];
|
|
4568
4541
|
/**
|
|
4569
4542
|
* The system exclusive data with the message.
|
|
4570
4543
|
*
|
|
@@ -4574,13 +4547,13 @@ type ChannelMIDIParameterChangeEvent = { [P in keyof ChannelMIDIParameter]: Chan
|
|
|
4574
4547
|
*
|
|
4575
4548
|
* @group Synthesizer.Events
|
|
4576
4549
|
*/
|
|
4577
|
-
type DisplayMessageData = number[];
|
|
4550
|
+
export type DisplayMessageData = number[];
|
|
4578
4551
|
/**
|
|
4579
4552
|
* This event is triggered when a {@link GlobalMIDIParameter} changes.
|
|
4580
4553
|
*
|
|
4581
4554
|
* @group Synthesizer.Events
|
|
4582
4555
|
*/
|
|
4583
|
-
type GlobalMIDIParameterChangeEvent = { [P in keyof GlobalMIDIParameter]: {
|
|
4556
|
+
export type GlobalMIDIParameterChangeEvent = { [P in keyof GlobalMIDIParameter]: {
|
|
4584
4557
|
/**
|
|
4585
4558
|
* The parameter that was changed.
|
|
4586
4559
|
*/
|
|
@@ -4589,13 +4562,16 @@ type GlobalMIDIParameterChangeEvent = { [P in keyof GlobalMIDIParameter]: {
|
|
|
4589
4562
|
* The new value of this parameter.
|
|
4590
4563
|
*/
|
|
4591
4564
|
value: GlobalMIDIParameter[P];
|
|
4592
|
-
} }[keyof GlobalMIDIParameter];
|
|
4565
|
+
}; }[keyof GlobalMIDIParameter];
|
|
4593
4566
|
/**
|
|
4594
4567
|
* The parameter names of an effect processor, or `macro` for the effect's macro.
|
|
4595
4568
|
*
|
|
4569
|
+
* When a macro is applied, an event is first emitted for every parameter it sets,
|
|
4570
|
+
* then the `macro` event.
|
|
4571
|
+
*
|
|
4596
4572
|
* @group Synthesizer.Events
|
|
4597
4573
|
*/
|
|
4598
|
-
type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
|
|
4574
|
+
export type FXType<K> = Exclude<keyof K, "process" | "getSnapshot" | "applySnapshot"> | "macro";
|
|
4599
4575
|
/**
|
|
4600
4576
|
* This event is triggered when an effect processor has one of its parameters changed.
|
|
4601
4577
|
*
|
|
@@ -4604,7 +4580,7 @@ type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
|
|
|
4604
4580
|
* - {@link GSReverbProcessor} (`effect: "gsReverb"`)
|
|
4605
4581
|
* - {@link GSChorusProcessor} (`effect: "gsChorus"`)
|
|
4606
4582
|
* - {@link GSDelayProcessor} (`effect: "gsDelay"`)
|
|
4607
|
-
* -
|
|
4583
|
+
* - {@link GSInsertionBlock} (`effect: "gsInsertion"`)
|
|
4608
4584
|
* - {@link XGReverbBlock} (`effect: "xgReverb"`)
|
|
4609
4585
|
* - {@link XGChorusBlock} (`effect: "xgChorus"`)
|
|
4610
4586
|
* - {@link XGVariationBlock} (`effect: "xgVariation"`)
|
|
@@ -4613,13 +4589,13 @@ type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
|
|
|
4613
4589
|
*
|
|
4614
4590
|
* @group Synthesizer.Events
|
|
4615
4591
|
*/
|
|
4616
|
-
type EffectChangeEvent = {
|
|
4592
|
+
export type EffectChangeEvent = {
|
|
4617
4593
|
/**
|
|
4618
4594
|
* The effect that was changed: Roland GS reverb.
|
|
4619
4595
|
*/
|
|
4620
4596
|
effect: "gsReverb";
|
|
4621
4597
|
/**
|
|
4622
|
-
* The parameter, see {@link GSReverbProcessor}, or `macro
|
|
4598
|
+
* The parameter, see {@link GSReverbProcessor}, or `macro` (see {@link FXType}).
|
|
4623
4599
|
*/
|
|
4624
4600
|
parameter: FXType<GSReverbProcessor>;
|
|
4625
4601
|
/**
|
|
@@ -4632,7 +4608,7 @@ type EffectChangeEvent = {
|
|
|
4632
4608
|
*/
|
|
4633
4609
|
effect: "gsChorus";
|
|
4634
4610
|
/**
|
|
4635
|
-
* The parameter, see {@link GSChorusProcessor}, or `macro
|
|
4611
|
+
* The parameter, see {@link GSChorusProcessor}, or `macro` (see {@link FXType}).
|
|
4636
4612
|
*/
|
|
4637
4613
|
parameter: FXType<GSChorusProcessor>;
|
|
4638
4614
|
/**
|
|
@@ -4645,7 +4621,7 @@ type EffectChangeEvent = {
|
|
|
4645
4621
|
*/
|
|
4646
4622
|
effect: "gsDelay";
|
|
4647
4623
|
/**
|
|
4648
|
-
* The parameter, see {@link GSDelayProcessor}, or `macro
|
|
4624
|
+
* The parameter, see {@link GSDelayProcessor}, or `macro` (see {@link FXType}).
|
|
4649
4625
|
*/
|
|
4650
4626
|
parameter: FXType<GSDelayProcessor>;
|
|
4651
4627
|
/**
|
|
@@ -4658,15 +4634,12 @@ type EffectChangeEvent = {
|
|
|
4658
4634
|
*/
|
|
4659
4635
|
effect: "gsInsertion";
|
|
4660
4636
|
/**
|
|
4661
|
-
* The parameter that was changed
|
|
4662
|
-
*
|
|
4663
|
-
*
|
|
4664
|
-
* - `
|
|
4665
|
-
* - `0x3` - EFX param 1
|
|
4666
|
-
* - `0x16` - EFX param 20 (usually level)
|
|
4667
|
-
* - `0x17` - EFX send to reverb
|
|
4637
|
+
* The parameter that was changed:
|
|
4638
|
+
* - `"type"` - 16-bit effect type (`MSB << 8 | LSB`). Note that this resets the parameters and the send levels!
|
|
4639
|
+
* - `"sendLevelToReverb" | "sendLevelToChorus" | "sendLevelToDelay"` - send levels (7-bit), see {@link GSInsertionParameter}.
|
|
4640
|
+
* - `number` - 0-based type-specific EFX parameter index (0-19). EFX parameter 1 is 0. Value is 7-bit.
|
|
4668
4641
|
*/
|
|
4669
|
-
parameter: number;
|
|
4642
|
+
parameter: "type" | keyof GSInsertionParameter | number;
|
|
4670
4643
|
/**
|
|
4671
4644
|
* The new value for the parameter.
|
|
4672
4645
|
*/
|
|
@@ -4761,7 +4734,7 @@ type EffectChangeEvent = {
|
|
|
4761
4734
|
*
|
|
4762
4735
|
* @group Synthesizer.Events
|
|
4763
4736
|
*/
|
|
4764
|
-
type UserDrumSetChangeEvent = { [P in keyof UserDrumSetParameter]: {
|
|
4737
|
+
export type UserDrumSetChangeEvent = { [P in keyof UserDrumSetParameter]: {
|
|
4765
4738
|
/**
|
|
4766
4739
|
* The drum set that was changed. 0 means User Drum Set 1, and 1 means User Drum Set 2.
|
|
4767
4740
|
*/
|
|
@@ -4778,7 +4751,7 @@ type UserDrumSetChangeEvent = { [P in keyof UserDrumSetParameter]: {
|
|
|
4778
4751
|
* The new value of this parameter.
|
|
4779
4752
|
*/
|
|
4780
4753
|
value: UserDrumSetParameter[P];
|
|
4781
|
-
} }[keyof UserDrumSetParameter];
|
|
4754
|
+
}; }[keyof UserDrumSetParameter];
|
|
4782
4755
|
/**
|
|
4783
4756
|
*
|
|
4784
4757
|
* {@link SynthesizerEvent} represents an event that {@link SpessaSynthProcessor} emits.
|
|
@@ -4816,7 +4789,7 @@ type UserDrumSetChangeEvent = { [P in keyof UserDrumSetParameter]: {
|
|
|
4816
4789
|
*
|
|
4817
4790
|
* @group Synthesizer.Events
|
|
4818
4791
|
*/
|
|
4819
|
-
interface SynthesizerEvent {
|
|
4792
|
+
export interface SynthesizerEvent {
|
|
4820
4793
|
/**
|
|
4821
4794
|
* This event is triggered when a note is pressed on any channel.
|
|
4822
4795
|
*/
|
|
@@ -4922,7 +4895,7 @@ interface SynthesizerEvent {
|
|
|
4922
4895
|
* - {@link GSReverbProcessor} (`effect: "gsReverb"`)
|
|
4923
4896
|
* - {@link GSChorusProcessor} (`effect: "gsChorus"`)
|
|
4924
4897
|
* - {@link GSDelayProcessor} (`effect: "gsDelay"`)
|
|
4925
|
-
* -
|
|
4898
|
+
* - {@link GSInsertionBlock} (`effect: "gsInsertion"`)
|
|
4926
4899
|
* - {@link XGReverbBlock} (`effect: "xgReverb"`)
|
|
4927
4900
|
* - {@link XGChorusBlock} (`effect: "xgChorus"`)
|
|
4928
4901
|
* - {@link XGVariationBlock} (`effect: "xgVariation"`)
|
|
@@ -4939,12 +4912,10 @@ interface SynthesizerEvent {
|
|
|
4939
4912
|
*
|
|
4940
4913
|
* @group Synthesizer.Events
|
|
4941
4914
|
*/
|
|
4942
|
-
type SynthesizerEventCallback = { [K in keyof SynthesizerEvent]: {
|
|
4915
|
+
export type SynthesizerEventCallback = { [K in keyof SynthesizerEvent]: {
|
|
4943
4916
|
type: K;
|
|
4944
4917
|
data: SynthesizerEvent[K];
|
|
4945
|
-
} }[keyof SynthesizerEvent];
|
|
4946
|
-
//#endregion
|
|
4947
|
-
//#region src/synthesizer/audio_engine/effects/xg/implementation/dsp/effect_processor.d.ts
|
|
4918
|
+
}; }[keyof SynthesizerEvent];
|
|
4948
4919
|
/**
|
|
4949
4920
|
* The raw DSP processor for Yamaha XG effects.
|
|
4950
4921
|
* Reverb, Chorus, Variation and Insertion all use it.
|
|
@@ -5002,8 +4973,6 @@ interface DefaultXGEffectProcessorConstructor {
|
|
|
5002
4973
|
*/
|
|
5003
4974
|
new (sampleRate: number, maxBufferSize: number, memory: Float32Array, variation: boolean): DefaultXGEffectProcessor;
|
|
5004
4975
|
}
|
|
5005
|
-
//#endregion
|
|
5006
|
-
//#region src/synthesizer/audio_engine/effects/xg/implementation/effect.d.ts
|
|
5007
4976
|
/**
|
|
5008
4977
|
* The default implementation for {@link XGEffectBlock}.
|
|
5009
4978
|
*
|
|
@@ -5013,7 +4982,7 @@ interface DefaultXGEffectProcessorConstructor {
|
|
|
5013
4982
|
*
|
|
5014
4983
|
* @group Synthesizer.XG Effects
|
|
5015
4984
|
*/
|
|
5016
|
-
declare abstract class DefaultXGEffect implements XGEffectBlock {
|
|
4985
|
+
export declare abstract class DefaultXGEffect implements XGEffectBlock {
|
|
5017
4986
|
/**
|
|
5018
4987
|
* The currently used processor.
|
|
5019
4988
|
*/
|
|
@@ -5049,8 +5018,6 @@ declare abstract class DefaultXGEffect implements XGEffectBlock {
|
|
|
5049
5018
|
};
|
|
5050
5019
|
applySnapshot(snapshot: XGEffectBlockSnapshot): void;
|
|
5051
5020
|
}
|
|
5052
|
-
//#endregion
|
|
5053
|
-
//#region src/synthesizer/audio_engine/effects/xg/implementation/system_effect.d.ts
|
|
5054
5021
|
/**
|
|
5055
5022
|
* The default implementation for {@link XGSystemEffectBlock}.
|
|
5056
5023
|
*
|
|
@@ -5058,7 +5025,7 @@ declare abstract class DefaultXGEffect implements XGEffectBlock {
|
|
|
5058
5025
|
*
|
|
5059
5026
|
* @group Synthesizer.XG Effects
|
|
5060
5027
|
*/
|
|
5061
|
-
declare abstract class DefaultXGSystemEffect extends DefaultXGEffect implements XGSystemEffectBlock {
|
|
5028
|
+
export declare abstract class DefaultXGSystemEffect extends DefaultXGEffect implements XGSystemEffectBlock {
|
|
5062
5029
|
return: number;
|
|
5063
5030
|
pan: number;
|
|
5064
5031
|
reset(): void;
|
|
@@ -5073,15 +5040,13 @@ declare abstract class DefaultXGSystemEffect extends DefaultXGEffect implements
|
|
|
5073
5040
|
*/
|
|
5074
5041
|
protected mixSystemEffect(outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
|
|
5075
5042
|
}
|
|
5076
|
-
//#endregion
|
|
5077
|
-
//#region src/synthesizer/audio_engine/effects/xg/implementation/reverb.d.ts
|
|
5078
5043
|
/**
|
|
5079
5044
|
* The default implementation for {@link XGReverbBlock}.
|
|
5080
5045
|
*
|
|
5081
5046
|
* @group Synthesizer.XG Effects
|
|
5082
5047
|
* @sealed
|
|
5083
5048
|
*/
|
|
5084
|
-
declare class DefaultXGReverb extends DefaultXGSystemEffect implements XGReverbBlock {
|
|
5049
|
+
export declare class DefaultXGReverb extends DefaultXGSystemEffect implements XGReverbBlock {
|
|
5085
5050
|
/**
|
|
5086
5051
|
* Constructs a new default XG reverb processor.
|
|
5087
5052
|
* @param sampleRate The sample rate, in Hertz.
|
|
@@ -5091,15 +5056,13 @@ declare class DefaultXGReverb extends DefaultXGSystemEffect implements XGReverbB
|
|
|
5091
5056
|
constructor(sampleRate: number, maxBufferSize: number);
|
|
5092
5057
|
process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
|
|
5093
5058
|
}
|
|
5094
|
-
//#endregion
|
|
5095
|
-
//#region src/synthesizer/audio_engine/effects/xg/implementation/chorus.d.ts
|
|
5096
5059
|
/**
|
|
5097
5060
|
* The default implementation for {@link XGChorusBlock}.
|
|
5098
5061
|
*
|
|
5099
5062
|
* @group Synthesizer.XG Effects
|
|
5100
5063
|
* @sealed
|
|
5101
5064
|
*/
|
|
5102
|
-
declare class DefaultXGChorus extends DefaultXGSystemEffect implements XGChorusBlock {
|
|
5065
|
+
export declare class DefaultXGChorus extends DefaultXGSystemEffect implements XGChorusBlock {
|
|
5103
5066
|
sendToReverb: number;
|
|
5104
5067
|
/**
|
|
5105
5068
|
* Constructs a new default XG chorus processor.
|
|
@@ -5119,15 +5082,13 @@ declare class DefaultXGChorus extends DefaultXGSystemEffect implements XGChorusB
|
|
|
5119
5082
|
};
|
|
5120
5083
|
applySnapshot(snapshot: XGChorusBlockSnapshot): void;
|
|
5121
5084
|
}
|
|
5122
|
-
//#endregion
|
|
5123
|
-
//#region src/synthesizer/audio_engine/effects/xg/implementation/variation.d.ts
|
|
5124
5085
|
/**
|
|
5125
5086
|
* The default implementation for {@link XGVariationBlock}.
|
|
5126
5087
|
*
|
|
5127
5088
|
* @group Synthesizer.XG Effects
|
|
5128
5089
|
* @sealed
|
|
5129
5090
|
*/
|
|
5130
|
-
declare class DefaultXGVariation extends DefaultXGSystemEffect implements XGVariationBlock {
|
|
5091
|
+
export declare class DefaultXGVariation extends DefaultXGSystemEffect implements XGVariationBlock {
|
|
5131
5092
|
insertionMode: boolean;
|
|
5132
5093
|
partNumber: number;
|
|
5133
5094
|
sendToReverb: number;
|
|
@@ -5154,15 +5115,13 @@ declare class DefaultXGVariation extends DefaultXGSystemEffect implements XGVari
|
|
|
5154
5115
|
};
|
|
5155
5116
|
applySnapshot(snapshot: XGVariationBlockSnapshot): void;
|
|
5156
5117
|
}
|
|
5157
|
-
//#endregion
|
|
5158
|
-
//#region src/synthesizer/audio_engine/effects/xg/implementation/insertion.d.ts
|
|
5159
5118
|
/**
|
|
5160
5119
|
* The default implementation for {@link XGInsertionBlock}.
|
|
5161
5120
|
*
|
|
5162
5121
|
* @group Synthesizer.XG Effects
|
|
5163
5122
|
* @sealed
|
|
5164
5123
|
*/
|
|
5165
|
-
declare class DefaultXGInsertion extends DefaultXGEffect implements XGInsertionBlock {
|
|
5124
|
+
export declare class DefaultXGInsertion extends DefaultXGEffect implements XGInsertionBlock {
|
|
5166
5125
|
partNumber: number;
|
|
5167
5126
|
/**
|
|
5168
5127
|
* Constructs a new default XG insertion processor.
|
|
@@ -5180,14 +5139,12 @@ declare class DefaultXGInsertion extends DefaultXGEffect implements XGInsertionB
|
|
|
5180
5139
|
};
|
|
5181
5140
|
applySnapshot(snapshot: XGInsertionBlockSnapshot): void;
|
|
5182
5141
|
}
|
|
5183
|
-
//#endregion
|
|
5184
|
-
//#region src/synthesizer/types.d.ts
|
|
5185
5142
|
/**
|
|
5186
5143
|
* Represents a single entry in the {@link SoundBankManager} list.
|
|
5187
5144
|
*
|
|
5188
5145
|
* @group Synthesizer.Sound Bank Integration
|
|
5189
5146
|
*/
|
|
5190
|
-
interface SoundBankManagerListEntry {
|
|
5147
|
+
export interface SoundBankManagerListEntry {
|
|
5191
5148
|
/**
|
|
5192
5149
|
* The unique string identifier of the sound bank,
|
|
5193
5150
|
* used to specify which one to add/remove.
|
|
@@ -5208,7 +5165,7 @@ interface SoundBankManagerListEntry {
|
|
|
5208
5165
|
*
|
|
5209
5166
|
* @group Synthesizer.Options
|
|
5210
5167
|
*/
|
|
5211
|
-
interface SynthMethodOptions {
|
|
5168
|
+
export interface SynthMethodOptions {
|
|
5212
5169
|
/**
|
|
5213
5170
|
* The {@link SpessaSynthProcessor.currentTime} when the event should execute, in seconds.
|
|
5214
5171
|
*/
|
|
@@ -5219,7 +5176,7 @@ interface SynthMethodOptions {
|
|
|
5219
5176
|
*
|
|
5220
5177
|
* @group Synthesizer.Options
|
|
5221
5178
|
*/
|
|
5222
|
-
interface SynthProcessorOptions {
|
|
5179
|
+
export interface SynthProcessorOptions {
|
|
5223
5180
|
/**
|
|
5224
5181
|
* The maximum buffer size the synthesizer can render at once.
|
|
5225
5182
|
* Attempting to `.process()` more samples than this will result in an error.
|
|
@@ -5258,6 +5215,10 @@ interface SynthProcessorOptions {
|
|
|
5258
5215
|
* Optional custom GS delay processor for the synthesizer. Leave undefined to use {@link DefaultGSDelay}.
|
|
5259
5216
|
*/
|
|
5260
5217
|
gsDelayProcessor?: GSDelayProcessor;
|
|
5218
|
+
/**
|
|
5219
|
+
* Optional custom GS insertion block for the synthesizer. Leave undefined to use {@link DefaultGSInsertion}.
|
|
5220
|
+
*/
|
|
5221
|
+
gsInsertionBlock?: GSInsertionBlock;
|
|
5261
5222
|
/**
|
|
5262
5223
|
* Optional custom XG reverb block for the synthesizer. Leave undefined to use {@link DefaultXGReverb}.
|
|
5263
5224
|
*
|
|
@@ -5298,7 +5259,7 @@ interface SynthProcessorOptions {
|
|
|
5298
5259
|
*
|
|
5299
5260
|
* @group Synthesizer.Sound Bank Integration
|
|
5300
5261
|
*/
|
|
5301
|
-
interface SynthesizerPatch extends MIDIPatchFull {
|
|
5262
|
+
export interface SynthesizerPatch extends MIDIPatchFull {
|
|
5302
5263
|
/**
|
|
5303
5264
|
* Returns the voice synthesis data for this preset.
|
|
5304
5265
|
* @param midiNote the MIDI note number.
|
|
@@ -5307,8 +5268,6 @@ interface SynthesizerPatch extends MIDIPatchFull {
|
|
|
5307
5268
|
*/
|
|
5308
5269
|
getVoiceParameters(midiNote: number, velocity: number): VoiceParameters[];
|
|
5309
5270
|
}
|
|
5310
|
-
//#endregion
|
|
5311
|
-
//#region src/synthesizer/audio_engine/channel/midi_channel.d.ts
|
|
5312
5271
|
/**
|
|
5313
5272
|
* This class represents a single MIDI channel within a {@link SpessaSynthProcessor}.
|
|
5314
5273
|
*
|
|
@@ -5316,7 +5275,7 @@ interface SynthesizerPatch extends MIDIPatchFull {
|
|
|
5316
5275
|
*
|
|
5317
5276
|
* @group Synthesizer.Channel
|
|
5318
5277
|
*/
|
|
5319
|
-
declare class MIDIChannel {
|
|
5278
|
+
export declare class MIDIChannel {
|
|
5320
5279
|
/**
|
|
5321
5280
|
* The currently selected MIDI patch of the channel.
|
|
5322
5281
|
* > **Note**
|
|
@@ -5421,8 +5380,6 @@ declare class MIDIChannel {
|
|
|
5421
5380
|
*/
|
|
5422
5381
|
stopAllNotes(force?: boolean): void;
|
|
5423
5382
|
}
|
|
5424
|
-
//#endregion
|
|
5425
|
-
//#region src/synthesizer/audio_engine/channel/parameters/midi.d.ts
|
|
5426
5383
|
/**
|
|
5427
5384
|
* Channel MIDI Parameters are MIDI-only parameters
|
|
5428
5385
|
* that affect a single MIDI channel.
|
|
@@ -5612,9 +5569,7 @@ interface ChannelMIDIParameter {
|
|
|
5612
5569
|
*
|
|
5613
5570
|
* @group Synthesizer.Parameters
|
|
5614
5571
|
*/
|
|
5615
|
-
declare const DEFAULT_CHANNEL_MIDI_PARAMETERS: ChannelMIDIParameter;
|
|
5616
|
-
//#endregion
|
|
5617
|
-
//#region src/midi/midi_tools/midi_editor.d.ts
|
|
5572
|
+
export declare const DEFAULT_CHANNEL_MIDI_PARAMETERS: ChannelMIDIParameter;
|
|
5618
5573
|
/**
|
|
5619
5574
|
* Represents a value that means "clear this parameter" instead of "replace this parameter with".
|
|
5620
5575
|
* Essentially:
|
|
@@ -5658,7 +5613,7 @@ interface ChannelModification {
|
|
|
5658
5613
|
* before the channel's first note-on, re-applying it after every system reset,
|
|
5659
5614
|
* effectively locking it to the set value.
|
|
5660
5615
|
*/
|
|
5661
|
-
midiParams?: { [P in keyof ChannelMIDIParameter]?: ClearableParameter<ChannelMIDIParameter[P]
|
|
5616
|
+
midiParams?: { [P in keyof ChannelMIDIParameter]?: ClearableParameter<ChannelMIDIParameter[P]>; };
|
|
5662
5617
|
/**
|
|
5663
5618
|
* The channel key shift in semitones.
|
|
5664
5619
|
* Note on/off and poly pressure MIDI note numbers are shifted.
|
|
@@ -5710,7 +5665,7 @@ interface ChannelModification {
|
|
|
5710
5665
|
*
|
|
5711
5666
|
* @group MIDI.Editing
|
|
5712
5667
|
*/
|
|
5713
|
-
type UserDrumModification = Map<number, ClearableParameter<{ [P in keyof UserDrumSetParameter]?: ClearableParameter<UserDrumSetParameter[P]
|
|
5668
|
+
type UserDrumModification = Map<number, ClearableParameter<{ [P in keyof UserDrumSetParameter]?: ClearableParameter<UserDrumSetParameter[P]>; }>>;
|
|
5714
5669
|
/**
|
|
5715
5670
|
* All drum note modifications for a single channel.
|
|
5716
5671
|
* - Key: the MIDI drum key/note number to modify.
|
|
@@ -5731,7 +5686,7 @@ type UserDrumModification = Map<number, ClearableParameter<{ [P in keyof UserDru
|
|
|
5731
5686
|
*
|
|
5732
5687
|
* @group MIDI.Editing
|
|
5733
5688
|
*/
|
|
5734
|
-
type ChannelDrumModification = Map<number, ClearableParameter<{ [P in keyof DrumParameter]?: ClearableParameter<DrumParameter[P]
|
|
5689
|
+
type ChannelDrumModification = Map<number, ClearableParameter<{ [P in keyof DrumParameter]?: ClearableParameter<DrumParameter[P]>; }>>;
|
|
5735
5690
|
/**
|
|
5736
5691
|
* Options editing a MIDI sequence using {@link BasicMIDI.modify}.
|
|
5737
5692
|
*
|
|
@@ -5776,7 +5731,7 @@ interface ModifyMIDIOptions {
|
|
|
5776
5731
|
* > to keep the GM reset (and replace all others with GM).
|
|
5777
5732
|
* > This is done to allow the bank selections and other parameters to work.
|
|
5778
5733
|
*/
|
|
5779
|
-
midiParams?: { [P in keyof GlobalMIDIParameter]?: ClearableParameter<GlobalMIDIParameter[P]
|
|
5734
|
+
midiParams?: { [P in keyof GlobalMIDIParameter]?: ClearableParameter<GlobalMIDIParameter[P]>; };
|
|
5780
5735
|
/**
|
|
5781
5736
|
* The desired GS reverb parameters.
|
|
5782
5737
|
* - `"clear"` - all existing parameter change MIDI messages are removed.
|
|
@@ -5798,9 +5753,9 @@ interface ModifyMIDIOptions {
|
|
|
5798
5753
|
/**
|
|
5799
5754
|
* The GS Insertion Effect parameters.
|
|
5800
5755
|
* - `"clear"` - all existing parameter change MIDI messages are cleared.
|
|
5801
|
-
* - {@link
|
|
5756
|
+
* - {@link GSInsertionBlockSnapshot} - clear + the new parameters are set via System Exclusive messages.
|
|
5802
5757
|
*/
|
|
5803
|
-
gsInsertionParams?: ClearableParameter<
|
|
5758
|
+
gsInsertionParams?: ClearableParameter<GSInsertionBlockSnapshot>;
|
|
5804
5759
|
/**
|
|
5805
5760
|
* The desired XG reverb parameters.
|
|
5806
5761
|
* - `"clear"` - all existing parameter change MIDI messages are removed.
|
|
@@ -5840,14 +5795,12 @@ interface ModifyMIDIOptions {
|
|
|
5840
5795
|
*/
|
|
5841
5796
|
fallbackReset?: MIDISystem;
|
|
5842
5797
|
}
|
|
5843
|
-
//#endregion
|
|
5844
|
-
//#region src/midi/types.d.ts
|
|
5845
5798
|
/**
|
|
5846
5799
|
* RMIDInfoData type represents metadata for an RMIDI file.
|
|
5847
5800
|
*
|
|
5848
5801
|
* @group MIDI.Sequence
|
|
5849
5802
|
*/
|
|
5850
|
-
interface RMIDInfoData {
|
|
5803
|
+
export interface RMIDInfoData {
|
|
5851
5804
|
/**
|
|
5852
5805
|
* The name of the song.
|
|
5853
5806
|
*/
|
|
@@ -5906,7 +5859,7 @@ interface RMIDInfoData {
|
|
|
5906
5859
|
/**
|
|
5907
5860
|
* @group MIDI.Sequence
|
|
5908
5861
|
*/
|
|
5909
|
-
interface TempoChange {
|
|
5862
|
+
export interface TempoChange {
|
|
5910
5863
|
/**
|
|
5911
5864
|
* MIDI ticks of the change, absolute value from the start of the MIDI file.
|
|
5912
5865
|
*/
|
|
@@ -5921,7 +5874,7 @@ interface TempoChange {
|
|
|
5921
5874
|
*
|
|
5922
5875
|
* @group MIDI.Sequence
|
|
5923
5876
|
*/
|
|
5924
|
-
interface MIDILoop {
|
|
5877
|
+
export interface MIDILoop {
|
|
5925
5878
|
/**
|
|
5926
5879
|
* Start of the loop, in MIDI ticks.
|
|
5927
5880
|
*/
|
|
@@ -5949,11 +5902,11 @@ interface MIDILoop {
|
|
|
5949
5902
|
*
|
|
5950
5903
|
* @group MIDI.Sequence
|
|
5951
5904
|
*/
|
|
5952
|
-
type MIDIFormat = 0 | 1 | 2;
|
|
5905
|
+
export type MIDIFormat = 0 | 1 | 2;
|
|
5953
5906
|
/**
|
|
5954
5907
|
* @group MIDI.Sequence
|
|
5955
5908
|
*/
|
|
5956
|
-
interface NoteTime {
|
|
5909
|
+
export interface NoteTime {
|
|
5957
5910
|
/**
|
|
5958
5911
|
* The MIDI note number.
|
|
5959
5912
|
*/
|
|
@@ -5976,7 +5929,7 @@ interface NoteTime {
|
|
|
5976
5929
|
*
|
|
5977
5930
|
* @group MIDI.Files
|
|
5978
5931
|
*/
|
|
5979
|
-
interface RMIDIWriteOptions {
|
|
5932
|
+
export interface RMIDIWriteOptions {
|
|
5980
5933
|
/**
|
|
5981
5934
|
* The bank offset to apply to the file. Defaults to `0`.
|
|
5982
5935
|
* [See this for more info](https://github.com/spessasus/sf2-rmidi-specification#dbnk-chunk)
|
|
@@ -6010,11 +5963,11 @@ interface RMIDIWriteOptions {
|
|
|
6010
5963
|
*
|
|
6011
5964
|
* @group Utilities.FourCC
|
|
6012
5965
|
*/
|
|
6013
|
-
type RMIDInfoFourCC = "INAM" | "IPRD" | "IALB" | "IART" | "IGNR" | "IPIC" | "ICOP" | "ICRD" | "ICRT" | "ICMT" | "IENG" | "ISFT" | "ISBJ" | "IENC" | "MENC" | "DBNK";
|
|
5966
|
+
export type RMIDInfoFourCC = "INAM" | "IPRD" | "IALB" | "IART" | "IGNR" | "IPIC" | "ICOP" | "ICRD" | "ICRT" | "ICMT" | "IENG" | "ISFT" | "ISBJ" | "IENC" | "MENC" | "DBNK";
|
|
6014
5967
|
/**
|
|
6015
5968
|
* @group MIDI.Sequence
|
|
6016
5969
|
*/
|
|
6017
|
-
interface TimelineEvent {
|
|
5970
|
+
export interface TimelineEvent {
|
|
6018
5971
|
/**
|
|
6019
5972
|
* The track number of this event.
|
|
6020
5973
|
*/
|
|
@@ -6029,13 +5982,13 @@ interface TimelineEvent {
|
|
|
6029
5982
|
*
|
|
6030
5983
|
* @group MIDI.Protocol
|
|
6031
5984
|
*/
|
|
6032
|
-
type SysExAcceptedArray = number[] | Uint8Array | Int8Array | Uint8ClampedArray;
|
|
5985
|
+
export type SysExAcceptedArray = number[] | Uint8Array | Int8Array | Uint8ClampedArray;
|
|
6033
5986
|
/**
|
|
6034
5987
|
* An interface that represents a virtual sound bank which can return a preset.
|
|
6035
5988
|
*
|
|
6036
5989
|
* @group Sound Banks
|
|
6037
5990
|
*/
|
|
6038
|
-
interface CallableSoundBank<T extends MIDIPatchFull> {
|
|
5991
|
+
export interface CallableSoundBank<T extends MIDIPatchFull> {
|
|
6039
5992
|
/**
|
|
6040
5993
|
* Returns the matching {@link BasicPreset} instance.
|
|
6041
5994
|
* This uses the {@link MIDIPatchTools.selectPatch} algorithm for selecting the optimal preset.
|
|
@@ -6050,7 +6003,7 @@ interface CallableSoundBank<T extends MIDIPatchFull> {
|
|
|
6050
6003
|
*
|
|
6051
6004
|
* @group Synthesizer.Drum Sets
|
|
6052
6005
|
*/
|
|
6053
|
-
interface DrumParameter {
|
|
6006
|
+
export interface DrumParameter {
|
|
6054
6007
|
/**
|
|
6055
6008
|
* Pitch offset in semitones. Relative value.
|
|
6056
6009
|
* May be floating point! (GS half-semitone coarse tune resolution)
|
|
@@ -6105,7 +6058,7 @@ interface DrumParameter {
|
|
|
6105
6058
|
*
|
|
6106
6059
|
* @group Synthesizer.Drum Sets
|
|
6107
6060
|
*/
|
|
6108
|
-
interface UserDrumSetParameter extends DrumParameter {
|
|
6061
|
+
export interface UserDrumSetParameter extends DrumParameter {
|
|
6109
6062
|
/**
|
|
6110
6063
|
* Pitch offset in GS steps (the PLAY NOTE NUMBER relative to 60). Relative value.
|
|
6111
6064
|
* A step is 50 cents, or 100 cents when `sourceDrumSet` is 1 (SC-55 map).
|
|
@@ -6125,8 +6078,6 @@ interface UserDrumSetParameter extends DrumParameter {
|
|
|
6125
6078
|
*/
|
|
6126
6079
|
sourceNoteNumber: number;
|
|
6127
6080
|
}
|
|
6128
|
-
//#endregion
|
|
6129
|
-
//#region src/utils/riff_chunk.d.ts
|
|
6130
6081
|
/**
|
|
6131
6082
|
* General RIFF (and RIFF64) Four Character Codes defined in the RIFF spec.
|
|
6132
6083
|
*
|
|
@@ -6145,9 +6096,7 @@ type WAVFourCC = "wave" | "cue " | "fmt ";
|
|
|
6145
6096
|
* @group Utilities.FourCC
|
|
6146
6097
|
*/
|
|
6147
6098
|
type FourCC = GenericRIFFFourCC | SF2InfoFourCC | SF2ChunkFourCC | DLSInfoFourCC | DLSChunkFourCC | RMIDInfoFourCC | WAVFourCC;
|
|
6148
|
-
|
|
6149
|
-
//#region src/utils/exports.d.ts
|
|
6150
|
-
declare const SpessaSynthCoreUtils: {
|
|
6099
|
+
export declare const SpessaSynthCoreUtils: {
|
|
6151
6100
|
ConsoleColors: {
|
|
6152
6101
|
warn: string;
|
|
6153
6102
|
unrecognized: string;
|
|
@@ -6162,14 +6111,12 @@ declare const SpessaSynthCoreUtils: {
|
|
|
6162
6111
|
readBinaryStringIndexed: typeof readBinaryStringIndexed;
|
|
6163
6112
|
readVariableLengthQuantity: typeof readVariableLengthQuantity;
|
|
6164
6113
|
};
|
|
6165
|
-
//#endregion
|
|
6166
|
-
//#region src/midi/midi_track.d.ts
|
|
6167
6114
|
/**
|
|
6168
6115
|
* This class represents a single MIDI track in a {@link BasicMIDI} sequence.
|
|
6169
6116
|
*
|
|
6170
6117
|
* @group MIDI.Sequence
|
|
6171
6118
|
*/
|
|
6172
|
-
declare class MIDITrack {
|
|
6119
|
+
export declare class MIDITrack {
|
|
6173
6120
|
/**
|
|
6174
6121
|
* The name of this track.
|
|
6175
6122
|
* Empty if the track has no name.
|
|
@@ -6216,8 +6163,6 @@ declare class MIDITrack {
|
|
|
6216
6163
|
*/
|
|
6217
6164
|
pushEvents(...events: MIDIMessage[]): void;
|
|
6218
6165
|
}
|
|
6219
|
-
//#endregion
|
|
6220
|
-
//#region src/midi/basic_midi.d.ts
|
|
6221
6166
|
/**
|
|
6222
6167
|
* BasicMIDI is the base of a complete MIDI file.
|
|
6223
6168
|
* It represents a single MIDI sequence, with an optional sound bank attached to it.
|
|
@@ -6226,7 +6171,7 @@ declare class MIDITrack {
|
|
|
6226
6171
|
*
|
|
6227
6172
|
* @group MIDI
|
|
6228
6173
|
*/
|
|
6229
|
-
declare class BasicMIDI {
|
|
6174
|
+
export declare class BasicMIDI {
|
|
6230
6175
|
/**
|
|
6231
6176
|
* The tracks in the sequence, represented as an array of {@link MIDITrack}.
|
|
6232
6177
|
*/
|
|
@@ -6702,14 +6647,12 @@ declare class BasicMIDI {
|
|
|
6702
6647
|
*/
|
|
6703
6648
|
protected parseInternal(): void;
|
|
6704
6649
|
}
|
|
6705
|
-
//#endregion
|
|
6706
|
-
//#region src/midi/midi_tools/midi_builder.d.ts
|
|
6707
6650
|
/**
|
|
6708
6651
|
* Options for initializing the MIDI Builder.
|
|
6709
6652
|
*
|
|
6710
6653
|
* @group MIDI.Files
|
|
6711
6654
|
*/
|
|
6712
|
-
interface MIDIBuilderOptions {
|
|
6655
|
+
export interface MIDIBuilderOptions {
|
|
6713
6656
|
/**
|
|
6714
6657
|
* The MIDI file's tick precision (how many ticks fit in a quarter note).
|
|
6715
6658
|
* Defaults to 480.
|
|
@@ -6746,7 +6689,7 @@ interface MIDIBuilderOptions {
|
|
|
6746
6689
|
*
|
|
6747
6690
|
* @group MIDI.Files
|
|
6748
6691
|
*/
|
|
6749
|
-
declare class MIDIBuilder extends BasicMIDI {
|
|
6692
|
+
export declare class MIDIBuilder extends BasicMIDI {
|
|
6750
6693
|
private encoder;
|
|
6751
6694
|
/**
|
|
6752
6695
|
* Creates a new MIDI file.
|
|
@@ -6861,14 +6804,12 @@ declare class MIDIBuilder extends BasicMIDI {
|
|
|
6861
6804
|
*/
|
|
6862
6805
|
nonRegisteredParameter(ticks: number, track: number, channel: number, parameter: number, value: number): void;
|
|
6863
6806
|
}
|
|
6864
|
-
//#endregion
|
|
6865
|
-
//#region src/midi/midi_tools/midi_utils.d.ts
|
|
6866
6807
|
/**
|
|
6867
6808
|
* This class contains useful utilities for manipulating and parsing System Exclusive and other MIDI 1.0 messages.
|
|
6868
6809
|
*
|
|
6869
6810
|
* @group MIDI.Protocol
|
|
6870
6811
|
*/
|
|
6871
|
-
declare class MIDIUtils {
|
|
6812
|
+
export declare class MIDIUtils {
|
|
6872
6813
|
private constructor();
|
|
6873
6814
|
/**
|
|
6874
6815
|
* Analyzes a MIDI System Exclusive message
|
|
@@ -6905,27 +6846,33 @@ declare class MIDIUtils {
|
|
|
6905
6846
|
/**
|
|
6906
6847
|
* Returns a MIDI event needed to set the given GS Reverb Parameter.
|
|
6907
6848
|
* @param ticks The MIDI tick time for the output event.
|
|
6908
|
-
* @param parameter The parameter to set.
|
|
6849
|
+
* @param parameter The parameter to set, or `"macro"` to select a reverb macro.
|
|
6909
6850
|
* @param value The value to set it to.
|
|
6910
6851
|
* @returns The {@link MIDIMessage} needed to set this GS Reverb Parameter.
|
|
6911
6852
|
*/
|
|
6912
|
-
static setGSReverbParameter<P extends
|
|
6853
|
+
static setGSReverbParameter<P extends GSReverbParameterMessage["parameter"]>(ticks: number, parameter: P, value: Extract<GSReverbParameterMessage, {
|
|
6854
|
+
parameter: P;
|
|
6855
|
+
}>["value"]): MIDIMessage;
|
|
6913
6856
|
/**
|
|
6914
6857
|
* Returns a MIDI event needed to set the given GS Chorus Parameter.
|
|
6915
6858
|
* @param ticks The MIDI tick time for the output event.
|
|
6916
|
-
* @param parameter The parameter to set.
|
|
6859
|
+
* @param parameter The parameter to set, or `"macro"` to select a chorus macro.
|
|
6917
6860
|
* @param value The value to set it to.
|
|
6918
6861
|
* @returns The {@link MIDIMessage} needed to set this GS Chorus Parameter.
|
|
6919
6862
|
*/
|
|
6920
|
-
static setGSChorusParameter<P extends
|
|
6863
|
+
static setGSChorusParameter<P extends GSChorusParameterMessage["parameter"]>(ticks: number, parameter: P, value: Extract<GSChorusParameterMessage, {
|
|
6864
|
+
parameter: P;
|
|
6865
|
+
}>["value"]): MIDIMessage;
|
|
6921
6866
|
/**
|
|
6922
6867
|
* Returns a MIDI event needed to set the given GS Delay Parameter.
|
|
6923
6868
|
* @param ticks The MIDI tick time for the output event.
|
|
6924
|
-
* @param parameter The parameter to set.
|
|
6869
|
+
* @param parameter The parameter to set, or `"macro"` to select a delay macro.
|
|
6925
6870
|
* @param value The value to set it to.
|
|
6926
6871
|
* @returns The {@link MIDIMessage} needed to set this GS Delay Parameter.
|
|
6927
6872
|
*/
|
|
6928
|
-
static setGSDelayParameter<P extends
|
|
6873
|
+
static setGSDelayParameter<P extends GSDelayParameterMessage["parameter"]>(ticks: number, parameter: P, value: Extract<GSDelayParameterMessage, {
|
|
6874
|
+
parameter: P;
|
|
6875
|
+
}>["value"]): MIDIMessage;
|
|
6929
6876
|
/**
|
|
6930
6877
|
* Returns a MIDI event needed to set the given GS Insertion Parameter.
|
|
6931
6878
|
* @param ticks The MIDI tick time for the output event.
|
|
@@ -6969,7 +6916,7 @@ declare class MIDIUtils {
|
|
|
6969
6916
|
* @param value The value to set it to.
|
|
6970
6917
|
* @returns The {@link MIDIMessage} needed to set this XG Variation Parameter.
|
|
6971
6918
|
*/
|
|
6972
|
-
static setXGVariationParameter(ticks: number, parameter:
|
|
6919
|
+
static setXGVariationParameter<P extends XGVariationParameterMessage["parameter"]>(ticks: number, parameter: P, value: P extends "connection" ? XGVariationConnection : number): MIDIMessage;
|
|
6973
6920
|
/**
|
|
6974
6921
|
* Returns a MIDI event needed to set the given XG Insertion Parameter (EFFECT 2).
|
|
6975
6922
|
* @param ticks The MIDI tick time for the output event.
|
|
@@ -6995,7 +6942,7 @@ declare class MIDIUtils {
|
|
|
6995
6942
|
/**
|
|
6996
6943
|
* Returns a list of MIDI events needed to set the given parameter.
|
|
6997
6944
|
* @param ticks The MIDI tick time for output events.
|
|
6998
|
-
* @param channel The channel number.
|
|
6945
|
+
* @param channel The channel number. Channels above 15 are wrapped to 0-15, so the port offset is ignored.
|
|
6999
6946
|
* @param system If the message has multiple ways of setting it,
|
|
7000
6947
|
* this selects the preferred way. Otherwise, it prefers Universal (GM).
|
|
7001
6948
|
* @param parameter The parameter to set.
|
|
@@ -7122,19 +7069,26 @@ declare class MIDIUtils {
|
|
|
7122
7069
|
* @returns The system exclusive MIDI message.
|
|
7123
7070
|
*/
|
|
7124
7071
|
static reset(ticks: number, system: MIDISystem): MIDIMessage;
|
|
7072
|
+
/**
|
|
7073
|
+
* Returns the GS or XG SysEx message that sets a part parameter of the given channel.
|
|
7074
|
+
* @param ticks The MIDI tick time for the output event.
|
|
7075
|
+
* @param channel The channel number (0-15).
|
|
7076
|
+
* @param system The system to prepare the message for. Any value other than `xg` will result in a GS-style message.
|
|
7077
|
+
* @param parameter The parameter to set.
|
|
7078
|
+
* @param data The 7-bit data byte.
|
|
7079
|
+
*/
|
|
7080
|
+
private static partParamMessage;
|
|
7125
7081
|
private static analyzeGM;
|
|
7126
7082
|
private static analyzeXG;
|
|
7127
7083
|
private static analyzeGS;
|
|
7128
7084
|
private static handleSingleUserDrum;
|
|
7129
7085
|
}
|
|
7130
|
-
//#endregion
|
|
7131
|
-
//#region src/midi/drum_parameters.d.ts
|
|
7132
7086
|
/**
|
|
7133
7087
|
* This class contains various utilities for manipulating {@link DrumParameter}s.
|
|
7134
7088
|
*
|
|
7135
7089
|
* @group Synthesizer.Drum Sets
|
|
7136
7090
|
*/
|
|
7137
|
-
declare class DrumParameterUtils {
|
|
7091
|
+
export declare class DrumParameterUtils {
|
|
7138
7092
|
/**
|
|
7139
7093
|
* Default drum parameter data.
|
|
7140
7094
|
*/
|
|
@@ -7168,8 +7122,6 @@ declare class DrumParameterUtils {
|
|
|
7168
7122
|
*/
|
|
7169
7123
|
static copyIntoUser(source: UserDrumSetParameter, dest: UserDrumSetParameter): void;
|
|
7170
7124
|
}
|
|
7171
|
-
//#endregion
|
|
7172
|
-
//#region src/sequencer/types.d.ts
|
|
7173
7125
|
/**
|
|
7174
7126
|
* {@link SequencerEvent} represents an event that {@link SpessaSynthSequencer} emits.
|
|
7175
7127
|
*
|
|
@@ -7177,7 +7129,7 @@ declare class DrumParameterUtils {
|
|
|
7177
7129
|
*
|
|
7178
7130
|
* @group Sequencer
|
|
7179
7131
|
*/
|
|
7180
|
-
interface SequencerEvent {
|
|
7132
|
+
export interface SequencerEvent {
|
|
7181
7133
|
/**
|
|
7182
7134
|
* This event is called when a MIDI message is sent and {@link SpessaSynthSequencer.externalMIDIPlayback `externalMIDIPlayback`} is true.
|
|
7183
7135
|
*/
|
|
@@ -7261,18 +7213,16 @@ interface SequencerEvent {
|
|
|
7261
7213
|
*
|
|
7262
7214
|
* @group Sequencer
|
|
7263
7215
|
*/
|
|
7264
|
-
type SequencerEventCallback = { [K in keyof SequencerEvent]: {
|
|
7216
|
+
export type SequencerEventCallback = { [K in keyof SequencerEvent]: {
|
|
7265
7217
|
type: K;
|
|
7266
7218
|
data: SequencerEvent[K];
|
|
7267
|
-
} }[keyof SequencerEvent];
|
|
7268
|
-
//#endregion
|
|
7269
|
-
//#region src/sequencer/sequencer.d.ts
|
|
7219
|
+
}; }[keyof SequencerEvent];
|
|
7270
7220
|
/**
|
|
7271
7221
|
* This module is responsible for playing back {@link BasicMIDI} sequences to {@link SpessaSynthProcessor}.
|
|
7272
7222
|
*
|
|
7273
7223
|
* @group Sequencer
|
|
7274
7224
|
*/
|
|
7275
|
-
declare class SpessaSynthSequencer {
|
|
7225
|
+
export declare class SpessaSynthSequencer {
|
|
7276
7226
|
/**
|
|
7277
7227
|
* Sequencer's current song list.
|
|
7278
7228
|
*/
|
|
@@ -7436,14 +7386,12 @@ declare class SpessaSynthSequencer {
|
|
|
7436
7386
|
*/
|
|
7437
7387
|
loadNewSongList(midiBuffers: BasicMIDI[]): void;
|
|
7438
7388
|
}
|
|
7439
|
-
//#endregion
|
|
7440
|
-
//#region src/synthesizer/audio_engine/effects/gs/implementation/reverb.d.ts
|
|
7441
7389
|
/**
|
|
7442
7390
|
* The default GS Reverb implementation for {@link SpessaSynthProcessor}.
|
|
7443
7391
|
*
|
|
7444
7392
|
* @group Synthesizer.GS Effects
|
|
7445
7393
|
*/
|
|
7446
|
-
declare class DefaultGSReverb implements GSReverbProcessor {
|
|
7394
|
+
export declare class DefaultGSReverb implements GSReverbProcessor {
|
|
7447
7395
|
/**
|
|
7448
7396
|
* Dattorro reverb processor.
|
|
7449
7397
|
* @private
|
|
@@ -7559,19 +7507,18 @@ declare class DefaultGSReverb implements GSReverbProcessor {
|
|
|
7559
7507
|
*/
|
|
7560
7508
|
process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
|
|
7561
7509
|
getSnapshot(): GSReverbParameter;
|
|
7510
|
+
applySnapshot(snapshot: GSReverbParameter): void;
|
|
7562
7511
|
private updateFeedback;
|
|
7563
7512
|
private updateLowpass;
|
|
7564
7513
|
private updateGain;
|
|
7565
7514
|
private updateTime;
|
|
7566
7515
|
}
|
|
7567
|
-
//#endregion
|
|
7568
|
-
//#region src/synthesizer/audio_engine/effects/gs/implementation/chorus.d.ts
|
|
7569
7516
|
/**
|
|
7570
7517
|
* The default GS Chorus implementation for {@link SpessaSynthProcessor}.
|
|
7571
7518
|
*
|
|
7572
7519
|
* @group Synthesizer.GS Effects
|
|
7573
7520
|
*/
|
|
7574
|
-
declare class DefaultGSChorus implements GSChorusProcessor {
|
|
7521
|
+
export declare class DefaultGSChorus implements GSChorusProcessor {
|
|
7575
7522
|
/**
|
|
7576
7523
|
* Cutoff frequency
|
|
7577
7524
|
* @private
|
|
@@ -7632,15 +7579,14 @@ declare class DefaultGSChorus implements GSChorusProcessor {
|
|
|
7632
7579
|
set level(value: number);
|
|
7633
7580
|
process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
|
|
7634
7581
|
getSnapshot(): GSChorusParameter;
|
|
7582
|
+
applySnapshot(snapshot: GSChorusParameter): void;
|
|
7635
7583
|
}
|
|
7636
|
-
//#endregion
|
|
7637
|
-
//#region src/synthesizer/audio_engine/effects/gs/implementation/delay.d.ts
|
|
7638
7584
|
/**
|
|
7639
7585
|
* The default GS Delay implementation for {@link SpessaSynthProcessor}.
|
|
7640
7586
|
*
|
|
7641
7587
|
* @group Synthesizer.GS Effects
|
|
7642
7588
|
*/
|
|
7643
|
-
declare class DefaultGSDelay implements GSDelayProcessor {
|
|
7589
|
+
export declare class DefaultGSDelay implements GSDelayProcessor {
|
|
7644
7590
|
/**
|
|
7645
7591
|
* Cutoff frequency
|
|
7646
7592
|
* @private
|
|
@@ -7728,65 +7674,115 @@ declare class DefaultGSDelay implements GSDelayProcessor {
|
|
|
7728
7674
|
*/
|
|
7729
7675
|
process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, startIndex: number, sampleCount: number): void;
|
|
7730
7676
|
getSnapshot(): GSDelayParameter;
|
|
7677
|
+
applySnapshot(snapshot: GSDelayParameter): void;
|
|
7731
7678
|
private updateDelayTimes;
|
|
7732
7679
|
private updateGain;
|
|
7733
7680
|
}
|
|
7734
|
-
|
|
7735
|
-
|
|
7681
|
+
/**
|
|
7682
|
+
* The default implementation for {@link GSInsertionBlock}.
|
|
7683
|
+
*
|
|
7684
|
+
* @group Synthesizer.GS Effects
|
|
7685
|
+
* @sealed
|
|
7686
|
+
*/
|
|
7687
|
+
export declare class DefaultGSInsertion implements GSInsertionBlock {
|
|
7688
|
+
sendLevelToReverb: number;
|
|
7689
|
+
sendLevelToChorus: number;
|
|
7690
|
+
sendLevelToDelay: number;
|
|
7691
|
+
/**
|
|
7692
|
+
* The list of effects available in this block.
|
|
7693
|
+
* Effect type: processor.
|
|
7694
|
+
*/
|
|
7695
|
+
private readonly effectMap;
|
|
7696
|
+
/**
|
|
7697
|
+
* The processor used when the requested type is not available.
|
|
7698
|
+
*/
|
|
7699
|
+
private readonly fallbackProcessor;
|
|
7700
|
+
/**
|
|
7701
|
+
* The currently used processor.
|
|
7702
|
+
*/
|
|
7703
|
+
private processor;
|
|
7704
|
+
/**
|
|
7705
|
+
* The requested EFX type.
|
|
7706
|
+
*/
|
|
7707
|
+
private type;
|
|
7708
|
+
/**
|
|
7709
|
+
* The parameters set since the last type change.
|
|
7710
|
+
* 255 means the parameter uses the type default.
|
|
7711
|
+
*/
|
|
7712
|
+
private readonly params;
|
|
7713
|
+
/**
|
|
7714
|
+
* The left output of the processor.
|
|
7715
|
+
*/
|
|
7716
|
+
private readonly outputLeft;
|
|
7717
|
+
/**
|
|
7718
|
+
* The right output of the processor.
|
|
7719
|
+
*/
|
|
7720
|
+
private readonly outputRight;
|
|
7721
|
+
/**
|
|
7722
|
+
* Constructs a new default GS insertion block.
|
|
7723
|
+
* @param sampleRate The sample rate, in Hertz.
|
|
7724
|
+
* @param maxBufferSize The maximum buffer size the synthesizer can render at once.
|
|
7725
|
+
* Attempting to `.process()` more samples than this will result in an error.
|
|
7726
|
+
*/
|
|
7727
|
+
constructor(sampleRate: number, maxBufferSize: number);
|
|
7728
|
+
setType(type: number): void;
|
|
7729
|
+
getType(): number;
|
|
7730
|
+
reset(): void;
|
|
7731
|
+
setParameter(param: number, value: number): void;
|
|
7732
|
+
process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputChorus: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
|
|
7733
|
+
getSnapshot(): GSInsertionBlockSnapshot;
|
|
7734
|
+
applySnapshot(snapshot: GSInsertionBlockSnapshot): void;
|
|
7735
|
+
}
|
|
7736
7736
|
/**
|
|
7737
7737
|
* Synthesizer's default voice cap.
|
|
7738
7738
|
*
|
|
7739
7739
|
* @group Synthesizer.Constants
|
|
7740
7740
|
*/
|
|
7741
|
-
declare const VOICE_CAP = 350;
|
|
7741
|
+
export declare const VOICE_CAP = 350;
|
|
7742
7742
|
/**
|
|
7743
7743
|
* Default MIDI drum channel number, 0 based index.
|
|
7744
7744
|
*
|
|
7745
7745
|
* @group Synthesizer.Constants
|
|
7746
7746
|
*/
|
|
7747
|
-
declare const MIDI_DRUM_CHANNEL = 9;
|
|
7747
|
+
export declare const MIDI_DRUM_CHANNEL = 9;
|
|
7748
7748
|
/**
|
|
7749
7749
|
* Default bank select and SysEx mode.
|
|
7750
7750
|
*
|
|
7751
7751
|
* @group Synthesizer.Constants
|
|
7752
7752
|
*/
|
|
7753
|
-
declare const DEFAULT_SYNTH_MODE: MIDISystem;
|
|
7753
|
+
export declare const DEFAULT_SYNTH_MODE: MIDISystem;
|
|
7754
7754
|
/**
|
|
7755
7755
|
* This gain factor ensures that spessasynth doesn't stay too loud.
|
|
7756
7756
|
* You can set the `gain` system parameter to an inverse of it to negate the effect.
|
|
7757
7757
|
*
|
|
7758
7758
|
* @group Synthesizer.Constants
|
|
7759
7759
|
*/
|
|
7760
|
-
declare const SPESSASYNTH_GAIN_FACTOR = 0.6;
|
|
7760
|
+
export declare const SPESSASYNTH_GAIN_FACTOR = 0.6;
|
|
7761
7761
|
/**
|
|
7762
7762
|
* The default buffer size for the synthesizer.
|
|
7763
7763
|
*
|
|
7764
7764
|
* @group Synthesizer.Constants
|
|
7765
7765
|
*/
|
|
7766
|
-
declare const SPESSA_BUFSIZE = 128;
|
|
7767
|
-
//#endregion
|
|
7768
|
-
//#region src/synthesizer/audio_engine/channel/reset.d.ts
|
|
7766
|
+
export declare const SPESSA_BUFSIZE = 128;
|
|
7769
7767
|
/**
|
|
7770
7768
|
* An array with the default MIDI controller values.
|
|
7771
7769
|
* Note that these are 14-bit, requiring a 7-bit shift to the right for 7-bit values!
|
|
7772
7770
|
*
|
|
7773
7771
|
* @group Synthesizer.Constants
|
|
7774
7772
|
*/
|
|
7775
|
-
declare const DEFAULT_MIDI_CONTROLLERS: Readonly<Int16Array>;
|
|
7773
|
+
export declare const DEFAULT_MIDI_CONTROLLERS: Readonly<Int16Array>;
|
|
7776
7774
|
/**
|
|
7777
7775
|
* Default reverb level for each drum instrument.
|
|
7778
7776
|
*
|
|
7779
7777
|
* @group Synthesizer.Drum Sets
|
|
7780
7778
|
*/
|
|
7781
|
-
declare const DEFAULT_DRUM_REVERB: Int8Array<ArrayBuffer>;
|
|
7782
|
-
//#endregion
|
|
7783
|
-
//#region src/soundbank/sound_bank_loader.d.ts
|
|
7779
|
+
export declare const DEFAULT_DRUM_REVERB: Int8Array<ArrayBuffer>;
|
|
7784
7780
|
/**
|
|
7785
7781
|
* A helper class for loading sound bank files as {@link BasicSoundBank} instances.
|
|
7786
7782
|
*
|
|
7787
7783
|
* @group Sound Banks
|
|
7788
7784
|
*/
|
|
7789
|
-
declare class SoundBankLoader {
|
|
7785
|
+
export declare class SoundBankLoader {
|
|
7790
7786
|
/**
|
|
7791
7787
|
* Loads a sound bank from a file buffer.
|
|
7792
7788
|
* @param buffer The binary file buffer to load.
|
|
@@ -7794,6 +7790,5 @@ declare class SoundBankLoader {
|
|
|
7794
7790
|
*/
|
|
7795
7791
|
static fromArrayBuffer(buffer: ArrayBuffer): BasicSoundBank;
|
|
7796
7792
|
}
|
|
7797
|
-
|
|
7798
|
-
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 };
|
|
7793
|
+
export type { ChannelDrumModification, ChannelGenerators, ChannelMIDIParameter, ChannelModification, ChannelSnapshot, ChannelSystemParameter, ClearableParameter, FourCC, GenericRIFFFourCC, GlobalMIDIParameter, GlobalSystemParameter, MIDIController, MIDIMessageType, ModifyMIDIOptions, SynthesizerSnapshot, UserDrumModification, WAVFourCC };
|
|
7799
7794
|
//# sourceMappingURL=index.d.ts.map
|