Davinci Resolve and APC 40

Yes,

Please find the attached. I’m using an APC40-MK2 and the first top two knobs for up/down and left/right respectively.

I’m using the buttons right under them for click down (and hold) and release click.

Since the APC-40 MK2 uses absolute encoders I need to figure their relative movement amount by comparing with the last known amount.
Fortunately when the knobs hit there end point of 0 or 127, they keep sending the same value if you continue to turn them so we are never ‘stuck’ at the end.

Here are the rules for up/down movement. I use the global variable ‘ga’ to hold the last known value. The rules for the horizontal movement are the same except I use global variable ‘gb’.

// Compare with last known value
// positive movement
if qq>ga then rr=1
// negative movement
if qq<ga then rr=-1
// end point positive movement
if qq==127 then rr=1
// end point negative movement
if qq==0 then rr=-1
// Informational message
Log "Log Value or rr=%rr%"
// Save for next iteration
ga=qq
// multiplier to make mouse move faster
rr=rr*3

For the first knob I use up and down movement as shown here.
The second knob uses left and right movement.
image

For the buttons, I simply use click down for one and click up for the other.

Here are how my aliases are set up.

image

If you are using a MK1, you may need to make some tweaks.

APC-40-Mouse-Control.bmtp (2.1 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Ok so that worked… the only thing im having trouble with is the two knobs that control the mouse are at top of board and i would like them in a different spot but when i try to recapture those new knobs the mouse disappears it seem to only work with the two knobs that you programmed in… Other wise its great.

Disable the existing translators temporarily. Then capture the MIDI from the new knob locations. Then you can re-enable the translators and use them.

Oh and when you capture the new knob locations, make sure after capturing, you set incoming value to any value set to qq.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thanks that worked perfect.

1 Like

Is it possible to make one knob if i turn it right it sends keystroke lets say up arrow and when i turn it left it sends key stroke down arrow. i got it to do the up but which ever way i turn it it only send the keystroke for Up arrow.

Hi,

I added a preset for this. I use the Cue Control Knob because it sends relative data. I call the new ‘Perform’ action (1.9.1 or higher require), within rules to determine which keystroke to call.

If you use an absolute encoder, you would need to do something similar in rules that I did with the mouse actions.

APC-40-Mouse-Key-Control.bmtp (2.8 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thanks i will check it out.

ok great that works really nice… now hopefully this will set up the process for the rest of the knobs.

i tried to duplicate the cue level knobs settings and preform settings. But setting up for knob 8 on device control area. to increase and decrease clip vol. with the two different keystrokes. up is Cntrl(Alt(=) and down Cntrl(Alt(-) but it works but volume has to go to 100 percent before it will move down. and 0 percent before it moves. up… meaning if im turning knob right to increase vol. it works but when i turn knob left to decrease the volume continues up to 100 percent before it moves down.

There are only 2 knobs that are relative value on the APC-40 MKII.
One is Cue Level and the other is Tempo. If you are using any thing else, it will be an absolute value and you need to use the rules similar that I did with mouse movement to convert from absolute to relative.
The device control knobs are all absolute.

I used global variable ‘gc’ for this. I would suggest you start organizing your variables so that you don’t forget what you are using.

You might want to look at this tutorial.

Here is the updated project with the new encoder added.

APC-40-Mouse-Key-Control-a.bmtp (4.3 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Brilliant thanks for all the help with this. I really appreciate it.