This script processor has a network that consumes the parameters
-
@d-healey A scriptFX will forward the parameter callbacks to the DspNetworks parameters by default so that combobox callback will not be executed and this message is supposed to save you some brain cells. You can use
DspNetwork. setForwardControlsToParameters(false)to deactivate this and implement the callbacks for your scripted UI elements. -
@Christoph-Hart i tired using this in the onInit but got an error
"Interface:! Unknown function 'setForwardControlsToParameters' {SW50ZXJmYWNlfG9uSW5pdCgpfDEzM3w3fDQy}
: onInit() - Line 7, column 42 {SW50ZXJmYWNlfG9uSW5pdCgpfDEzM3w3fDQy}"Does this command go some where specific?
@modularsamples unfortunately exporting as a snippet and reimporting did not work for me
-
@d-healey any recollection how you figured this one out?
-
@argon Use the solution I posted above. And don't type in
DspNetwork.xxxbut use your object name instead:const var dsp = Engine.createDspNetwork("whatever"); dsp.setForwardControlsToParameter(true); -
@Christoph-Hart thanks so much, that set me on the right path. it works now :)
-
@Christoph-Hart I think I am missing something but this won't work for me.
The "whatever" here is just the name of the scriptFx correct (whatever we named the xml file)?
** Edit: Something strange with how the project was set up. There is something buggy about this feature that I can't quite put my finger on. Does the scriptnode have to be compiled to dll first? I solved the issue but I can't say exactly how. This has happened to me numerous times in the past.
-
H HISEnberg referenced this topic
-
@Christoph-Hart Unknown function 'setForwardControlsToParameter'
-
@Jeetender Check the docs. Looks like you're missing an 's' at the end -
setForwardControlsToParametershttps://docs.hise.dev/scripting/scripting-api/dspnetwork/index.html#setforwardcontrolstoparameters
-
@dannytaurus said in This script processor has a network that consumes the parameters:
@Jeetender Check the docs. Looks like you're missing an 's' at the end -
setForwardControlsToParametershttps://docs.hise.dev/scripting/scripting-api/dspnetwork/index.html#setforwardcontrolstoparameters
Yes it was missing am 's' at the end, thank you. it works but gives out a warning in almost every script "Warning: 'local' used outside of callback/inline function, treating as 'var' "
-
@Jeetender The only place you should use
varis withinfunctionsandpaint routines. Inon inityou should useconstas much as possible, followed byreg. In MIDI callbacks andinline functionsyou should uselocal.That warning is telling you you've used
localwhere you should usevar(or possiblyconst/reg) but HISE is still going to accept it and behind the scenes treat it as avar. This is for the benefit of AI agents who don't understand HISE script. -
@David-Healey said in This script processor has a network that consumes the parameters:
The only place you should use var is within functions and paint routines. In on init you should use const as much as possible, followed by reg. In MIDI callbacks and inline functions you should use local.
We should just use
vareverywhere and let the parser/compiler sort it out. -
@dannytaurus said in This script processor has a network that consumes the parameters:
We should just use var everywhere and let the parser/compiler sort it out.
Probably true...