spessasynth_core 1.1.1 → 1.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spessasynth_core",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "SoundFont2 synthesizer library for node.js",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -63,7 +63,9 @@ export function noteOn(channel, midiNote, velocity, enableDebugging = false)
63
63
  }
64
64
  computeModulators(voice, this.workletProcessorChannels[channel].midiControllers);
65
65
  voice.currentAttenuationDb = 100;
66
- })
66
+ // set initial pan to avoid split second changing from middle to the correct value
67
+ voice.currentPan = ( (Math.max(-500, Math.min(500, voice.modulatedGenerators[generatorTypes.pan] )) + 500) / 1000) // 0 to 1
68
+ });
67
69
 
68
70
  this.totalVoicesAmount += voices.length;
69
71
  // cap the voices