Adding Midi Out to VST Host Demo

I’m trying to get a test host up and running with midi in and out, my plugins work with external synthesizers.
Midi in works fine.
I added the following to add an MidiOutput filter -

FilterGraph::FilterGraph - added -

addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::midiOutputFilter),   0.25f, 0.1f);

FilterGraph::newDocument -added -
addFilter (internalFormat.getDescriptionFor (InternalPluginFormat::midiOutputFilter), 0.25f, 0.9f);


    AudioProcessorGraph::AudioGraphIOProcessor p (AudioProcessorGraph::AudioGraphIOProcessor::midiOutputNode);
    p.fillInPluginDescription (midiOutDesc);

InternalPluginFormat::createPluginInstance - added -

if ( ==
    retval = new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::midiOutputNode);

PluginDescription* InternalPluginFormat::getDescriptionFor - added -

    case midiOutputFilter:      return &midiOutDesc;

InternalPluginFormat - added -

PluginDescription midiInDesc;

updated -
enum InternalFilterType
audioInputFilter = 0,


This gave me a Midiout plugin I can add, but it does not function.
I saw two different threads that had suggested changes to JUCE core code, but they must be too old, as it generated tons of errors. Plus I saw that midiout appeared to be implemented in those classes now.

I have written several stand alone apps that use midi in and out with JUCE and now I’m trying to convert some to vst3 plugins. Plus I wanted to have my own base host for other projects and I need midi out.

What is a method to add midi out to the demo host, or simplest structure to build one from scratch?
I have found lots of info on plugins, but almost nothing an creating VST host apps.


The problem is that the demo host uses an AudioProcessorPlayer to host the AudioProcessorGraph. The AudioProcessorPlayer is really just a quick boilerplate class to to run a single AudioProcessor (the AudioProcessorGraph is an AudioProcessor itself which hosts other AudioProcessor) in your app. It takes the midi and audio callbacks of the AudioDeviceManager and passes them on to the processor. However, there is no callback for midi output. Midi output is actively pushed with sendMidiNow etc. The AudioProcessorPlayer won’t do this.

So for midi output you will need to host the AudioProcessorGraph yourself. I’ve done a quick implementation of this on my private github account if you want to know how to do this:

Just build the audio plugin host on the master branch of the above repo.

Note that the above audio plugin host does not support double precision audio processing.

Hi Fabian,

I’ve recently hit the same need as discussed in this thread. I couldn’t find evidence of the quick implementation you describe in audio plugin host on your github (which would be very useful to see). Am I looking in the wrong spot ( Has it gotten moved? Any help greatly appreciated.


I’m looking for this too… Does your code branch still exist anywhere?



No sorry. I don’t think I kept that branch around. I know it wasn’t all too hard though. Basically copy the code for the AudioProcessorPlayer and create a new one which also pushes the midi output.

Thanks - I got it working :slight_smile:



Okay, using this thread:

I made changes to the Host code and to AudioProcessorPlayer

Code changes are here:

It would be great if you considered adding this to the JUCE code base.




Thanks for providing this work around on dropbox. The code in filterGraph.cpp seems to have changed quite a bit since this midiOut solution was done, it will take me a while to figure out how to get the right changes into the latest AudioPluginHost.

Sure would be nice if this was in the code base to begin with. I am going to develop midi-only VST plugins and AudioPluginHost would be very useful to send the output to an external midi monitor if MidiOut was there