We add more MIDI commands to our sketch:
Sustain pedal - keep the notes playing, ignoring NoteOff until the Sustain is turned off
(this is the right pedal of a piano)
Controllers - some MIDI voices (instruments/sounds/patches/...) accept "Control Change" MIDI commands to modify the sound.
The MIDI specification lists them:
https://midi.org/midi-1-0-control-change-messages
We can add more potentiometers and a sustain pedal (button) and extending our previous sketch:
MIDI_keys_pitchbend_sustain_controlChange.ino