
I'm using a uc-33e controller and I want the numeric keypad to server 2 purposes:
If the layer is not in focus, set the focus to that layer (but do not hide/unhide)
If the layer is in focus, toggle hide/unhide.
So, if layer 1 is active and not hidden and layer 3 is hidden, I could press the '3' button to focus on layer 3 and change some parameters then press the '3' button again and have it displayed (not hidden)
I am able to hide/not hide the currently focused layer, but I am unable to change the focus of the layer (unless the main window doesn't update the new layer with the orange hightlight)
Could this be related to http://www.garagecube.com/forum/viewtopic.php?t=635&highlight=ctrllayerfocused ? Was this fixed ?
The code I'm using with debug statements looks like this: (in DirectEvent)
Code: Select all
if type == 'MIDI' and param['channel'] == 1 :
##print 'Midi Key from uc-33e:' , param['param1']
## On the uc33e, P01 sends the numeric keypads at button 1 = midi message 19, button 2 = midi message 20, etc.
myDebug = True
myLayer = param['param1'] - 18
if modul8.getValue('ctrl_layer_activated', myLayer) == True:
if myDebug :
print "Before : "
print "Layer " , myLayer, " : focus : ", modul8.getValue('ctrl_layer_focused', myLayer)
print "Layer " , myLayer, " : hidden: ", modul8.getValue('ctrl_layer_hidden', myLayer )
print "Layer " , myLayer, " : active: ", modul8.getValue('ctrl_layer_activated', myLayer )
if modul8.getValue('ctrl_layer_focused', myLayer) == False :
modul8.setValue('ctrl_layer_focused', True, myLayer)
else :
hideToggle = modul8.getValue('ctrl_layer_hidden',myLayer)
modul8.setValue('ctrl_layer_hidden', not hideToggle, myLayer)
if myDebug :
print "After : "
print "Layer " , myLayer, " : focus : ", modul8.getValue('ctrl_layer_focused', myLayer)
print "Layer " , myLayer, " : hidden: ", modul8.getValue('ctrl_layer_hidden', myLayer )
print "Layer " , myLayer, " : active: ", modul8.getValue('ctrl_layer_activated', myLayer )
print "-------------------------------------------------------------"
Thanks in advance to anyone who may be able to shed some light on this issue!
-james
(a nomad. )