Actually, didn’t need to scale at all if I want to use any number between 0 and 1. Just use Random. And it works!
Var
RplRand1 : Widget
Repl : PluginBlock;
Ka : double
Ba : integer
On WidgetValueChanged(newValue : double) from RplRand1
Ka = Random()
Ba = RandomRange(0,1)
SetParameter(Repl, 0, Ka)
SetParameter(Repl, 1, Ba)
End
However, I did want to figure out scale so I could confine the range, if desired. And this works too!
Var
RplRand1 : Widget
Repl : PluginBlock;
Ka : double
KaSc : double
Ba : integer
On WidgetValueChanged(newValue : double) from RplRand1
Ka = RandomRange(0,100)
KaSc = Scale (Ka, 0, 100, 0.25, 0.5)
Ba = RandomRange(0,1)
SetParameter(Repl, 0, KaSc)
SetParameter(Repl, 1, Ba)
End
This is awesome! Thank you for your help dhj. And let me say also, I am loving GP. It’s been exactly what I needed and really really looking forward to getting my templates together and get going.
I have another question. I see there is a way in the Script Editor to add a New Editor Tab. Do I put all scripting in the Main Script (Live) window or if I create New Editor Tabs and put other scripts, will they work too? If I missed this in the manual, I apologize.
Edit: Nevermind, I think I just figured out all scripting needs to go into the main window. This is going to get a little complicated but ok! Actually, any great examples of how to organize this window for lots of scripting would be wonderful to look at, if anyone has any.