Stereo effect comes out as mono AU, stereo VST


#1

I made a stereo effect plugin. As VST it comes up in Reaper as (2 in/2 out) which is as expected, but the AU version of the same comes out as (1in/1out) in Reaper… JucePluginHost shows correct (2in/2out) also for the AU.

I figured out its because i have:
#define JucePlugin_MaxNumInputChannels 2
#define JucePlugin_MaxNumOutputChannels 2
#define JucePlugin_PreferredChannelConfigurations {1, 1}, {2, 2}

and reaper choose the {1,1} in case of using an AU, and {2,2} for the VST.

What is the rule here? I want the DAWs to choose Stereo if possible, and Mono as fallback - for example in case of using a mono input audio interface.


#2

This was mentioned here some time ago but I can’t find the thread.
IIRC it works if you use “{2, 2}, {1, 1}”.


#3

Ok thanks, ckk, that seems to work.


#4

Just to note that I've been bitten by this in the last couple of days.

ckk - many thanks for posting the solution!

 

Jules, it might be worth adding a runtime assertion if these values are supplied in the wrong order...?! :)

 

Pete


#5
Jules, it might be worth adding a runtime assertion if these values are supplied in the wrong order...?! :)

well.. not sure what the logic would be for deciding whether it's "wrong' - they're listed in the order of preference, so it could be argues that some plugins might prefer to have the mono option first (?)


#6

Hi Jules... a good point, I suppose. :)


#7

Hi,

I had the same problem too and I did the same.

But i found that this fix has a side effect:

When I change the channel configuration of my AU plugin from {1, 1}, {2, 2}  to {2, 2}, {1, 1}, it works on a new project however if I load a Reaper project saved with a old channel congiration plugin, it crashes...

 

May be there is a fix to add in juce_AU_wrapper.mm ?