spessasynth_lib 3.24.3 → 3.24.4

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.
Files changed (93) hide show
  1. package/package.json +1 -2
  2. package/sequencer/worklet_sequencer/worklet_sequencer.js +6 -0
  3. package/synthetizer/worklet_processor.min.js +6 -6
  4. package/@types/external_midi/midi_handler.d.ts +0 -39
  5. package/@types/external_midi/web_midi_link.d.ts +0 -12
  6. package/@types/externals/stbvorbis_sync/stbvorbis_sync.min.d.ts +0 -1
  7. package/@types/index.d.ts +0 -44
  8. package/@types/midi_parser/basic_midi.d.ts +0 -36
  9. package/@types/midi_parser/midi_builder.d.ts +0 -68
  10. package/@types/midi_parser/midi_data.d.ts +0 -46
  11. package/@types/midi_parser/midi_editor.d.ts +0 -89
  12. package/@types/midi_parser/midi_loader.d.ts +0 -30
  13. package/@types/midi_parser/midi_message.d.ts +0 -155
  14. package/@types/midi_parser/midi_sequence.d.ts +0 -135
  15. package/@types/midi_parser/midi_writer.d.ts +0 -6
  16. package/@types/midi_parser/rmidi_writer.d.ts +0 -85
  17. package/@types/midi_parser/used_keys_loaded.d.ts +0 -10
  18. package/@types/sequencer/sequencer.d.ts +0 -277
  19. package/@types/sequencer/worklet_sequencer/sequencer_message.d.ts +0 -31
  20. package/@types/soundfont/basic_soundfont/basic_instrument.d.ts +0 -29
  21. package/@types/soundfont/basic_soundfont/basic_preset.d.ts +0 -86
  22. package/@types/soundfont/basic_soundfont/basic_sample.d.ts +0 -88
  23. package/@types/soundfont/basic_soundfont/basic_soundfont.d.ts +0 -102
  24. package/@types/soundfont/basic_soundfont/basic_zone.d.ts +0 -58
  25. package/@types/soundfont/basic_soundfont/basic_zones.d.ts +0 -22
  26. package/@types/soundfont/basic_soundfont/generator.d.ts +0 -102
  27. package/@types/soundfont/basic_soundfont/modulator.d.ts +0 -92
  28. package/@types/soundfont/basic_soundfont/riff_chunk.d.ts +0 -45
  29. package/@types/soundfont/basic_soundfont/write_dls/art2.d.ts +0 -6
  30. package/@types/soundfont/basic_soundfont/write_dls/articulator.d.ts +0 -28
  31. package/@types/soundfont/basic_soundfont/write_dls/combine_zones.d.ts +0 -8
  32. package/@types/soundfont/basic_soundfont/write_dls/ins.d.ts +0 -7
  33. package/@types/soundfont/basic_soundfont/write_dls/lins.d.ts +0 -5
  34. package/@types/soundfont/basic_soundfont/write_dls/modulator_converter.d.ts +0 -11
  35. package/@types/soundfont/basic_soundfont/write_dls/rgn2.d.ts +0 -8
  36. package/@types/soundfont/basic_soundfont/write_dls/wave.d.ts +0 -6
  37. package/@types/soundfont/basic_soundfont/write_dls/write_dls.d.ts +0 -6
  38. package/@types/soundfont/basic_soundfont/write_dls/wsmp.d.ts +0 -12
  39. package/@types/soundfont/basic_soundfont/write_dls/wvpl.d.ts +0 -8
  40. package/@types/soundfont/basic_soundfont/write_sf2/ibag.d.ts +0 -6
  41. package/@types/soundfont/basic_soundfont/write_sf2/igen.d.ts +0 -6
  42. package/@types/soundfont/basic_soundfont/write_sf2/imod.d.ts +0 -6
  43. package/@types/soundfont/basic_soundfont/write_sf2/inst.d.ts +0 -6
  44. package/@types/soundfont/basic_soundfont/write_sf2/pbag.d.ts +0 -6
  45. package/@types/soundfont/basic_soundfont/write_sf2/pgen.d.ts +0 -6
  46. package/@types/soundfont/basic_soundfont/write_sf2/phdr.d.ts +0 -6
  47. package/@types/soundfont/basic_soundfont/write_sf2/pmod.d.ts +0 -6
  48. package/@types/soundfont/basic_soundfont/write_sf2/sdta.d.ts +0 -11
  49. package/@types/soundfont/basic_soundfont/write_sf2/shdr.d.ts +0 -8
  50. package/@types/soundfont/basic_soundfont/write_sf2/soundfont_trimmer.d.ts +0 -6
  51. package/@types/soundfont/basic_soundfont/write_sf2/write.d.ts +0 -21
  52. package/@types/soundfont/dls/articulator_converter.d.ts +0 -19
  53. package/@types/soundfont/dls/dls_destinations.d.ts +0 -29
  54. package/@types/soundfont/dls/dls_preset.d.ts +0 -13
  55. package/@types/soundfont/dls/dls_sample.d.ts +0 -19
  56. package/@types/soundfont/dls/dls_soundfont.d.ts +0 -31
  57. package/@types/soundfont/dls/dls_sources.d.ts +0 -27
  58. package/@types/soundfont/dls/dls_zone.d.ts +0 -23
  59. package/@types/soundfont/dls/read_articulation.d.ts +0 -12
  60. package/@types/soundfont/dls/read_instrument.d.ts +0 -5
  61. package/@types/soundfont/dls/read_instrument_list.d.ts +0 -5
  62. package/@types/soundfont/dls/read_lart.d.ts +0 -7
  63. package/@types/soundfont/dls/read_region.d.ts +0 -7
  64. package/@types/soundfont/dls/read_samples.d.ts +0 -5
  65. package/@types/soundfont/load_soundfont.d.ts +0 -6
  66. package/@types/soundfont/read_sf2/generators.d.ts +0 -16
  67. package/@types/soundfont/read_sf2/instruments.d.ts +0 -29
  68. package/@types/soundfont/read_sf2/modulators.d.ts +0 -15
  69. package/@types/soundfont/read_sf2/presets.d.ts +0 -30
  70. package/@types/soundfont/read_sf2/samples.d.ts +0 -55
  71. package/@types/soundfont/read_sf2/soundfont.d.ts +0 -28
  72. package/@types/soundfont/read_sf2/zones.d.ts +0 -99
  73. package/@types/synthetizer/audio_effects/effects_config.d.ts +0 -41
  74. package/@types/synthetizer/audio_effects/fancy_chorus.d.ts +0 -97
  75. package/@types/synthetizer/audio_effects/reverb.d.ts +0 -7
  76. package/@types/synthetizer/key_modifier_manager.d.ts +0 -56
  77. package/@types/synthetizer/synth_event_handler.d.ts +0 -263
  78. package/@types/synthetizer/synth_soundfont_manager.d.ts +0 -52
  79. package/@types/synthetizer/synthetizer.d.ts +0 -358
  80. package/@types/synthetizer/worklet_system/message_protocol/worklet_message.d.ts +0 -98
  81. package/@types/synthetizer/worklet_system/worklet_methods/worklet_key_modifier.d.ts +0 -77
  82. package/@types/synthetizer/worklet_system/worklet_methods/worklet_soundfont_manager/sfman_message.d.ts +0 -7
  83. package/@types/synthetizer/worklet_system/worklet_utilities/controller_tables.d.ts +0 -23
  84. package/@types/synthetizer/worklet_system/worklet_utilities/worklet_processor_channel.d.ts +0 -155
  85. package/@types/synthetizer/worklet_url.d.ts +0 -5
  86. package/@types/utils/buffer_to_wav.d.ts +0 -31
  87. package/@types/utils/byte_functions/big_endian.d.ts +0 -13
  88. package/@types/utils/byte_functions/little_endian.d.ts +0 -35
  89. package/@types/utils/byte_functions/string.d.ts +0 -27
  90. package/@types/utils/byte_functions/variable_length_quantity.d.ts +0 -12
  91. package/@types/utils/indexed_array.d.ts +0 -21
  92. package/@types/utils/loggin.d.ts +0 -26
  93. package/@types/utils/other.d.ts +0 -37
