Multioutput AU

Fixed on latest tip. Kudos to otristan. I owe you a beer!

Thanks! I updated JUCE, recompiled with both {1, 1}, {2, 2}, {4,4} and {0, 1}, {0, 2}, {0,4}, re-scanned with AU tool...still showing only mono and stereo. Should I do something else?

Since I need my plugin to work in multi-output mode i'd be happy to offer my inferior non-guru-like assistance to fix this. 

 

BUT ONLY if you guys help me sort ouy my WINDOW COMBOBOX-DROPDOWN NOT APPEARING  HEADACHES !!!!!

 

GAAAAAAAAAAAAAAAAAAH !!!!

Hmmm I tested this with {0,4} and {0,8} as an AU instrument. And {4,4}, {8,8} as an AU fx. I didn’t try multi in and multi out with an AU instrument. I thought you could use aufx for that?

I just tried again with only {4, 4}  and it doesn't show up anymore in the instrument list of the track (not even if I load a multi-timbral track). AU tools still reports "WARNING: Source AU supports multi-channel output but does not provide a channel layout".

Not sure what should I do now. I'll try with a new instrument project and see what happens.

What I need is the ability to have Mono, Stereo AND multi out ("just" 4 channels), kinda like Kontakt where you can load it as 16 out and route everything internally.

Fresh project, tried both {1, 1}, {2, 2}, {4, 4} and just {4, 4}. Same problem. First configuration shows only Mono and Stereo, second doesn't show at all. AU tools has the same channel layout error. What to do?

I think I’m missing something. If your AU instrument is an instrument why does it have audio inputs. I think you need to try {0,1}, {0,2}, {0,4}. It was always my understanding that AU does not support instruments with audio inputs (only midi input).

Tried {0,1}, {0,2}, {0,4} as well, but I'm still getting Mono and Stereo only. I'm really lost here.

 

I have tested again with latest tip with our plugins as well, but logic still only shows the stereo configuration, and the same warning:

WARNING: Source AU supports multi-channel output but does not provide a channel layout

Although I have specified {0,2},{0,4},{0,8} etc. Ableton Live also doesn't seem to use the multi output configurations, only the stereo one.

So how are you defining channel layouts?

Sorry I can't check the newest code form repo right now

this is (part of) the code that adds channel layouts description (this code is from the link that I already posted)

 

        //set the channelLayout with the greatest number of buses to the default value
        currentChannelLayoutIdx = channelLayouts.size() -1;
 
        ChannelLayout* layout = channelLayouts[currentChannelLayoutIdx];
      #if JucePlugin_IsSynth == 1
        SetBusCount(kAudioUnitScope_Input, 0);
      #else
        SetBusCount(kAudioUnitScope_Input, layout->getNumBuses(ChannelLayout::kInput, false));
      #endif
        SetBusCount(kAudioUnitScope_Output, layout->getNumBuses(ChannelLayout::kOutput, false));
 
        //make the AU support other channel configurations than the default n-to-n configuration
        for(int i=0; i<Inputs().GetNumberOfElements(); i++)
        {
            CAStreamBasicDescription streamDescIn;
            streamDescIn.SetCanonical(layout->getNumChannelsOfBus(i, ChannelLayout::kInput), false);
            streamDescIn.mSampleRate = GetSampleRate();
            Inputs().GetIOElement(i)->SetStreamFormat(streamDescIn);
        }
        
        for(int i=0; i<Outputs().GetNumberOfElements(); i++)
        {
            CAStreamBasicDescription streamDescOut;
            streamDescOut.SetCanonical(layout->getNumChannelsOfBus(i, ChannelLayout::kOutput), false);
            streamDescOut.mSampleRate = GetSampleRate();
            Outputs().GetIOElement(i)->SetStreamFormat(streamDescOut);
        }        
    }

your code from http://www.juce.com/comment/313689#comment-313689 does not describe channel layout

 

moreover - your description "{0,4}" does not provide any info wich channels are stereo an wich are mono

