feat: sustain (CC64), modulation (CC1), pitch bend for MIDI keyboard
- Add controllerChange forwarder for all CC messages (cmd 0xB) - Add pitchBend method to SonicSF + MIDI handler (cmd 0xE) - CCs routed to _synthInstance.controllerChange(ch, cc, val) - Pitch bend routed to _synthInstance.pitchBend(ch, 14bit-val)
This commit is contained in:
@@ -154,6 +154,13 @@
|
||||
return { ..._channels[channel] };
|
||||
},
|
||||
|
||||
pitchBend: function (channel, value) {
|
||||
if (channel < 0 || channel > 15) return;
|
||||
if (_initialized && _synthInstance) {
|
||||
try { _synthInstance.pitchBend(channel, value); } catch (e) {}
|
||||
}
|
||||
},
|
||||
|
||||
playNote: function (note, velocity, durationMs, startTime, program, destinationNode, channel, synthEngine) {
|
||||
if (_initialized && _synthInstance) {
|
||||
this._playNoteSpessa(note, velocity, durationMs, startTime, program, channel, synthEngine);
|
||||
|
||||
Reference in New Issue
Block a user