Such a lovely coincidence to see @fr810 back for a cameo appearance on the forum. And on the very same day that I’m also here to ask my first question in years!
…and even more fun that the question is about the one topic where Fabian is probably the only living human who actually has a vague grasp of it: the dreaded plugin buses!
I remember Fabian implementing the JUCE plugin bus system years ago. I’d had a go, failed and given up. Probably others on the team had also failed and given up. Fabian took the challenge, and after huge effort managed to come up with a system that worked. Sadly it was also unintelligible and nobody else understood it, but it was still probably the best and only way to make it work in all the plugin formats.
Anyway, my question today is because I’m in the middle of trying to get our Cmajor JIT loader plugin working. That means that it’s a plugin that can randomly recompile itself and change things like the number of parameters and bus layout at any moment while running.
I know that changing the list of parameters dynamically will crash most DAWs, and hoping to make that work is a bit of a lost cause. What I’m not sure about is whether dynamically changing buses is equally a waste of effort. I’d have thought that some plugins will add or remove side-chain buses while running, and that mostly works OK, right…?
I did a quick test with the JUCE audio plugin host, but even if I just try to change the number of channels in an existing bus, it all goes horribly wrong. But I’m totally unclear about whether:
- it’s reasonable to expect the real DAWs to generally cope with bus changes?
- whether or not I’m doing it all wrong, given the 30 different bus-related virtual methods in AudioProcessor with confusing names, where it’s very hard to fathom whether a host is supposed to call them, or a plugin is supposed to call them, or the plugin is supposed to override them and do something…
So I guess my question is: should I just move on and make our JIT plugin declare 2 ins and 2 outs, and never change them? Or is there any point in trying to make it work before giving up?