@svanya
MIDI CC 66 Sostenuto On/Off Switch – Like the Sustain controller (CC 64), However it only holds notes that were “On” when the pedal was pressed. People use it to “hold” chords” and play melodies over the held chord.
0 to 63 = Off, 64 to 127 = On
MIDI CC 67 Soft Pedal On/Off Switch - Lowers the volume of notes played.
0 to 63 = Off, 64 to 127 = On
You probably knew that already!
Soft should be easy..... subtracting a value of you choosing from incoming midi note volumes (and probably those that arrived earlier) while the pedal is pressed.
It might be easier to control the audio?
Sostenuto...... you will need to "hold" any note off messages until the pedal is released...... but none that arrive after the pedal is pressed.
I am not a musician, and I know nothing much about midi....... so..... I could be very wrong.
If I tried to patch this you would beat me by a mile....
David.