OK, this version uses CC instead of notes.
I set up translator 2.3 to send mouse position x=100 y=100 for single tap.
Translator 2.5 is sends mouse position x=200 y=100 for double tap.
Translator send mouse position x=300 y=100 for triple tap.
There is a lot going behind the scenes as ‘gestures’ is a complex set of action.
Basically we count the number of times a given button is pressed or release within 500 ms. Based on that count, we determine the proper output.
A single tap is count 2 (press and release)
A double tap is count 4 …etc
The CC # evaluation and MIDI channel and rules are done in each translator in preset 2 to determine if all are a match. If anything doesn’t match, the outgoing action does not happen, otherwise it will.
Here are the rules of 2.3 . Other translators have similar rules but look for different conditions to look for a match. Only one of the translators will fire because each have different conditions.
// First parameter is MIDI CH
// Second parameter is Note Number
// Third parameter is count
if zz==1 then Log "Log Gesture called with ch=%oo% note=%pp% count=%qq%"
// Which channel
if oo!=1 then exit rules, skip Outgoing Action
// Which note
if pp!=123 then exit rules, skip Outgoing Action
// Which count
if qq!=2 then exit rules, skip Outgoing Action
if zz!=0 then Log "Log Perform Success on Gesture Single tap MIDI CH %oo% Note %pp%"
I use global variable zz to determine whether to send log messages. This is done for troubleshooting. You can turn these messages off by setting it to 0 in the rules of translator 0.2 and then restarting the project.
My aliases are as follows. You should set up your input device to your physical controller port.
You can learn more about aliases from this tutorial.
In my example a push of a button is CC with a value of 127 and release is with same CC with value of 0. If your buttons are toggle instead of momentary, then this will not work as you will not be able to determine the count correctly.
If you need gestures for other CC’s, you would duplicate translators 2.1 through 2.10 and modify the rules for their proper note (CC) number and MIDI Channel.
If you want different mouse locations than the example, simply set the desired X and Y mouse locations in translators 2.3, 2.5 and 2.7. I left unused gesture translators disabled.
Good luck!
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz