setAttribute - not working for me
-
Yeah, basically that requires you to open up the JSON editor and remove the
processorId
andparameterId
manually. -
@Christoph-Hart any chance of a fix then?
-
Yes, however there's an unspoken "if there's a workaround, it's not a bug" policy in HISE :) so it's categorized under "cleanup maintenance task"
-
@Christoph-Hart What if I want to link a button from the main interface to a script processor, AND use a callback in the main interface script?
Can I link to the script processor from the callback in the main interface?
I know there's a workaround using a global variable, but this is not a good idea AFAIKFor instance, I have a button in the interface which controls another button in a script processor, but at the same time I want to set a panel visible in the main interface
Thanks
-
@ustk You can either use the interface designer to link a control to a parameter or you can write a custom callback function. You can't have both. So if you want a control to perform more than one function you will have to use a custom callback.
@Christoph-Hart Would it be possible to link a control in the interface designer and also have it trigger a custom callback after it performs its linked action? Or is there something fundamental preventing this?
-
@d-healey Thanks, I understand that we can't have both, I think because it would be weird to have two different callbacks for the same control (I guess the property editor use a kind of callback in the background)
so what should I do in my custom callback if I want also to link to a button in a script processor?
is a:ScriptProcessor.setAttribute(n, value)
working?
If so, how to define "n" when you have 20 controls?If it is not the way, it would be cool to add it
-
Ok I tried, and it works this way
Still, I don't understand how to find "n" except by trying all the possibilities
-
@ustk To get
n
put all the controls in an array then usearray.indexOf(control);
-
@ustk Take a look at this example
A knob controlling Gain, Limiter Treshold and Delay at the same time. You can multiply the controls as much as you want...
By the way to get the n, you need to learn the control parameter names: create a slider (you won't use it to control, just to learn parameter name), select processor ID and Parameter. You can apply this Parameter name in setAttribute controls. Then delete the slider... ;)
HiseSnippet 1318.3oc6X8zaaTDEe1jrgXCA0h3CvJK.4fRS8FmjVUDxIw4OXBw1pNs.mhlr633QY8LV6NaaLUQhOAbOHNzuCbhy7ofaH0u.bf6v6M6td2E6DRPzpFoL4Rl2626Mu4su+MtsuzgEDH8IFENX3.Fw38L6LTn5UuGkKHM1hXXZZaaS1b3.ZP.ykXXL8tHKiByPzq+n1lTOpvgkRhPdpj6v9JdetJkZ602i64sC0kc.ueFzqrdCGontzSFBlwzlUHCnNmPOl0jhvlxjXL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4cFMsGu+.O1toS6AQFWzzd5DNcwwr9suNNVLlv2t9DlGzX57WnouZWn+ko1t7..cG9aLArefo1wdSxf0e3u4Xv2wrM8sg.hGKCUbww6SgYNvZ9MC62Ad5iCCLUgf4gsdMlBaRFsuBtGMnNLgqdC1AIlocRcdjocBSxUHSeVLSe4K4gcDR1T8uu6NsW+1T8aS0uMU+s1T84RlyM9sOZeQwjc4+QbhdUTrK3k+YiWUqUnZPnZTq9pup1iYdLZPlr6euF7RI3UMof90Z6IXIHd44m+a09eK++Mh26MwYzm53KOzI5cNXgs4zTf6sPOMdAy8w8V1IutA8GvyK3G53fCGdOH1ZxRr70VhpWaIV4ZKwpWaIV6ZKwCt1R7vKQB7G2aiPkreT0BfP6s0upzvXaAEhV0oLj+FCRRsfC
-
Or use the autocomplete popup which shows you all available parameters - this is also more safe because of NO MAGIC NUMBERS.
-
@Christoph-Hart said in setAttribute - not working for me:
Or use the autocomplete popup which shows you all available parameters - this is also more safe because of NO MAGIC NUMBERS.
Oops I totally misunderstood the question.
-
Thanks! It is way easier...