spessasynth_lib 3.20.11 → 3.20.15

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.15",
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
  {
@@ -138,7 +138,7 @@ generatorLimits[generatorTypes.startloopAddrsCoarseOffset] = {min: -32768, max:
138
138
  generatorLimits[generatorTypes.keyNum] = {min: -1, max: 127, def: -1};
139
139
  generatorLimits[generatorTypes.velocity] = {min: -1, max: 127, def: -1};
140
140
 
141
- generatorLimits[generatorTypes.initialAttenuation] = {min: -250, max: 1440, def: 0}; // soundblaster allows 10dB of gain (divide by 0.4)
141
+ generatorLimits[generatorTypes.initialAttenuation] = {min: 0, max: 1440, def: 0}; // soundblaster allows 10dB of gain (divide by 0.4)
142
142
 
143
143
  generatorLimits[generatorTypes.endloopAddrsCoarseOffset] = {min: -32768, max: 32768, def: 0};
144
144