Now available for testing: The MIDI Input / Output plugin!

Started by Saga Musix, March 12, 2012, 23:37:21

Previous topic - Next topic

Saga Musix

After years of VST host development, I have decided to also have a look at the "other side of the VST SDK". I've written my first VST plugin, which is to be included with upcoming versions of OpenMPT. It's a MIDI Input and Output plugin and is supposed to replace VST2MID for OpenMPT users.

(Download link removed, as the plugin is officially part of the OpenMPT download package)

What's the point of making it an Input and Output plugin?


  • Several plugin instances can be opened at once to allow for multiple MIDI inputs.
  • The incoming MIDI are only routed to the next chainged plugin.

Combining these two previous points, you can use the plugin to control another instrument plugin exclusively using the MIDI data from the MIDI plugin. Only the selected output plugin of the MIDI plugin will receive this input. At the same time, this also means that the MIDI events captured by this plugin cannot be recorded to the pattern editor.

You can set up plugin chains with several MIDI processing plugins to go crazy: How about sending the MIDI events captured by this plugin to an arpeggiator plugin, and then send the arpeggiated MIDI data generated by that plugin to another instance of the MIDI Input / Output plugin to control external gear that has no built-in arpeggiator? It's up to you!

MIDI Input only works in recent test versions of OpenMPT, btw.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Harbinger

EXCELLENT! I'm inspired to go out and buy a new MIDI keyboard with this plugin. ;D

Just wondering: Is the plugin only helpful for external MIDI hardware? IOW, can some use be made for MIDI-based VSTi's, such as Roland's Orchestral board? Or would it be kind of redundant when using your plugin with others?

Saga Musix

Well, since the only thing this plugin does is sending data from the host to MIDI hardware or vice versa, it wouldn't be very helpful without external MIDI gear. But it can of course address any virtual MIDI device as well, like Windows' built-in GM player.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

oxxi

When I saw this, I quickly downloaded it! There is a latency issue though. I used the lowest possible settings for Midi and Audio, including ASIO, and sending midi to my Casio CZ101 was a bit delayed with Modplug. Any other ideas as to what else I could try to remedy this?
////

Saga Musix

I have practically zero latency when using the plugin together with an ASIO driver at 10ms latency. Do you get better performance with other audio software using the same drivers? Does VST2MID have any significant differences in latency?

The plugin makes use of PortMidi with a zero length buffer, so the plugin itself doesn't cause any latency that I could fix. I have only noticed higher latencies when using the plugin together with WaveOut and DirectX.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

oxxi

Well today my Midi-to-USB stopped working. I had to uninstall MidiYoke so that my Midi Usb Cable could work on my system along with your plugin. After this,  I tested your plugin in Modplug and the latency was practically non-existent! The only thing now is if I try to record notes while the pattern is playing, the sequence/pattern automatically starts to play back slow. I have to stop and replay the pattern to hear the original speed. Don't know if this is a bug or not. Also, I can't do both Midi IN/OUT at the same time. It's either one or the other. So I've just been using my pc keyboard to enter the note data and having Modlug play the sequence on my synth. 
////

Saga Musix

Quote from: oxxi on March 27, 2012, 04:17:12The only thing now is if I try to record notes while the pattern is playing, the sequence/pattern automatically starts to play back slow.
That sounds weird. To isolate the problem, do use tempo commands in your song, and does the tempo in the pattern you want to record into differ from the initial tempo setting?

Quote from: oxxi on March 27, 2012, 04:17:12Also, I can't do both Midi IN/OUT at the same time. It's either one or the other.
Sounds like a driver issue, though that shouldn't even happen with the generic Windows USB MIDI Interface drivers - I have tried them and they work perfectly. Are you sure that no other application is accessing MIDI ports when you try to use them in OpenMPT?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

oxxi

Well I haven't had much time to test things lately, but the tempo in the pattern does differ from the initial setting. I have to change it back to the original tempo. It could be a midi driver issue though, or maybe I should do a fresh install of XP (it's been a while). I did have trouble installing the midi drivers for the Roland UM-one when I first got it. Windows XP did not recognize it and neither did other Win 7 computers. I tried the UM-one in OSX, and it worked fine. So I guess that could be the issue. I'll see if I can try another midi device sometime in the future along with your plugin.
////

Saga Musix

Well, that would be weird if the MIDI callback would slow down OpenMPT. Are you sure that OpenMPT is not simply reverting the tempo settings to the defaults when you try to play the pattern?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.