Multinote Gesture detector

Hi Steve, the 3 button pedal gesture code with 250ms timer use case is very insightful and portable for either a single button or note on/off message. I am still deconstructing and commenting each line to appreciate the logic of detecting single or multiple the down/up and hold/release gestures over time.

The 3 note pedal example outlines single or multiple down/up/release(s) of one button at a time to gate program flows. My goal is to reliably detect within 250ms a triple down/up/release state such as note on/off (60 & 61 & 62) or Program Change message (x & y & z).

Do you have an existing example of monitoring and persisting the gestures of a triple button/note down/up/release state? Additional guidance regarding unexpected considerations or outliers to be aware of would be useful. No rush for any deliverable at this point. Gratefully.

I haven\'t built an example for a triple press yet however I can give you the gist of how I do it.

On pedal press up or down, I increment the value of ge and set an \"Evaluate\" timer with a 300ms delay (time to count up)

Evaluate counts the clicks/releases and from that determine the gesture type and stores it in global variable gf.

Count of 1 is click and hold

Count of 2 is click and release

Count of 3 is double click with hold on second press

Count of 4 is double click and release

For holds, I look at the value of gf to determine if it is a release after a hold

// gf is gestuire

// 1= single down and hold

// 2= single press

// 3= double down and hold

// 4= double press

// 5= release after down and hold

// 6= release after double down and hold


Gesture dispatcher translators then look at gf, note (or CC number) and channel to determine if it is for them and skip if it is not theirs.

So for triple press you would need to use ge with higher values and then set gf to the new gesture definitions you want.

For instance, for 5 count it would be triple press with hold on last press. For 6 count it would be triple press and release.

These are the current values of gf so I would add a type of 7 for triple press with hold on last and 8 (which are not yet used above) for triple press and release. You would do that in the \"Set Gesture\" translator.

Then set up translators (incoming action timer \"Gesture Displatcher\") to look for those conditions and produce the output you want.

If your foot/or finger is not fast enough for a triple press in 300ms, then set the timer in \"3 Byte Button Press\" to a longer time (maybe 500 ms or 1/2 second).


Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist

P.S. Looking at the project file I use gd as the down counter and ge as the up counter. That way I can tell how many presses (gd) and releases (ge) to determine the gesture (gf).

It has been a few months since I worked on this so I forgot ;-)


And the referenced document in case other users are interested.



Wow, this will give me alot to deconstruct this month. Got my new BomeBox! Whoohoo! Thanks for all the great and rapid responses. Gratefully.

OK, don’t be too dependent on all of the logic. I’m sure there are a few bugs there in this version.

This one is more reliable. I also added triple push gestures and increased the time to 500ms

Had to strip some aftertouch out which was giving me problems.

Also had a few other things wrong.

I have it set up for 1 note (g0) and 1 cc (g1)

Different gestures send out different PC.

Incoming note or cc doesn't care about channel which are handled in the rules of the gesture dispatcher translators.


Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist