Is it possible to make sustain pedal (CC64) trigger start song and stop song on a toggle (not momentary) basis, using Bome Translator?

Hello,

I have just bought BOME Translator Pro and I would like to make such a thing:

  1. when for the first time pressing and releasing the sustain pedal connected to my midikeyboard (CC#64) I would like to trigger “start song” midi message.
  2. when for the second time pressing and releasing the sustain pedal connected to my midi keyboard (CC#64) I would like to trigger “stop song” midi message.
    So I would like to make my sustain pedal acting as toggle instead of momentary.

I am looking forward to some solutions on that. If anyone comes up with any idea please let me know.
Thanks.

Hi and welcome to the Bome community!

Yes, this is pretty straight forward. The below project does this.

With press of sustain pedal, in rules of translator 0.1 we toggle the global variable “ga”. Then we check the value and if it is not 0 we send Start Song. If the value is zero we do nothing with this translator.

// toggle Value
ga=ga^1
if ga==0 then exit rules, skip Outgoing Action

The second translator recognizes the same trigger, however we have rule so that it only send a message if the value of ga is not zero.

if ga!=0 then exit rules, skip Outgoing Action

So essentially only one translator will output depending on the state of the global variable ga.

For testing, I set up my aliases as follows. I suggest you always use aliases. See this tutorial.

image

Attached is the example project file.

image

Sustain-toggle-2023-01-28.bmtp (1.4 KB)

Steve Caldwell
Bome Customer Care


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