Calming Down A Variable Sustain Pedal

I have a three-pedal controller with the sustain pedal having the ability to send continuous controller messages to instruments that respond to what is sometimes called half-pedaling.
This is great to have but this particular pedal gets a little twitchy.
I have been trying to come up with some rules that for instance:

PI (Pedal Input) is =<20 then nothing should be sent to the output just as if the pedal is not being pressed

If PI (Pedal Input) goes above 20 that would then act as if the pedal was engaged sending a value of 127

When the pedal is then released it should send a value of 0 to stop the notes from sounding.

So I am basically trying to convert a continuous controller to a more simple on-off toggle, I am just having trouble understanding how to approach the logic.

Thanks as always for the help.

The following should do what you want.

We use global variables gb (last not played) and gd (sent flag)

The incoming value is local variable qq and the target trigger point is local variable oo.
The output value is local variable tt. We use local variable pp for temporary comparison of the sent flag.

I have comments throughout so I hope you can follow them.

Continous-Sustain-Crossover.bmtp (1.8 KB)

Steve Caldwell
Bome Customer Care

Also available for paid consulting services:
1 Like

I will take a look.
Thanks so much for the amazing assistance!