Page 1 of 1

How to instruct a fader to repeat a key command

Posted: 13 Jul 2013 06:22
by 310PJH
Within one of my first project builds I'd like to assign two faders to react as a zoom control for my edit window in Pro Tools.
This command is accessed as a key command in PT and moves one degree with each execution of the command on a qwerty keyboard.
How would I program these two faders to send this command in a repetitive fashion to allow a seamless zoom in/out & up/down?
I'm using OSC with the Lemur app and programing within the app itself.
Thanks.

Re: How to instruct a fader to repeat a key command

Posted: 14 Jul 2013 17:44
by Softcore
Anything typed in a script which is set to "execute"

Code: Select all

on expression x, any

inside an object (fader in our case) will be executed each time the fader is moved.

If then we set it to execute

Code: Select all

on expression x, + 
it will be executed only when the x is rising - fader moving up.
If set it to execute

Code: Select all

on expression x, -
it will be executed when the x is falling - fader moving down.

Then supposedly we use the keyout(target,key,state) function or the keycomboout(target,ctrl,alt,shift,key) function (Lemur Manual page 131) to output a keyboard press. So in , essense you need two scripts inside fader - one one expression x,+ and one on expression x,-.

But then the problem is, x inside lemur has greater resolution than just a range of 0 - 127 (midi) so you 'll end up with a super fast, not usable zooming function - so I guess you could create a custom expression to slow it down ( example, step=floor(x*100) ). But again, what happens if you open up a project which is completely zoomed out but you have left you fader at the "completely zoomed in" position? In that sense, I think its wiser to use two buttons - one to zoom in, one to zoom out.