Open modosc opened 2 years ago
adding my updates from the forum post:
au
instead of an auv3
then the result does pass auvaltool
For anyone interested in targeting systems that do support MIDI output from an instrument while also targeting an AUv3 with MIDI output disabled, I did the following hack:
+++ b/modules/juce_audio_plugin_client/AU/juce_AUv3_Wrapper.mm
@@ -1625,7 +1625,7 @@ AUAudioUnitStatus renderCallback (AudioUnitRenderActionFlags* actionFlags, const
// send MIDI
#if JucePlugin_ProducesMidiOutput && JUCE_AUV3_MIDI_OUTPUT_SUPPORTED
- if (@available (macOS 10.13, iOS 11.0, *))
+ if (@available (macOS 10.13, iOS 11.0, *) && getAudioProcessor().producesMidi())^M
{
if (auto midiOut = midiOutputEventBlock)
for (const auto metadata : midiMessages)
And then in your AudioProcessor
you can do
bool YourAudioProcessor::producesMidi() const
{
if (wrapperType == wrapperType_AudioUnitv3) return false;
#if JucePlugin_ProducesMidiOutput
return true;
#else
return false;
#endif
}
Having optional AUv3-incompatible bus layouts can be done without any JUCE hacks:
YourAudioProcessor::YourAudioProcessor()
: AudioProcessor (juce::PluginHostType::jucePlugInClientCurrentWrapperType == juce::AudioProcessor::wrapperType_AudioUnitv3 ?
BusesProperties()
.withOutput("STEREO OUT", juce::AudioChannelSet::stereo(), true)
:
BusesProperties()
.withInput("RECORD IN", juce::AudioChannelSet::stereo(), true)
.withOutput("STEREO OUT", juce::AudioChannelSet::stereo(), true)
)
i've tested this on intel and arm64 but only on macos12.
i know for a fact this worked in april of this year but then i was on macos 11 and an intel mac.(edit: j/k, i didn't have midi out enabled then, i can't verify if this ever worked).to reproduce:
develop
and projucer is built from it.AUv3SynthPlugin
exampleplugin AU main type
is set tokAudioUnit_MusicDevice
plugin AU is sandbox safe
is enabledUse App Sandbox
is enabledDevelopment Team ID
plugin is a synth
andplugin midi input
are checked.now build everything and open the standalone executable once. after this, you should be able to successfully run
auvaltool
(replacing the last two values with whatever projucer filled them in with):great. now go back to projucer and check
plugin midi output
. save, re-export, rebuild, and tryauvaltool
again:i couldn't debug with
auvaltool
on arm64 but i managed to get a stack trace on an intel mac: