Hi,
Please find the attached.
First of all I set up my aliases as follows:
You will want to set that to your pedal and your desired output application or device.
You can learn more about aliases from this tutorial.
Translators 1.0 and 1.2 start a 1ms timer (1.4) each from different pedals when pushed down.
Transators 1.1 and 1.3 will measure the time and then stop the timer
The rules of translators 1.1 an 1.3 will measure the time between events and depending of the value send the desired increment (1.1) or decrement (1.3). We also make sure that we never go above 127 (1.1.) and less than 0 (1.3)
Each has a rule to set the current PC (global variable gb). The timer uses the global variable ga for the timer count.
The Perform rules in translators 1.1 and 1.3 call translator 1.5 to set the desired Program Change value.
As mentioned earlier the global variables “ga” and “gb” are used in this project to store the timer count an PC value respectively.
You may need to change the input trigger of translators 1.0-1.3 base on the MIDI message your pedals send. I’m using note on and note off instead of CCs.
Here are the rules of translator 1.1
pp=ga
if pp<500 then qq=1
if pp>=500 then qq=10
if pp>=1500 then qq=32
if pp>=3000 then qq=64
Log "Log Count = %pp% increase by %qq%"
gb=gb+qq
if gb>127 then gb=127
Perform "Program Change", gb
ga=0
and 1.3
pp=ga
if pp<500 then qq=1
if pp>=500 then qq=10
if pp>=1500 then qq=32
if pp>=3000 then qq=64
Log "Log Count = %pp% decrease by %qq%"
gb=gb-qq
if gb<0 then gb=0
Perform "Program Change", gb
ga=0
And here is the project file.
Measure-Between-Events-to-PC-Inc-Dec.bmtp (3.1 KB)
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz