spessasynth_core 4.4.8 → 4.4.10
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 +3 -2
- package/dist/index.d.ts +27 -9
- package/dist/index.js +3785 -211
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ It allows you to:
|
|
|
12
12
|
- Read and write MIDI files!
|
|
13
13
|
- Read and write SF2/SF3 files!
|
|
14
14
|
- Convert DLS to SF2! (and back!)
|
|
15
|
-
- Play tracker modules (MOD, XM, S3M) as MIDI files!
|
|
15
|
+
- Play tracker modules (MOD, XM, S3M, IT) as MIDI files!
|
|
16
16
|
- [and more!](#current-features)
|
|
17
17
|
|
|
18
18
|
### v4.4.0 The XG Update is here!
|
|
@@ -151,10 +151,11 @@ a more capable MIDI editor, and a faster synthesis engine!
|
|
|
151
151
|
|
|
152
152
|
#### Read and play tracker modules
|
|
153
153
|
|
|
154
|
-
- **MOD, XM and
|
|
154
|
+
- **MOD, XM, S3M and IT support:** _ProTracker, FastTracker 2, Scream Tracker 3 and Impulse Tracker modules load just like MIDI files!_
|
|
155
155
|
- **Converted to MIDI with an embedded sound bank:** Every sample becomes a preset, and the song can be saved as an RMIDI file!
|
|
156
156
|
- **Accurate playback:** _Effects, effect memory, instrument envelopes and auto-vibrato are converted to MIDI events!_
|
|
157
157
|
- **Sample offset support:** _Implemented with SoundFont modulators!_
|
|
158
|
+
- **Impulse Tracker features:** _New note actions, resonant filters, filter and pitch envelopes, MIDI macros, sustain loops, stereo samples and reversed playback!_
|
|
158
159
|
- **Loop detection:** _Song loops and restart positions become loop points!_
|
|
159
160
|
- **Seamless integration:** _Read like any other MIDI file!_
|
|
160
161
|
|
package/dist/index.d.ts
CHANGED
|
@@ -181,9 +181,8 @@ export declare function audioToWav(audioData: Float32Array[], sampleRate: number
|
|
|
181
181
|
* Reads a WAVE file into PCM audio data, the counterpart of {@link audioToWav}.
|
|
182
182
|
*
|
|
183
183
|
* It reads 8, 16, 24 and 32-bit integer PCM and 32 and 64-bit float files (including `WAVE_FORMAT_EXTENSIBLE`).
|
|
184
|
-
* The loop is read from the first loop of the `smpl` chunk. Without one,
|
|
185
|
-
*
|
|
186
|
-
* Other files may use cue points as plain markers, so such a loop is only reliable for files written by core.
|
|
184
|
+
* The loop is read from the first loop of the `smpl` chunk. Without one, a `cue ` chunk with exactly two points
|
|
185
|
+
* is taken as the loop start and end, which is how {@link audioToWav} writes it.
|
|
187
186
|
*
|
|
188
187
|
* > **Note**
|
|
189
188
|
* >
|
|
@@ -3828,6 +3827,7 @@ export declare class SoundBankManager {
|
|
|
3828
3827
|
* @param id The unique ID to assign to the sound bank.
|
|
3829
3828
|
* If a sound bank with this ID already exists, it will be replaced.
|
|
3830
3829
|
* @param bankOffset The bank offset of the sound bank. Offsets the bank MSB value of all presets in this sound bank.
|
|
3830
|
+
* Presets that would end up above bank 127 are left out.
|
|
3831
3831
|
* @param reset If the synthesizer should reset (put every channel's controllers back to defaults) after the change.
|
|
3832
3832
|
* Set it to `false` to keep a song playing, the channels then only update to the new presets.
|
|
3833
3833
|
*/
|
|
@@ -6285,6 +6285,10 @@ interface ChannelMIDIParameter {
|
|
|
6285
6285
|
/**
|
|
6286
6286
|
* The key shift of the channel (in semitones).
|
|
6287
6287
|
* Drum channels ignore this value.
|
|
6288
|
+
*
|
|
6289
|
+
* > **Note**
|
|
6290
|
+
* >
|
|
6291
|
+
* > For `xg` drum channels this instead changes the pitch in semitones.
|
|
6288
6292
|
*/
|
|
6289
6293
|
keyShift: number;
|
|
6290
6294
|
/**
|
|
@@ -6790,7 +6794,7 @@ export interface NoteTime {
|
|
|
6790
6794
|
*/
|
|
6791
6795
|
export interface RMIDIWriteOptions {
|
|
6792
6796
|
/**
|
|
6793
|
-
* The bank offset to apply to the file. Defaults to `0`.
|
|
6797
|
+
* The bank offset to apply to the file, an integer from 0 to 127. Defaults to `0`.
|
|
6794
6798
|
* [See this for more info](https://github.com/spessasus/sf2-rmidi-specification#dbnk-chunk)
|
|
6795
6799
|
*/
|
|
6796
6800
|
bankOffset: number;
|
|
@@ -7169,6 +7173,21 @@ export declare class BasicMIDI {
|
|
|
7169
7173
|
* > See [SF2 RMIDI Extension Specification](https://github.com/spessasus/sf2-rmidi-specification#readme) for more info.
|
|
7170
7174
|
*/
|
|
7171
7175
|
rmidiInfo: Partial<Record<keyof RMIDInfoData, Uint8Array<ArrayBuffer>>>;
|
|
7176
|
+
/**
|
|
7177
|
+
* RMIDI chunks that SpessaSynth does not recognize, kept so {@link BasicMIDI.writeRMIDI} can write them back.
|
|
7178
|
+
* Each entry is a complete RIFF chunk (FourCC, size, data and the pad byte).
|
|
7179
|
+
*
|
|
7180
|
+
* - `info` holds unknown chunks from the `INFO` list.
|
|
7181
|
+
* - `file` holds unknown chunks from the main `RIFF` chunk. They get written after the sound bank.
|
|
7182
|
+
*
|
|
7183
|
+
* > **Tip**
|
|
7184
|
+
* >
|
|
7185
|
+
* > See [SF2 RMIDI Extension Specification](https://github.com/spessasus/sf2-rmidi-specification#handling-differences) for more info.
|
|
7186
|
+
*/
|
|
7187
|
+
rmidiExtraChunks: {
|
|
7188
|
+
info: Uint8Array<ArrayBufferLike>[];
|
|
7189
|
+
file: Uint8Array<ArrayBufferLike>[];
|
|
7190
|
+
};
|
|
7172
7191
|
/**
|
|
7173
7192
|
* The bank offset used for RMID files.
|
|
7174
7193
|
* Only applies to RMID, for normal MIDIs it's set to 0.
|
|
@@ -7213,7 +7232,7 @@ export declare class BasicMIDI {
|
|
|
7213
7232
|
*/
|
|
7214
7233
|
get infoEncoding(): string | undefined;
|
|
7215
7234
|
/**
|
|
7216
|
-
* Loads a MIDI file (SMF, RMIDI, XMF,
|
|
7235
|
+
* Loads a MIDI file (SMF, RMIDI, XMF, Tracker Modules) from a given ArrayBuffer.
|
|
7217
7236
|
* @param arrayBuffer The ArrayBuffer containing the binary file data.
|
|
7218
7237
|
* @param fileName The _optional_ name of the file, will be used if the MIDI file does not have a name.
|
|
7219
7238
|
*
|
|
@@ -7222,12 +7241,11 @@ export declare class BasicMIDI {
|
|
|
7222
7241
|
* and populates the BasicMIDI instance with the parsed data.
|
|
7223
7242
|
* It supports Standard MIDI Files (SMF), RIFF MIDI (RMIDI), and Extensible Music Format (XMF).
|
|
7224
7243
|
* It also handles embedded soundbanks in RMIDI and XMF files.
|
|
7225
|
-
* Tracker modules
|
|
7226
|
-
* into MIDI with an embedded sound bank.
|
|
7244
|
+
* Tracker modules are converted into MIDI with an embedded sound bank.
|
|
7227
7245
|
*/
|
|
7228
7246
|
static fromArrayBuffer(arrayBuffer: ArrayBuffer, fileName?: string): BasicMIDI;
|
|
7229
7247
|
/**
|
|
7230
|
-
* Loads a MIDI file (SMF, RMIDI, XMF,
|
|
7248
|
+
* Loads a MIDI file (SMF, RMIDI, XMF, Tracker Modules) from a given file.
|
|
7231
7249
|
* @param file The file to load.
|
|
7232
7250
|
*/
|
|
7233
7251
|
static fromFile(file: File): Promise<BasicMIDI>;
|
|
@@ -7512,7 +7530,7 @@ export declare class BasicMIDI {
|
|
|
7512
7530
|
* > Do not call in audioWorkletGlobalScope as it uses TextDecoder.
|
|
7513
7531
|
*
|
|
7514
7532
|
* @param infoType The metadata type.
|
|
7515
|
-
* @returns `string`, `Date`, `ArrayBuffer` or undefined if the info is not set.
|
|
7533
|
+
* @returns `string`, `Date`, `ArrayBuffer` or undefined if the info is not set (or the creation date cannot be parsed).
|
|
7516
7534
|
*/
|
|
7517
7535
|
getRMIDInfo<K extends keyof RMIDInfoData>(infoType: K): RMIDInfoData[K] | undefined;
|
|
7518
7536
|
/**
|