COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 02-03-2012, 11:53 AM   #1
olilarkin
Mortal
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 683
Default Au multi output (i.e. drumsynth)

has anyone here ever successfully built an IPlug AU with multiple output buses (i.e. a drumsynth with stereo outs for each drum, or a multi-timbral synth)?

cheers,

oli
__________________
pMix | Endless Series V3 Shepard Tone Plugin | WDL-OL Plugin dev framework
Available for consultancy/tuition via Skype (help with IPlug/JUCE/MaxMSP)
olilarkin is offline   Reply With Quote
Old 02-03-2012, 02:00 PM   #2
olilarkin
Mortal
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 683
Default

I've found out it works, it's just that you have to call IsOutChannelConnected() in ProcessReplacing on the "extra" outputs to test if they are connected before doing anything with those outputs... by default the extra outputs will not point to to buffers full of zeros as they do in VST2 - if you try and access them before you've set up the routing in the host, the plugin will crash.

[EDIT - scratch that - it works in live, but not in any other AU host i've tried]
__________________
pMix | Endless Series V3 Shepard Tone Plugin | WDL-OL Plugin dev framework
Available for consultancy/tuition via Skype (help with IPlug/JUCE/MaxMSP)

Last edited by olilarkin; 02-04-2012 at 04:09 AM.
olilarkin is offline   Reply With Quote
Old 02-04-2012, 08:16 AM   #3
olilarkin
Mortal
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 683
Default

it turns out this is really f*cking complicated.

Previously i had a channel io of "0-2 0-8". I changed to "0-2 0-4" which is working a bit better (i.e passing enough of auval's tests for Logic & Reaper to open it). I think this is indicating a few problems here:

1) need to support the kAudioUnitProperty_SupportedChannelLayoutTags and kAudioUnitProperty_AudioChannelLayout properties to specify pairs of stereo buses

2) need to attach the remaining scratch buffers for channels > 2

3) need to synchronise the buffers coming from IPlugAU::RenderProc(). IPlugAU::RenderProc() gets called once for each output bus, which are stereo pairs, except for in Live, where you have one bus with four/eight channels ( I think this is incorrect on Ableton's part).

This means that in Logic and Reaper _this->ProcessBuffers((AudioSampleType) 0, nFrames); is getting called twice (in my "0-2 0-4" config) and causing glitchy output, since ProcessDoubleReplacing() is getting called twice for each block.
__________________
pMix | Endless Series V3 Shepard Tone Plugin | WDL-OL Plugin dev framework
Available for consultancy/tuition via Skype (help with IPlug/JUCE/MaxMSP)
olilarkin is offline   Reply With Quote
Old 03-18-2012, 06:32 AM   #4
olilarkin
Mortal
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 683
Default

if anyone else cares about this, I made some progress:

https://github.com/olilarkin/wdl-ol/...5b79618fbd6545
__________________
pMix | Endless Series V3 Shepard Tone Plugin | WDL-OL Plugin dev framework
Available for consultancy/tuition via Skype (help with IPlug/JUCE/MaxMSP)
olilarkin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.