@d-healey @Lindon
Is that always the case? I vaguely remember documenting a situation where threads were executing (twice) before onInit. Something to do with default presets
I haven't used the default preset thing so that might change things but the usual behaviour is as I described.
Wisely said; here's the thread: https://forum.hise.audio/topic/10723/preset-component-callbacks-triggering-twice-on-startup/11?_=1742336098253
Is that always the case about Callbacks?
I will investigate - it will take me a couple weeks, but I will get back to you.
Do you mean manually inserting a conditional check
Yes, in every place you don't want it to execute automatically.
I appreciate your thoughts. For me, at least, that solution isn't tenable. I have far too many callbacks, and it has emerged, on my end, that I am unable to always tell if a callback is being called at startup—or even what means, when you get into the various preset handling systems. But overall (and this is a @Christoph-Hart thing, not you), to me it is an illogical and limiting design choice. I get why it's there, and I'm free to write my own HISE. I just think it's wrong, much like with the broadcasters. 👻
How do you pass data between (for example) UI and real-time threads.
The same way I'd pass information between my UI and an effect - or any other HISE module. Either using processor/parameter ID or setAttribute.
I thought about this, a lot. Because generally, I agree with you (and I teach my students as such) that global variables are to be eschewed (and because your code is so elegant). But there are legitimate usage cases for them. And more to the point—if the language says it supports global variables, then it should do that. At one point, @Christoph-Hart improved the handling of globals by introducing the Global object…but…and please let me know if I have this wrong…didn't fix them so they work properly.
Out-of-order execution during startup.
I have looked high and low for the screen-capture movies I made, but I don't think I was able to upload them because they were over 10MB, so I deleted them. I do remember that another user appeared to be having the same issue. I simply had to spend a couple weeks completely refactoring my code to get around that issue. 😭
Anyway, thank you, as always, for giving thought to my questions.