spessasynth_core 4.0.25 → 4.1.0
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 +68 -72
- package/dist/index.d.ts +1889 -1665
- package/dist/index.js +8232 -7635
- package/dist/index.js.map +1 -1
- package/package.json +16 -4
package/README.md
CHANGED
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
<img src='https://raw.githubusercontent.com/spessasus/SpessaSynth/refs/heads/master/src/website/spessasynth_logo_rounded.png' width='300' alt='SpessaSynth logo'>
|
|
4
4
|
</p>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
WebAssembly
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
_A powerful SF2/DLS/MIDI TypeScript/JavaScript library. It works with any modern JS environment that supports
|
|
7
|
+
WebAssembly._
|
|
10
8
|
|
|
11
9
|
It allows you to:
|
|
12
10
|
|
|
@@ -16,14 +14,12 @@ It allows you to:
|
|
|
16
14
|
- Convert DLS to SF2! (and back!)
|
|
17
15
|
- [and more!](#current-features)
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### v4.0.0 TypeScript Update is here!
|
|
17
|
+
### v4.0.0 TypeScript Update is here!
|
|
22
18
|
|
|
23
19
|
[**Read about breaking changes here.**](https://spessasus.github.io/spessasynth_core/extra/3-28-migration-guide)
|
|
24
20
|
|
|
25
21
|
> **Tip:**
|
|
26
|
-
>
|
|
22
|
+
>
|
|
27
23
|
> Looking for an easy-to-use WebAudioAPI browser wrapper?
|
|
28
24
|
> Try [spessasynth_lib](https://github.com/spessasus/spessasynth_lib)!
|
|
29
25
|
|
|
@@ -48,45 +44,45 @@ It allows you to:
|
|
|
48
44
|
|
|
49
45
|
### Easy Integration
|
|
50
46
|
|
|
51
|
-
- **Modular design:**
|
|
52
|
-
- **Flexible:**
|
|
53
|
-
- **Easy to Use:**
|
|
54
|
-
just [two lines of code!](https://spessasus.github.io/spessasynth_core/getting-started#minimal-setup)
|
|
55
|
-
- **No dependencies:**
|
|
56
|
-
- **TypeScript definitions:**
|
|
47
|
+
- **Modular design:** _Easy integration into other projects (load what you need)_
|
|
48
|
+
- **Flexible:** _It's not just a MIDI player!_
|
|
49
|
+
- **Easy to Use:** _Basic setup is
|
|
50
|
+
just [two lines of code!](https://spessasus.github.io/spessasynth_core/getting-started#minimal-setup)_
|
|
51
|
+
- **No dependencies:** _Batteries included!_
|
|
52
|
+
- **TypeScript definitions:** _Autocompletion in IDEs!_
|
|
57
53
|
|
|
58
54
|
### Powerful MIDI Synthesizer
|
|
59
55
|
|
|
60
56
|
- Suitable for both **real-time** and **offline** synthesis
|
|
61
57
|
- **Excellent SoundFont support:**
|
|
62
58
|
- **Full Generator Support**
|
|
63
|
-
- **Full Modulator Support:**
|
|
59
|
+
- **Full Modulator Support:** _First (to my knowledge) JavaScript SoundFont synth with that feature!_
|
|
64
60
|
- **GeneralUserGS Compatible:**
|
|
65
|
-
|
|
61
|
+
_[See more here!](https://github.com/mrbumpy409/GeneralUser-GS/blob/main/documentation/README.md)_
|
|
66
62
|
- **SoundFont3 Support:** Play compressed SoundFonts!
|
|
67
|
-
- **Experimental SF2Pack Support:** Play soundfonts compressed with BASSMIDI! (
|
|
68
|
-
|
|
69
|
-
- **Can load very large SoundFonts:** up to 4GB!
|
|
70
|
-
memory
|
|
63
|
+
- **Experimental SF2Pack Support:** Play soundfonts compressed with BASSMIDI! (_Note: only works with vorbis
|
|
64
|
+
compression_)
|
|
65
|
+
- **Can load very large SoundFonts:** up to 4GB! _Note: Only Firefox handles this well; Chromium has a hard-coded
|
|
66
|
+
memory limit_
|
|
71
67
|
- **Great DLS Support:**
|
|
72
68
|
- **DLS Level 1 Support**
|
|
73
69
|
- **DLS Level 2 Support**
|
|
74
70
|
- **Mobile DLS Support**
|
|
75
|
-
- **Correct articulator support:**
|
|
71
|
+
- **Correct articulator support:** _Converts articulators to both modulators and generators!_
|
|
76
72
|
- **Tested and working with gm.dls!**
|
|
77
|
-
- **Correct volume:**
|
|
73
|
+
- **Correct volume:** _Properly translated to SoundFont volume!_
|
|
78
74
|
- **A-Law encoding support**
|
|
79
75
|
- **Both unsigned 8-bit and signed 16-bit sample support (24-bit theoretically supported as well!)**
|
|
80
|
-
- **Detects special articulator combinations:**
|
|
76
|
+
- **Detects special articulator combinations:** _Such as vibratoLfoToPitch_
|
|
81
77
|
- **Soundfont manager:** Stack multiple soundfonts!
|
|
82
78
|
- **Unlimited channel count:** Your CPU is the limit!
|
|
83
79
|
- **Excellent MIDI Standards Support:**
|
|
84
80
|
- **MIDI Controller Support:** Default supported
|
|
85
81
|
controllers [here](https://spessasus.github.io/spessasynth_core/extra/midi-implementation#default-supported-controllers)
|
|
86
|
-
- **Portamento Support:**
|
|
87
|
-
- **Sound Controllers:**
|
|
82
|
+
- **Portamento Support:** _Smooth note gliding!_
|
|
83
|
+
- **Sound Controllers:** _Real-time filter and envelope control!_
|
|
88
84
|
- **MIDI Tuning Standard Support:**
|
|
89
|
-
|
|
85
|
+
_[more info here](https://spessasus.github.io/spessasynth_core/extra/midi-implementation#midi-tuning-standard)_
|
|
90
86
|
- [Full **RPN** and limited **NRPN**
|
|
91
87
|
support](https://spessasus.github.io/spessasynth_core/extra/midi-implementation#supported-registered-parameters)
|
|
92
88
|
- **SoundFont2 NRPN Support**
|
|
@@ -97,84 +93,84 @@ It allows you to:
|
|
|
97
93
|
|
|
98
94
|
### Powerful and Fast MIDI Sequencer
|
|
99
95
|
|
|
100
|
-
- **Supports MIDI formats 0, 1, and 2:**
|
|
101
|
-
- **[Multi-Port MIDI](https://spessasus.github.io/spessasynth_core/extra/about-multi-port) support:**
|
|
102
|
-
channels
|
|
103
|
-
- **Smart preloading:** Only preloads the samples used in the MIDI file for smooth playback
|
|
104
|
-
velocity!)
|
|
105
|
-
- **Lyrics support:**
|
|
106
|
-
- **Raw lyrics available:** Decode in any encoding!
|
|
107
|
-
- **Loop points support:**
|
|
96
|
+
- **Supports MIDI formats 0, 1, and 2:** _note: format 2 support is experimental as it's very, very rare._
|
|
97
|
+
- **[Multi-Port MIDI](https://spessasus.github.io/spessasynth_core/extra/about-multi-port) support:** _More than 16
|
|
98
|
+
channels!_
|
|
99
|
+
- **Smart preloading:** Only preloads the samples used in the MIDI file for smooth playback _(down to key and
|
|
100
|
+
velocity!)_
|
|
101
|
+
- **Lyrics support:** _Add karaoke to your program!_
|
|
102
|
+
- **Raw lyrics available:** Decode in any encoding! _(Kanji? No problem!)_
|
|
103
|
+
- **Loop points support:** _Ensures seamless loops!_
|
|
108
104
|
|
|
109
105
|
### Read and Write SoundFont and MIDI Files with Ease
|
|
110
106
|
|
|
111
107
|
#### Read and write MIDI files
|
|
112
108
|
|
|
113
|
-
- **Smart name detection:**
|
|
114
|
-
- **Raw name available:** Decode in any encoding!
|
|
115
|
-
- **Port detection during load time:**
|
|
116
|
-
- **Used channels on track:**
|
|
117
|
-
- **Key range detection:**
|
|
109
|
+
- **Smart name detection:** _Handles incorrectly formatted and non-standard track names!_
|
|
110
|
+
- **Raw name available:** Decode in any encoding! _(Kanji? No problem!)_
|
|
111
|
+
- **Port detection during load time:** _Manage ports and channels easily!_
|
|
112
|
+
- **Used channels on track:** _Quickly determine which channels are used!_
|
|
113
|
+
- **Key range detection:** _Detect the key range of the MIDI!_
|
|
118
114
|
- **Easy MIDI editing:**
|
|
119
115
|
Use [helper functions](https://spessasus.github.io/spessasynth_core/writing-files/midi#modifymidi) to modify the
|
|
120
116
|
song to your needs!
|
|
121
|
-
- **Loop detection:**
|
|
122
|
-
- **First note detection:**
|
|
123
|
-
- **Lyrics support:**
|
|
117
|
+
- **Loop detection:** _Automatically detects loops in MIDIs (e.g., from **Touhou Project**)_
|
|
118
|
+
- **First note detection:** _Skip unnecessary silence at the start by jumping to the first note!_
|
|
119
|
+
- **Lyrics support:** _Both regular MIDI and .kar files!_
|
|
124
120
|
- **[Write MIDI files from scratch](https://spessasus.github.io/spessasynth_core/midi/creating-midi-files)**
|
|
125
|
-
- **Easy saving:**
|
|
126
|
-
just [one function!](https://spessasus.github.io/spessasynth_core/writing-files/midi#writemidi)
|
|
121
|
+
- **Easy saving:** _Save with
|
|
122
|
+
just [one function!](https://spessasus.github.io/spessasynth_core/writing-files/midi#writemidi)_
|
|
127
123
|
|
|
128
124
|
#### Read and write [RMID files with embedded sound banks](https://github.com/spessasus/sf2-rmidi-specification#readme)
|
|
129
125
|
|
|
130
|
-
- **[Level 4](https://github.com/spessasus/sf2-rmidi-specification#level-4) compliance:** Reads and writes
|
|
131
|
-
- **Compression and trimming support:**
|
|
132
|
-
- **DLS Version support:**
|
|
133
|
-
- **Automatic bank shifting and validation:** Every sound bank
|
|
134
|
-
- **Metadata support:** Add title, artist, album name and cover and more! And of course, read them too!
|
|
135
|
-
encoding!)
|
|
126
|
+
- **[Level 4](https://github.com/spessasus/sf2-rmidi-specification#level-4) compliance:** Reads and writes _everything!_
|
|
127
|
+
- **Compression and trimming support:** _Reduce a MIDI file with a 1GB sound bank to **as small as 5MB**!_
|
|
128
|
+
- **DLS Version support:** _The original legacy format with bank offset detection!_
|
|
129
|
+
- **Automatic bank shifting and validation:** Every sound bank _just works!_
|
|
130
|
+
- **Metadata support:** Add title, artist, album name and cover and more! And of course, read them too! _(In any
|
|
131
|
+
encoding!)_
|
|
136
132
|
- **Compatible with [Falcosoft Midi Player 6!](https://falcosoft.hu/softwares.html#midiplayer)**
|
|
137
133
|
- **Easy saving:**
|
|
138
|
-
|
|
134
|
+
_[As simple as saving a MIDI file!](https://spessasus.github.io/spessasynth_core/writing-files/midi#writermidi)_
|
|
139
135
|
|
|
140
136
|
#### Read and write SoundFont2 files
|
|
141
137
|
|
|
142
|
-
- **Easy info access:**
|
|
143
|
-
an [object of strings!](https://spessasus.github.io/spessasynth_core/sound-bank#soundbankinfo)
|
|
144
|
-
- **Smart trimming:** Trim the sound bank to only include samples used in the MIDI
|
|
145
|
-
- **SF3 conversion:**
|
|
146
|
-
- **Easy saving:**
|
|
138
|
+
- **Easy info access:** _Just
|
|
139
|
+
an [object of strings!](https://spessasus.github.io/spessasynth_core/sound-bank#soundbankinfo)_
|
|
140
|
+
- **Smart trimming:** Trim the sound bank to only include samples used in the MIDI _(down to key and velocity!)_
|
|
141
|
+
- **SF3 conversion:** _Compress SoundFont2 files to SoundFont3 with variable quality!_
|
|
142
|
+
- **Easy saving:** _Also just [one function!](https://spessasus.github.io/spessasynth_core/sound-bank#write)_
|
|
147
143
|
|
|
148
144
|
#### Read and write SoundFont3 files
|
|
149
145
|
|
|
150
146
|
- Same features as SoundFont2 but with now with **Ogg Vorbis compression!**
|
|
151
|
-
- **Variable compression quality:**
|
|
152
|
-
- **Compression preserving:**
|
|
153
|
-
- **Custom compression function:**
|
|
147
|
+
- **Variable compression quality:** _You choose between file size and quality!_
|
|
148
|
+
- **Compression preserving:** _Avoid decompressing and recompressing uncompressed samples for minimal quality loss!_
|
|
149
|
+
- **Custom compression function:** _Want a different format than Vorbis? No problem!_
|
|
154
150
|
|
|
155
151
|
#### Read and write DLS Level One or Two files
|
|
156
152
|
|
|
157
153
|
- Read DLS (DownLoadable Sounds) files like SF2 files!
|
|
158
|
-
- **Native support:**
|
|
159
|
-
still [just one function!](https://spessasus.github.io/spessasynth_core/sound-bank#write)
|
|
160
|
-
-
|
|
161
|
-
also [just one function!](https://spessasus.github.io/spessasynth_core/sound-bank#writedls)
|
|
154
|
+
- **Native support:** _Saving it as sf2 is
|
|
155
|
+
still [just one function!](https://spessasus.github.io/spessasynth_core/sound-bank#write)_
|
|
156
|
+
- _That's right, saving as DLS is
|
|
157
|
+
also [just one function!](https://spessasus.github.io/spessasynth_core/sound-bank#writedls)_
|
|
162
158
|
- Converts articulators to both **modulators** and **generators**!
|
|
163
159
|
- Works with both unsigned 8-bit samples and signed 16-bit samples!
|
|
164
|
-
- **A-Law encoding support:**
|
|
165
|
-
- **Covers special generator cases:**
|
|
166
|
-
- **Correct volume:**
|
|
160
|
+
- **A-Law encoding support:** _Sure, why not?_
|
|
161
|
+
- **Covers special generator cases:** _such as modLfoToPitch_!
|
|
162
|
+
- **Correct volume:** _looking at you, Viena and gm.sf2!_
|
|
167
163
|
- Support built right into the synthesizer!
|
|
168
164
|
- **Convert SF2 to DLS:** [limited support](https://spessasus.github.io/spessasynth_core/extra/dls-conversion-problem)
|
|
169
165
|
|
|
170
166
|
### Export MIDI as WAV
|
|
171
167
|
|
|
172
168
|
- Save the MIDI file as WAV audio!
|
|
173
|
-
- **Metadata support:**
|
|
174
|
-
- **Cue points:**
|
|
175
|
-
- **Loop multiple times:**
|
|
176
|
-
-
|
|
177
|
-
also [just one function!](https://spessasus.github.io/spessasynth_core/writing-files/wav#audiobuffertowav)
|
|
169
|
+
- **Metadata support:** _Embed metadata such as title, artist, album and more!_
|
|
170
|
+
- **Cue points:** _Write MIDI loop points as cue points!_
|
|
171
|
+
- **Loop multiple times:** _Render two (or more) loops into the file for seamless transitions!_
|
|
172
|
+
- _That's right, saving as WAV is
|
|
173
|
+
also [just one function!](https://spessasus.github.io/spessasynth_core/writing-files/wav#audiobuffertowav)_
|
|
178
174
|
|
|
179
175
|
### Limitations
|
|
180
176
|
|
|
@@ -292,7 +288,7 @@ The files will be placed in the `dist` folder.
|
|
|
292
288
|
|
|
293
289
|
## License
|
|
294
290
|
|
|
295
|
-
Copyright ©
|
|
291
|
+
Copyright © 2026 Spessasus
|
|
296
292
|
Licensed under the Apache-2.0 License.
|
|
297
293
|
|
|
298
294
|
#### Legal
|