spessasynth_lib 3.20.10 → 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.
- package/@types/synthetizer/synthetizer.d.ts +10 -0
- package/midi_parser/rmidi_writer.js +2 -1
- package/package.json +1 -1
- package/synthetizer/synthetizer.js +0 -10
- package/synthetizer/worklet_processor.min.js +5 -5
- package/synthetizer/worklet_system/main_processor.js +0 -6
- package/synthetizer/worklet_system/worklet_methods/snapshot.js +4 -1
- package/synthetizer/worklet_system/worklet_methods/voice_control.js +2 -2
|
@@ -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
|
-
|
|
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
|
@@ -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.10";
|
|
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
|
|