When you push and hold CC58 (value =127), it starts a continuous timer after setting either increment or decrement (global variable ga)
The timer adds (or subtracts) the ga from the current value of your target variable (global variable gc) and then outputs the Sysex with the new value of gc.
The timer fires continuously at the rate of global variable gd (currently set to 500ms or 1/2 second). The timer gets killed when releasing the button thereby stopping the output.
I also set up a separate pair of translators for CC59 to decrement the output values of the Sysex.
We make sure in the timer never exceeds the value of 127 or is lower than 0.
We also set a timer running flag (gb) to 1 when we start the timer, to prevent from starting it again if it is already running. When we kill the timer, we set it back to gb back to 0.
Another thing that I usually do is to document and set all global variables in the rules of a translator called “Init Global Variables”. This translator is fired by timer Init which I set to fire when the project is opened or I hit my computer ESC key. Global variables are always guaranteed to be 0 when open a project but I set everything there anyway to document and keep track of what I’m using.
I also use the Init Timer to kill the SysEx Timer. This way I can ensure it is always killed when hitting the ESC key.
Actually you might want to change the value of ge in the translator to 5 instead of 0 if you want the first value to be zero when you press that button.
Once you change it in the rules, either hit ESC or restart the project to change it’s value.