Built-in Sustain Pedal Behavior and NoteOff Suspension
-
Currently, in the sampler, the sustain pedal works as one would expect... for a piano.
Internally, it looks like there's something really cool going on. My note launches 5 samples, all one next to another (neighbouring zones). So in any downstream MIDI processor, the Message.getNoteNumber() returns the number of the sample that will play, not the physical real note that was pressed.
The built in sustain pedal, once released, correctly notes off these voices based on which physical key isn't pressed anymore, even though the samples themselves were triggered by a different internal note number.
This lead me to believe that the built in sustain pedal merely suspends the execution of note-offs instead of doing its own
noteOffAllNotesThatDontHaveKeyDown
thing.Great! Is there any way to gain more control over this? If you're working on a guitar, you want notes on the same strings to override other playing notes. The currently built-in sustain pedal behavior doesn't allow for this as it ignores all note-offs.
Is there a way to disable the built in sustain pedal? I could then script my own sustain pedal behavior. I only found a 7 year old post about ignoring it, but ignoring CC64 will make that controller unusable for using the built-in MIDI learn capabilities of knobs.
Additionally, if I could specify which noteoffs aren't to be suspended, that would be extra cool and add more control over the built-in sustain pedal.
-
but ignoring CC64 will make that controller unusable for using the built-in MIDI learn capabilities of knobs.
Works here
function onController() { if (Message.getControllerNumber() == 64) Message.ignoreEvent(true); }
-
@d-healey Ah, I ignore it down the line but not in the interface.
Alright, that solves the bypass question! Thanks!
-
So there's a workaround for my request of the sustain pedal ignoring certain note offs.
The built-in sustain pedal will not delay execution of Synth.addVolumeFade, and I can use this instead of Synth.noteOff when the pedal is pressed.
I hope this isn't a bug, @Christoph-Hart :face_with_tongue: