spessasynth_lib 3.20.25 → 3.20.26
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 +2 -2
- package/soundfont/basic_soundfont/basic_soundfont.js +9 -1
- package/soundfont/dls/dls_soundfont.js +6 -1
- package/soundfont/dls/dls_zone.js +1 -0
- package/synthetizer/worklet_processor.min.js +7 -7
- package/synthetizer/worklet_system/worklet_methods/system_exclusive.js +15 -6
- package/synthetizer/worklet_system/worklet_methods/worklet_soundfont_manager/worklet_soundfont_manager.js +11 -0
|
@@ -259,6 +259,15 @@ export function systemExclusive(messageData, channelOffset = 0)
|
|
|
259
259
|
// http://www.bandtrax.com.au/sysex.htm
|
|
260
260
|
// https://cdn.roland.com/assets/media/pdf/AT-20R_30R_MI.pdf
|
|
261
261
|
case 0x41:
|
|
262
|
+
function notRecognized()
|
|
263
|
+
{
|
|
264
|
+
// this is some other GS sysex...
|
|
265
|
+
SpessaSynthWarn(`%cUnrecognized Roland %cGS %cSysEx: %c${arrayToHexString(messageData)}`,
|
|
266
|
+
consoleColors.warn,
|
|
267
|
+
consoleColors.recognized,
|
|
268
|
+
consoleColors.warn,
|
|
269
|
+
consoleColors.unrecognized);
|
|
270
|
+
}
|
|
262
271
|
if(messageData[2] === 0x42 && messageData[3] === 0x12)
|
|
263
272
|
{
|
|
264
273
|
// this is a GS sysex
|
|
@@ -294,6 +303,8 @@ export function systemExclusive(messageData, channelOffset = 0)
|
|
|
294
303
|
switch (messageData[6])
|
|
295
304
|
{
|
|
296
305
|
default:
|
|
306
|
+
// this is some other GS sysex...
|
|
307
|
+
notRecognized();
|
|
297
308
|
break;
|
|
298
309
|
|
|
299
310
|
case 0x15:
|
|
@@ -340,7 +351,7 @@ export function systemExclusive(messageData, channelOffset = 0)
|
|
|
340
351
|
case 0x4B:
|
|
341
352
|
// scale tuning
|
|
342
353
|
const cents = messageValue - 64;
|
|
343
|
-
SpessaSynthInfo(`%cChannel %c${channel}%c tuning. Cents %c${cents}%c, with %c${arrayToHexString(messageData)}`,
|
|
354
|
+
SpessaSynthInfo(`%cChannel %c${channel}%c scale tuning. Cents %c${cents}%c, with %c${arrayToHexString(messageData)}`,
|
|
344
355
|
consoleColors.info,
|
|
345
356
|
consoleColors.recognized,
|
|
346
357
|
consoleColors.info,
|
|
@@ -348,7 +359,9 @@ export function systemExclusive(messageData, channelOffset = 0)
|
|
|
348
359
|
consoleColors.info,
|
|
349
360
|
consoleColors.value);
|
|
350
361
|
this.setChannelTuning(channel, cents);
|
|
362
|
+
break;
|
|
351
363
|
}
|
|
364
|
+
return;
|
|
352
365
|
}
|
|
353
366
|
else
|
|
354
367
|
// this is a global system parameter
|
|
@@ -390,11 +403,7 @@ export function systemExclusive(messageData, channelOffset = 0)
|
|
|
390
403
|
}
|
|
391
404
|
}
|
|
392
405
|
// this is some other GS sysex...
|
|
393
|
-
|
|
394
|
-
consoleColors.warn,
|
|
395
|
-
consoleColors.recognized,
|
|
396
|
-
consoleColors.warn,
|
|
397
|
-
consoleColors.unrecognized);
|
|
406
|
+
notRecognized();
|
|
398
407
|
return;
|
|
399
408
|
}
|
|
400
409
|
else
|
|
@@ -48,9 +48,20 @@ export class WorkletSoundfontManager
|
|
|
48
48
|
for (let i = this.soundfontList.length - 1; i >= 0; i--)
|
|
49
49
|
{
|
|
50
50
|
const font = this.soundfontList[i];
|
|
51
|
+
/**
|
|
52
|
+
* prevent preset names from the same soudfont from being overriden
|
|
53
|
+
* if the soundfont has two presets with matching bank and program
|
|
54
|
+
* @type {Set<string>}
|
|
55
|
+
*/
|
|
56
|
+
const presets = new Set();
|
|
51
57
|
for(const p of font.soundfont.presets)
|
|
52
58
|
{
|
|
53
59
|
const presetString = `${p.bank + font.bankOffset}-${p.program}`;
|
|
60
|
+
if(presets.has(presetString))
|
|
61
|
+
{
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
presets.add(presetString);
|
|
54
65
|
presetList[presetString] = p.presetName;
|
|
55
66
|
}
|
|
56
67
|
}
|