Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating CtrlrProcessor.cpp isInputChannelStereoPair() with class BusesProperties() #530

Open
damiensellier opened this issue Jan 12, 2023 · 1 comment

Comments

@damiensellier
Copy link

Hi guys,
Here is a little update about my journey to building Ctrlr as AAX for Pro Tools and I need some C++ help.
I finaly got a licence for PT for Developers which is required to test unsigned AAX plugins.
I built the mac intel version of Ctrlr with xCode and tried it in PT.

That's promissing, I can open Ctrlr in AudioSuite and it loads panels, and send midi messages perfectly but it's useless since AudioSuite is just for "offline" process...

Ctrlr as AudioSuite

The proper way to use Ctrlr is on an instrument track as an insert. (PT wants stereo i/o by default)
When I create an instrument track, mono, or stereo and load Ctrlr as insert It crashes Pro Tools. Right now, PT sees Ctrlr as an instrument>multi-mono>ctrlr|Instigator(mono) plugin, and it's not available in stereo.

caps-ctrlr-inst-mono

I investigated for a moment and to me it's because the i/o bus layout and configuration is not defined properly in CtrlrProcessor.cpp.

Roman Kubiak decalred the i/o setup with a deprecated JUCE definition isInputChannelStereoPair & isOutputChannelStereoPair :

bool CtrlrProcessor::isInputChannelStereoPair (int index) const

In all the Juce plugin demos, for exemple GainPluginDemo.h , the i/o is declared as following with "BusesProperties" withinput() & withoutputs() from Juce class AudioProcessor :

GainProcessor()
        : AudioProcessor (BusesProperties().withInput  ("Input",  AudioChannelSet::stereo())
                                           .withOutput ("Output", AudioChannelSet::stereo()))
    {
    }

: AudioProcessor (BusesProperties().withInput ("Input", AudioChannelSet::stereo())

That's totally different from the current i/o definition. By default for a "synth" it still works with VST, AU and standalone as stereo but not for AAX because AAX requires the proper i/o layout of the plugin.

Same for InterAppAudioEffectPluginDemo.h, i/o are also defined with BusesProperties()

Also, In the avid demo for Juce integration (AAX juce_to_aax_dsp), they define the i/o with the following declaration :

Juce_aax_dsp_testAudioProcessor::Juce_aax_dsp_testAudioProcessor() :
#ifndef JucePlugin_PreferredChannelConfigurations
     AudioProcessor (BusesProperties()
                     #if ! JucePlugin_IsMidiEffect
                      #if ! JucePlugin_IsSynth
                       .withInput  ("Input",  AudioChannelSet::stereo(), true)
                      #endif
                       .withOutput ("Output", AudioChannelSet::stereo(), true)
                     #endif
                       ),
#endif

I tried to implement BusesProperties() in CtrlrProcessor.cpp and its header CtrlrProcessor.h but I get many syntax errors in xCode because I'm just not good in C++.

Can someone please help to implement the up-to-date Bus layout definition in CtrlrProcessor.cpp so that I could go ahead with the AAX build?

Thanks in advance

Damien

Originally posted by @damiensellier in #489 (comment)

@damiensellier
Copy link
Author

damiensellier commented Jan 23, 2023

EDIT: I updated https://github.com/RomanKubiak/ctrlr/blob/8aa00d82127acda42ad9ac9b7b479461e9436aa4/Source/Plugin/CtrlrProcessor.cpp with the latest JUCE commands and it doesn't change anything for AAX, the bug is coming from somewhere else.
The updated file CtrlrProcessor.cpp will be added soon to the "pull requests" queue from my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant