Multioutput AU

I'm trying to build an AU instrument with 4 output channels without luck. Whatever configuration I input in the introjucer I get only Mono or Stereo in Logic X. I'm using {0, 1}, {0, 2}, {0, 4} and I tried other combinations without luck.

In the AU Validation I see this error: WARNING: Source AU supports multi-channel output but does not provide a channel layout.

What can I do?

bump?

Hi lapsang,

I've been looking into this for the last two days and starting to pull my hair out ;-). I've been trying out different channel layouts etc. But I cannot get this to work for an AU instrument. Interestingly, the Apple AudioUnits return -16 as their output channel count (I cannot find documentation on negative channel numbers) but even if I try this, my AU does not want to show-up as a multi-channel instrument. It's strange that there is so different behaviour between audio effects and audio units.

Does anybody have any experience with this or point me in the right direction?

Fabian

Check out this thread: http://www.juce.com/forum/topic/multi-channel-au-instrument-problem?page=1

You may be able to get some code from Kevin@Arturia

Rail

BTW: Putting in the following code snippet on line 449 in modues/juce_audio_plugin_client/AU/juce_AU_wrapper.mm will get rid of the auval warning. It's a bit hacky and needs some cleaning. However, this will only fix the auval warning - Logic Pro will still only show Mono and Stereo.

UInt32 GetChannelLayoutTags (AudioUnitScope inScope,
                             AudioUnitElement inElement,
                             AudioChannelLayoutTag* outLayoutTags)

{
    if (AUElement* element = SafeGetElement (inScope, inElement))
    {
        bool isInput = (dynamic_cast<AUInputElement*>(element) != nullptr);  

       #if JucePlugin_IsSynth
        if (isInput)
        {
            return 0;
        }
       #endif

        int j = 0;
        for (int i = 0; i < numChannelConfigs; ++i)
        {
            if (outLayoutTags != nullptr)
                outLayoutTags [j] = channelConfigs [i][isInput ? 0 : 1] + kAudioChannelLayoutTag_DiscreteInOrder;
            j++;

            switch (channelConfigs [i][isInput ? 0 : 1])
            {
               case 1:
                    if (outLayoutTags != nullptr)
                        outLayoutTags [j] = kAudioChannelLayoutTag_Mono;
                     j++;
                     break;
               case 2:
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_Stereo;
                   j++;
                   break;

               case 4:
                   if (outLayoutTags != nullptr)
                      outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_4;
                   j++;
                   break;

               case 5:
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_5;
                   j++;

                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_5_0;
                   j++;
                   break;

               case 6:
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_6;
                   j++;
                        
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_6_0;
                   j++;
                       
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_5_1;
                   j++;
                   break;

               case 7:
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_7_0;
                   j++;
                        
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_7_0_Front;
                   j++;
        
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_6_1;
                   j++;
                   break;

               case 8:
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_8;
                   j++;                        

                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_7_1;
                   j++;
                        
                   if (outLayoutTags != nullptr)
                       outLayoutTags [j] = kAudioChannelLayoutTag_AudioUnit_7_1_Front;
                   j++;
                   break;
            }
       }
       return j;
   }
   return 0;
}

Don't remember having to do anything for our instrument that support multiple configuration

In GetProperty, I just do this


if( inScope == kAudioUnitScope_Global ) 
        {
            switch( inID ) 
            {
                case kAudioUnitProperty_SupportedChannelLayoutTags:
                {
                    return MusicDeviceBase::GetProperty( inID, inScope, inElement, outData );
                }

}

}
 

However we do overide ValidFormat function

 

disclaimer: we don't use Juce for plugin format support but our own code

Please check out this thread  - http://www.juce.com/forum/topic/now-available-vst3-wrapper-sidechains-and-aux/out-rtas-aax-au

this link is throm thread http://www.juce.com/forum/topic/juce-30-no-sidechain-no-proper-multiout-configuration-support

 

you can find more links to different solutions there

danradix has upu to date soultion http://www.juce.com/comment/309818#comment-309818

 

Well it's working in all other DAWs that I have tested and auval shows that it supports multiple outputs. It's only Logic which seems to ignore this. There must be some magic flag to keep logic happy

reposting it here just to be sure that it would not be missed =)

Please check out this thread  - http://www.juce.com/forum/topic/now-available-vst3-wrapper-sidechains-an...

this link is throm thread http://www.juce.com/forum/topic/juce-30-no-sidechain-no-proper-multiout-...

 

you can find more links to different solutions there

danradix has upu to date soultion http://www.juce.com/comment/309818#comment-309818

Thanks for the replies, I'll have a look at those links.

I tried danradix solution without luck (I guess it was for side-chain only).

Any news on possible fixes/updates? Reading the other posts it seems like a very old unresolved issue.

We also have a big problem with JUCE AU not presenting multiple outputs in Logic.

Surely there must be a solution, but it is very difficult to know which old threads are still relevant when searching the forum for this issue.

So a very big +1 for putting more priority to this issue with JUCE and AU plugins.

bump!

I've banged my head against this one multiple times already and I can't seem to figure it out. I compared JUCE's behaviour to Apple's own PlugIns and Apple seems to be returning -16 for number of channels (?!?). That seems to work if I bodge it into JUCE but I'd like to know what negative numbers mean in the context of AUs before I change anything. Also, multi-output AU plug-ins built against the current version of JUCE  *do* work in all other DAWs except Logic.

Does anybody have any *tested* code-snippets or - even better - patches for the AU wrapper in JUCE that I could test? That would help me a lot!


I've already posted this in the message #6 of this thread

 

fully working code

http://www.juce.com/forum/topic/now-available-vst3-wrapper-sidechains-an...

 

PS the problem is that you not only need to support multuple outputs, but we need to have a way to describe how these outputs are exactly arranged - for example 8 mono + 8 stereo

I seem to recall that i had to make the nr of inputs and outputs the same.. 

 

i've had to modify juce_AudioUnitPluginFormat.mm and i think sent JUCE my mods but far as i can tell for my multi-output plugin i didnt have to modify the AU wrapper.  

 

( my project has both a plugin and a plugin host so i have to deal with multiple outputs from both sides ) 

PS the problem is that you not only need to support multuple outputs, but we need to have a way to describe how these outputs are exactly arranged - for example 8 mono + 8 stereo

I've posted code in this thread which will addresses the above issue, however,  even with this Logic doesn't want to present the multi outputs.

 

I seem to recall that i had to make the nr of inputs and outputs the same.. 

Yes. This is a valid workaround and already works with the current version of JUCE. However, Logic will not present JUCE based AU instruments if they have multi outputs. Any ideas would be much appreciated.

 

 

 

No hints from the code I've sent you ?