Hi, since āRing the Alarmā apparently does not allow MIDI CCās, Iāve create the following project that will take CC in put (CC0-3 on MIDI CH 1) and convert it to click and drag operations that should be able to move the knobs.
Translator 1.0 monitors for CC on MIDI CH 1. Then based on the CC number and value, the rules will handle other operations.
The first operatation is to see if the application is in focus and if it is not, it will focus the application with Perform āfocusā (translator 1.6). Then it will perform āclickā (translator 1.2) which will click down at the last known location of the knob in question. Then it will perform ādragā which will move the pointer up or down depending on the direction you are moving the knob (translator 1.3). Finally it will set a timer to automatically do a click up (translator 1.1) after 250ms of inactivity.
Here are the rules of translator 1.0. Note that the CCās can either be relative or absolute but I set them to absolute with the global variable gc because your controller cannot do relative. I use the global variable g0-g7 to determine the last value of each knob.
// focused?
if gb==0 then Perform "focus"
if gb==0 then Log "Log Ring the Alarm is not focusd"
if gb==0 then exit rules, skip Outgoing Action
if ga==0 then Perform "Click", oo
ga=1
if gc==1 then Goto "absolute"
Label "relative"
if ga==1 then Perform "Drag", qq
Goto "done"
Label "absolute"
if oo==0 then tt=g0
if oo==1 then tt=g1
if oo==2 then tt=g2
if oo==3 then tt=g3
if oo==4 then tt=g4
if oo==5 then tt=g5
if oo==6 then tt=g6
if oo==7 then tt=g7
// convert absolute to relative for drag operation
if qq>tt then rr=1
if qq<tt then rr=127
if tt!=0 then Perform "drag",rr
if oo==0 then g0=qq
if oo==1 then g1=qq
if oo==2 then g2=qq
if oo==3 then g3=qq
if oo==4 then g4=qq
if oo==5 then g5=qq
if oo==6 then g6=qq
if oo==7 then g7=qq
Label "done"
Translator 1.4 and 1.5 tell Bome MIDI Translator Pro when the application if focused by setting or resetting the global variable gb.
The global variable ga is used to determine if the mouse is clicked down (1) for a drag operation or release (0).
The rules of translator 1.2 determine the click down location for each knob. You will need to set up the locations based on where on your screen your knobs are. Iāve only programmed 4 knobs (for my screen) but you can follow the pattern I used for the other four. I then use the value pp for the screen X location and qq for the screen Y location.
Here are the rules:
// knob locations need to be manually entered here
// and then the location on the screen for the knobs
// should NOT move
// knob 1 location
if oo==0 then pp=381
if oo==0 then qq=481
if oo==0 then exit rules, execute Outgoing Action
//knob 2
if oo==1 then pp=381
if oo==1 then qq=765
if oo==1 then exit rules, execute Outgoing Action
// knob 3
if oo==2 then pp=572
if oo==2 then qq=481
if oo==2 then exit rules, execute Outgoing Action
// knob 4
if oo==3 then pp=697
if oo==3 then qq=481
if oo==3 then exit rules, execute Outgoing Action
exit rules, skip Outgoing Action
So the main thing you will need to do to get it working on your system is to set the proper mouse locations for click in the above rules.
Ring-The-Alarm-with mouse.bmtp (4.3 KB)
I hope this helps and it is a shame that the developer didnāt take the time to allow MIDI control of the knobs as a stand alone program.
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz