Preset Select + Mute script (to avoid clicks)
-
@orange It happens in Hise too
-
@d-healey Ha, I thought that snippet might not do the sameas my project!
I think perhaps my script needs to be a lot more efficient in order to speed it up. Quite often when changing presets the panel and knob changes lag behing eachother when changing state. I need to get better at Arrays for sure.
Thanks for looking at it!
-
@DanH How many components do you have in your interface?
-
@ustk 60+ including tables, analysers etc etc..
-
@DanH That's not a particularly large amount of components so probably not the cause, but it's easy to test - make a backup and delete components one at a time and see if the problem goes away. I would suspect your script is causing the issue since I couldn't recreate it with the script disabled.
-
@DanH You got some controls but nothing that should add lag to the interface... I got lag in the past with 700+ components. If something is not going as expected it's definitely about the code (or when a slider sets 10 modules at the same time for instance...)
-
@ustk I've no doubt the code can be better - it's the first one I've ever made! There's a lot of repetition. I was hoping to group some things into arrays but not having much luck - Can you put components into arrays?
For example I have a button which switches on/off several panels and modules. At the moment the callback is one long list of about 15 lines, for eg:
analyser1.setBypassed(1- value); panel1.showControl(value); etc x 15
Can I get the list of components / modules into two different arrays and do for example:
allanalysers = [analyser1,2,3 etc];
and then in the callback:
allanalysers[i].setBypassed(1- value);
?
-
-
@ustk checked this out recently but will go through it again!!
-
@DanH Make sure your code follows these guidelines and it will go a long way to cleaning things up - https://github.com/davidhealey/hise_documentation/blob/master/scripting/scripting-in-hise/hise-script-coding-standards.md
-
@d-healey Thanks David, v useful :)