spessasynth_core 4.3.9 → 4.3.11
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 +48 -49
- package/dist/index.js +219 -121
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
package/dist/index.d.ts
CHANGED
|
@@ -737,42 +737,6 @@ declare class BasicPresetZone extends BasicZone {
|
|
|
737
737
|
getWriteGenerators(bank: BasicSoundBank): Generator[];
|
|
738
738
|
}
|
|
739
739
|
//#endregion
|
|
740
|
-
//#region src/soundbank/soundfont/write/types.d.ts
|
|
741
|
-
/**
|
|
742
|
-
* Returned structure containing extended SF2 chunks.
|
|
743
|
-
*/
|
|
744
|
-
interface ExtendedSF2Chunks {
|
|
745
|
-
/**
|
|
746
|
-
* The PDTA part of the chunk.
|
|
747
|
-
*/
|
|
748
|
-
pdta: IndexedByteArray;
|
|
749
|
-
/**
|
|
750
|
-
* The XDTA (https://github.com/spessasus/soundfont-proposals/blob/main/extended_limits.md) part of the chunk.
|
|
751
|
-
*/
|
|
752
|
-
xdta: IndexedByteArray;
|
|
753
|
-
}
|
|
754
|
-
/**
|
|
755
|
-
* Write indexes for tracking writing a SoundFont file.
|
|
756
|
-
*/
|
|
757
|
-
interface SoundFontWriteIndexes {
|
|
758
|
-
/**
|
|
759
|
-
* Generator start index.
|
|
760
|
-
*/
|
|
761
|
-
gen: number;
|
|
762
|
-
/**
|
|
763
|
-
* Modulator start index.
|
|
764
|
-
*/
|
|
765
|
-
mod: number;
|
|
766
|
-
/**
|
|
767
|
-
* Zone start index.
|
|
768
|
-
*/
|
|
769
|
-
bag: number;
|
|
770
|
-
/**
|
|
771
|
-
* Preset/instrument start index.
|
|
772
|
-
*/
|
|
773
|
-
hdr: number;
|
|
774
|
-
}
|
|
775
|
-
//#endregion
|
|
776
740
|
//#region src/soundbank/basic_soundbank/basic_preset.d.ts
|
|
777
741
|
declare class BasicPreset implements MIDIPatchFull {
|
|
778
742
|
/**
|
|
@@ -862,12 +826,6 @@ declare class BasicPreset implements MIDIPatchFull {
|
|
|
862
826
|
* @returns The instrument containing the flattened zones. In theory, it should exactly the same as this preset.
|
|
863
827
|
*/
|
|
864
828
|
toFlattenedInstrument(): BasicInstrument;
|
|
865
|
-
/**
|
|
866
|
-
* Writes the SF2 header
|
|
867
|
-
* @param phdrData
|
|
868
|
-
* @param index
|
|
869
|
-
*/
|
|
870
|
-
write(phdrData: ExtendedSF2Chunks, index: number): void;
|
|
871
829
|
}
|
|
872
830
|
//#endregion
|
|
873
831
|
//#region src/soundbank/basic_soundbank/basic_instrument.d.ts
|
|
@@ -926,7 +884,6 @@ declare class BasicInstrument {
|
|
|
926
884
|
* to the global zone as possible to reduce clutter and the count of parameters.
|
|
927
885
|
*/
|
|
928
886
|
globalize(): void;
|
|
929
|
-
write(instData: ExtendedSF2Chunks, index: number): void;
|
|
930
887
|
}
|
|
931
888
|
//#endregion
|
|
932
889
|
//#region src/soundbank/basic_soundbank/basic_sample.d.ts
|
|
@@ -3335,6 +3292,29 @@ declare class ModulatorSource {
|
|
|
3335
3292
|
getValue(channel: SF2Channel, pitchWheel: number, voice: Voice): number;
|
|
3336
3293
|
}
|
|
3337
3294
|
//#endregion
|
|
3295
|
+
//#region src/soundbank/soundfont/write/types.d.ts
|
|
3296
|
+
/**
|
|
3297
|
+
* Write indexes for tracking writing a SoundFont file.
|
|
3298
|
+
*/
|
|
3299
|
+
interface SoundFontWriteIndexes {
|
|
3300
|
+
/**
|
|
3301
|
+
* Generator start index.
|
|
3302
|
+
*/
|
|
3303
|
+
gen: number;
|
|
3304
|
+
/**
|
|
3305
|
+
* Modulator start index.
|
|
3306
|
+
*/
|
|
3307
|
+
mod: number;
|
|
3308
|
+
/**
|
|
3309
|
+
* Zone start index.
|
|
3310
|
+
*/
|
|
3311
|
+
bag: number;
|
|
3312
|
+
/**
|
|
3313
|
+
* Preset/instrument start index.
|
|
3314
|
+
*/
|
|
3315
|
+
hdr: number;
|
|
3316
|
+
}
|
|
3317
|
+
//#endregion
|
|
3338
3318
|
//#region src/soundbank/basic_soundbank/modulator.d.ts
|
|
3339
3319
|
declare class Modulator {
|
|
3340
3320
|
/**
|
|
@@ -3397,12 +3377,12 @@ declare class BasicSoundBank {
|
|
|
3397
3377
|
static isSF3DecoderReady: Promise<boolean>;
|
|
3398
3378
|
/**
|
|
3399
3379
|
* The type of the sound bank that was loaded.
|
|
3400
|
-
* Either `sf2` for SoundFont2/SoundFont3 or `dls` for DownLoadable Sounds.
|
|
3380
|
+
* Either `sf2` for SoundFont2/SoundFont3 or `dls` for DownLoadable Sounds or `sfe` for SF-Enhanced.
|
|
3401
3381
|
*
|
|
3402
3382
|
* Please note that SF3 or SFOGG files are parsed as `sf2` files, but with compressed samples.
|
|
3403
3383
|
* The type is still `sf2`.
|
|
3404
3384
|
*/
|
|
3405
|
-
readonly type: "sf2" | "dls";
|
|
3385
|
+
readonly type: "sf2" | "dls" | "sfe";
|
|
3406
3386
|
/**
|
|
3407
3387
|
* Sound bank's info.
|
|
3408
3388
|
*/
|
|
@@ -3427,7 +3407,7 @@ declare class BasicSoundBank {
|
|
|
3427
3407
|
* If the sound bank has custom default modulators (DMOD).
|
|
3428
3408
|
*/
|
|
3429
3409
|
customDefaultModulators: boolean;
|
|
3430
|
-
constructor(type?: "sf2" | "dls");
|
|
3410
|
+
constructor(type?: "sf2" | "sfe" | "dls");
|
|
3431
3411
|
private _isXGBank;
|
|
3432
3412
|
/**
|
|
3433
3413
|
* Checks for XG drum sets and considers if this sound bank is XG.
|
|
@@ -3470,6 +3450,14 @@ declare class BasicSoundBank {
|
|
|
3470
3450
|
* @returns the binary file data.
|
|
3471
3451
|
*/
|
|
3472
3452
|
writeSF2(writeOptions?: Partial<SoundFont2WriteOptions>): ArrayBuffer;
|
|
3453
|
+
/**
|
|
3454
|
+
* Writes the sound bank as an [SFE 4](https://sfe-team-was-taken.github.io/SFE/) file.
|
|
3455
|
+
* This enables features such as bank LSB and RIFF64.
|
|
3456
|
+
* Note that spessasynth is currently the only software that can read these files.
|
|
3457
|
+
* @param writeOptions the options for writing.
|
|
3458
|
+
* @returns the binary file data.
|
|
3459
|
+
*/
|
|
3460
|
+
writeSFE(writeOptions?: Partial<SFEWriteOptions>): ArrayBuffer;
|
|
3473
3461
|
addPresets(...presets: BasicPreset[]): void;
|
|
3474
3462
|
addInstruments(...instruments: BasicInstrument[]): void;
|
|
3475
3463
|
addSamples(...samples: BasicSample[]): void;
|
|
@@ -3703,6 +3691,17 @@ interface SoundFont2WriteOptions extends SoundBankWriteOptions {
|
|
|
3703
3691
|
* Options for writing a DLS file.
|
|
3704
3692
|
*/
|
|
3705
3693
|
type DLSWriteOptions = SoundBankWriteOptions;
|
|
3694
|
+
/**
|
|
3695
|
+
* Options for writing an SFE 4 file.
|
|
3696
|
+
*/
|
|
3697
|
+
interface SFEWriteOptions extends SoundBankWriteOptions {
|
|
3698
|
+
/**
|
|
3699
|
+
* If the RIFS (64-bit RIFF chunks) should be used.
|
|
3700
|
+
* Increases maximum size from 4GB to effectively infinite.
|
|
3701
|
+
* Recommended, since SFE 4 is effectively incompatible with SF2.
|
|
3702
|
+
*/
|
|
3703
|
+
rf64: boolean;
|
|
3704
|
+
}
|
|
3706
3705
|
interface GenericRange {
|
|
3707
3706
|
min: number;
|
|
3708
3707
|
max: number;
|
|
@@ -3729,7 +3728,7 @@ type PresetsWithKeyCombinations = Map<BasicPreset, Map<number, Set<number>>>;
|
|
|
3729
3728
|
type MIDISystem = "gm" | "gm2" | "gs" | "xg";
|
|
3730
3729
|
//#endregion
|
|
3731
3730
|
//#region src/utils/riff_chunk.d.ts
|
|
3732
|
-
type GenericRIFFFourCC = "RIFF" | "LIST" | "INFO";
|
|
3731
|
+
type GenericRIFFFourCC = "RIFF" | "RIFS" | "LIST" | "INFO";
|
|
3733
3732
|
type WAVFourCC = "wave" | "cue " | "fmt ";
|
|
3734
3733
|
type FourCC = GenericRIFFFourCC | SoundBankInfoFourCC | SF2InfoFourCC | SF2ChunkFourCC | DLSInfoFourCC | DLSChunkFourCC | RMIDInfoFourCC | WAVFourCC;
|
|
3735
3734
|
//#endregion
|
|
@@ -4224,7 +4223,7 @@ declare class BasicMIDI {
|
|
|
4224
4223
|
* Do not call in audioWorkletGlobalScope as it uses TextDecoder.
|
|
4225
4224
|
* RMIDI encoding overrides the provided encoding.
|
|
4226
4225
|
*/
|
|
4227
|
-
getExtraMetadata(encoding?: string):
|
|
4226
|
+
getExtraMetadata(encoding?: string): string[];
|
|
4228
4227
|
/**
|
|
4229
4228
|
* Sets a given RMIDI info value.
|
|
4230
4229
|
* @param infoType The type to set.
|
|
@@ -4867,5 +4866,5 @@ declare class SpessaSynthSequencer {
|
|
|
4867
4866
|
protected sendMIDIPitchWheel(channel: number, pitch: number): void;
|
|
4868
4867
|
}
|
|
4869
4868
|
//#endregion
|
|
4870
|
-
export { BasicInstrument, BasicInstrumentZone, BasicMIDI, BasicPreset, BasicPresetZone, BasicSample, BasicSoundBank, BasicZone, CONTROLLER_TABLE_SIZE, CachedVoiceList, type ChannelMIDIParameter, ChannelMIDIParameterChange, type ChannelSystemParameter, ChorusProcessor, ChorusProcessorSnapshot, ControllerChangeCallback, DEFAULT_CHANNEL_MIDI_PARAMETERS, DEFAULT_CHANNEL_SYSTEM_PARAMETERS, DEFAULT_DRUM_REVERB, DEFAULT_GLOBAL_MIDI_PARAMETERS, DEFAULT_GLOBAL_SYSTEM_PARAMETERS, DEFAULT_MIDI_CONTROLLERS, DEFAULT_PERCUSSION, DEFAULT_SYNTH_MODE, DLSChunkFourCC, DLSInfoFourCC, DLSLoop, DLSWriteOptions, DelayProcessor, DelayProcessorSnapshot, EffectChangeCallback, EmptySample, type FourCC, GENERATORS_AMOUNT, Generator, GeneratorLimits, GeneratorType, GeneratorTypes, GenericBankInfoFourCC, type GenericRIFFFourCC, GenericRange, type GlobalMIDIParameter, GlobalMIDIParameterChangeCallback, type GlobalSystemParameter, IndexedByteArray, InsertionProcessor, InsertionProcessorConstructor, InsertionProcessorSnapshot, InterpolationType, InterpolationTypes, KeyModifier, MAX_GENERATOR, MIDIBuilder, MIDIChannel, MIDIController, MIDIControllers, MIDIFormat, MIDILoop, MIDILoopType, MIDIMessage, MIDIMessageType, MIDIMessageTypes, MIDIPatch, MIDIPatchFull, MIDIPatchTools, MIDISystem, MIDITrack, MIDIUtils, type ModifyMIDIOptions, Modulator, ModulatorControllerSource, ModulatorControllerSources, ModulatorCurveType, ModulatorCurveTypes, ModulatorSource, ModulatorSourceIndex, ModulatorTransformType, ModulatorTransformTypes, NonRegisteredLSB, NonRegisteredMSB, NoteOffCallback, NoteOnCallback, NoteTime, PolyPressureCallback, PresetsWithKeyCombinations, ProgramChangeCallback, ProgressFunction, RMIDIWriteOptions, RMIDInfoData, RMIDInfoFourCC, RegisteredParameterTypes, ReverbProcessor, ReverbProcessorSnapshot, SF2Channel, SF2ChunkFourCC, SF2InfoFourCC, SF2VersionTag, SPESSASYNTH_GAIN_FACTOR, SPESSA_BUFSIZE, SampleEncodingFunction, SampleLoopingMode, SampleType, SampleTypes, SequencerEvent, SequencerEventData, SetSampleFormatOptions, SoundBankInfoData, SoundBankInfoFourCC, SoundBankLoader, SoundBankManagerListEntry, SoundFont2WriteOptions, SpessaLog, SpessaSynthCoreUtils, SpessaSynthProcessor, SpessaSynthSequencer, StopAllCallback, SynthMethodOptions, SynthProcessorEvent, SynthProcessorEventData, SynthProcessorOptions, type SynthesizerSnapshot, SysExAcceptedArray, TempoChange, TimelineEvent, VOICE_CAP, VoiceParameters, WaveMetadata, WaveWriteOptions, audioToWav };
|
|
4869
|
+
export { BasicInstrument, BasicInstrumentZone, BasicMIDI, BasicPreset, BasicPresetZone, BasicSample, BasicSoundBank, BasicZone, CONTROLLER_TABLE_SIZE, CachedVoiceList, type ChannelMIDIParameter, ChannelMIDIParameterChange, type ChannelSystemParameter, ChorusProcessor, ChorusProcessorSnapshot, ControllerChangeCallback, DEFAULT_CHANNEL_MIDI_PARAMETERS, DEFAULT_CHANNEL_SYSTEM_PARAMETERS, DEFAULT_DRUM_REVERB, DEFAULT_GLOBAL_MIDI_PARAMETERS, DEFAULT_GLOBAL_SYSTEM_PARAMETERS, DEFAULT_MIDI_CONTROLLERS, DEFAULT_PERCUSSION, DEFAULT_SYNTH_MODE, DLSChunkFourCC, DLSInfoFourCC, DLSLoop, DLSWriteOptions, DelayProcessor, DelayProcessorSnapshot, EffectChangeCallback, EmptySample, type FourCC, GENERATORS_AMOUNT, Generator, GeneratorLimits, GeneratorType, GeneratorTypes, GenericBankInfoFourCC, type GenericRIFFFourCC, GenericRange, type GlobalMIDIParameter, GlobalMIDIParameterChangeCallback, type GlobalSystemParameter, IndexedByteArray, InsertionProcessor, InsertionProcessorConstructor, InsertionProcessorSnapshot, InterpolationType, InterpolationTypes, KeyModifier, MAX_GENERATOR, MIDIBuilder, MIDIChannel, MIDIController, MIDIControllers, MIDIFormat, MIDILoop, MIDILoopType, MIDIMessage, MIDIMessageType, MIDIMessageTypes, MIDIPatch, MIDIPatchFull, MIDIPatchTools, MIDISystem, MIDITrack, MIDIUtils, type ModifyMIDIOptions, Modulator, ModulatorControllerSource, ModulatorControllerSources, ModulatorCurveType, ModulatorCurveTypes, ModulatorSource, ModulatorSourceIndex, ModulatorTransformType, ModulatorTransformTypes, NonRegisteredLSB, NonRegisteredMSB, NoteOffCallback, NoteOnCallback, NoteTime, PolyPressureCallback, PresetsWithKeyCombinations, ProgramChangeCallback, ProgressFunction, RMIDIWriteOptions, RMIDInfoData, RMIDInfoFourCC, RegisteredParameterTypes, ReverbProcessor, ReverbProcessorSnapshot, SF2Channel, SF2ChunkFourCC, SF2InfoFourCC, SF2VersionTag, SFEWriteOptions, SPESSASYNTH_GAIN_FACTOR, SPESSA_BUFSIZE, SampleEncodingFunction, SampleLoopingMode, SampleType, SampleTypes, SequencerEvent, SequencerEventData, SetSampleFormatOptions, SoundBankInfoData, SoundBankInfoFourCC, SoundBankLoader, SoundBankManagerListEntry, SoundFont2WriteOptions, SpessaLog, SpessaSynthCoreUtils, SpessaSynthProcessor, SpessaSynthSequencer, StopAllCallback, SynthMethodOptions, SynthProcessorEvent, SynthProcessorEventData, SynthProcessorOptions, type SynthesizerSnapshot, SysExAcceptedArray, TempoChange, TimelineEvent, VOICE_CAP, VoiceParameters, WaveMetadata, WaveWriteOptions, audioToWav };
|
|
4871
4870
|
//# sourceMappingURL=index.d.ts.map
|