@@ -1,31 +0,0 @@
1
- export class DLSSoundFont extends BasicSoundFont {
2
- /**
3
- * Loads a new DLS (Downloadable sounds) soundfont
4
- * @param buffer {ArrayBuffer}
5
- */
6
- constructor(buffer: ArrayBuffer);
7
- dataArray: IndexedByteArray;
8
- instrumentAmount: number;
9
- /**
10
- * @param chunk {RiffChunk}
11
- * @param expected {string}
12
- */
13
- verifyHeader(chunk: RiffChunk, expected: string): void;
14
- /**
15
- * @param text {string}
16
- * @param expected {string}
17
- */
18
- verifyText(text: string, expected: string): void;
19
- readDLSInstrumentList: typeof readDLSInstrumentList;
20
- readDLSInstrument: typeof readDLSInstrument;
21
- readRegion: typeof readRegion;
22
- readLart: typeof readLart;
23
- readDLSSamples: typeof readDLSSamples;
24
- }
25
- import { BasicSoundFont } from "../basic_soundfont/basic_soundfont.js";
26
- import { IndexedByteArray } from "../../utils/indexed_array.js";
27
- import { readDLSInstrumentList } from "./read_instrument_list.js";
28
- import { readDLSInstrument } from "./read_instrument.js";
29
- import { readRegion } from "./read_region.js";
30
- import { readLart } from "./read_lart.js";
31
- import { readDLSSamples } from "./read_samples.js";
@@ -1,27 +0,0 @@
1
- export type DLSSources = number;
2
- export namespace DLSSources {
3
- let none: number;
4
- let modLfo: number;
5
- let velocity: number;
6
- let keyNum: number;
7
- let volEnv: number;
8
- let modEnv: number;
9
- let pitchWheel: number;
10
- let polyPressure: number;
11
- let channelPressure: number;
12
- let vibratoLfo: number;
13
- let modulationWheel: number;
14
- let volume: number;
15
- let pan: number;
16
- let expression: number;
17
- let chorus: number;
18
- let reverb: number;
19
- let pitchWheelRange: number;
20
- let fineTune: number;
21
- let coarseTune: number;
22
- }
23
- export const DEFAULT_DLS_REVERB: Modulator;
24
- export const DEFAULT_DLS_CHORUS: Modulator;
25
- export const DLS_1_NO_VIBRATO_MOD: Modulator;
26
- export const DLS_1_NO_VIBRATO_PRESSURE: Modulator;
27
- import { Modulator } from "../basic_soundfont/modulator.js";
@@ -1,23 +0,0 @@
1
- export class DLSZone extends BasicInstrumentZone {
2
- /**
3
- * @param keyRange {SoundFontRange}
4
- * @param velRange {SoundFontRange}
5
- */
6
- constructor(keyRange: SoundFontRange, velRange: SoundFontRange);
7
- keyRange: SoundFontRange;
8
- velRange: SoundFontRange;
9
- /**
10
- * @param attenuationCb {number} with EMU correction
11
- * @param loopingMode {number} the sfont one
12
- * @param loop {{start: number, end: number}}
13
- * @param sampleKey {number}
14
- * @param sample {BasicSample}
15
- * @param sampleID {number}
16
- * @param samplePitchCorrection {number} cents
17
- */
18
- setWavesample(attenuationCb: number, loopingMode: number, loop: {
19
- start: number;
20
- end: number;
21
- }, sampleKey: number, sample: BasicSample, sampleID: number, samplePitchCorrection: number): void;
22
- }
23
- import { BasicInstrumentZone } from "../basic_soundfont/basic_zones.js";
@@ -1,12 +0,0 @@
1
- /**
2
- * Reads the articulator chunk
3
- * @param chunk {RiffChunk}
4
- * @param disableVibrato {boolean} it seems that dls 1 does not have vibrato lfo, so we shall disable it
5
- * @returns {{modulators: Modulator[], generators: Generator[]}}
6
- */
7
- export function readArticulation(chunk: RiffChunk, disableVibrato: boolean): {
8
- modulators: Modulator[];
9
- generators: Generator[];
10
- };
11
- import { Modulator } from "../basic_soundfont/modulator.js";
12
- import { Generator } from "../basic_soundfont/generator.js";
@@ -1,5 +0,0 @@
1
- /**
2
- * @this {DLSSoundFont}
3
- * @param chunk {RiffChunk}
4
- */
5
- export function readDLSInstrument(this: DLSSoundFont, chunk: RiffChunk): void;
@@ -1,5 +0,0 @@
1
- /**
2
- * @this {DLSSoundFont}
3
- * @param instrumentListChunk {RiffChunk}
4
- */
5
- export function readDLSInstrumentList(this: DLSSoundFont, instrumentListChunk: RiffChunk): void;
@@ -1,7 +0,0 @@
1
- /**
2
- * @param lartChunk {RiffChunk|undefined}
3
- * @param lar2Chunk {RiffChunk|undefined}
4
- * @param zone {BasicInstrumentZone}
5
- * @this {DLSSoundFont}
6
- */
7
- export function readLart(this: DLSSoundFont, lartChunk: RiffChunk | undefined, lar2Chunk: RiffChunk | undefined, zone: BasicInstrumentZone): void;
@@ -1,7 +0,0 @@
1
- /**
2
- * @this {DLSSoundFont}
3
- * @param chunk {RiffChunk}
4
- * @returns {DLSZone}
5
- */
6
- export function readRegion(this: DLSSoundFont, chunk: RiffChunk): DLSZone;
7
- import { DLSZone } from "./dls_zone.js";
@@ -1,5 +0,0 @@
1
- /**
2
- * @this {DLSSoundFont}
3
- * @param waveListChunk {RiffChunk}
4
- */
5
- export function readDLSSamples(this: DLSSoundFont, waveListChunk: RiffChunk): void;
@@ -1,6 +0,0 @@
1
- /**
2
- * Loads a soundfont file
3
- * @param buffer {ArrayBuffer}
4
- * @returns {BasicSoundFont}
5
- */
6
- export function loadSoundFont(buffer: ArrayBuffer): BasicSoundFont;
@@ -1,16 +0,0 @@
1
- /**
2
- * Reads the generator read
3
- * @param generatorChunk {RiffChunk}
4
- * @returns {Generator[]}
5
- */
6
- export function readGenerators(generatorChunk: RiffChunk): Generator[];
7
- export class ReadGenerator extends Generator {
8
- /**
9
- * Creates a generator
10
- * @param dataArray {IndexedByteArray}
11
- */
12
- constructor(dataArray: IndexedByteArray);
13
- }
14
- import { RiffChunk } from "../basic_soundfont/riff_chunk.js";
15
- import { Generator } from "../basic_soundfont/generator.js";
16
- import { IndexedByteArray } from "../../utils/indexed_array.js";
@@ -1,29 +0,0 @@
1
- /**
2
- * Reads the instruments
3
- * @param instrumentChunk {RiffChunk}
4
- * @param instrumentZones {InstrumentZone[]}
5
- * @returns {Instrument[]}
6
- */
7
- export function readInstruments(instrumentChunk: RiffChunk, instrumentZones: InstrumentZone[]): Instrument[];
8
- /**
9
- * instrument.js
10
- * purpose: parses soundfont instrument and stores them as a class
11
- */
12
- export class Instrument extends BasicInstrument {
13
- /**
14
- * Creates an instrument
15
- * @param instrumentChunk {RiffChunk}
16
- */
17
- constructor(instrumentChunk: RiffChunk);
18
- instrumentZoneIndex: number;
19
- instrumentZonesAmount: number;
20
- /**
21
- * Loads all the instrument zones, given the amount
22
- * @param amount {number}
23
- * @param zones {InstrumentZone[]}
24
- */
25
- getInstrumentZones(amount: number, zones: InstrumentZone[]): void;
26
- }
27
- import { RiffChunk } from "../basic_soundfont/riff_chunk.js";
28
- import { InstrumentZone } from "./zones.js";
29
- import { BasicInstrument } from "../basic_soundfont/basic_instrument.js";
@@ -1,15 +0,0 @@
1
- /**
2
- * Reads the modulator read
3
- * @param modulatorChunk {RiffChunk}
4
- * @returns {Modulator[]}
5
- */
6
- export function readModulators(modulatorChunk: RiffChunk): Modulator[];
7
- export class ReadModulator extends Modulator {
8
- /**
9
- * Creates a modulator
10
- * @param dataArray {IndexedByteArray}
11
- */
12
- constructor(dataArray: IndexedByteArray);
13
- }
14
- import { Modulator } from "../basic_soundfont/modulator.js";
15
- import { IndexedByteArray } from "../../utils/indexed_array.js";
@@ -1,30 +0,0 @@
1
- /**
2
- * Reads the presets
3
- * @param presetChunk {RiffChunk}
4
- * @param presetZones {PresetZone[]}
5
- * @param defaultModulators {Modulator[]}
6
- * @returns {Preset[]}
7
- */
8
- export function readPresets(presetChunk: RiffChunk, presetZones: PresetZone[], defaultModulators: Modulator[]): Preset[];
9
- /**
10
- * parses soundfont presets, also includes function for getting the generators and samples from midi note and velocity
11
- */
12
- export class Preset extends BasicPreset {
13
- /**
14
- * Creates a preset
15
- * @param presetChunk {RiffChunk}
16
- * @param defaultModulators {Modulator[]}
17
- */
18
- constructor(presetChunk: RiffChunk, defaultModulators: Modulator[]);
19
- presetZoneStartIndex: number;
20
- presetZonesAmount: number;
21
- /**
22
- * Loads all the preset zones, given the amount
23
- * @param amount {number}
24
- * @param zones {PresetZone[]}
25
- */
26
- getPresetZones(amount: number, zones: PresetZone[]): void;
27
- }
28
- import { RiffChunk } from "../basic_soundfont/riff_chunk.js";
29
- import { PresetZone } from "./zones.js";
30
- import { BasicPreset } from "../basic_soundfont/basic_preset.js";
@@ -1,55 +0,0 @@
1
- /**
2
- * Reads the generatorTranslator from the shdr read
3
- * @param sampleHeadersChunk {RiffChunk}
4
- * @param smplChunkData {IndexedByteArray|Float32Array}
5
- * @param isSmplDataRaw {boolean}
6
- * @returns {LoadedSample[]}
7
- */
8
- export function readSamples(sampleHeadersChunk: RiffChunk, smplChunkData: IndexedByteArray | Float32Array, isSmplDataRaw?: boolean): LoadedSample[];
9
- export class LoadedSample extends BasicSample {
10
- /**
11
- * Creates a sample
12
- * @param sampleName {string}
13
- * @param sampleStartIndex {number}
14
- * @param sampleEndIndex {number}
15
- * @param sampleLoopStartIndex {number}
16
- * @param sampleLoopEndIndex {number}
17
- * @param sampleRate {number}
18
- * @param samplePitch {number}
19
- * @param samplePitchCorrection {number}
20
- * @param sampleLink {number}
21
- * @param sampleType {number}
22
- * @param smplArr {IndexedByteArray|Float32Array}
23
- * @param sampleIndex {number} initial sample index when loading the sfont
24
- * @param isDataRaw {boolean} if false, the data is decoded as float32.
25
- * Used for SF2Pack support
26
- */
27
- constructor(sampleName: string, sampleStartIndex: number, sampleEndIndex: number, sampleLoopStartIndex: number, sampleLoopEndIndex: number, sampleRate: number, samplePitch: number, samplePitchCorrection: number, sampleLink: number, sampleType: number, smplArr: IndexedByteArray | Float32Array, sampleIndex: number, isDataRaw: boolean);
28
- sampleStartIndex: number;
29
- sampleEndIndex: number;
30
- isSampleLoaded: boolean;
31
- sampleID: number;
32
- sampleLength: number;
33
- sampleDataArray: Float32Array<ArrayBuffer> | IndexedByteArray;
34
- isDataRaw: boolean;
35
- /**
36
- * Get raw data, whether it's compressed or not as we simply write it to the file
37
- * @return {Uint8Array} either s16 or vorbis data
38
- */
39
- getRawData(): Uint8Array;
40
- /**
41
- * Decode binary vorbis into a float32 pcm
42
- */
43
- decodeVorbis(): void;
44
- /**
45
- * @returns {Float32Array}
46
- */
47
- loadUncompressedData(): Float32Array;
48
- /**
49
- * @returns {Float32Array}
50
- */
51
- getUncompressedReadyData(): Float32Array;
52
- }
53
- import { RiffChunk } from "../basic_soundfont/riff_chunk.js";
54
- import { IndexedByteArray } from "../../utils/indexed_array.js";
55
- import { BasicSample } from "../basic_soundfont/basic_sample.js";
@@ -1,28 +0,0 @@
1
- /**
2
- * soundfont.js
3
- * purpose: parses a soundfont2 file
4
- */
5
- export class SoundFont2 extends BasicSoundFont {
6
- /**
7
- * Initializes a new SoundFont2 Parser and parses the given data array
8
- * @param arrayBuffer {ArrayBuffer}
9
- * @param warnDeprecated {boolean}
10
- */
11
- constructor(arrayBuffer: ArrayBuffer, warnDeprecated?: boolean);
12
- dataArray: IndexedByteArray;
13
- sampleDataStartIndex: number;
14
- instruments: import("./instruments.js").Instrument[];
15
- /**
16
- * @param chunk {RiffChunk}
17
- * @param expected {string}
18
- */
19
- verifyHeader(chunk: RiffChunk, expected: string): void;
20
- /**
21
- * @param text {string}
22
- * @param expected {string}
23
- */
24
- verifyText(text: string, expected: string): void;
25
- }
26
- import { BasicSoundFont } from "../basic_soundfont/basic_soundfont.js";
27
- import { IndexedByteArray } from "../../utils/indexed_array.js";
28
- import { RiffChunk } from "../basic_soundfont/riff_chunk.js";
@@ -1,99 +0,0 @@
1
- /**
2
- * Reads the given instrument zone read
3
- * @param zonesChunk {RiffChunk}
4
- * @param instrumentGenerators {Generator[]}
5
- * @param instrumentModulators {Modulator[]}
6
- * @param instrumentSamples {BasicSample[]}
7
- * @returns {InstrumentZone[]}
8
- */
9
- export function readInstrumentZones(zonesChunk: RiffChunk, instrumentGenerators: Generator[], instrumentModulators: Modulator[], instrumentSamples: BasicSample[]): InstrumentZone[];
10
- /**
11
- * Reads the given preset zone read
12
- * @param zonesChunk {RiffChunk}
13
- * @param presetGenerators {Generator[]}
14
- * @param instruments {Instrument[]}
15
- * @param presetModulators {Modulator[]}
16
- * @returns {PresetZone[]}
17
- */
18
- export function readPresetZones(zonesChunk: RiffChunk, presetGenerators: Generator[], presetModulators: Modulator[], instruments: Instrument[]): PresetZone[];
19
- /**
20
- * zones.js
21
- * purpose: reads instrumend and preset zones from soundfont and gets their respective samples and generators and modulators
22
- */
23
- export class InstrumentZone extends BasicInstrumentZone {
24
- /**
25
- * Creates a zone (instrument)
26
- * @param dataArray {IndexedByteArray}
27
- */
28
- constructor(dataArray: IndexedByteArray);
29
- generatorZoneStartIndex: number;
30
- modulatorZoneStartIndex: number;
31
- modulatorZoneSize: number;
32
- generatorZoneSize: number;
33
- setZoneSize(modulatorZoneSize: any, generatorZoneSize: any): void;
34
- /**
35
- * grab the generators
36
- * @param generators {Generator[]}
37
- */
38
- getGenerators(generators: Generator[]): void;
39
- /**
40
- * grab the modulators
41
- * @param modulators {Modulator[]}
42
- */
43
- getModulators(modulators: Modulator[]): void;
44
- /**
45
- * Loads the zone's sample
46
- * @param samples {BasicSample[]}
47
- */
48
- getSample(samples: BasicSample[]): void;
49
- /**
50
- * Reads the keyRange of the zone
51
- */
52
- getKeyRange(): void;
53
- /**
54
- * reads the velolicty range of the zone
55
- */
56
- getVelRange(): void;
57
- }
58
- export class PresetZone extends BasicPresetZone {
59
- /**
60
- * Creates a zone (preset)
61
- * @param dataArray {IndexedByteArray}
62
- */
63
- constructor(dataArray: IndexedByteArray);
64
- generatorZoneStartIndex: number;
65
- modulatorZoneStartIndex: number;
66
- modulatorZoneSize: number;
67
- generatorZoneSize: number;
68
- setZoneSize(modulatorZoneSize: any, generatorZoneSize: any): void;
69
- /**
70
- * grab the generators
71
- * @param generators {Generator[]}
72
- */
73
- getGenerators(generators: Generator[]): void;
74
- /**
75
- * grab the modulators
76
- * @param modulators {Modulator[]}
77
- */
78
- getModulators(modulators: Modulator[]): void;
79
- /**
80
- * grab the instrument
81
- * @param instruments {Instrument[]}
82
- */
83
- getInstrument(instruments: Instrument[]): void;
84
- /**
85
- * Reads the keyRange of the zone
86
- */
87
- getKeyRange(): void;
88
- /**
89
- * reads the velolicty range of the zone
90
- */
91
- getVelRange(): void;
92
- }
93
- import { RiffChunk } from "../basic_soundfont/riff_chunk.js";
94
- import { Generator } from "../basic_soundfont/generator.js";
95
- import { Modulator } from "../basic_soundfont/modulator.js";
96
- import { Instrument } from "./instruments.js";
97
- import { BasicInstrumentZone } from "../basic_soundfont/basic_zones.js";
98
- import { IndexedByteArray } from "../../utils/indexed_array.js";
99
- import { BasicPresetZone } from "../basic_soundfont/basic_zones.js";
@@ -1,41 +0,0 @@
1
- /**
2
- * @typedef {Object} SynthConfig
3
- * @property {boolean} chorusEnabled - indicates if the chorus effect is enabled.
4
- * @property {ChorusConfig?} chorusConfig - the configuration for chorus. Pass undefined to use defaults
5
- * @property {boolean} reverbEnabled - indicates if the reverb effect is enabled.
6
- * @property {AudioBuffer?} reverbImpulseResponse - the impulse response for the reverb. Pass undefined to use defaults
7
- * @property {{
8
- * worklet: function(context: object, name: string, options?: Object)
9
- * }} audioNodeCreators - custom audio node creation functions for Web Audio wrappers.
10
- */
11
- /**
12
- * @type {SynthConfig}
13
- */
14
- export const DEFAULT_SYNTH_CONFIG: SynthConfig;
15
- export type SynthConfig = {
16
- /**
17
- * - indicates if the chorus effect is enabled.
18
- */
19
- chorusEnabled: boolean;
20
- /**
21
- * - the configuration for chorus. Pass undefined to use defaults
22
- */
23
- chorusConfig: ChorusConfig | null;
24
- /**
25
- * - indicates if the reverb effect is enabled.
26
- */
27
- reverbEnabled: boolean;
28
- /**
29
- * - the impulse response for the reverb. Pass undefined to use defaults
30
- */
31
- reverbImpulseResponse: AudioBuffer | null;
32
- /**
33
- * )
34
- * }} audioNodeCreators - custom audio node creation functions for Web Audio wrappers.
35
- */
36
- "": {
37
- worklet: (arg0: context) => object;
38
- name: string;
39
- options?: any;
40
- };
41
- };
@@ -1,97 +0,0 @@
1
- export namespace DEFAULT_CHORUS_CONFIG {
2
- export { NODES_AMOUNT as nodesAmount };
3
- export { DEFAULT_DELAY as defaultDelay };
4
- export { DELAY_VARIATION as delayVariation };
5
- export { STEREO_DIFF as stereoDifference };
6
- export { OSC_FREQ as oscillatorFrequency };
7
- export { OSC_FREQ_VARIATION as oscillatorFrequencyVariation };
8
- export { OSC_GAIN as oscillatorGain };
9
- }
10
- export class FancyChorus {
11
- /**
12
- * Creates a fancy chorus effect
13
- * @param output {AudioNode}
14
- * @param config {ChorusConfig}
15
- */
16
- constructor(output: AudioNode, config?: ChorusConfig);
17
- input: ChannelSplitterNode;
18
- merger: ChannelMergerNode;
19
- chorusLeft: ChorusNode[];
20
- chorusRight: ChorusNode[];
21
- delete(): void;
22
- /**
23
- * @param freq {number}
24
- * @param delay {number}
25
- * @param list {ChorusNode[]}
26
- * @param input {number}
27
- * @param output {AudioNode}
28
- * @param outputNum {number}
29
- * @param context {BaseAudioContext}
30
- * @param config {ChorusConfig}
31
- */
32
- createChorusNode(freq: number, delay: number, list: ChorusNode[], input: number, output: AudioNode, outputNum: number, context: BaseAudioContext, config: ChorusConfig): void;
33
- }
34
- export type ChorusNode = {
35
- oscillator: OscillatorNode;
36
- oscillatorGain: GainNode;
37
- delay: DelayNode;
38
- };
39
- export type ChorusConfig = {
40
- /**
41
- * - the amount of delay nodes (for each channel) and the corresponding oscillators
42
- */
43
- nodesAmount: number;
44
- /**
45
- * - the initial delay, in seconds
46
- */
47
- defaultDelay: number;
48
- /**
49
- * - the difference between delays in the delay nodes
50
- */
51
- delayVariation: number;
52
- /**
53
- * - the difference of delays between two channels (added to the left channel and subtracted from the right)
54
- */
55
- stereoDifference: number;
56
- /**
57
- * - the initial delay time oscillator frequency, in Hz.
58
- */
59
- oscillatorFrequency: number;
60
- /**
61
- * - the difference between frequencies of oscillators, in Hz
62
- */
63
- oscillatorFrequencyVariation: number;
64
- /**
65
- * - how much will oscillator alter the delay in delay nodes, in seconds
66
- */
67
- oscillatorGain: number;
68
- };
69
- /**
70
- * fancy_chorus.js
71
- * purpose: creates a simple chorus effect node
72
- */
73
- /**
74
- * @typedef {{
75
- * oscillator: OscillatorNode,
76
- * oscillatorGain: GainNode,
77
- * delay: DelayNode
78
- * }} ChorusNode
79
- */
80
- /**
81
- * @typedef {Object} ChorusConfig
82
- * @property {number} nodesAmount - the amount of delay nodes (for each channel) and the corresponding oscillators
83
- * @property {number} defaultDelay - the initial delay, in seconds
84
- * @property {number} delayVariation - the difference between delays in the delay nodes
85
- * @property {number} stereoDifference - the difference of delays between two channels (added to the left channel and subtracted from the right)
86
- * @property {number} oscillatorFrequency - the initial delay time oscillator frequency, in Hz.
87
- * @property {number} oscillatorFrequencyVariation - the difference between frequencies of oscillators, in Hz
88
- * @property {number} oscillatorGain - how much will oscillator alter the delay in delay nodes, in seconds
89
- */
90
- declare const NODES_AMOUNT: 4;
91
- declare const DEFAULT_DELAY: 0.03;
92
- declare const DELAY_VARIATION: 0.01;
93
- declare const STEREO_DIFF: 0.02;
94
- declare const OSC_FREQ: 0.2;
95
- declare const OSC_FREQ_VARIATION: 0.05;
96
- declare const OSC_GAIN: 0.003;
97
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * Creates a reverb processor
3
- * @param context {BaseAudioContext}
4
- * @param reverbBuffer {AudioBuffer}
5
- * @returns {ConvolverNode}
6
- */
7
- export function getReverbProcessor(context: BaseAudioContext, reverbBuffer?: AudioBuffer): ConvolverNode;
@@ -1,56 +0,0 @@
1
- export class KeyModifierManager {
2
- /**
3
- * @param synth {Synthetizer}
4
- */
5
- constructor(synth: Synthetizer);
6
- synth: Synthetizer;
7
- /**
8
- * The velocity override mappings for MIDI keys
9
- * @type {KeyModifier[][]}
10
- * @private
11
- */
12
- private _keyModifiers;
13
- /**
14
- * @private
15
- * @param type {workletKeyModifierMessageType}
16
- * @param data {any}
17
- */
18
- private _sendToWorklet;
19
- /**
20
- * Modifies a single key
21
- * @param channel {number} the channel affected. Usually 0-15
22
- * @param midiNote {number} the MIDI note to change. 0-127
23
- * @param options {{
24
- * velocity: number|undefined,
25
- * patch: {
26
- * bank: number,
27
- * program: number
28
- * }|undefined
29
- * }} the key's modifiers
30
- */
31
- addModifier(channel: number, midiNote: number, options: {
32
- velocity: number | undefined;
33
- patch: {
34
- bank: number;
35
- program: number;
36
- } | undefined;
37
- }): void;
38
- /**
39
- * Gets a key modifier
40
- * @param channel {number} the channel affected. Usually 0-15
41
- * @param midiNote {number} the MIDI note to change. 0-127
42
- * @returns {KeyModifier|undefined}
43
- */
44
- getModifier(channel: number, midiNote: number): KeyModifier | undefined;
45
- /**
46
- * Deletes a key modifier
47
- * @param channel {number} the channel affected. Usually 0-15
48
- * @param midiNote {number} the MIDI note to change. 0-127
49
- */
50
- deleteModifier(channel: number, midiNote: number): void;
51
- /**
52
- * Clears ALL Modifiers
53
- */
54
- clearModifiers(): void;
55
- }
56
- import { KeyModifier } from "./worklet_system/worklet_methods/worklet_key_modifier.js";