spessasynth_lib 3.20.11 → 3.20.12

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.
@@ -296,7 +296,7 @@ export function modifyMIDI(
296
296
  /**
297
297
  * @type {{index: number, track: number}[]}
298
298
  */
299
- const firstNoteOnForTrack = getFirstVoiceForChannel(midiChannel, port, offset > 0);
299
+ const firstNoteOnForTrack = getFirstVoiceForChannel(midiChannel, port, true);
300
300
  if(firstNoteOnForTrack.length === 0)
301
301
  {
302
302
  SpessaSynthWarn("Program change but no notes... ignoring!");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spessasynth_lib",
3
- "version": "3.20.11",
3
+ "version": "3.20.12",
4
4
  "description": "MIDI and SoundFont2 or DLS Synthesizer library with no compromises",
5
5
  "browser": "index.js",
6
6
  "types": "@types/index.d.ts",
@@ -57,11 +57,7 @@ export function loadNewSequence(parsedMidi)
57
57
  if(this.midiData.embeddedSoundFont !== undefined)
58
58
  {
59
59
  SpessaSynthInfo("%cEmbedded soundfont detected! Using it.", consoleColors.recognized);
60
- // set offet
61
- this.synth.soundfontBankOffset = this.midiData.bankOffset;
62
- this.synth.reloadSoundFont(this.midiData.embeddedSoundFont, true);
63
- // preload all samples
64
- this.synth.overrideSoundfont.samples.forEach(s => s.getAudioData());
60
+ this.synth.setEmbeddedSoundFont(this.midiData.embeddedSoundFont, this.midiData.bankOffset);
65
61
  }
66
62
  else
67
63
  {