Hi all,
please can you have a look at my GigFile ?
I am able to switch SongVariation with my X-Touch Mini Controller but on my Global Rack i want to Sync the Buttons to Song Variation. If i activate the Widget Button the LED on the X-Touch is working.
But i am not able to sync them to the actually SongPart. I feel that this has to be scripted in the Global Rackspace aswell.
Ah… as i am a new USER i am right now not able to upload my Gig File.
Following the Code i actually have in my Global Rig:
var
VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8 : Widget // used button’s names
// Declaration of widget arrays for upper and lower preset buttons
buttons : Widget Array = [VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8]
// Called when any of several widgets changed → This is the block for UPPER buttons
On WidgetValueChanged(w : Widget, index: integer, newValue : double) from VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8
var i : integer
selected : boolean = false
if newValue == 1.0 then
// Deselect other buttons
for i = 0; i < Size(buttons); i = i + 1 do
if i <> index then SetWidgetValue(buttons[i],0.0) end
end
else
// Check there is one selected button
for i = 0; i < Size(buttons); i = i + 1 do
if GetWidgetValue(buttons[i]) == 1.0 then selected = true end
end
// If no button is selected, assume the callback was called by the widget that was deselected (and re-select it)
if !selected then SetWidgetValue(w, 1.0) end
end
End