MIDI FX for Logic Pro X: Audio does not work

Hi everyone,

I just built a MIDI FX plug-in for Logic Pro X successfully following the instructions written in another post. Everything works fine except that audio does not work. I read in that post that it does not enter the AudioProcessor::processBlock() method. After testing, I realized It does not enter neither AudioProcessor::processBlock() nor AudioProcessor::processBlockBypassed(). 

How can I trigger one of those methods? If not possible, how can I make audio work in the plug-in?



Hi Oscar,

do you mean this post: http://www.juce.com/forum/topic/build-logic-midi-fx ?

If I understand MIDI FX correctly you can't send audio from a MIDI FX to the host - it's pure MIDI IO - not more.

To answer your question: You can generate your own audio stream and send it directly to an audio device (and route it to Logic). But if you don't route a MIDI clock into your FX plugin you haven't any sync information. How to tell your users such a workaround? I have no idea :D

I think you need a AU instrument with MIDI out? Do you know the Logic workaround? Check how this sequencer plugin sends MIDI and how you can use it in logic: http://forum.monoplugs.com/viewtopic.php?f=58&t=668


Thanks monotomy,


With regard to needing a instrument with virtual MIDI OUT, I think MIDI FXs do not need. I downloaded Kirnu cream arp demo (my plugin has similar functionality) and managed to get it working under Logic Pro X. Just created a software instrument track and added Kirnu as a MIDI effect. I did not need 2 tracks (i.e as you need in Ableton Live VST/AU) with the plugin and instrument.


After debugging code, I realized that the reason why does not call AudioProcessor::processBlock() method is in these lines in AUBase.cpp


if (output->GetStreamFormat().NumberChannelStreams() != ioData.mNumberBuffers) 


            DebugMessageN4("%s:%d ioData.mNumberBuffers=%u, output->GetStreamFormat().NumberChannelStreams()=%u; kAudio_ParamError",
                __FILE__, __LINE__, (unsigned)ioData.mNumberBuffers, (unsigned)output->GetStreamFormat().NumberChannelStreams());
            goto ParamErr;

a) When compiling as a normal AU, (without 'aumi' as plugin type), 

ioData.mNumberBuffers = output->GetStreamFormat().NumberChannelStreams() = 1 (They are the same)

b) When compiling as a MIDI FX (with 'aumi' as plugin type),

output->GetStreamFormat().NumberChannelStreams() = 1 and ioData.mNumberBuffers = 2 (They are different and this log is displayed on the XCode terminal): 

ioData.mNumberBuffers=2, output->GetStreamFormat().NumberChannelStreams()=1; kAudio_ParamError

  from AU (0x810000): 'aumi' 0x00534E41 0x00535148, render err: -50

I managed to get processBlock work by a very non-satisfactory and temporal way, setting manually ioData.mNumberBuffers=1 just before the first if condition. Apparently everything worked great.

I have not found where mNumberBuffers variable is changed. I think it should be related to the number of output channels, but I tested with different configurations in AppConfig.h and nothing happened. I use this configuration with VST/AU

#ifndef  JucePlugin_MaxNumInputChannels
 #define JucePlugin_MaxNumInputChannels    2
#ifndef  JucePlugin_MaxNumOutputChannels
 #define JucePlugin_MaxNumOutputChannels   2
#ifndef  JucePlugin_PreferredChannelConfigurations
 #define JucePlugin_PreferredChannelConfigurations  {1, 1}, {2, 2}

I would be grateful if anyone may bring out some help`.




Oscar +1000!!!

I've got it working too. Excuse me for my replay and thanks for discover this!

NOTE: it's only working if  JucePlugin_isSynth is set true.

JucePlugin_isSynth 1

I would prefer to have a better solution, but temporally it may work.

I forgot to mention that JucePlugin_isSynth was also set true in my case. Thanks for adding that.


Many thanks monotomy & Oscar1771 for your tips - with your help I've succesfully got my MIDI FX plugin running in LPX :)

Trying to get this working - even a simple midi thru - in Logic Pro X with no luck.  Any pointers would be much appreciated.  My ultimate goal is to  able to have a MIDI FX plug in send the incoming midi out an IAC bus before passing it on the track itself.  I know this can be done easily in the environment, but it would be for over a hundred tracks - a midi fx plugin would be much more elegant.

I've attempted to make it work with the Juce tutorial (slider that controls midi velocity) but no luck.  Works in VST3 - but not in Logic Pro as MIDI FX.  



Hi Skoss, I've written a getting started tutorial for building Logic Pro X MIDI FX plugins. I hope it gets you going :)

many thanks - i'll check it out!!!

willrice, is the tutorial you wrote for building Logic Pro midi fx plugins still on here somewhere?

It is, but it’s now completely obsolete.