Ok, they are just normal, absolute position control knobs. So you want to be able to scroll through the entire brush size range, as in smallest when the knob is all the way left and largest when all the way right?
So basically you need to track and output 2 main variables, you need to know which direction the knob is being turned, clockwise or anti-clockwise and you need to downsample the value message from the knob to 50 steps.
I've had it working, and it can be done like this:
Code: Select all
Translator 0: Knob Input Clockwise
Incoming: MIDI B0 00 oo
Rules:
if oo>=ga then Goto "Forward"
ga=oo
exit rules, skip Outgoing Action
Label "Forward"
ga=oo
oo=oo*20
pp=oo/51
if gb==pp then exit rules, skip Outgoing Action
gb=pp
Outgoing: Keystroke: ]
Translator 1: Knob Input Counter Clockwise
Incoming: MIDI B0 00 oo
Rules:
if oo<=gc then Goto "Back"
gc=oo
exit rules, skip Outgoing Action
Label "Back"
gc=oo
oo=oo*20
pp=oo/51
if gd==pp then exit rules, skip Outgoing Action
gd=pp
Outgoing: Keystroke: [
Knob message
B0 00 oo is just for example, replace this with your knob message...
I have written a translator per direction of the knob, so each tracks if it is going the direction that translator 'wants' to see and if so, then downsamples the velocity from 128 steps to 50 steps and outputs the correct keystroke for that direction.
Obviously there is no output from photoshop to tell us which brush size is selected and and we are controlling the size with a relative message (up or down), and because 50 key-presses is a LOT in one quick sweep of a knob, things can slip out of sync. If you turn tooooo fast, then when you finally reach the furthest right on the knob (100%) then sometimes photoshop will not have caught up and won't have the largest brush selected... My advice is to start with the knob all the way left and the brush size at 1, and play lightly!
I hope this makes sense! If you want/need me to go into more detail, just ask!
Scott