Midi Effect plugin only

Topics: Audio, Midi
Nov 23, 2012 at 1:12 AM

Hi Marc and the VST gang,

I've basically fried my brain with my project - which is working well but I've left a few 'issues' hanging.

My plugin is a midi receiver only - I'm managing the midi output internally myself - as it's a wrapper for my synth Roland module.

At the moment my MidiProcessor is called from the AudioProcessor but obviously I don't really want to process the audio buffers at all. If I initilaise AudioProcess with 0 input and outputs, it's process method never gets called (which is good) but then I don't get to call the MidiProcessor ProcessCurrentEvents.

Is there any easy alternative before I go digging ?

Kind regards


Nov 23, 2012 at 6:21 AM

Hi Adrian,

The frying of ones brain is a pretty serious matter ... :-P

"In theory" you should not need an AudioPorcessor to begin with, BUT not all hosts are capable of handling midi only plugins - they assume audio. That is the reason why the MidiNoteMapper sample has an AudioProcessor - to work in as many hosts as possible. If you set the inputs and outputs of the AudioProcessor to 2 and simply let the base class handle the process (implements a bypass or thru) you WILL get called.

Depending on the range of hosts you are targeting you could try to use only the MidiProcessor (simply return null from the CreateAudioProcessor method on the Plugin root class to temporarily remove the AudioProcessor) and call the ProcessCurrentEvents from the Process method on the MidiProcessor.

Also realize that outputting Midi yourself inside the plugin requires a midi driver that is capable of serving multiple clients. Usually the DAW that hosts your plugin opens all Midi ports and holds on to them. If you run your plugin on a machine with a Midi driver that is not multi-client, your call to open the midi out port will fail.

On the other hand not many hosts process ALL Midi (thinking sysex) correctly in or out...

Hope it helps,

Nov 23, 2012 at 9:08 AM

Thanks Marc,

indeed; there just aren't enough hours in a lifetime :)

Yes, my approach is a little strange but sys-ex is a big part of my plugin. I could (should maybe) have gone with a standalone as this is partly an editor / patch manager but it's also an attempt to turn Roland modules into a live configurable instrument using a midi controller. I had some initial success with routing midi back to the host, but once I started to expand my host list it all became flaky and unreliable (much to the distain of some of my user 'base'). So I borrowed another hero's work - Les Sanford's Midi toolkit. As long as the user is aware that their DAW can't lock the module midi port everything seems alright.

I'll see what happens with nulling the Audioprocessor but I imagine it'll work with some DAWs but not all; fingers crossed. It's a pain that host implementations are not all equal.

I've tested with Ableton, Sonar 8 and X1, Cubase, VSTHost (of course) and an old version Protools - all good so far. It looks hideous (I'm no graphic designer; it's all windows controls) but its working pretty well. Lots more to do but it's enough to take back to the Roland groups and re-interest them - hopefully. It might mean that some of them can upgrade from Windows 95 / XP and still edit their modules :)

Kind regards and thanks again for your input and help,


Nov 23, 2012 at 10:02 AM

Do you have a link? I have a stack of Roland modules as well :-)

I also have been meaning to to write a (generic) patch editor - so many ideas, so little time :-P

I'd be very interested to see your plugin and to know how it works.

Nov 23, 2012 at 5:25 PM

Surely, the group is at http://launch.groups.yahoo.com/group/RolandJavelin/ although I'm only just ramping it up again, come on in if you're brave enough.

I think there is a waffle-full video for the MidiRouter Vst - which is a precursor to the full plugin. I'll be plopping up another video over the coming weeks and I'll definitely be rolling out an 'alpha' for the Javelin plugin.

It's not primarily generic although it is mostly database driven and it is only dealing with binary strings. It's alright until you give it to another human ! I have broken things out into layers and MEF is in play for the data so....

I have to say I'm a little nervous about giving you access; this being my first plugin - and indeed first public project - so it's a bit like singing Heroes for David Bowie.

And I can't sing :)

Many thanks Marc


Nov 23, 2012 at 6:24 PM

Ah, don't sweat it. Like in any 'performance': the audience doesn't hear all the imperfections you hear :-P

I've tried to join, but there was an error. Will try later again. Also watched your video - can't wait to see what it has evolved into.