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
#endif
#ifndef JucePlugin_MaxNumOutputChannels
#define JucePlugin_MaxNumOutputChannels 2
#endif
#ifndef JucePlugin_PreferredChannelConfigurations
#define JucePlugin_PreferredChannelConfigurations {1, 1}, {2, 2}
#endif
I would be grateful if anyone may bring out some help`.
Thanks,
Oscar