Multi-output AudioUnits hosting in JUCE e.g. BFD3/Kontakt: Not Supported!

I am using JUCE v2.1.5  to host/instantiate a Kontakt 5 Audiounit plugin.  The plugin instances work fine - editor opens , sounds play ok,respond to MIDI etc - all  as expected.  But the Kontakt 5  plugin ( as audiounit ) seems to be instantiated by default to single stereo outs. And I cannot get the plugin to switch to 32 outputs for multi-channel operation. 


I've tried to  use   setPlayConfigDetails() to change the nr of output channels dynamically ( since my undertanding is that AU allows this whereas VST doesnt ) but get no result:  

(  forceOutputChannelCount = 32  here ) 



what am i doing wrong ? 

No, you're not being purposefully ignored! But I don't know anything about kontakt, I don't know the answer to this question, and I don't have time to try it myself! Perhaps someone else will have a suggestion..

This is very much to do with JUCE and hosting.   And AudioUnits.  It is YOUR code JULIAN.    I only mentioned Kontakt as an example here since that is a ubiquitous plugin which can be switched from stereo output mode to 32 output mode as needs be.


In VST one has to use different plugins in order to do one or the other.  In AudiUnit land, to my best knowledge -the one plugin ( or at least one plugin "component"  )  serves as both a stereo out or  a multichannel out  plugin. 

Kontakt is one of the most widely used plugins out there.   I merely need to know how to host this in both stereo out, AND in multichannel out mode AS AN AUDIOUNIT ON OSX.   


This is what most DAWS  do.   For a certain fact - both Cubase and Ableton do.


  I am using AudioPluginInstance (),  AudioPliginFormatmanager, PluginDirectoryScanner   etc etc, to do the hosting

as normal in JUCE.  And I am using the AUDIOUNIT WRAPPER code that you supply in JUCE to do this.  Host AU plugins.   


My code, using JUCE can currently host plugins with stereo outputs just fine.   But like most DAWs - one sometimes nees to use a plugin ( like Kontakt or Halion )   in MULTI-CHANNEL OUTPUT  mode.  For example when using several sampler instruments inside a single instance of Kontakt and sending them to seperate tracks in the DAW.  


How do you host and deal with plugins that have multiple outputs on Traktion right now ?   


Halion 5 is multitimbral for example.  Any decent DAW will let you load up 16 seperate instruments inside Halion 5 ( or Sonic ) and then route each of the 16 stereo outs from the single instance of HALION - to seperarte tracks in Cubase or Ableton etc. 


I presume Traktion allows this too ?  

Hi, I'm totally new to JUCE but I've been reading the forum like a madman.  This thread my have some relevancy to what you're asking about, ByTheBucket:

Hopefully someone else more experienced than I will respond to you in a more complete way.  You might want to post on that existing thread if what you're asking is the same as the conversation there.  This topic is one that I am almost shocked to find out about with JUCE.  

yes I did read that.  I do so hope it doesnt apply to my problem though - since it seems such an obviously basic and essential thing to 

 support in any C++ framework claiming to support plugin Hosting - namely supporting/handling multiple-outs for AU's that use them. 

Well, it doesn't currently support that - the hosting classes work as a lowest-common-denominator for VST/AU, and what you're talking about is clearly an AU-specific feature (and not one that I had heard of).

I guess it's something that could be added, and yes, we'll probably need it for tracktion at some point, so obviously I'll investigate for that, if not sooner. But it doesn't sound trivial and I don't have time to figure it out right now.

Please don't be one of those people who write long, ranty posts containing capital letters because some feature that they happen to want is missing.. Many hundreds of people use the library, and everyone has different priorities. This is not a common request - in fact I don't remember it ever being mentioned before.

yes  - I hate capitals too.   Wont be doing any ranting. But since this is effectively a block to my ongoing project - and was quite frankly something I just assumed would be in the code - I needed to know whether its just a mstake in my coding - or as appears now

something that I will have to write myself and create a seperate branch from the JUCE code.


  Hence my desperation in getting some response here. 


I will see if I can make the necessary changes to the JUCE code myself. ( eek )   And when successful will submit it to you for inclusion in a newer version of JUCE.


in the meantime if anyone else has already done this - please let me know too !  I dont want to reinvent the wheel on what - ought to be by now just a given in this framework.  

I have sent JUCE my modified version of  which I have been using for a while now to implement this missing functionality in JUCE - regarding AU's with  > 2 outputs suchas Kontakt, Halion, BFD3   and many others. 


I'm hoping this will speed up getting such functionality built into a future JUCE rather than me having to constantly fudge the JUCE library to support this. 

It is very common for example for drum plugins to use mutiple outs - in order to send individual drum instruments to different input tracks in the host DAW.    Ableton for example makes this very easy.   


It really is time JUCE had this written into the framework - given that JUCE is a framework designed specifically for AUDIO apps that either ARE or are hosted inside DAWS. 


By the way - I presume this feature - multi-outs - is still unsupported in the latest TRAKTION too ?   if so it would be quite a thing to omit - since to my knowledge - every decent DAW out there from Ableton to Cubase to Logic supports this. 


I'm not sure if I've misunderstood you here but multi-out plugins have been supported in Tracktion for ever. If you put a plugin on a track it will simply us the first 2 channels. If you put one in a rack however, you can do whatever routing you want with a multi-out plugin.

IIRC the JUCE hosting classes always open plugins with their maximum amount of channels. Just open Kontakt in the plugin host to see all those output pins.

[  "IIRC the JUCE hosting classes always open plugins with their maximum amount of channels. Just open Kontakt in the plugin host to see all those output pins."  ] 

NOPE. Maybe most here have only been hosting VSTs where what you write IS true. Dunno.  But not for AudioUnits.  

If you use the juce_PluginDirectoryScanner as per normal in order to scan all you AudioUnits  and generate a result in KnownPluginList you will find that the PluginDescription structure  for any AU - like Kontakt - will report  2 outputs - ie STEREO  even if - as is the case - the plugin IN FACT supports  64 mono channels !!. 

My modified version of  has been written so it DOES in fact set PluginDescription so it reports the MAXIMUM number of outputs correctly.    But then in order to work properly - my code has to - inside - actually RESET the AudioUnit   AGAIN - in order that it initialises as a multiple output AU instead of STEREO. 



Hmm, Kontakt was a bad example, looks like I was loading the VST version. You're right the AU version does open with 2 output channels.

Perhaps the AU wrapper opens with the default number of channels. Some plugins work correctly e.g. EzDrummer:

I agree with you though, there should probably be an option to choose the channel configuration when you load a plugin. This would have to be cross platform though.