Global Variable vs. Passing Reg Variables Around?
-
Hello!
I have an interface script with a combo box, and a reg
boxValue
that updates with the value every time the menu selection is changed.Now I want to use
boxValue
in a sampler script processor. Is there a way to pass the reg from the interface script to the sampler script? I found that definingboxValue
as a global variable works as intended, but I'm unsure if this is good practice. -
@ericchesek said in Global Variable vs. Passing Reg Variables Around?:
Hello!
I have an interface script with a combo box, and a reg
boxValue
that updates with the value every time the menu selection is changed.Now I want to use
boxValue
in a sampler script processor. Is there a way to pass the reg from the interface script to the sampler script? I found that definingboxValue
as a global variable works as intended, but I'm unsure if this is good practice.- its not .
define a slider(knob) in your script processor and update it with your "boxValue" when it changes. Then in your script processor use this slider...
-
@ericchesek What Lindon said. Also what value does the reg hold, is it the same as the combo box value?
-
@d-healey
Correct, it's the same value as the combo box. -
@ericchesek Then why do you need the reg?
-
@d-healey
The only answer I have is "I don't know."
So it's possible to get the value of the combo box directly from a sampler script? I thought that had to be done in the interface script for some reason. -