Knob to keystroke translation in rules

I am having some problems trying to find the correct syntax for a rule that I need to create for my project. I apologise in advance as I am not experienced at all in Bome, so the question might appear a bit dumb for this community.
I need to connect a knob (to be more exactly, a slide potentiometer) to a keystroke, so that I get the following effect:
If potentiometerValue is between 0 (min. value) and 0.5, then keystroke Z is held down (press without release), and if potentiometerValue is between 0.5 and 1 (max. value), then keystroke X is held down.

Does anyone have any clue how I can write this in the rules providing the proper syntax? I keep getting error messages and I am not sure how to fix them since I don’t quite understand how to use the Bome language, even after checking the manual and the YouTube tutorials.

Any help would be GREATLY appreciated!!!


Hi and welcome to the Bome community!

The following project should be what you want, however I assume that if you are pressing Z you want to release X and visa versa.

Also I created a ‘dead zone’ in the middle where you don’t want to press either key.

First of all MIDI knobs have a value between 0 and 127

  • If the value of the incoming MIDI message is between 0 and 60 then we press and hold Z and release X.
  • If the value is between 61 and 69 we release both keys. (Dead Zone)
  • If the value is between 70 and 127 we we press and hold X and release Z

The rules of first translator (0.0) handles most of the logic calling various ‘Perform’ actions that handle the keystrokes.

  • Translator 0.1 Performs Keystroke Z Down (if not done already) and also ensures that X is not down by calling translator 0.4.
  • Likewise Translator 0.2 Performs Keystroke X Down (if not done already) and also ensures Z is not down by calling Translator 0.3
  • When we are in the middle area, we ensure both KeyStroke X and Z up are sent.
  • Translator 0.3 and 0.4 handle keystroke up actions

Note also, I have turned off key repeat for the KeyStroke Down outgoing actions of translator 0.1 and 0.2. If you want repeat, then simply add this option and it will repeat at the rate your operating system defaults.

I use an alias ‘My Controller’ for the controller and have set CC39 for the incoming trigger. You will need to set it to point to your actual MIDI controller port. You may also need to adjust the CC# for the controller that you are using as the incoming trigger on translator 0.0.


You can learn more about aliases from this tutorial.

I’ve commented the rules pretty heavily so that perhaps you can see what I was doing.

Knob-to-Keystroke-2024-01-04.bmtp (2.8 KB)

Good luck!

Steve Caldwell
Bome Customer Care

Also available for paid consulting services: