Haven’t been doing any lua so far, so rationale below is rather generic, but it may help.
If you are able to store a global value somewhere that you can read and write with both pads, then you could create a counter. In the description below I use besides the GlobalValue a variable called Count, which actually counts the amount of increases or decreases while the pad is pressed, and a variable Number that defines the size of the value steps to take.
When/while a pad is pressed:
- assign Count=0, Number=1,
- reach a marker(M1)
- increase/decrease Global Value with Number,
- increase Count with Number,
- kick off the Function you need using GlobalValue as input
- wait for a Period (result of a function using Count and Number as input)
- go back to marker M1 if the pad is still pressed
I would make Period a function that can do two things: the period length shortens according to the value of Count (so you could accelerate when pressing long), and/or the Number could be increased (so you skip values and thus reduce number transmissions)