The PLUG_CHANNEL_IO string in config.h should include all the possible variations of channel I/O. Hosts are rarely consistent about how they handle sidechain connections, so donāt be surprised if itās not allways entirely predictable which I/O config you get.
This sidechain issue is a long story and i guess the most important phrase in the provided example is āHosts are rarely consistent about how they handle sidechain connections, so donāt be surprised if itās not allways entirely predictable which I/O config you get.ā
But it definitely seems to need some revision because the example dosnāt work in Reaper and Logic as it is .
I fiddled a bit with the IPlugSideChain example and at least came up with a quick hack which works for Reaper, Logic and Ableton in the meaning of getting the same functionality and proper routing for all three hosts.
The main idea is that Reaper seems to handle additional (sidechain) input buses in its own way and only works if the main bus includes the additional channels instead. An IO routing of 4.2-2 added to the IPlugSideChain example did the trick. To get it work i had to change some lines in the code. I just upped a gist which demonstrates the changes.
Even if this seems to work donāt consider it as a reasonable solution because itās neither fully tested for unwanted side effects (e.g. what happens to the additional main bus channels in Logic) nor tested in other hosts but the three mentioned. Itās just a starting point for further investigations or maybe includes ideas for future updates.
EDIT: Forgot to mentionā¦ This hack was only meant for AU plugs (I didnāt even test other formatsā¦ )
The first thing I want to do is express my gratitude for your work. The second one we also messed around and made is also not so elegant, but also a solution how it could work.
But in this case AudioUnit will not work in the Reper on Mac.
Itās just that reaper works in a different way, forcing us to follow a different scenario. I will definitely investigate this code and conduct tests. But it looks like this is a normal solution that should be updated (in github).
Also, I will then conduct testing and notify how everything went.
No i donāt disagree. My statement was a bid misleading, sorry.
I mean the same as you. With the current config it doesnāt work in Reaper.
If you change the config (so that it works in Reaper) it wonāt work with Logic.
No. Macros are resolved at compile-time, but in order to know what host a plug-in is loaded in, you need to do that at runtime.
I think this is a Reaper bug to be honest. The AU has two input buses, but only one shows up in Reaper.
--------------------------------------------------
VERIFYING DEFAULT SCOPE FORMATS:
Input Scope Bus Configuration:
Default Bus Count:2
Bus Name: Main Input
Format Bus 0: AudioStreamBasicDescription: 2 ch, 48000 Hz, Float32, deinterleaved
Bus Name: SideChain
Format Bus 1: AudioStreamBasicDescription: 2 ch, 48000 Hz, Float32, deinterleaved
Bus 0, Has Channel Layouts: 0x640001 0x650002
Bus 1, Has Channel Layouts: 0x640001 0x650002
Output Scope Bus Configuration:
Default Bus Count:1
Bus Name: Output
Default Format: AudioStreamBasicDescription: 2 ch, 48000 Hz, Float32, deinterleaved
Has Channel Layouts: 0x640001 0x650002
One other thing I noticed was that the order of the channel configs mattered sometimes. For example, if the two supported configs are 2-2 and 2.2-2, I define PLUG_CHANNEL_IO as ā2.2-2 2-2ā. That way if it is parsed, the sidechain config is always presented first. This works for my users, so I donāt really mess with it any more than I need to. I will test my Mac builds again soon and post an update should anything not work.
Logic pro for #define PLUG_CHANNEL_IO "1-1 1.1-1 1.2-1 1.2-2 2.1-1 2.1-2 2-2 2.2-2 4-4 4.1-2 4.2-2 - does not work, for reaper - ok. It seems that your fix does not solve the problem in any way.
pBus->mNHostChannels = pBus->mNPlugChannels; (tried without - else {})
The Reaper as a whole requires - 4 - 64 channels
It looks like Iām going to have to give up the Reaperās support. If I could see for myself in the code whatās going on there, I would try to fix it. But what can we do, just come up with strange codes for IplugAU. And what if we are for the Reaper via GetHost () this? Is this even an idea possible?
if (GetHost() = "Reaper") { code for only Reaper channels size }
Š”ould you explain the code line where I can take a look at it, as there usually is please? As I understand it, this has been a problem for many years!
FWIW: I wouldnāt worry that much about perfect AU support in reaper, since users can also use VST2, VST3 there.
My PR fixes the issue with the iPlugSideChain example AUv2 not working in Reaper and I tried this based on discussing it with the Reaper Devs. I donāt know about your project or with these extra channel io options.
Itās difficult to understand your posts to be honest, but if you can perhaps provide an example project or some very clear description of how to produce, and what ānot workingā means
Now Iām just going to try to describe what I mean.
When you specify 2 channels in the Reaper itself, everything is fine (2 X 2). But when you need to specify 4 channels, the sound disappears in my project. This means that my plugin needs support for 4 channels.
IPlugSideChain can 2 X 2 ā up 4 ā 2 X 4 (Logically, it should be X - X ā 4 X 4)
Here is a video (gif) that demonstrates this problem. I specifically took a reference plugin that works perfectly.
P.S. Iām sorry I didnāt put it that way earlier
This looks as if Olis fix is not implementedā¦
The original IPlugSideChain example (and my other creations) definitely work with the updated IPlugAU.cpp exactly like the Glue plug in your gif shows.