Changing Scriptnode Drop Down Parameter Via Script
-
I am trying to change the "MODEL" dropdown value of a Neural node via script and I just can't seem to figure it out.
I had read that you reference the nodes by ID, but I don't see the IDs in the node properties.
If anyone could point me in the right direction, I would really appreciate it...
-
I cleaned up the network a bit. If I can get script access to the MODEL dropdown, I wouldn't need 5 neural nodes anyway.
So, hopefully this makes it easier to see what I'm trying to do...
Again, any help would be greatly appreciated.
-
@scottmire You could probably just use the soft_bypass container (check the template section in the nodes) and bypass the ones you aren't using
-
@HISEnberg
So, I originally did that....each NN node had a different "model" loaded. But every time I switched between the nodes, there was an audible loud "click". You can also see from the first screenshot, I also used a Branch node....same problem. On the other hand, if I use just one NN node and switch the "model" in the dropdown parameter....no click. I just need to be able to control the value of the dropdown via script. The problem I'm having is that I can't figure out how to get a reference to the dropdown in the script. -
@scottmire Ya feels like there should be a way to reference that dropdown. It might not be ideal but you could create 5 individual networks for each nn and use the scriptFx or Hardcoded Fx and swap between those.
-
@HISEnberg OHHHHH.....that might work! It ain't pretty.....but it might work...
-
@scottmire I intend to work on something in the near future to check for loud pops and temporarily drop the audio signal (almost like a brickwall limiter), or some other method. I have this issue too with some saturation algorithms (plus the soft.bypass introduces some pops of its own). If I figure it out I'll share it with you.
-
@HISEnberg Yes, that would be awesome.
BTW....thank you so much for the help. It's much appreciated. -
The classes in the API that might be of interest to you are DspNetwork and Node.
Now, to change the actual value of a parameter you need this hidden class
HISE/hi_scripting/scripting/scriptnode/api/NodeBase.h at 03c420c1d12f7a4457a8b497a6b78bc49d250e85 · christophhart/HISE
The open source framework for sample based instruments - HISE/hi_scripting/scripting/scriptnode/api/NodeBase.h at 03c420c1d12f7a4457a8b497a6b78bc49d250e85 · christophhart/HISE
GitHub (github.com)
So give it a try. First you'll have to find out the name of the dropdown parameter, then you could maybe try to pass ints 1, 2, 3... or 0, 1, 2... or a straight up string.