How to control a sustain pedal