I'm trying to implement sidechain for my plug-in.
- So I ported the sidechain VST version to AU, and the config {4, 2} on a single bus (element) works as expected, but it's not so immediate for the users in logic audio (for reaper the behaviour is exactly the same as VST version).
So I thought I should change the number of busses/elements using the "CreateElements() - Inputs().SetNumberOfElements(2)" approach. And here the trouble: ProcessBufferLists is receiving things only from the first bus.
1st question: what should I do/implement in order to process the other bus using the processbufferlist?
2nd question: I see logic audio is adding a "sidechain" selector to other plugins (for example SSL compressor). How can I make the bus selector visible and add a proper name (sidechain) or type to it?
Sorry if they are stupid questions, I'm lost
AU and sidechain
-
Zaphod (giancarlo) Zaphod (giancarlo) https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=111268
- KVRAF
- Topic Starter
- 2596 posts since 23 Jun, 2006
-
Zaphod (giancarlo) Zaphod (giancarlo) https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=111268
- KVRAF
- Topic Starter
- 2596 posts since 23 Jun, 2006
Ok, no answers here but I'm sure other developers will find this very helpful so I try to add what I learnt.
For the second question I found the answer here:
http://lists.apple.com/archives/coreaud ... 00165.html
so it's simply
for first question I discovered that AUEffectBase is referring only to bus 0, so I should override the Render function and call my ProcessBufferLists from there, maybe with a clever union of all channels on both busses.
Creating a proper number of input and output busses could be achieved easily following PostConstructor example coming from vstau:
http://vstau.googlecode.com/svn-history ... /VSTAU.cpp
but specifying a
CreateElements();
Inputs().SetNumberOfElements(2);
than you change the number of channels for each bus.
Using 2 busses the result configuration is simply a {2, 2} for each bus.
For the second question I found the answer here:
http://lists.apple.com/archives/coreaud ... 00165.html
so it's simply
Code: Select all
SafeGetElement(kAudioUnitScope_Input, 0)->SetName(CFSTR("main input"));
SafeGetElement(kAudioUnitScope_Input, 1)->SetName(CFSTR("sidechain"));
Creating a proper number of input and output busses could be achieved easily following PostConstructor example coming from vstau:
http://vstau.googlecode.com/svn-history ... /VSTAU.cpp
but specifying a
CreateElements();
Inputs().SetNumberOfElements(2);
than you change the number of channels for each bus.
Using 2 busses the result configuration is simply a {2, 2} for each bus.