|
07-21-2020, 05:11 PM
|
#1
|
Human being with feelings
Join Date: Apr 2018
Posts: 396
|
"1-1 2-1" not working in AU - SOLVED
I have 2-2 4-2 working in Logic but no matter what I have tried I cannot get 1-1 2-1 to work (mono/mono with side chain).
--------------------------------------------------
FORMAT TESTS:
Reported Channel Capabilities (explicit):
[1, 1] [2, 1] [2, 2] [4, 2]
ERROR: -10879 IN CALL Cannot Set Input Num Channels:1 when unit says it can
* * FAIL
--------------------------------------------------
Mono w/sidechain works in VST, VST3 and AAX so apparently the issue is in iPlugAU.cpp but I don't see what the problem is.
Any help appreciated!
UPDATE - SOLVED - see this thread: https://forum.cockos.com/showthread.php?t=233653
Last edited by Nonlinear; 08-11-2020 at 12:48 PM.
|
|
|
07-21-2020, 10:14 PM
|
#2
|
Human being with feelings
Join Date: May 2014
Location: Germany
Posts: 643
|
Quote:
Originally Posted by Nonlinear
I have 2-2 4-2 working in Logic but no matter what I have tried I cannot get 1-1 2-1 to work (mono/mono with side chain).
|
This works for me:
Code:
#if defined AU_API
#if defined PLUG_ISSTEREO
#define PLUG_CHANNEL_IO "2-2 4-2" // Stereo Config
#define PLUG_SC_CHANS 2
#else
#define PLUG_CHANNEL_IO "1-1 2-1" // Mono Config => extra plugin
#define PLUG_SC_CHANS 1
#endif
AU cannot handle "1-1 2-1 2-2 4-2" in one plug, you need two variants: mono and stereo.
|
|
|
07-21-2020, 11:49 PM
|
#3
|
Human being with feelings
Join Date: Apr 2018
Posts: 396
|
Quote:
Originally Posted by TBProAudio
This works for me:
Code:
#if defined AU_API
#if defined PLUG_ISSTEREO
#define PLUG_CHANNEL_IO "2-2 4-2" // Stereo Config
#define PLUG_SC_CHANS 2
#else
#define PLUG_CHANNEL_IO "1-1 2-1" // Mono Config => extra plugin
#define PLUG_SC_CHANS 1
#endif
|
Can you point me to the "iPlugAU.cpp" you are using? When I try to run a purely mono version (1-1 2-1) I get this:
TESTING OPEN TIMES:
COLD:
Time to open AudioUnit: 68.727 ms
WARM:
Time to open AudioUnit: 0.327 ms
FIRST TIME:
FATAL ERROR: Initialize: result: -2147450878
Quote:
Originally Posted by TBProAudio
AU cannot handle "1-1 2-1 2-2 4-2" in one plug, you need two variants: mono and stereo.
|
Hmmm ... I have another AU plugin that works in Logic in both mono/stereo (1-1 2-2) as one block of code in one plugin using this:
Code:
#define PLUG_CHANNEL_IO "1-1 2-2"
#define PLUG_SC_CHANS 0
in1 = inputs[0];
in2 = inputs[0];
out1 = outputs[0];
out2 = outputs[0];
STEREO = IsOutChannelConnected(1) && IsInChannelConnected(1);
MONOIN2OUT = IsOutChannelConnected(1) && !IsInChannelConnected(1);
if (STEREO)
{
in2 = inputs[1];
out2 = outputs[1];
}
if (MONOIN2OUT)
{
out2 = outputs[1];
}
for (int s = 0; s < nFrames; ++s, ++in1, ++in2, ++out1, ++out2)
{
and it works. It also works in stereo with side chain (1-1 2-2 4-2). However, if I add 2-1 if fails.
I tried building a purely mono plug starting with 1-1. It worked fine. Added a side chain (1-1 2-1) and it failed validation with "cannot create input 1". So there is something wrong with the 2-1 configuration in the iPlugAU.cpp I have. Any tips on where the problem could be?
|
|
|
07-22-2020, 12:32 AM
|
#4
|
Human being with feelings
Join Date: May 2014
Location: Germany
Posts: 643
|
Quote:
Originally Posted by Nonlinear
Can you point me to the "iPlugAU.cpp" you are using?
|
Just to be clear: we are using WDL-OL
I compared our iPlugAU.cpp with latest from Github, no changes regarding channel handling detected.
We learned that AU is quite strict with channel configs:
#define PLUG_CHANNEL_IO "1-1 2-1" // basic mono config
#define PLUG_SC_CHANS 1 // if there is a "2-1" config SC must be 1
This is the only working method for mono plugs with side channel (based on original WDL-OL implementation. In fact the plug can now work in 2 modes:
a) simple mono plug, no SC (1-1)
b) mono plug with SC, SC active or not (2-1)
|
|
|
07-22-2020, 04:57 AM
|
#5
|
Human being with feelings
Join Date: May 2012
Location: PA, USA
Posts: 356
|
If you made STW's modifications to make external sidechaining work (Sidechain pain - https://forum.cockos.com/showthread.php?t=233653), I think this is the problem. I just ran into this same issue last week. I think this causes the problem with AUVal when testing the 1:1 configurations.
You can fix this but modifying IPlugAU::AssessInputConnections(). In the referenced thread, the STW modifications have three lines that are added (*** Add this ***) https://forum.cockos.com/showpost.ph...5&postcount=11. If you encase these three lines with if (nIn > 1){ ... }, it should work.
|
|
|
07-22-2020, 10:32 AM
|
#6
|
Human being with feelings
Join Date: Apr 2018
Posts: 396
|
Quote:
Originally Posted by TBProAudio
Just to be clear: we are using WDL-OL
I compared our iPlugAU.cpp with latest from Github, no changes regarding channel handling detected.
We learned that AU is quite strict with channel configs:
#define PLUG_CHANNEL_IO "1-1 2-1" // basic mono config
#define PLUG_SC_CHANS 1 // if there is a "2-1" config SC must be 1
This is the only working method for mono plugs with side channel (based on original WDL-OL implementation. In fact the plug can now work in 2 modes:
a) simple mono plug, no SC (1-1)
b) mono plug with SC, SC active or not (2-1)
|
Well, this is weird. I am also using WDL-OL - latest version before Oli archived it. 1-1 works but adding 2-1 crashes auval/Logic:
Code:
#define PLUG_CHANNEL_IO "1-1 2-1"
#define PLUG_SC_CHANS 1
in1 = inputs[0];
if (IsInChannelConnected(1)) scin1 = inputs[1]; else scin1 = inputs[0];
out1 = outputs[0];
for (int s = 0; s < nFrames; ++s, ++in1, ++scin1, ++out1)
{
Does not work here. FATAL ERROR per auval.
|
|
|
07-22-2020, 10:40 AM
|
#7
|
Human being with feelings
Join Date: Apr 2018
Posts: 396
|
Quote:
Originally Posted by random_id
If you made STW's modifications to make external sidechaining work (Sidechain pain - https://forum.cockos.com/showthread.php?t=233653), I think this is the problem. I just ran into this same issue last week. I think this causes the problem with AUVal when testing the 1:1 configurations.
|
Yep, I discovered that after-the-fact as well. The reason is it forces a 2 channel plugin. I commented those lines back out and mono/stereo again works properly in Logic (1-1 2-2). However, it seems something in those lines IS required for sidechaining to work in 4-2 mode so your suggestion below (nIn>1) may at least be a partial solution.
Quote:
Originally Posted by random_id
You can fix this but modifying IPlugAU::AssessInputConnections(). In the referenced thread, the STW modifications have three lines that are added (*** Add this ***) https://forum.cockos.com/showpost.ph...5&postcount=11. If you encase these three lines with if (nIn > 1){ ... }, it should work.
|
I was hopeful but - nope. Still get auval error: "ERROR: -10879 IN CALL Cannot Set Input Num Channels:1 when unit says it can"
1-1 works, 2-2 works, 4-2 works but 2-1 does not work and causes the entire plug to fail AU validation. All 4 configs work in VST, VST3 and AAX.
Last edited by Nonlinear; 07-22-2020 at 11:12 AM.
|
|
|
07-22-2020, 10:16 PM
|
#8
|
Human being with feelings
Join Date: May 2014
Location: Germany
Posts: 643
|
Quote:
Originally Posted by Nonlinear
Well, this is weird. I am also using WDL-OL - latest version before Oli archived it. 1-1 works but adding 2-1 crashes auval/Logic:
Code:
#define PLUG_CHANNEL_IO "1-1 2-1"
#define PLUG_SC_CHANS 1
in1 = inputs[0];
if (IsInChannelConnected(1)) scin1 = inputs[1]; else scin1 = inputs[0];
out1 = outputs[0];
for (int s = 0; s < nFrames; ++s, ++in1, ++scin1, ++out1)
{
Does not work here. FATAL ERROR per auval.
|
Hmm, in deed wired.
Have you tried an empty or simple "ProcessDoubleReplacing" function (wo the SC test thing and buffer linking)?
|
|
|
07-23-2020, 09:26 AM
|
#9
|
Human being with feelings
Join Date: Apr 2018
Posts: 396
|
Quote:
Originally Posted by TBProAudio
Hmm, in deed wired.
Have you tried an empty or simple "ProcessDoubleReplacing" function (wo the SC test thing and buffer linking)?
|
Yes. 1-1 works. 2-2 works. I also have several plugins that use both, "1-1 2-2", that work perfectly in Logic on either mono or stereo tracks. The problem is with "2-1".
Something else strange - when I build the plugin as "2-2 4-2" it shows up in the FX list in Logic on MONO tracks (also shows up on stereo tracks as "dual mono"). If I try to launch it, however, Logic issues an error:
"Failed to load Audio Unit "my plugin", please contact the manufacturer for an updated version or further assistance."
So I don't have a clue what is wrong. Obviously something is very messed up in AU I/O.
|
|
|
07-23-2020, 11:38 AM
|
#10
|
Human being with feelings
Join Date: Apr 2018
Posts: 396
|
No support for Mono with Side Chain in AU?
I found another post with exact same issue going back to 2013: https://forum.cockos.com/showpost.ph...27&postcount=5
Conclusion at the time seemed to be "this config (2-2 4-2) is the only one, that will work for AU in iPlug"
So it appears there is no support for MONO with SIDE CHAIN in iPlug for AU?
random_id - the post above was from you 7 years ago - did you ever get 1-1 2-1 to work or did you give up on side chaining in mono plugs?
TBPro - you said "1-1 2-1" is working for you - it's baffling because it doesn't seem work for anyone else. Did you find a "hack" somewhere or did you add your own code, etc.?
Last edited by Nonlinear; 07-23-2020 at 03:39 PM.
|
|
|
07-23-2020, 10:18 PM
|
#11
|
Human being with feelings
Join Date: May 2014
Location: Germany
Posts: 643
|
Quote:
Originally Posted by Nonlinear
TBPro - you said "1-1 2-1" is working for you - it's baffling because it doesn't seem work for anyone else. Did you find a "hack" somewhere or did you add your own code, etc.?
|
You could provide your IPlugAU.cpp and I check against ours...
|
|
|
07-24-2020, 09:16 AM
|
#13
|
Human being with feelings
Join Date: May 2014
Location: Germany
Posts: 643
|
Quote:
Originally Posted by Nonlinear
|
OK, it seems that our IPlugAU.cpp is fairly old, compared to GitHub and yours.
In any case this is what we found:
1) Is is not in our version:
Code:
//---------------------------------------------------------------------------new stuff
if(nIn > 1)
{
pInBus->mNHostChannels = (GetHost() == kHostAbletonLive)? (i>0)? 0:4 : 2;
pInBus->mNPlugChannels = 2;
pInBus->mPlugChannelStartIdx = (i>0)? 2:0;
}
//---------------------------------------------------------------------------new stuff
2) And this is different:
Code:
SetInputBusLabel(0, "input");
SetInputBusLabel(1, "aux input"); // Ableton Live seems to think a 4-2 audiounit has a sidechain input, even if it is not meant to, so name it just in case
I hope this helps :-)
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:21 AM.
|