spessasynth_lib 3.10.0 → 3.11.0
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/midi_parser/midi_data.d.ts +17 -0
- package/@types/midi_parser/midi_loader.d.ts +19 -3
- package/@types/midi_parser/rmidi_writer.d.ts +14 -1
- package/midi_parser/midi_data.js +21 -1
- package/midi_parser/midi_editor.js +15 -0
- package/midi_parser/midi_loader.js +74 -24
- package/midi_parser/rmidi_writer.js +84 -16
- package/midi_parser/used_keys_loaded.js +4 -8
- package/package.json +1 -1
- package/sequencer/worklet_sequencer/play.js +2 -2
- package/sequencer/worklet_sequencer/song_control.js +2 -1
- package/synthetizer/worklet_processor.min.js +7 -7
- package/synthetizer/worklet_system/worklet_methods/program_control.js +8 -2
- package/synthetizer/worklet_system/worklet_methods/system_exclusive.js +1 -1
|
@@ -24,7 +24,8 @@ export function programChange(channel, programNumber, userChange=false)
|
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
// always 128 for percussion
|
|
27
|
-
const
|
|
27
|
+
const bankWithOffset = Math.max(0, channelObject.midiControllers[midiControllers.bankSelect] - this.soundfontBankOffset);
|
|
28
|
+
const bank = channelObject.drumChannel ? 128 : bankWithOffset;
|
|
28
29
|
const preset = this.soundfont.getPreset(bank, programNumber);
|
|
29
30
|
this.setPreset(channel, preset);
|
|
30
31
|
this.callEvent("programchange",{
|
|
@@ -68,6 +69,10 @@ export function setDrums(channel, isDrum)
|
|
|
68
69
|
{
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
72
|
+
if(channelObject.drumChannel === isDrum)
|
|
73
|
+
{
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
71
76
|
if(isDrum)
|
|
72
77
|
{
|
|
73
78
|
// clear transpose
|
|
@@ -128,7 +133,8 @@ export function reloadSoundFont(buffer)
|
|
|
128
133
|
{
|
|
129
134
|
const channelObject = this.workletProcessorChannels[i];
|
|
130
135
|
channelObject.cachedVoices = [];
|
|
131
|
-
for (let j = 0; j < 128; j++)
|
|
136
|
+
for (let j = 0; j < 128; j++)
|
|
137
|
+
{
|
|
132
138
|
channelObject.cachedVoices.push([]);
|
|
133
139
|
}
|
|
134
140
|
channelObject.lockPreset = false;
|
|
@@ -318,7 +318,7 @@ export function systemExclusive(messageData, channelOffset = 0)
|
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
320
320
|
const channel = messageData[4] + channelOffset;
|
|
321
|
-
const value = messageData[6]
|
|
321
|
+
const value = messageData[6];
|
|
322
322
|
switch (messageData[5])
|
|
323
323
|
{
|
|
324
324
|
// bank select
|