Hi,
I think there are some fundamental flaws in the way you handle gestures and also it is probably best not to have any default MIDI thru routes. It is probably best to use just 1 timer for all gestures rather than different timers for each button.
If you want to continue with your method, I guess that is OK but I’m not going to try to debug it further.
I put this example together.
In this example I define the incoming cc number as the button for gesture
g0=cc # for button 0
g1= cc# for button 1
g2= cc# for button 2
Right now I only have buttons defined in my example, but am only using g1. If you are going to use more than 10 buttons g0-g9, then I suggest you use global variables starting with something else that is not used
The rules in all of the gesture manager translators use these variables to determine which button you pressed and whether it is a CC or note.
I manage layers by the global variables gh and gi which are the preset number 0-4 and the offset of 2. I leave presets 0 and 1 always on. I added a preset “Preset Manager” to manage which of the other presets are enabled. Only one at a time
Look at the “Set Globals” in the “Init” preset where I document all global variables.
In this example I’m only working with CC1 input and in each preset set the outgoing offset up by 8 so
Gesture manager 1 outgoing for button 1 is 1, for Gesture Manager 2 it is 9 for Gesture Manager 3 it is 17 and Gesture manager 4 it is 25. I did not program any LED button feedback but you could add translators for that if you would like.
I bitmap the state of the bits in each preset with global variables h0=h3 for toggle. (Double Press)
I disabled all unused gestures in all presets but you can enable them and do anything you would like as output actions.
This whole structure may seem overly complicated but if you have a lot of stuff to program, once the template is set up correctly it can scale quite nicely. I suggest you study it carefully until you understand what is going on.
Right now I hardcoded the offset in each preset output CC but you might want to use math in the rules to set the offsets based on the preset number to define your button outputs instead.
Again I only set up CC 1 for all layers because you might have other ideas and global variables that you want to use for each incoming button.
The way to work it is set up all global variables the way you want. Then update the translators in 1 preset the way you want them as a template and then duplicate presets and make tweaks as necessary to each preset for changes in values and/or global variables used etc.
gesture-manager-example-2021-06-30.bmtp (41.0 KB)
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz