spessasynth_lib 3.24.40 → 3.25.1
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/LICENSE +202 -26
- package/README.md +3 -1
- package/midi_parser/midi_editor.js +5 -16
- package/midi_parser/rmidi_writer.js +64 -33
- package/midi_parser/used_keys_loaded.js +47 -32
- package/package.json +2 -2
- package/sequencer/sequencer.js +0 -1
- package/synthetizer/synthetizer.js +48 -1
- package/synthetizer/worklet_processor.min.js +12 -12
- package/synthetizer/worklet_system/main_processor.js +17 -2
- package/synthetizer/worklet_system/message_protocol/handle_message.js +3 -0
- package/synthetizer/worklet_system/message_protocol/worklet_message.js +5 -6
- package/synthetizer/worklet_system/snapshot/channel_snapshot.js +1 -1
- package/synthetizer/worklet_system/snapshot/synthesizer_snapshot.js +1 -1
- package/synthetizer/worklet_system/worklet_methods/controller_control/controller_change.js +67 -131
- package/synthetizer/worklet_system/worklet_methods/controller_control/reset_controllers.js +2 -2
- package/synthetizer/worklet_system/worklet_methods/system_exclusive.js +6 -6
- package/synthetizer/worklet_system/worklet_utilities/worklet_processor_channel.js +35 -2
- package/utils/sysex_detector.js +46 -0
- package/utils/xg_hacks.js +128 -0
- /package/externals/{NOTICE → stbvorbis_sync/NOTICE} +0 -0
|
@@ -15,7 +15,13 @@ import { DEFAULT_SYNTH_CONFIG } from "./audio_effects/effects_config.js";
|
|
|
15
15
|
import { SoundfontManager } from "./synth_soundfont_manager.js";
|
|
16
16
|
import { KeyModifierManager } from "./key_modifier_manager.js";
|
|
17
17
|
import { channelConfiguration } from "./worklet_system/worklet_utilities/controller_tables.js";
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
DEFAULT_PERCUSSION,
|
|
20
|
+
DEFAULT_SYNTH_MODE,
|
|
21
|
+
MIDI_CHANNEL_COUNT,
|
|
22
|
+
VOICE_CAP,
|
|
23
|
+
WORKLET_PROCESSOR_NAME
|
|
24
|
+
} from "./synth_constants.js";
|
|
19
25
|
|
|
20
26
|
|
|
21
27
|
/**
|
|
@@ -239,6 +245,30 @@ export class Synthetizer
|
|
|
239
245
|
});
|
|
240
246
|
}
|
|
241
247
|
|
|
248
|
+
/**
|
|
249
|
+
* @type {"gm"|"gm2"|"gs"|"xg"}
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
_midiSystem = DEFAULT_SYNTH_MODE;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* The current MIDI system used by the synthesizer
|
|
256
|
+
* @returns {"gm"|"gm2"|"gs"|"xg"}
|
|
257
|
+
*/
|
|
258
|
+
get midiSystem()
|
|
259
|
+
{
|
|
260
|
+
return this._midiSystem;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* The current MIDI system used by the synthesizer
|
|
265
|
+
* @param value {"gm"|"gm2"|"gs"|"xg"}
|
|
266
|
+
*/
|
|
267
|
+
set midiSystem(value)
|
|
268
|
+
{
|
|
269
|
+
this._midiSystem = value;
|
|
270
|
+
}
|
|
271
|
+
|
|
242
272
|
/**
|
|
243
273
|
* current voice amount
|
|
244
274
|
* @type {number}
|
|
@@ -383,6 +413,23 @@ export class Synthetizer
|
|
|
383
413
|
}
|
|
384
414
|
break;
|
|
385
415
|
|
|
416
|
+
case returnMessageType.masterParameterChange:
|
|
417
|
+
/**
|
|
418
|
+
* @type {masterParameterType}
|
|
419
|
+
*/
|
|
420
|
+
const param = messageData[0];
|
|
421
|
+
const value = messageData[1];
|
|
422
|
+
switch (param)
|
|
423
|
+
{
|
|
424
|
+
default:
|
|
425
|
+
break;
|
|
426
|
+
|
|
427
|
+
case masterParameterType.midiSystem:
|
|
428
|
+
this._midiSystem = value;
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
break;
|
|
432
|
+
|
|
386
433
|
case returnMessageType.synthesizerSnapshot:
|
|
387
434
|
if (this._snapshotCallback)
|
|
388
435
|
{
|