I’m working in a plugin that outputs MIDI correctly in VST mode but fails to do so in the Audio Unit version.
I suspect that this feature (MIDI output) is not implemented in the JUCE plugin wrapper for Audio Unit. Can anybody confirm?
Apparently it would be possible. http://lists.apple.com/archives/coreaudio-api/2007/Mar/msg00053.html
I’m also having problems with getCurrentPosition. If I run:
AudioPlayHead::CurrentPositionInfo pos;
getPlayHead()->getCurrentPosition(pos);
Only the bpm and signature fields are correct. Everything else doesn’t seem to be written (e.g. isPlaying or ppqPosition, in particular, are critical to me). Is there a way to get this information in Audio Units?
I’m working in a plugin that outputs MIDI correctly in VST mode but fails to do so in the Audio Unit version.
I suspect that this feature (MIDI output) is not implemented in the JUCE plugin wrapper for Audio Unit. Can anybody confirm?
Apparently it would be possible. http://lists.apple.com/archives/coreaudio-api/2007/Mar/msg00053.html
[/quote]
AFAIK this feature is not supported by any Audio Unit host. We had to implement this for one of our plugins and the only solution we found is to use the IAC driver. This is far more difficult for the user to set it up but this works.
Concerning RTAS, after tweaking a little the wrapper, this works great in Pro Tools, I can give some code if needed.
I have to check this but I think both isPlaying and ppqPosition work well for me. What host are you using?
Put this code just after the creation CEffectMIDIOtherBufferedNode of the inside the MIDILogIn() test.
Then in the RenderAudio callback you have to push the MIDI packets into the node:
if (! midiEvents.isEmpty())
{
#if JucePlugin_ProducesMidiOutput
const JUCE_NAMESPACE::uint8* midiEventData;
int midiEventSize, midiEventPosition;
MidiBuffer::Iterator it (midiEvents);
while (it.getNextEvent (midiEventData, midiEventSize, midiEventPosition))
{
DirectMidiPacket packet;
packet.mTimestamp = midiEventPosition;
packet.mLength = midiEventSize;
for(int i = 0; i < jmin(4, midiEventSize); ++i){
packet.mData[i] = midiEventData[i];
}
mMidiOutNode->PushMIDIPacket(&packet);
}
#else
// if your plugin creates midi messages, you'll need to set
// the JucePlugin_ProducesMidiOutput macro to 1 in your
// JucePluginCharacteristics.h file
jassert (midiEvents.getNumEvents() <= numMidiEventsComingIn);
#endif
midiEvents.clear();
}
There is an API for that but AFAIK there is no DAW that is supporting it :).
The workaround we have used in Spark is sending the data through the IAC driver.
[quote=“ke20”]There is an API for that but AFAIK there is no DAW that is supporting it :).
The workaround we have used in Spark is sending the data through the IAC driver.
Kevin[/quote]
Thanks for the fast reply. I hoped so much that there is an easy solution for this without leaving the JUCE framework