spessasynth_core 4.4.9 → 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 +25 -6
- package/dist/index.js +3697 -167
- 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
|
@@ -3827,6 +3827,7 @@ export declare class SoundBankManager {
|
|
|
3827
3827
|
* @param id The unique ID to assign to the sound bank.
|
|
3828
3828
|
* If a sound bank with this ID already exists, it will be replaced.
|
|
3829
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.
|
|
3830
3831
|
* @param reset If the synthesizer should reset (put every channel's controllers back to defaults) after the change.
|
|
3831
3832
|
* Set it to `false` to keep a song playing, the channels then only update to the new presets.
|
|
3832
3833
|
*/
|
|
@@ -6284,6 +6285,10 @@ interface ChannelMIDIParameter {
|
|
|
6284
6285
|
/**
|
|
6285
6286
|
* The key shift of the channel (in semitones).
|
|
6286
6287
|
* Drum channels ignore this value.
|
|
6288
|
+
*
|
|
6289
|
+
* > **Note**
|
|
6290
|
+
* >
|
|
6291
|
+
* > For `xg` drum channels this instead changes the pitch in semitones.
|
|
6287
6292
|
*/
|
|
6288
6293
|
keyShift: number;
|
|
6289
6294
|
/**
|
|
@@ -6789,7 +6794,7 @@ export interface NoteTime {
|
|
|
6789
6794
|
*/
|
|
6790
6795
|
export interface RMIDIWriteOptions {
|
|
6791
6796
|
/**
|
|
6792
|
-
* 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`.
|
|
6793
6798
|
* [See this for more info](https://github.com/spessasus/sf2-rmidi-specification#dbnk-chunk)
|
|
6794
6799
|
*/
|
|
6795
6800
|
bankOffset: number;
|
|
@@ -7168,6 +7173,21 @@ export declare class BasicMIDI {
|
|
|
7168
7173
|
* > See [SF2 RMIDI Extension Specification](https://github.com/spessasus/sf2-rmidi-specification#readme) for more info.
|
|
7169
7174
|
*/
|
|
7170
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
|
+
};
|
|
7171
7191
|
/**
|
|
7172
7192
|
* The bank offset used for RMID files.
|
|
7173
7193
|
* Only applies to RMID, for normal MIDIs it's set to 0.
|
|
@@ -7212,7 +7232,7 @@ export declare class BasicMIDI {
|
|
|
7212
7232
|
*/
|
|
7213
7233
|
get infoEncoding(): string | undefined;
|
|
7214
7234
|
/**
|
|
7215
|
-
* Loads a MIDI file (SMF, RMIDI, XMF,
|
|
7235
|
+
* Loads a MIDI file (SMF, RMIDI, XMF, Tracker Modules) from a given ArrayBuffer.
|
|
7216
7236
|
* @param arrayBuffer The ArrayBuffer containing the binary file data.
|
|
7217
7237
|
* @param fileName The _optional_ name of the file, will be used if the MIDI file does not have a name.
|
|
7218
7238
|
*
|
|
@@ -7221,12 +7241,11 @@ export declare class BasicMIDI {
|
|
|
7221
7241
|
* and populates the BasicMIDI instance with the parsed data.
|
|
7222
7242
|
* It supports Standard MIDI Files (SMF), RIFF MIDI (RMIDI), and Extensible Music Format (XMF).
|
|
7223
7243
|
* It also handles embedded soundbanks in RMIDI and XMF files.
|
|
7224
|
-
* Tracker modules
|
|
7225
|
-
* into MIDI with an embedded sound bank.
|
|
7244
|
+
* Tracker modules are converted into MIDI with an embedded sound bank.
|
|
7226
7245
|
*/
|
|
7227
7246
|
static fromArrayBuffer(arrayBuffer: ArrayBuffer, fileName?: string): BasicMIDI;
|
|
7228
7247
|
/**
|
|
7229
|
-
* Loads a MIDI file (SMF, RMIDI, XMF,
|
|
7248
|
+
* Loads a MIDI file (SMF, RMIDI, XMF, Tracker Modules) from a given file.
|
|
7230
7249
|
* @param file The file to load.
|
|
7231
7250
|
*/
|
|
7232
7251
|
static fromFile(file: File): Promise<BasicMIDI>;
|
|
@@ -7511,7 +7530,7 @@ export declare class BasicMIDI {
|
|
|
7511
7530
|
* > Do not call in audioWorkletGlobalScope as it uses TextDecoder.
|
|
7512
7531
|
*
|
|
7513
7532
|
* @param infoType The metadata type.
|
|
7514
|
-
* @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).
|
|
7515
7534
|
*/
|
|
7516
7535
|
getRMIDInfo<K extends keyof RMIDInfoData>(infoType: K): RMIDInfoData[K] | undefined;
|
|
7517
7536
|
/**
|