spessasynth_core 3.26.6 → 3.26.7
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 +10 -8
- package/package.json +1 -1
- package/src/midi/basic_midi.js +4 -1
package/README.md
CHANGED
|
@@ -21,6 +21,12 @@ npm install --save spessasynth_core
|
|
|
21
21
|
|
|
22
22
|
> Note: This is the new heart of the SpessaSynth library, after the repository has been split.
|
|
23
23
|
|
|
24
|
+
**Project index**
|
|
25
|
+
|
|
26
|
+
- spessasynth_core (you are here) - SF2/DLS/MIDI library
|
|
27
|
+
- [spessasynth_lib](https://github.com/spessasus/spessasynth_lib) - spessasynth_core wrapper optimized for browsers and WebAudioAPI
|
|
28
|
+
- [SpessaSynth](https://github.com/spessasus/SpessaSynth) - online/local web player/editor application
|
|
29
|
+
|
|
24
30
|
## Current Features
|
|
25
31
|
|
|
26
32
|
### Easy Integration
|
|
@@ -87,7 +93,7 @@ npm install --save spessasynth_core
|
|
|
87
93
|
- **Compression and trimming support:** Reduce a MIDI file with a 1GB soundfont to **as small as 5MB**!
|
|
88
94
|
- **DLS Version support:** The original legacy format with bank offset detection!
|
|
89
95
|
- **Automatic bank shifting and validation:** Every soundfont *just works!*
|
|
90
|
-
- **Metadata support:** Add title, artist, album name and cover and more! And of course read them too! *(In any encoding!)*
|
|
96
|
+
- **Metadata support:** Add title, artist, album name and cover and more! And of course, read them too! *(In any encoding!)*
|
|
91
97
|
- **Compatible with [Falcosoft Midi Player 6!](https://falcosoft.hu/softwares.html#midiplayer)**
|
|
92
98
|
- **Easy saving:** [As simple as saving a MIDI file!](https://github.com/spessasus/spessasynth_core/wiki/Writing-MIDI-Files#writermidi)
|
|
93
99
|
|
|
@@ -120,13 +126,9 @@ npm install --save spessasynth_core
|
|
|
120
126
|
- **Loop multiple times:** *Render two (or more) loops into the file for seamless transitions!*
|
|
121
127
|
- *That's right, saving as WAV is also [just one function!](https://github.com/spessasus/spessasynth_core/wiki/Writing-Wave-Files#audiobuffertowav)*
|
|
122
128
|
|
|
123
|
-
|
|
124
|
-
- Synth's performance may be
|
|
125
|
-
- [SF2 to DLS Conversion](https://github.com/spessasus/SpessaSynth/wiki/DLS-Conversion-Problem)
|
|
126
|
-
- Audio may sometimes sound distorted in Chrome, Edge, Brave,
|
|
127
|
-
etc. due to a **[Chromium Bug](https://issues.chromium.org/issues/367304685).**
|
|
128
|
-
I can't do anything about it, only hope that it gets fixed.
|
|
129
|
-
Please consider voting for it on the bug tracker to get it fixed!
|
|
129
|
+
### Limitations
|
|
130
|
+
- Synth's performance may be questionable sometimes
|
|
131
|
+
- [SF2 to DLS Conversion limits](https://github.com/spessasus/SpessaSynth/wiki/DLS-Conversion-Problem)
|
|
130
132
|
|
|
131
133
|
#### TODO
|
|
132
134
|
- Improve the performance of the engine
|
package/package.json
CHANGED
package/src/midi/basic_midi.js
CHANGED
|
@@ -402,6 +402,9 @@ class BasicMIDI extends MIDISequenceData
|
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
+
// fix empty port channel offsets (do a copy to turn empty slots into undefined so map goes over them)
|
|
406
|
+
this.midiPortChannelOffsets = [...this.midiPortChannelOffsets].map(o => o ?? 0);
|
|
407
|
+
|
|
405
408
|
// fix midi ports:
|
|
406
409
|
// midi tracks without ports will have a value of -1
|
|
407
410
|
// if all ports have a value of -1, set it to 0,
|
|
@@ -426,7 +429,7 @@ class BasicMIDI extends MIDISequenceData
|
|
|
426
429
|
{
|
|
427
430
|
defaultPort = 0;
|
|
428
431
|
}
|
|
429
|
-
this.midiPorts = this.midiPorts.map(port => port === -1 ? defaultPort : port);
|
|
432
|
+
this.midiPorts = this.midiPorts.map(port => port === -1 || port === undefined ? defaultPort : port);
|
|
430
433
|
// add fake port if empty
|
|
431
434
|
if (this.midiPortChannelOffsets.length === 0)
|
|
432
435
|
{
|