spessasynth_core 4.0.22 → 4.0.24
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 +18 -11
- package/dist/index.js +1125 -960
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1177,7 +1177,8 @@ declare class SoundBankManager {
|
|
|
1177
1177
|
*/
|
|
1178
1178
|
declare function killVoicesIntenral(this: SpessaSynthProcessor, amount: number): void;
|
|
1179
1179
|
|
|
1180
|
-
type
|
|
1180
|
+
type SysExAcceptedArray = number[] | IndexedByteArray | Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Uint8ClampedArray | Float32Array | Float64Array;
|
|
1181
|
+
|
|
1181
1182
|
/**
|
|
1182
1183
|
* Executes a system exclusive message for the synthesizer.
|
|
1183
1184
|
* @param syx The system exclusive message as an array of bytes.
|
|
@@ -1186,7 +1187,7 @@ type TypedArray = Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Arra
|
|
|
1186
1187
|
* This is a rather extensive method that handles various system exclusive messages,
|
|
1187
1188
|
* including Roland GS, MIDI Tuning Standard, and other non-realtime messages.
|
|
1188
1189
|
*/
|
|
1189
|
-
declare function systemExclusiveInternal(this: SpessaSynthProcessor, syx:
|
|
1190
|
+
declare function systemExclusiveInternal(this: SpessaSynthProcessor, syx: SysExAcceptedArray, channelOffset?: number): void;
|
|
1190
1191
|
|
|
1191
1192
|
declare const midiMessageTypes: {
|
|
1192
1193
|
readonly noteOff: 128;
|
|
@@ -1482,10 +1483,9 @@ declare class ProtectedSynthValues {
|
|
|
1482
1483
|
voiceKilling: (amount: number) => unknown;
|
|
1483
1484
|
/**
|
|
1484
1485
|
* Cached voices for all presets for this synthesizer.
|
|
1485
|
-
* Nesting
|
|
1486
|
-
* this.cachedVoices[bankMSB][bankLSB][programNumber][midiNote][velocity] = a list of voices for that.
|
|
1486
|
+
* Nesting is calculated in getCachedVoiceIndex, returns a list of voices for this note.
|
|
1487
1487
|
*/
|
|
1488
|
-
cachedVoices: VoiceList[]
|
|
1488
|
+
cachedVoices: VoiceList[];
|
|
1489
1489
|
constructor(eventCallbackHandler: <K extends keyof SynthProcessorEventData>(eventType: K, eventData: SynthProcessorEventData[K]) => unknown, getVoices: (channel: number, midiNote: number, velocity: number, realKey: number) => VoiceList, voiceKillingFunction: (amount: number) => unknown, volumeEnvelopeSmoothingFactor: number, panSmoothingFactor: number, filterSmoothingFactor: number);
|
|
1490
1490
|
/**
|
|
1491
1491
|
* Copied callback so MIDI channels can call it.
|
|
@@ -1811,7 +1811,7 @@ declare class MIDIChannel {
|
|
|
1811
1811
|
* This will reset all controllers to their default values,
|
|
1812
1812
|
* except for the locked controllers.
|
|
1813
1813
|
*/
|
|
1814
|
-
declare function resetAllControllersInternal(this: SpessaSynthProcessor,
|
|
1814
|
+
declare function resetAllControllersInternal(this: SpessaSynthProcessor, system?: SynthSystem): void;
|
|
1815
1815
|
/**
|
|
1816
1816
|
* Reset all controllers for channel.
|
|
1817
1817
|
* This will reset all controllers to their default values,
|
|
@@ -2259,6 +2259,7 @@ declare class SpessaSynthProcessor {
|
|
|
2259
2259
|
protected callEvent<K extends keyof SynthProcessorEventData>(eventName: K, eventData: SynthProcessorEventData[K]): void;
|
|
2260
2260
|
protected getCachedVoice(patch: MIDIPatch, midiNote: number, velocity: number): VoiceList | undefined;
|
|
2261
2261
|
protected setCachedVoice(patch: MIDIPatch, midiNote: number, velocity: number, voices: VoiceList): void;
|
|
2262
|
+
private getCachedVoiceIndex;
|
|
2262
2263
|
private createMIDIChannelInternal;
|
|
2263
2264
|
private updatePresetList;
|
|
2264
2265
|
private getDefaultPresets;
|
|
@@ -3217,6 +3218,13 @@ declare class BasicMIDI {
|
|
|
3217
3218
|
* @returns The output data is a key-value pair: preset -> Set<"key-velocity">
|
|
3218
3219
|
*/
|
|
3219
3220
|
getUsedProgramsAndKeys(soundbank: BasicSoundBank | SoundBankManager): Map<BasicPreset, Set<string>>;
|
|
3221
|
+
/**
|
|
3222
|
+
* Preloads all voices for this sequence in a given synth.
|
|
3223
|
+
* This caches all the needed voices for playing back this sequencer, resulting in a smooth playback.
|
|
3224
|
+
* The sequencer calls this function by default when loading the songs.
|
|
3225
|
+
* @param synth
|
|
3226
|
+
*/
|
|
3227
|
+
preloadSynth(synth: SpessaSynthProcessor): void;
|
|
3220
3228
|
/**
|
|
3221
3229
|
* Updates all internal values of the MIDI.
|
|
3222
3230
|
* @param sortEvents if the events should be sorted by ticks. Recommended to be true.
|
|
@@ -4020,7 +4028,7 @@ declare class SpessaSynthSequencer {
|
|
|
4020
4028
|
*/
|
|
4021
4029
|
protected stop(): void;
|
|
4022
4030
|
/**
|
|
4023
|
-
* @returns
|
|
4031
|
+
* @returns The track number of the next closest event, based on eventIndexes.
|
|
4024
4032
|
*/
|
|
4025
4033
|
protected findFirstEventIndex(): number;
|
|
4026
4034
|
/**
|
|
@@ -4044,10 +4052,10 @@ declare class SpessaSynthSequencer {
|
|
|
4044
4052
|
protected recalculateStartTime(time: number): void;
|
|
4045
4053
|
/**
|
|
4046
4054
|
* Jumps to a MIDI tick without any further processing.
|
|
4047
|
-
* @param
|
|
4055
|
+
* @param targetTicks The MIDI tick to jump to.
|
|
4048
4056
|
* @protected
|
|
4049
4057
|
*/
|
|
4050
|
-
protected jumpToTick(
|
|
4058
|
+
protected jumpToTick(targetTicks: number): void;
|
|
4051
4059
|
protected sendMIDINoteOn(channel: number, midiNote: number, velocity: number): void;
|
|
4052
4060
|
protected sendMIDINoteOff(channel: number, midiNote: number): void;
|
|
4053
4061
|
protected sendMIDICC(channel: number, type: MIDIController, value: number): void;
|
|
@@ -4075,7 +4083,6 @@ declare const CONTROLLER_TABLE_SIZE = 147;
|
|
|
4075
4083
|
*/
|
|
4076
4084
|
declare const defaultMIDIControllerValues: Int16Array<ArrayBuffer>;
|
|
4077
4085
|
declare const setResetValue: (i: MIDIController, v: number) => number;
|
|
4078
|
-
declare const PORTAMENTO_CONTROL_UNSET = 1;
|
|
4079
4086
|
declare const CUSTOM_CONTROLLER_TABLE_SIZE: number;
|
|
4080
4087
|
declare const customResetArray: Float32Array<ArrayBuffer>;
|
|
4081
4088
|
|
|
@@ -4089,4 +4096,4 @@ declare class SoundBankLoader {
|
|
|
4089
4096
|
private static loadDLS;
|
|
4090
4097
|
}
|
|
4091
4098
|
|
|
4092
|
-
export { ALL_CHANNELS_OR_DIFFERENT_ACTION, BasicGlobalZone, BasicInstrument, BasicInstrumentZone, BasicMIDI, BasicPreset, BasicPresetZone, BasicSample, BasicSoundBank, BasicZone, CONTROLLER_TABLE_SIZE, CUSTOM_CONTROLLER_TABLE_SIZE, type ChannelPressureCallback, type ChannelProperty, type ChannelPropertyChangeCallback, ChannelSnapshot, type ControllerChangeCallback, type CustomController, DEFAULT_MASTER_PARAMETERS, DEFAULT_PERCUSSION, DEFAULT_WAV_WRITE_OPTIONS, type DLSChunkFourCC, type DLSDestination, type DLSInfoFourCC, type DLSLoop, type DLSLoopType, DLSLoopTypes, type DLSSource, type DLSTransform, type DLSWriteOptions, type DataEntryState, type DesiredChannelTranspose, type DesiredControllerChange, type DesiredProgramChange, type DrumChangeCallback, EmptySample, type FourCC, GENERATORS_AMOUNT, Generator, type GeneratorType, type GenericBankInfoFourCC, type GenericRIFFFourCC, type GenericRange, IndexedByteArray, type InterpolationType, KeyModifier, MAX_GENERATOR, MIDIBuilder, type MIDIController, type MIDIFormat, type MIDILoop, type MIDILoopType, MIDIMessage, type MIDIMessageType, type MIDIPatch, type MIDIPatchNamed, MIDIPatchTools, MIDITrack, type MTSNoteTuning, type MTSProgramTuning, type MasterParameterChangeCallback, type MasterParameterType, Modulator, type ModulatorCurveType, ModulatorSource, type ModulatorSourceEnum, type ModulatorSourceIndex, type ModulatorTransformType, type MuteChannelCallback, NON_CC_INDEX_OFFSET, type NoteOffCallback, type NoteOnCallback, type NoteTime,
|
|
4099
|
+
export { ALL_CHANNELS_OR_DIFFERENT_ACTION, BasicGlobalZone, BasicInstrument, BasicInstrumentZone, BasicMIDI, BasicPreset, BasicPresetZone, BasicSample, BasicSoundBank, BasicZone, CONTROLLER_TABLE_SIZE, CUSTOM_CONTROLLER_TABLE_SIZE, type ChannelPressureCallback, type ChannelProperty, type ChannelPropertyChangeCallback, ChannelSnapshot, type ControllerChangeCallback, type CustomController, DEFAULT_MASTER_PARAMETERS, DEFAULT_PERCUSSION, DEFAULT_WAV_WRITE_OPTIONS, type DLSChunkFourCC, type DLSDestination, type DLSInfoFourCC, type DLSLoop, type DLSLoopType, DLSLoopTypes, type DLSSource, type DLSTransform, type DLSWriteOptions, type DataEntryState, type DesiredChannelTranspose, type DesiredControllerChange, type DesiredProgramChange, type DrumChangeCallback, EmptySample, type FourCC, GENERATORS_AMOUNT, Generator, type GeneratorType, type GenericBankInfoFourCC, type GenericRIFFFourCC, type GenericRange, IndexedByteArray, type InterpolationType, KeyModifier, MAX_GENERATOR, MIDIBuilder, type MIDIController, type MIDIFormat, type MIDILoop, type MIDILoopType, MIDIMessage, type MIDIMessageType, type MIDIPatch, type MIDIPatchNamed, MIDIPatchTools, MIDITrack, type MTSNoteTuning, type MTSProgramTuning, type MasterParameterChangeCallback, type MasterParameterType, Modulator, type ModulatorCurveType, ModulatorSource, type ModulatorSourceEnum, type ModulatorSourceIndex, type ModulatorTransformType, type MuteChannelCallback, NON_CC_INDEX_OFFSET, type NoteOffCallback, type NoteOnCallback, type NoteTime, type PitchWheelCallback, type PolyPressureCallback, type PresetList, type PresetListEntry, type ProgramChangeCallback, type ProgressFunction, type RMIDIWriteOptions, type RMIDInfoData, type RMIDInfoFourCC, type SF2ChunkFourCC, type SF2InfoFourCC, type SF2VersionTag, type SampleEncodingFunction, type SampleLoopingMode, type SampleType, type SequencerEvent, type SequencerEventData, type SoundBankErrorCallback, type SoundBankInfoData, type SoundBankInfoFourCC, SoundBankLoader, type SoundBankManagerListEntry, type SoundFont2WriteOptions, SpessaSynthCoreUtils, SpessaSynthLogging, SpessaSynthProcessor, SpessaSynthSequencer, type StopAllCallback, type SynthMethodOptions, type SynthProcessorEvent, type SynthProcessorEventData, type SynthProcessorOptions, type SynthSystem, SynthesizerSnapshot, type TempoChange, type VoiceList, type VoiceSynthesisData, type WaveMetadata, type WaveWriteOptions, audioToWav, customControllers, customResetArray, dataEntryStates, defaultMIDIControllerValues, dlsDestinations, dlsSources, generatorLimits, generatorTypes, interpolationTypes, midiControllers, midiMessageTypes, modulatorCurveTypes, modulatorSources, modulatorTransformTypes, sampleTypes, setResetValue };
|