Converting a Potentiometer sustain pedal to switch sustain pedal within rules

My sustain pedal is giving continuous messages between 0-127. This is causing a lot of events and delay since I am sending the same sustain pedals to all channels(1-16). Can you give me some statement that I can put in rules which will trigger only 0 and 127.

If my explanation is not clear please let me know.

Thanks

Hi,

Although this doesn’t trigger at 0 and 127, it is probably closer to what you want. The first ruled determines the target position to trigger either on or off. The output will be either 0 or 127 but it will only trigger once on either side of the trigger point. You could modify the output to trigger on multiple channels if you send raw MIDI. Take a look and let me know what you think.

Continous-Sustain-Crossover.bmtp (1.8 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hi,

Your approach is a little different to my situation and looks like a range of possibilities are targeted. I am sending you my statement in rules. Actually this works for me but sometimes I get more than one 0’s or 127’s. That is the Issue.
Example.bmtp (1.1 KB)

Can you capture your pedal input and output in Bome MIDI Translator pro then copy and paste the log so that I can see what is happening? Perhaps your pedal is sending value of 0 or 127 more than once.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

This is more like your strategy but it will only send 0 or 127 once. We use the global variable ‘ga’ to determine if the outgoing CC value was already sent. If you are using a different global variable, you will need to replace ‘ga’ with something else in the rules

// Look for 0 or 127
// if qq!=0 and qq!=127 then exit rules skip
// the below rules are Bome's way of writing the above

if qq!=0 then skip next 2 rules
// only send once
if ga==0 then exit rules, skip outgoing action
ga=0
if qq!=127 then skip next 2 rules
// only send once
if ga==127 then exit rules, skip outgoing action
ga=127


// if qq==0 or qq==127 then exit rules execute
// Bome's way of handling OR
if qq==0 then exit rules, execute outgoing action
if qq==127 then exit rules, execute outgoing action
// must not be 0 or 127 so do nothing.
exit rules, skip outgoing action

Example (1).bmtp (1.6 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thanks a lot. This worked.

1 Like