spessasynth_lib 3.20.9 → 3.20.11

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.
@@ -1,3 +1,13 @@
1
+ /**
2
+ * synthesizer.js
3
+ * purpose: responds to midi messages and called functions, managing the channels and passing the messages to them
4
+ */
5
+ /**
6
+ * @typedef {Object} StartRenderingDataConfig
7
+ * @property {BasicMIDI} parsedMIDI - the MIDI to render
8
+ * @property {SynthesizerSnapshot} snapshot - the snapshot to apply
9
+ * @property {boolean|undefined} oneOutput - if synth should use one output with 32 channels (2 audio channels for each midi channel). this disables chorus and reverb.
10
+ */
1
11
  export const WORKLET_PROCESSOR_NAME: "spessasynth-worklet-system";
2
12
  export const VOICE_CAP: 450;
3
13
  export const DEFAULT_PERCUSSION: 9;
@@ -230,7 +230,8 @@ export function writeRMIDI(
230
230
  consoleColors.info);
231
231
  } else {
232
232
  // there is a preset with this bank. add offset. For drums add the normal offset.
233
- const newBank = (bank === 128 ? 0 : realBank) + bankOffset;
233
+ let drumBank = system === "xg" ? 127 : 0;
234
+ const newBank = (bank === 128 ? drumBank : realBank) + bankOffset;
234
235
  channel.lastBank.messageData[1] = newBank;
235
236
  SpessaSynthInfo(`%cPreset %c${bank}:${e.messageData[0]}%c exists. Changing bank to ${newBank}.`,
236
237
  consoleColors.info,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spessasynth_lib",
3
- "version": "3.20.9",
3
+ "version": "3.20.11",
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",
@@ -26,8 +26,6 @@ import { SoundfontManager } from './synth_soundfont_manager.js'
26
26
  * @property {boolean|undefined} oneOutput - if synth should use one output with 32 channels (2 audio channels for each midi channel). this disables chorus and reverb.
27
27
  */
28
28
 
29
- const CURRENT_SPESSASYNTH_VERSION = "3.20.9";
30
-
31
29
  export const WORKLET_PROCESSOR_NAME = "spessasynth-worklet-system";
32
30
 
33
31
  export const VOICE_CAP = 450;
@@ -325,14 +323,6 @@ export class Synthetizer {
325
323
  SpessaSynthWarn(new Error(messageData));
326
324
  this.eventHandler.callEvent("soundfonterror", messageData);
327
325
  break;
328
-
329
- case returnMessageType.identify:
330
- if(messageData !== CURRENT_SPESSASYNTH_VERSION)
331
- {
332
- this.stopAll(true);
333
- this.worklet.disconnect();
334
- throw new Error(`Outdated worklet_processor.min.js! version: ${messageData}. Please update it to ${CURRENT_SPESSASYNTH_VERSION}`);
335
- }
336
326
  }
337
327
  }
338
328