spessasynth_lib 3.24.3 → 3.24.6
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/README.md +14 -4
- package/midi_parser/midi_loader.js +51 -28
- package/package.json +1 -2
- package/sequencer/sequencer.js +3 -3
- package/sequencer/worklet_sequencer/worklet_sequencer.js +6 -0
- package/synthetizer/synthetizer.js +8 -6
- package/synthetizer/worklet_processor.min.js +9 -9
- package/synthetizer/worklet_system/main_processor.js +9 -7
- package/synthetizer/worklet_system/worklet_methods/note_on.js +2 -1
- package/@types/external_midi/midi_handler.d.ts +0 -39
- package/@types/external_midi/web_midi_link.d.ts +0 -12
- package/@types/externals/stbvorbis_sync/stbvorbis_sync.min.d.ts +0 -1
- package/@types/index.d.ts +0 -44
- package/@types/midi_parser/basic_midi.d.ts +0 -36
- package/@types/midi_parser/midi_builder.d.ts +0 -68
- package/@types/midi_parser/midi_data.d.ts +0 -46
- package/@types/midi_parser/midi_editor.d.ts +0 -89
- package/@types/midi_parser/midi_loader.d.ts +0 -30
- package/@types/midi_parser/midi_message.d.ts +0 -155
- package/@types/midi_parser/midi_sequence.d.ts +0 -135
- package/@types/midi_parser/midi_writer.d.ts +0 -6
- package/@types/midi_parser/rmidi_writer.d.ts +0 -85
- package/@types/midi_parser/used_keys_loaded.d.ts +0 -10
- package/@types/sequencer/sequencer.d.ts +0 -277
- package/@types/sequencer/worklet_sequencer/sequencer_message.d.ts +0 -31
- package/@types/soundfont/basic_soundfont/basic_instrument.d.ts +0 -29
- package/@types/soundfont/basic_soundfont/basic_preset.d.ts +0 -86
- package/@types/soundfont/basic_soundfont/basic_sample.d.ts +0 -88
- package/@types/soundfont/basic_soundfont/basic_soundfont.d.ts +0 -102
- package/@types/soundfont/basic_soundfont/basic_zone.d.ts +0 -58
- package/@types/soundfont/basic_soundfont/basic_zones.d.ts +0 -22
- package/@types/soundfont/basic_soundfont/generator.d.ts +0 -102
- package/@types/soundfont/basic_soundfont/modulator.d.ts +0 -92
- package/@types/soundfont/basic_soundfont/riff_chunk.d.ts +0 -45
- package/@types/soundfont/basic_soundfont/write_dls/art2.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_dls/articulator.d.ts +0 -28
- package/@types/soundfont/basic_soundfont/write_dls/combine_zones.d.ts +0 -8
- package/@types/soundfont/basic_soundfont/write_dls/ins.d.ts +0 -7
- package/@types/soundfont/basic_soundfont/write_dls/lins.d.ts +0 -5
- package/@types/soundfont/basic_soundfont/write_dls/modulator_converter.d.ts +0 -11
- package/@types/soundfont/basic_soundfont/write_dls/rgn2.d.ts +0 -8
- package/@types/soundfont/basic_soundfont/write_dls/wave.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_dls/write_dls.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_dls/wsmp.d.ts +0 -12
- package/@types/soundfont/basic_soundfont/write_dls/wvpl.d.ts +0 -8
- package/@types/soundfont/basic_soundfont/write_sf2/ibag.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/igen.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/imod.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/inst.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/pbag.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/pgen.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/phdr.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/pmod.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/sdta.d.ts +0 -11
- package/@types/soundfont/basic_soundfont/write_sf2/shdr.d.ts +0 -8
- package/@types/soundfont/basic_soundfont/write_sf2/soundfont_trimmer.d.ts +0 -6
- package/@types/soundfont/basic_soundfont/write_sf2/write.d.ts +0 -21
- package/@types/soundfont/dls/articulator_converter.d.ts +0 -19
- package/@types/soundfont/dls/dls_destinations.d.ts +0 -29
- package/@types/soundfont/dls/dls_preset.d.ts +0 -13
- package/@types/soundfont/dls/dls_sample.d.ts +0 -19
- package/@types/soundfont/dls/dls_soundfont.d.ts +0 -31
- package/@types/soundfont/dls/dls_sources.d.ts +0 -27
- package/@types/soundfont/dls/dls_zone.d.ts +0 -23
- package/@types/soundfont/dls/read_articulation.d.ts +0 -12
- package/@types/soundfont/dls/read_instrument.d.ts +0 -5
- package/@types/soundfont/dls/read_instrument_list.d.ts +0 -5
- package/@types/soundfont/dls/read_lart.d.ts +0 -7
- package/@types/soundfont/dls/read_region.d.ts +0 -7
- package/@types/soundfont/dls/read_samples.d.ts +0 -5
- package/@types/soundfont/load_soundfont.d.ts +0 -6
- package/@types/soundfont/read_sf2/generators.d.ts +0 -16
- package/@types/soundfont/read_sf2/instruments.d.ts +0 -29
- package/@types/soundfont/read_sf2/modulators.d.ts +0 -15
- package/@types/soundfont/read_sf2/presets.d.ts +0 -30
- package/@types/soundfont/read_sf2/samples.d.ts +0 -55
- package/@types/soundfont/read_sf2/soundfont.d.ts +0 -28
- package/@types/soundfont/read_sf2/zones.d.ts +0 -99
- package/@types/synthetizer/audio_effects/effects_config.d.ts +0 -41
- package/@types/synthetizer/audio_effects/fancy_chorus.d.ts +0 -97
- package/@types/synthetizer/audio_effects/reverb.d.ts +0 -7
- package/@types/synthetizer/key_modifier_manager.d.ts +0 -56
- package/@types/synthetizer/synth_event_handler.d.ts +0 -263
- package/@types/synthetizer/synth_soundfont_manager.d.ts +0 -52
- package/@types/synthetizer/synthetizer.d.ts +0 -358
- package/@types/synthetizer/worklet_system/message_protocol/worklet_message.d.ts +0 -98
- package/@types/synthetizer/worklet_system/worklet_methods/worklet_key_modifier.d.ts +0 -77
- package/@types/synthetizer/worklet_system/worklet_methods/worklet_soundfont_manager/sfman_message.d.ts +0 -7
- package/@types/synthetizer/worklet_system/worklet_utilities/controller_tables.d.ts +0 -23
- package/@types/synthetizer/worklet_system/worklet_utilities/worklet_processor_channel.d.ts +0 -155
- package/@types/synthetizer/worklet_url.d.ts +0 -5
- package/@types/utils/buffer_to_wav.d.ts +0 -31
- package/@types/utils/byte_functions/big_endian.d.ts +0 -13
- package/@types/utils/byte_functions/little_endian.d.ts +0 -35
- package/@types/utils/byte_functions/string.d.ts +0 -27
- package/@types/utils/byte_functions/variable_length_quantity.d.ts +0 -12
- package/@types/utils/indexed_array.d.ts +0 -21
- package/@types/utils/loggin.d.ts +0 -26
- package/@types/utils/other.d.ts +0 -37
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export class BasicSample {
|
|
2
|
-
/**
|
|
3
|
-
* The basic representation of a soundfont sample
|
|
4
|
-
* @param sampleName {string} The sample's name
|
|
5
|
-
* @param sampleRate {number} The sample's rate in Hz
|
|
6
|
-
* @param samplePitch {number} The sample's pitch as a MIDI note number
|
|
7
|
-
* @param samplePitchCorrection {number} The sample's pitch correction in cents
|
|
8
|
-
* @param sampleLink {number} The sample's link, currently unused
|
|
9
|
-
* @param sampleType {number} The sample's type, an enum
|
|
10
|
-
* @param loopStart {number} The sample's loop start relative to the sample start in sample points
|
|
11
|
-
* @param loopEnd {number} The sample's loop end relative to the sample start in sample points
|
|
12
|
-
*/
|
|
13
|
-
constructor(sampleName: string, sampleRate: number, samplePitch: number, samplePitchCorrection: number, sampleLink: number, sampleType: number, loopStart: number, loopEnd: number);
|
|
14
|
-
/**
|
|
15
|
-
* Sample's name
|
|
16
|
-
* @type {string}
|
|
17
|
-
*/
|
|
18
|
-
sampleName: string;
|
|
19
|
-
/**
|
|
20
|
-
* Sample rate in Hz
|
|
21
|
-
* @type {number}
|
|
22
|
-
*/
|
|
23
|
-
sampleRate: number;
|
|
24
|
-
/**
|
|
25
|
-
* Original pitch of the sample as a MIDI note number
|
|
26
|
-
* @type {number}
|
|
27
|
-
*/
|
|
28
|
-
samplePitch: number;
|
|
29
|
-
/**
|
|
30
|
-
* Pitch correction, in cents. Can be negative
|
|
31
|
-
* @type {number}
|
|
32
|
-
*/
|
|
33
|
-
samplePitchCorrection: number;
|
|
34
|
-
/**
|
|
35
|
-
* Sample link, currently unused.
|
|
36
|
-
* @type {number}
|
|
37
|
-
*/
|
|
38
|
-
sampleLink: number;
|
|
39
|
-
/**
|
|
40
|
-
* Type of the sample, an enum
|
|
41
|
-
* @type {number}
|
|
42
|
-
*/
|
|
43
|
-
sampleType: number;
|
|
44
|
-
/**
|
|
45
|
-
* Relative to start of the sample in sample points
|
|
46
|
-
* @type {number}
|
|
47
|
-
*/
|
|
48
|
-
sampleLoopStartIndex: number;
|
|
49
|
-
/**
|
|
50
|
-
* Relative to start of the sample in sample points
|
|
51
|
-
* @type {number}
|
|
52
|
-
*/
|
|
53
|
-
sampleLoopEndIndex: number;
|
|
54
|
-
/**
|
|
55
|
-
* Indicates if the sample is compressed
|
|
56
|
-
* @type {boolean}
|
|
57
|
-
*/
|
|
58
|
-
isCompressed: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* The compressed sample data if it was compressed by spessasynth
|
|
61
|
-
* @type {Uint8Array}
|
|
62
|
-
*/
|
|
63
|
-
compressedData: Uint8Array;
|
|
64
|
-
/**
|
|
65
|
-
* The sample's use count
|
|
66
|
-
* @type {number}
|
|
67
|
-
*/
|
|
68
|
-
useCount: number;
|
|
69
|
-
/**
|
|
70
|
-
* The sample's audio data
|
|
71
|
-
* @type {Float32Array}
|
|
72
|
-
*/
|
|
73
|
-
sampleData: Float32Array;
|
|
74
|
-
/**
|
|
75
|
-
* @returns {Uint8Array|IndexedByteArray}
|
|
76
|
-
*/
|
|
77
|
-
getRawData(): Uint8Array | IndexedByteArray;
|
|
78
|
-
resampleData(newSampleRate: any): void;
|
|
79
|
-
/**
|
|
80
|
-
* @param quality {number}
|
|
81
|
-
* @param encodeVorbis {EncodeVorbisFunction}
|
|
82
|
-
*/
|
|
83
|
-
compressSample(quality: number, encodeVorbis: EncodeVorbisFunction): void;
|
|
84
|
-
/**
|
|
85
|
-
* @returns {Float32Array}
|
|
86
|
-
*/
|
|
87
|
-
getAudioData(): Float32Array;
|
|
88
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
export class BasicSoundFont {
|
|
2
|
-
/**
|
|
3
|
-
* Merges soundfonts with the given order. Keep in mind that the info read is copied from the first one
|
|
4
|
-
* @param soundfonts {...BasicSoundFont} the soundfonts to merge, the first overwrites the last
|
|
5
|
-
* @returns {BasicSoundFont}
|
|
6
|
-
*/
|
|
7
|
-
static mergeSoundfonts(...soundfonts: BasicSoundFont[]): BasicSoundFont;
|
|
8
|
-
/**
|
|
9
|
-
* Creates a simple soundfont with one saw wave preset.
|
|
10
|
-
* @returns {ArrayBufferLike}
|
|
11
|
-
*/
|
|
12
|
-
static getDummySoundfontFile(): ArrayBufferLike;
|
|
13
|
-
/**
|
|
14
|
-
* Creates a new basic soundfont template
|
|
15
|
-
* @param data {undefined|{presets: BasicPreset[], info: Object<string, string>}}
|
|
16
|
-
*/
|
|
17
|
-
constructor(data?: undefined | {
|
|
18
|
-
presets: BasicPreset[];
|
|
19
|
-
info: {
|
|
20
|
-
[x: string]: string;
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
/**
|
|
24
|
-
* Soundfont's info stored as name: value. ifil and iver are stored as string representation of float (e.g. 2.1)
|
|
25
|
-
* @type {Object<string, string|IndexedByteArray>}
|
|
26
|
-
*/
|
|
27
|
-
soundFontInfo: {
|
|
28
|
-
[x: string]: any;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* The soundfont's presets
|
|
32
|
-
* @type {BasicPreset[]}
|
|
33
|
-
*/
|
|
34
|
-
presets: BasicPreset[];
|
|
35
|
-
/**
|
|
36
|
-
* The soundfont's samples
|
|
37
|
-
* @type {BasicSample[]}
|
|
38
|
-
*/
|
|
39
|
-
samples: BasicSample[];
|
|
40
|
-
/**
|
|
41
|
-
* The soundfont's instruments
|
|
42
|
-
* @type {BasicInstrument[]}
|
|
43
|
-
*/
|
|
44
|
-
instruments: BasicInstrument[];
|
|
45
|
-
/**
|
|
46
|
-
* Soundfont's default modulatorss
|
|
47
|
-
* @type {Modulator[]}
|
|
48
|
-
*/
|
|
49
|
-
defaultModulators: Modulator[];
|
|
50
|
-
removeUnusedElements(): void;
|
|
51
|
-
/**
|
|
52
|
-
* @param instrument {BasicInstrument}
|
|
53
|
-
*/
|
|
54
|
-
deleteInstrument(instrument: BasicInstrument): void;
|
|
55
|
-
/**
|
|
56
|
-
* @param preset {BasicPreset}
|
|
57
|
-
*/
|
|
58
|
-
deletePreset(preset: BasicPreset): void;
|
|
59
|
-
/**
|
|
60
|
-
* @param sample {BasicSample}
|
|
61
|
-
*/
|
|
62
|
-
deleteSample(sample: BasicSample): void;
|
|
63
|
-
/**
|
|
64
|
-
* To avoid overlapping on multiple desfonts
|
|
65
|
-
* @param offset {number}
|
|
66
|
-
*/
|
|
67
|
-
setSampleIDOffset(offset: number): void;
|
|
68
|
-
/**
|
|
69
|
-
* Get the appropriate preset, undefined if not foun d
|
|
70
|
-
* @param bankNr {number}
|
|
71
|
-
* @param programNr {number}
|
|
72
|
-
* @param fallbackToProgram {boolean} if true, if no exact match is found, will use any bank with the given preset
|
|
73
|
-
* @return {BasicPreset}
|
|
74
|
-
*/
|
|
75
|
-
getPresetNoFallback(bankNr: number, programNr: number, fallbackToProgram?: boolean): BasicPreset;
|
|
76
|
-
/**
|
|
77
|
-
* Get the appropriate preset
|
|
78
|
-
* @param bankNr {number}
|
|
79
|
-
* @param programNr {number}
|
|
80
|
-
* @returns {BasicPreset}
|
|
81
|
-
*/
|
|
82
|
-
getPreset(bankNr: number, programNr: number): BasicPreset;
|
|
83
|
-
/**
|
|
84
|
-
* gets preset by name
|
|
85
|
-
* @param presetName {string}
|
|
86
|
-
* @returns {BasicPreset}
|
|
87
|
-
*/
|
|
88
|
-
getPresetByName(presetName: string): BasicPreset;
|
|
89
|
-
/**
|
|
90
|
-
* @param error {string}
|
|
91
|
-
*/
|
|
92
|
-
parsingError(error: string): void;
|
|
93
|
-
destroySoundfont(): void;
|
|
94
|
-
write: typeof write;
|
|
95
|
-
writeDLS: typeof writeDLS;
|
|
96
|
-
}
|
|
97
|
-
import { BasicPreset } from "./basic_preset.js";
|
|
98
|
-
import { BasicSample } from "./basic_sample.js";
|
|
99
|
-
import { BasicInstrument } from "./basic_instrument.js";
|
|
100
|
-
import { Modulator } from "./modulator.js";
|
|
101
|
-
import { write } from "./write_sf2/write.js";
|
|
102
|
-
import { writeDLS } from "./write_dls/write_dls.js";
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} SoundFontRange
|
|
3
|
-
* @property {number} min - the minimum midi note
|
|
4
|
-
* @property {number} max - the maximum midi note
|
|
5
|
-
*/
|
|
6
|
-
export class BasicZone {
|
|
7
|
-
/**
|
|
8
|
-
* The zone's velocity range
|
|
9
|
-
* min -1 means that it is a default value
|
|
10
|
-
* @type {SoundFontRange}
|
|
11
|
-
*/
|
|
12
|
-
velRange: SoundFontRange;
|
|
13
|
-
/**
|
|
14
|
-
* The zone's key range
|
|
15
|
-
* min -1 means that it is a default value
|
|
16
|
-
* @type {SoundFontRange}
|
|
17
|
-
*/
|
|
18
|
-
keyRange: SoundFontRange;
|
|
19
|
-
/**
|
|
20
|
-
* Indicates if the zone is global
|
|
21
|
-
* @type {boolean}
|
|
22
|
-
*/
|
|
23
|
-
isGlobal: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The zone's generators
|
|
26
|
-
* @type {Generator[]}
|
|
27
|
-
*/
|
|
28
|
-
generators: Generator[];
|
|
29
|
-
/**
|
|
30
|
-
* The zone's modulators
|
|
31
|
-
* @type {Modulator[]}
|
|
32
|
-
*/
|
|
33
|
-
modulators: Modulator[];
|
|
34
|
-
/**
|
|
35
|
-
* @returns {boolean}
|
|
36
|
-
*/
|
|
37
|
-
get hasKeyRange(): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* @returns {boolean}
|
|
40
|
-
*/
|
|
41
|
-
get hasVelRange(): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* @param generatorType {generatorTypes}
|
|
44
|
-
* @param notFoundValue {number}
|
|
45
|
-
* @returns {number}
|
|
46
|
-
*/
|
|
47
|
-
getGeneratorValue(generatorType: generatorTypes, notFoundValue: number): number;
|
|
48
|
-
}
|
|
49
|
-
export type SoundFontRange = {
|
|
50
|
-
/**
|
|
51
|
-
* - the minimum midi note
|
|
52
|
-
*/
|
|
53
|
-
min: number;
|
|
54
|
-
/**
|
|
55
|
-
* - the maximum midi note
|
|
56
|
-
*/
|
|
57
|
-
max: number;
|
|
58
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export class BasicInstrumentZone extends BasicZone {
|
|
2
|
-
/**
|
|
3
|
-
* Zone's sample. Undefined if global
|
|
4
|
-
* @type {BasicSample|undefined}
|
|
5
|
-
*/
|
|
6
|
-
sample: BasicSample | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* The zone's use count
|
|
9
|
-
* @type {number}
|
|
10
|
-
*/
|
|
11
|
-
useCount: number;
|
|
12
|
-
deleteZone(): void;
|
|
13
|
-
}
|
|
14
|
-
export class BasicPresetZone extends BasicZone {
|
|
15
|
-
/**
|
|
16
|
-
* Zone's instrument. Undefined if global
|
|
17
|
-
* @type {BasicInstrument|undefined}
|
|
18
|
-
*/
|
|
19
|
-
instrument: BasicInstrument | undefined;
|
|
20
|
-
deleteZone(): void;
|
|
21
|
-
}
|
|
22
|
-
import { BasicZone } from "./basic_zone.js";
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* generator.js
|
|
3
|
-
* purpose: contains enums for generators and their limis parses reads soundfont generators, sums them and applies limits
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @param generatorType {number}
|
|
7
|
-
* @param presetGens {Generator[]}
|
|
8
|
-
* @param instrumentGens {Generator[]}
|
|
9
|
-
*/
|
|
10
|
-
export function addAndClampGenerator(generatorType: number, presetGens: Generator[], instrumentGens: Generator[]): number;
|
|
11
|
-
export type generatorTypes = number;
|
|
12
|
-
export namespace generatorTypes {
|
|
13
|
-
let INVALID: number;
|
|
14
|
-
let startAddrsOffset: number;
|
|
15
|
-
let endAddrOffset: number;
|
|
16
|
-
let startloopAddrsOffset: number;
|
|
17
|
-
let endloopAddrsOffset: number;
|
|
18
|
-
let startAddrsCoarseOffset: number;
|
|
19
|
-
let modLfoToPitch: number;
|
|
20
|
-
let vibLfoToPitch: number;
|
|
21
|
-
let modEnvToPitch: number;
|
|
22
|
-
let initialFilterFc: number;
|
|
23
|
-
let initialFilterQ: number;
|
|
24
|
-
let modLfoToFilterFc: number;
|
|
25
|
-
let modEnvToFilterFc: number;
|
|
26
|
-
let endAddrsCoarseOffset: number;
|
|
27
|
-
let modLfoToVolume: number;
|
|
28
|
-
let unused1: number;
|
|
29
|
-
let chorusEffectsSend: number;
|
|
30
|
-
let reverbEffectsSend: number;
|
|
31
|
-
let pan: number;
|
|
32
|
-
let unused2: number;
|
|
33
|
-
let unused3: number;
|
|
34
|
-
let unused4: number;
|
|
35
|
-
let delayModLFO: number;
|
|
36
|
-
let freqModLFO: number;
|
|
37
|
-
let delayVibLFO: number;
|
|
38
|
-
let freqVibLFO: number;
|
|
39
|
-
let delayModEnv: number;
|
|
40
|
-
let attackModEnv: number;
|
|
41
|
-
let holdModEnv: number;
|
|
42
|
-
let decayModEnv: number;
|
|
43
|
-
let sustainModEnv: number;
|
|
44
|
-
let releaseModEnv: number;
|
|
45
|
-
let keyNumToModEnvHold: number;
|
|
46
|
-
let keyNumToModEnvDecay: number;
|
|
47
|
-
let delayVolEnv: number;
|
|
48
|
-
let attackVolEnv: number;
|
|
49
|
-
let holdVolEnv: number;
|
|
50
|
-
let decayVolEnv: number;
|
|
51
|
-
let sustainVolEnv: number;
|
|
52
|
-
let releaseVolEnv: number;
|
|
53
|
-
let keyNumToVolEnvHold: number;
|
|
54
|
-
let keyNumToVolEnvDecay: number;
|
|
55
|
-
let instrument: number;
|
|
56
|
-
let reserved1: number;
|
|
57
|
-
let keyRange: number;
|
|
58
|
-
let velRange: number;
|
|
59
|
-
let startloopAddrsCoarseOffset: number;
|
|
60
|
-
let keyNum: number;
|
|
61
|
-
let velocity: number;
|
|
62
|
-
let initialAttenuation: number;
|
|
63
|
-
let reserved2: number;
|
|
64
|
-
let endloopAddrsCoarseOffset: number;
|
|
65
|
-
let coarseTune: number;
|
|
66
|
-
let fineTune: number;
|
|
67
|
-
let sampleID: number;
|
|
68
|
-
let sampleModes: number;
|
|
69
|
-
let reserved3: number;
|
|
70
|
-
let scaleTuning: number;
|
|
71
|
-
let exclusiveClass: number;
|
|
72
|
-
let overridingRootKey: number;
|
|
73
|
-
let unused5: number;
|
|
74
|
-
let endOper: number;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @type {{min: number, max: number, def: number}[]}
|
|
78
|
-
*/
|
|
79
|
-
export const generatorLimits: {
|
|
80
|
-
min: number;
|
|
81
|
-
max: number;
|
|
82
|
-
def: number;
|
|
83
|
-
}[];
|
|
84
|
-
export class Generator {
|
|
85
|
-
/**
|
|
86
|
-
* Constructs a new generator
|
|
87
|
-
* @param type {generatorTypes|number}
|
|
88
|
-
* @param value {number}
|
|
89
|
-
* @param validate {boolean}
|
|
90
|
-
*/
|
|
91
|
-
constructor(type?: generatorTypes | number, value?: number, validate?: boolean);
|
|
92
|
-
/**
|
|
93
|
-
* The generator's enum number
|
|
94
|
-
* @type {generatorTypes|number}
|
|
95
|
-
*/
|
|
96
|
-
generatorType: generatorTypes | number;
|
|
97
|
-
/**
|
|
98
|
-
* The generator's 16-bit value
|
|
99
|
-
* @type {number}
|
|
100
|
-
*/
|
|
101
|
-
generatorValue: number;
|
|
102
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
export function getModSourceEnum(curveType: any, polarity: any, direction: any, isCC: any, index: any): number;
|
|
2
|
-
export namespace modulatorSources {
|
|
3
|
-
let noController: number;
|
|
4
|
-
let noteOnVelocity: number;
|
|
5
|
-
let noteOnKeyNum: number;
|
|
6
|
-
let polyPressure: number;
|
|
7
|
-
let channelPressure: number;
|
|
8
|
-
let pitchWheel: number;
|
|
9
|
-
let pitchWheelRange: number;
|
|
10
|
-
let link: number;
|
|
11
|
-
}
|
|
12
|
-
export namespace modulatorCurveTypes {
|
|
13
|
-
export let linear: number;
|
|
14
|
-
export let concave: number;
|
|
15
|
-
export let convex: number;
|
|
16
|
-
let _switch: number;
|
|
17
|
-
export { _switch as switch };
|
|
18
|
-
}
|
|
19
|
-
export class Modulator {
|
|
20
|
-
/**
|
|
21
|
-
* @param modulator {Modulator}
|
|
22
|
-
* @returns {Modulator}
|
|
23
|
-
*/
|
|
24
|
-
static copy(modulator: Modulator): Modulator;
|
|
25
|
-
/**
|
|
26
|
-
* @param mod1 {Modulator}
|
|
27
|
-
* @param mod2 {Modulator}
|
|
28
|
-
* @param checkAmount {boolean}
|
|
29
|
-
* @returns {boolean}
|
|
30
|
-
*/
|
|
31
|
-
static isIdentical(mod1: Modulator, mod2: Modulator, checkAmount?: boolean): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Creates a modulator
|
|
34
|
-
* @param params {{srcEnum: number, secSrcEnum: number, dest: generatorTypes, amt: number, transform: number}}
|
|
35
|
-
*/
|
|
36
|
-
constructor(params: {
|
|
37
|
-
srcEnum: number;
|
|
38
|
-
secSrcEnum: number;
|
|
39
|
-
dest: generatorTypes;
|
|
40
|
-
amt: number;
|
|
41
|
-
transform: number;
|
|
42
|
-
});
|
|
43
|
-
/**
|
|
44
|
-
* The current computed value of this modulator
|
|
45
|
-
* @type {number}
|
|
46
|
-
*/
|
|
47
|
-
currentValue: number;
|
|
48
|
-
sourceEnum: number;
|
|
49
|
-
/**
|
|
50
|
-
* @type {generatorTypes}
|
|
51
|
-
*/
|
|
52
|
-
modulatorDestination: generatorTypes;
|
|
53
|
-
secondarySourceEnum: number;
|
|
54
|
-
transformAmount: number;
|
|
55
|
-
transformType: number;
|
|
56
|
-
sourcePolarity: number;
|
|
57
|
-
sourceDirection: number;
|
|
58
|
-
sourceUsesCC: number;
|
|
59
|
-
sourceIndex: number;
|
|
60
|
-
sourceCurveType: number;
|
|
61
|
-
secSrcPolarity: number;
|
|
62
|
-
secSrcDirection: number;
|
|
63
|
-
secSrcUsesCC: number;
|
|
64
|
-
secSrcIndex: number;
|
|
65
|
-
secSrcCurveType: number;
|
|
66
|
-
/**
|
|
67
|
-
* Indicates if the given modulator is chorus or reverb effects modulator.
|
|
68
|
-
* This is done to simulate BASSMIDI effects behavior:
|
|
69
|
-
* - defaults to 1000 transform amount rather than 200
|
|
70
|
-
* - values can be changed, but anything above 200 is 1000
|
|
71
|
-
* (except for values above 1000, they are copied directly)
|
|
72
|
-
* - all values below are multiplied by 5 (200 * 5 = 1000)
|
|
73
|
-
* - still can be disabled if the soundfont has its own modulator curve
|
|
74
|
-
* - this fixes the very low amount of reverb by default and doesn't break soundfonts
|
|
75
|
-
* @type {boolean}
|
|
76
|
-
*/
|
|
77
|
-
isEffectModulator: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Sums transform and creates a NEW modulator
|
|
80
|
-
* @param modulator {Modulator}
|
|
81
|
-
* @returns {Modulator}
|
|
82
|
-
*/
|
|
83
|
-
sumTransform(modulator: Modulator): Modulator;
|
|
84
|
-
/**
|
|
85
|
-
* @returns {string}
|
|
86
|
-
*/
|
|
87
|
-
debugString(): string;
|
|
88
|
-
}
|
|
89
|
-
export const DEFAULT_ATTENUATION_MOD_AMOUNT: 960;
|
|
90
|
-
export const DEFAULT_ATTENUATION_MOD_CURVE_TYPE: number;
|
|
91
|
-
export const defaultModulators: Modulator[];
|
|
92
|
-
import { generatorTypes } from "./generator.js";
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param dataArray {IndexedByteArray}
|
|
3
|
-
* @param readData {boolean}
|
|
4
|
-
* @param forceShift {boolean}
|
|
5
|
-
* @returns {RiffChunk}
|
|
6
|
-
*/
|
|
7
|
-
export function readRIFFChunk(dataArray: IndexedByteArray, readData?: boolean, forceShift?: boolean): RiffChunk;
|
|
8
|
-
/**
|
|
9
|
-
* @param chunk {RiffChunk}
|
|
10
|
-
* @param prepend {IndexedByteArray}
|
|
11
|
-
* @returns {IndexedByteArray}
|
|
12
|
-
*/
|
|
13
|
-
export function writeRIFFChunk(chunk: RiffChunk, prepend?: IndexedByteArray): IndexedByteArray;
|
|
14
|
-
/**
|
|
15
|
-
* @param header {string}
|
|
16
|
-
* @param data {Uint8Array}
|
|
17
|
-
* @param addZeroByte {Boolean}
|
|
18
|
-
* @param isList {boolean}
|
|
19
|
-
* @returns {IndexedByteArray}
|
|
20
|
-
*/
|
|
21
|
-
export function writeRIFFOddSize(header: string, data: Uint8Array, addZeroByte?: boolean, isList?: boolean): IndexedByteArray;
|
|
22
|
-
/**
|
|
23
|
-
* @param collection {RiffChunk[]}
|
|
24
|
-
* @param type {string}
|
|
25
|
-
* @returns {RiffChunk|undefined}
|
|
26
|
-
*/
|
|
27
|
-
export function findRIFFListType(collection: RiffChunk[], type: string): RiffChunk | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* riff_chunk.js
|
|
30
|
-
* reads a riff read and stores it as a class
|
|
31
|
-
*/
|
|
32
|
-
export class RiffChunk {
|
|
33
|
-
/**
|
|
34
|
-
* Creates a new riff read
|
|
35
|
-
* @constructor
|
|
36
|
-
* @param header {string}
|
|
37
|
-
* @param size {number}
|
|
38
|
-
* @param data {IndexedByteArray}
|
|
39
|
-
*/
|
|
40
|
-
constructor(header: string, size: number, data: IndexedByteArray);
|
|
41
|
-
header: string;
|
|
42
|
-
size: number;
|
|
43
|
-
chunkData: IndexedByteArray;
|
|
44
|
-
}
|
|
45
|
-
import { IndexedByteArray } from "../../utils/indexed_array.js";
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export class Articulator {
|
|
2
|
-
constructor(source: any, control: any, destination: any, scale: any, transform: any);
|
|
3
|
-
/**
|
|
4
|
-
* @type {DLSSources}
|
|
5
|
-
*/
|
|
6
|
-
source: DLSSources;
|
|
7
|
-
/**
|
|
8
|
-
* @type {DLSSources}
|
|
9
|
-
*/
|
|
10
|
-
control: DLSSources;
|
|
11
|
-
/**
|
|
12
|
-
* @type {DLSDestinations}
|
|
13
|
-
*/
|
|
14
|
-
destination: DLSDestinations;
|
|
15
|
-
/**
|
|
16
|
-
* @type {number}
|
|
17
|
-
*/
|
|
18
|
-
scale: number;
|
|
19
|
-
/**
|
|
20
|
-
* @type {number}
|
|
21
|
-
*/
|
|
22
|
-
transform: number;
|
|
23
|
-
/**
|
|
24
|
-
* @returns {IndexedByteArray}
|
|
25
|
-
*/
|
|
26
|
-
writeArticulator(): IndexedByteArray;
|
|
27
|
-
}
|
|
28
|
-
import { IndexedByteArray } from "../../../utils/indexed_array.js";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Combines preset zones
|
|
3
|
-
* @param preset {BasicPreset}
|
|
4
|
-
* @param globalize {boolean}
|
|
5
|
-
* @returns {BasicInstrumentZone[]}
|
|
6
|
-
*/
|
|
7
|
-
export function combineZones(preset: BasicPreset, globalize?: boolean): BasicInstrumentZone[];
|
|
8
|
-
import { BasicInstrumentZone } from "../basic_zones.js";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param gen {Generator}
|
|
3
|
-
* @returns {Articulator|undefined}
|
|
4
|
-
*/
|
|
5
|
-
export function getDLSArticulatorFromSf2Generator(gen: Generator): Articulator | undefined;
|
|
6
|
-
/**
|
|
7
|
-
* @param mod {Modulator}
|
|
8
|
-
* @returns {Articulator|undefined}
|
|
9
|
-
*/
|
|
10
|
-
export function getDLSArticulatorFromSf2Modulator(mod: Modulator): Articulator | undefined;
|
|
11
|
-
import { Articulator } from "./articulator.js";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param zone {BasicInstrumentZone}
|
|
3
|
-
* @param globalZone {BasicInstrumentZone}
|
|
4
|
-
* @this {BasicSoundFont}
|
|
5
|
-
* @returns {IndexedByteArray}
|
|
6
|
-
*/
|
|
7
|
-
export function writeDLSRegion(this: BasicSoundFont, zone: BasicInstrumentZone, globalZone: BasicInstrumentZone): IndexedByteArray;
|
|
8
|
-
import { IndexedByteArray } from "../../../utils/indexed_array.js";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param sample {BasicSample}
|
|
3
|
-
* @param rootKey {number}
|
|
4
|
-
* @param tuning {number}
|
|
5
|
-
* @param attenuationCentibels {number} CENTIBELS, NO CORRECTION
|
|
6
|
-
* @param loopStart {number}
|
|
7
|
-
* @param loopEnd {number}
|
|
8
|
-
* @param loopingMode {number}
|
|
9
|
-
* @returns {IndexedByteArray}
|
|
10
|
-
*/
|
|
11
|
-
export function writeWavesample(sample: BasicSample, rootKey: number, tuning: number, attenuationCentibels: number, loopStart: number, loopEnd: number, loopingMode: number): IndexedByteArray;
|
|
12
|
-
import { IndexedByteArray } from "../../../utils/indexed_array.js";
|