does a tutorial exist on how to write a MIDI VST plugin?

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

tux99
Establlshed Member
Posts: 329
Joined: Fri Sep 28, 2012 10:42 am
Contact:

does a tutorial exist on how to write a MIDI VST plugin?

Postby tux99 » Wed Mar 14, 2018 2:09 pm

I have been searching everywhere but I can't find a tutorial or some documentation that explains how the VST API is used to write pure MIDI plugins (such as synth editors). All I can find is examples and tutorials on how to write sound plugins.
Purely looking at source code of existing MIDI plugins or of the VST SDK is no help to me, my skills are not that advanced to figure it out purely by looking at source code without any tutorial or explanation on how the API works.

User avatar
falkTX
Establlshed Member
Posts: 6496
Joined: Sat Jan 09, 2010 3:04 pm

Re: does a tutorial exist on how to write a MIDI VST plugin?

Postby falkTX » Wed Mar 14, 2018 3:13 pm

There's 2 main things regarding VST MIDI.
1. effProcessEvents is called by the host to inform the plugin about midi events. this is called just before the process function.
2. audioMasterProcessEvents which is called by the plugin during processing to report MIDI events to the host

tux99
Establlshed Member
Posts: 329
Joined: Fri Sep 28, 2012 10:42 am
Contact:

Re: does a tutorial exist on how to write a MIDI VST plugin?

Postby tux99 » Wed Mar 14, 2018 8:03 pm

Thanks falkTX, that's a starting point for me, but if anybody knows of proper documentation or a tutorial and could post a link to it, it would be even better.

User avatar
falkTX
Establlshed Member
Posts: 6496
Joined: Sat Jan 09, 2010 3:04 pm

Re: does a tutorial exist on how to write a MIDI VST plugin?

Postby falkTX » Wed Mar 14, 2018 9:24 pm

I know pizmidi are a collection of vst midi plugins, so checking out its source might serve as documentation.
Documentation for VST SDK has always been lackluster, it's not very detailed on what devs should do, which leads to plugins implementing the same API in sorta different ways...

tux99
Establlshed Member
Posts: 329
Joined: Fri Sep 28, 2012 10:42 am
Contact:

Re: does a tutorial exist on how to write a MIDI VST plugin?

Postby tux99 » Wed Mar 14, 2018 11:18 pm

falkTX wrote:I know pizmidi are a collection of vst midi plugins, so checking out its source might serve as documentation.

Thanks will check it out, but as I said, reading source code (unless it's full of comments) does not help me a lot at my skill-level.
Documentation for VST SDK has always been lackluster, it's not very detailed on what devs should do, which leads to plugins implementing the same API in sorta different ways...

Good to know that I'm not the only one struggling with the lack of documentation. ;)

j_e_f_f_g
Establlshed Member
Posts: 977
Joined: Fri Aug 10, 2012 10:48 pm

Re: does a tutorial exist on how to write a MIDI VST plugin?

Postby j_e_f_f_g » Thu Mar 15, 2018 11:03 am

Does it need to be VST, or can it be LV2?

tux99
Establlshed Member
Posts: 329
Joined: Fri Sep 28, 2012 10:42 am
Contact:

Re: does a tutorial exist on how to write a MIDI VST plugin?

Postby tux99 » Thu Mar 15, 2018 5:41 pm

It needs to be VST as it has to be multi-platform and work with all common DAWs.

Or does some kind of wrapper exist to use a LV2 in VST compatible DAWs?

SpotlightKid
Posts: 3
Joined: Sun Jul 02, 2017 1:24 pm

Re: does a tutorial exist on how to write a MIDI VST plugin?

Postby SpotlightKid » Thu Mar 15, 2018 6:21 pm

tux99 wrote:It needs to be VST as it has to be multi-platform and work with all common DAWs.


Yes, for example Carla, by the present, illustrious falkTX.

tux99 wrote:Or does some kind of wrapper exist to use a LV2 in VST compatible DAWs?


There are also frameworks, which allow you to write the core processing code of a plugin once and export it in different plugin format. Not many of these support LV2, though, and MIDI support is often less developed than that for audio.

I'm not aware of such a framework, which supports all important plugin formats across all platforms, most are missing support for either LV2 or AU (and support for less important formats like RTAS is even rarer).

Again, falkTX has something on offer here: DPF supports LADSPA, DSSI, LV2 and VST, but I'm not sure how extensive MIDI support is. falkTX himself can probably can answer this better ;)

Jack Winter
Establlshed Member
Posts: 162
Joined: Sun May 28, 2017 3:52 pm

Re: does a tutorial exist on how to write a MIDI VST plugin?

Postby Jack Winter » Thu Mar 15, 2018 7:31 pm

tux99 wrote:It needs to be VST as it has to be multi-platform and work with all common DAWs.

Or does some kind of wrapper exist to use a LV2 in VST compatible DAWs?


Yes, https://github.com/x42/lv2vst/blob/master/README.md, but it doesn't support all features, so not all plugs work.

But as an example, most Harrison plugs work in Reaper.

That said with Steinberg supporting VST3 with a SDK for Linux, I'd imagine that VST3 could be important on Linux.
Reaper/KDE/Archlinux. i7-2600k/16GB + i7-4700HQ/16GB, RME Multiface/Babyface, Behringer X32, 2 x WA-412, ADL-600, Tegeler TRC, and too much other stuff to list 8) For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 2 guests