DAW can't understand the output busses configuration - do you want stereo + mono + mono layout or mono + mono + mono + mono or stereo + stereo - all these re 4 output channels 

I think that it's not enough to support many output channels.
In most formats (except VST2), there could be several output "busses" and each one has some number of channels.
Then the hosts which support this know for example that your drum machine plugin has 8 stereo outputs (and not just 16 individual output channels)

I think that danradix's changes, while intended mostly for side-chain, also include most of the work needed for multiple output busses.

If you are at NAMM, I would glady agree :)

I just checked again that multi-output AU works. On the risk of exposing myself as a complete Logic noob, here are the steps I did to test the mutli-out AU intrument/effect. Please tell me if I am doing something wrong.

For a multi-out AU effect:

1) Open the "Juce Demo Plugin" introjucer project on the latest tip
2) Replace Plugin Channel Configurations {1, 1}, {2, 2} with {1,1}, {2,2}, {4,4}
3) Make sure “Is a Synth” is not checked
4) Disable both “Plugin produces midi output” & "Plugin wants midi input" 
5) Un-click Build VST and Build VST3 (not strictly necessary)
6) Open Logic
7) In Logic: File -> "New from template...". Select "Empty Project" and make sure that the "Surround Format" is set to Quadrophonic 
8) A dialog will appear to create a new track: Select Audio and make sure "Surround" is selected in the Output and Input Drop-down menus
9) Add the audio unit to the audio track “Audio Units -> ROLI Ltd. -> JUCE demo plugin -> Quad” 
 

For a multi-out AU instrument (no audio inputs):

1) Open the "Juce Demo Plugin" introjucer project on the latest tip
2) Replace Plugin Channel Configurations {1, 1}, {2, 2} with {0,1}, {0,2}, {0,4}
3) Check “Is a Synth”
4) Uncheck “Plugin produces midi output”
5) Un-click Build VST and Build VST3 (not strictly necessary)
6) Open Logic (for some reason Logic would sometimes still pick-up the aufx version of the plug-in, although it was deleted from the PlugIns folder, only a reboot of my mac helped)
7) In Logic: File -> "New from template...". Select "Empty Project" and make sure that the "Surround Format" is set to Quadrophonic 
8) A dialog will appear to create a new track: Select "Software Instrument" and make sure "Surround" is selected in the Output Drop-down menu
9) Replace the default "E-Piano" instrument with “AU Instruments -> ROLI Ltd. -> JUCE demo plugin -> Quadrophonic” 
 

The AU Validation will pick-up some audio channel layout warnings. We are working on fixing this. I think the code I posted here is a short-term workaround to mute those warnings.

For the channel layout, you probably just need to add

 


                case kAudioUnitProperty_SupportedChannelLayoutTags:
                {
                    return JuceAUBaseClass::GetProperty( inID, inScope, inElement, outData );
                }

in GetProperty

 

No need for your fancy code AFAIK.

Hi Fabian, thanks again. I tried all the steps for the Instrument, from a fresh JUCE folder, nothing. Still Mono/Stereo only. Rebooted several times, re-checked with AU tools several times.

Also, when I load other multioutput plugins like Konakt, even on a stereo track, I can see several options like Mono, Stereo, Multi (16xMono) etc...

Can you send your AU or perhaps your plugin demo project? I'm lost here.

Sorry that this is causing so much pain for you. I've just pm-ed you with a sample project and source code. BTW I also see all possible channel configurations in Logic:

What is still missing, I suppose, is the possibility to use multiple pairs of mono- or stereo-outputs in non-surround projects. For example the typical situation where you have a multi-timbral synth or drum machine with a number of MIDI channels, where there is a main stereo output plus, say 8 different individual stereo outputs from the separate channels.

There are two diferent thing and Juce do not support yet Multi Bus, but there was a patch sent at some point though.

And I, as well, would like to see this happen at some point :)

Still same problems, Mono/Stereo only. 

Am I the only one with this problem now?