spessasynth_lib 3.22.10 → 3.22.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/midi_parser/midi_editor.js +13 -0
- package/package.json +1 -1
- package/sequencer/worklet_sequencer/play.js +6 -8
- package/synthetizer/worklet_processor.min.js +10 -10
- package/synthetizer/worklet_system/worklet_methods/reset_controllers.js +14 -1
- package/synthetizer/worklet_system/worklet_utilities/lowpass_filter.js +4 -4
|
@@ -476,6 +476,19 @@ export function modifyMIDI(
|
|
|
476
476
|
midi.tracks[firstVoice.track].splice(firstIndex, 0, bankChange);
|
|
477
477
|
firstIndex++;
|
|
478
478
|
|
|
479
|
+
// on xg, add lsb
|
|
480
|
+
if (!change.isDrum && midiSystem === "xg")
|
|
481
|
+
{
|
|
482
|
+
const bankChangeLSB = getControllerChange(
|
|
483
|
+
midiChannel,
|
|
484
|
+
midiControllers.lsbForControl0BankSelect,
|
|
485
|
+
desiredBank,
|
|
486
|
+
ticks
|
|
487
|
+
);
|
|
488
|
+
midi.tracks[firstVoice.track].splice(firstIndex, 0, bankChangeLSB);
|
|
489
|
+
firstIndex++;
|
|
490
|
+
}
|
|
491
|
+
|
|
479
492
|
// add program change
|
|
480
493
|
const programChange = new MidiMessage(
|
|
481
494
|
ticks,
|
package/package.json
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { getEvent, messageTypes, midiControllers } from "../../midi_parser/midi_message.js";
|
|
2
2
|
import { WorkletSequencerReturnMessageType } from "./sequencer_message.js";
|
|
3
3
|
import { MIDIticksToSeconds } from "../../midi_parser/basic_midi.js";
|
|
4
|
+
import { resetArray } from "../../synthetizer/worklet_system/worklet_utilities/controller_tables.js";
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
// an array with preset default values
|
|
7
|
-
const defaultControllerArray =
|
|
8
|
-
// default values
|
|
9
|
-
defaultControllerArray[midiControllers.mainVolume] = 100;
|
|
10
|
-
defaultControllerArray[midiControllers.expressionController] = 127;
|
|
11
|
-
defaultControllerArray[midiControllers.pan] = 64;
|
|
12
|
-
defaultControllerArray[midiControllers.releaseTime] = 64;
|
|
13
|
-
defaultControllerArray[midiControllers.brightness] = 64;
|
|
14
|
-
defaultControllerArray[midiControllers.reverbDepth] = 0;
|
|
8
|
+
const defaultControllerArray = resetArray.slice(0, 128);
|
|
15
9
|
|
|
16
10
|
/**
|
|
17
11
|
* plays from start to the target time, excluding note messages (to get the synth to the correct state)
|
|
@@ -130,6 +124,10 @@ export function _playTo(time, ticks = undefined)
|
|
|
130
124
|
programs[channel].bank = ccV;
|
|
131
125
|
break;
|
|
132
126
|
}
|
|
127
|
+
else if (controllerNumber === midiControllers.resetAllControllers)
|
|
128
|
+
{
|
|
129
|
+
savedControllers[channel] = Array.from(defaultControllerArray);
|
|
130
|
+
}
|
|
133
131
|
if (this.sendMIDIMessages)
|
|
134
132
|
{
|
|
135
133
|
this.sendMIDICC(channel, controllerNumber, ccV);
|