Detect if Stereo or Multi-Output?
-
This topic got a bit lengthy, so I'm posting this question here:
Since
Engine.getNumPluginChannels()always returns the max outputs, even if it was added as Stereo, is there another way to detect if the plugin was inserted in the DAW either as Stereo or Multi-Output?(I'm currently implementing an UI toggle switch, but it'd be great to detect it automatically)
-
@daniloprates Different DAWs handle multiple outputs in different ways.
I know Logic loads separate versions for Stereo and Multi-Output, and other DAWs may too. But the problem is, in Logic at least, is that even though it's loaded as a 'Stereo' version, Logic still sees all the multiple outputs, therefore you can't get a reliable number.
In Reaper, there's no option to load a Stereo or Multi-Output version. It just loads the plugin with however many outputs are specified.
-
@dannytaurus so, UI toggle it is
-
@daniloprates Someone else with more experience might weigh in here but as far as I can tell, UI toggle, or combos box per sound, is the way to go.
-
I think you have to manually change the output amounts by connecting/disconnecting them via script using the routing manager api's.
Do you already have something along the lines of this...
const var routing = Synth.getRoutingMatrix("masterContainer"); //this sets 12 outputs by default. for(i=0; i < 12; i++) { routing.addConnection(i,i); // 1 to 1 channel routing // Use this function to make connections. Console.print(i); // Check outputs. }See the docs for more options to clear and reset connections.
https://docs.hise.dev/scripting/scripting-api/routingmatrix/index.html
https://docs.hise.dev/scripting/scripting-api/routingmatrix/index.html
-
@Chazrox yes, I've added an UI toggle, so when it's on it'll route it to multiple outputs, otherwise to stereo