How to best develop plugins for use with OpenMPT

Started by dem1, May 19, 2021, 17:49:38

Previous topic - Next topic

dem1

Suppose I want to write a few plugins for use with OpenMPT: custom distortion, a granulator, a full-screen visualizer with MIDI input.
It looks like OpenMPT supports VST2 and DirectX Media Objects. Are there any others? Where can I find documentation/SDKs? Which one would minimize development time for what I have in mind? Are there any features that I should avoid in order to ensure compatibility with OpenMPT?

Saga Musix

QuoteAre there any others?
There's also built-in plugins but obviously those will really only work with OpenMPT, and there is absolutely zero guarantee for API stability for internal plugins (we refactor it as required).

DirectX plugins haven't really been relevant in the last ten years or so, I wouldn't even know where to find the SDK for developing them, and few hosts support them. VST2 is the only widely supported solution, and even though Steinberg is trying to make it more and more difficult to obtain access to the SDK (because they want to push VST3), there are third-party projects such as DPF that will allow you to still create VST2 plugins. In fact, that project in particular allows you to use the same code base to create plugins in several formats. I have never used it myself but looking at the examples, DPF should be able to get you started quickly. The biggest limitation with any plugin format is that OpenMPT currently only supports one stereo input and one stereo output for each plugin (no sidehcain buses etc.), but apart from that you should be able to use most features of VST2.
» 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.

dem1

Quote from: Saga Musix on May 19, 2021, 18:03:40
QuoteAre there any others?
There's also built-in plugins but obviously those will really only work with OpenMPT, and there is absolutely zero guarantee for API stability for internal plugins (we refactor it as required).

DirectX plugins haven't really been relevant in the last ten years or so, I wouldn't even know where to find the SDK for developing them, and few hosts support them. VST2 is the only widely supported solution, and even though Steinberg is trying to make it more and more difficult to obtain access to the SDK (because they want to push VST3), there are third-party projects such as DPF that will allow you to still create VST2 plugins. In fact, that project in particular allows you to use the same code base to create plugins in several formats. I have never used it myself but looking at the examples, DPF should be able to get you started quickly. The biggest limitation with any plugin format is that OpenMPT currently only supports one stereo input and one stereo output for each plugin (no sidehcain buses etc.), but apart from that you should be able to use most features of VST2.

Built-in plugins are an interesting possibility. I suppose that would (currently) mean forking OpenMPT and compiling it with my plugin (with a few things added to PluginManager.cpp)?

DPF looks very neat, thanks for pointing that out!

I'm curious why VST3, sidechain buses, etc., aren't supported?

Saga Musix

Quote from: dem1 on May 19, 2021, 18:51:52
Built-in plugins are an interesting possibility. I suppose that would (currently) mean forking OpenMPT and compiling it with my plugin (with a few things added to PluginManager.cpp)?
Correct.

Quote from: dem1 on May 19, 2021, 18:51:52I'm curious why VST3, sidechain buses, etc., aren't supported?
The reason for both is "because the work hasn't been done", but for VST3 also once again Steinberg's questionable way of licensing their SDKs, and that it is greatly overengineered and nobody really likes working with VST3. A lot of OpenMPT's plugin communication is done via MIDI, and VST3 was originally designed to essentially completely replace MIDI. This means that for years many things that were trivially possible in VST2 were not possible in VST3, some of which might still not be possible today (I don't know). At this point I'd probably be more likely to add LV2 support than VST3 support.
» 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.

dem1

Quote from: Saga Musix on May 19, 2021, 20:53:22
The reason for both is "because the work hasn't been done", but for VST3 also once again Steinberg's questionable way of licensing their SDKs, and that it is greatly overengineered and nobody really likes working with VST3. A lot of OpenMPT's plugin communication is done via MIDI, and VST3 was originally designed to essentially completely replace MIDI. This means that for years many things that were trivially possible in VST2 were not possible in VST3, some of which might still not be possible today (I don't know). At this point I'd probably be more likely to add LV2 support than VST3 support.

That makes sense, I'd had a hard time figuring out where to even start with VST3 - but it might just be more complicated than what I actually need it for :)
LV2 does seem a lot friendlier, and nobody can beat that license!