VST3 and MIDI CC pitfall

OK - thanks. Good to know that this is not a VST3 SDK issue but rather a host issue.

(I am just a beginner in coding VST plugins, maybe i have overlooked anything.)

So it was never thought of designing “real” midi VST3 plugins?

I recentley did this juce beginner tutorial: hxxps://docs.juce.com/master/tutorial_code_basic_plugin.html
(cant post links, so replace xx to tt)
VST2 version works fine upon setting plugin midi in and plugin midi out in projucer. While VST3 plugin simply doesnt work.

What is the solution to get the VST3 version working?

Also Why is it so bad to not allow 3 VST3 plugin versions? MIDI FX, Audio and Mixed aka Synth Plugin?

There is a post above that answers your question:

In other words, Steinberg, Presonus, Ableton don’t want you to create your own MIDI plugins. They want you to use their great (cough) MIDI effects instead. Now that VST2 has been deprecated, if you want to create your own MIDI effects, you have to get a Mac, code them as MIDI effect Audio Units and use them in Logic or Reaper.

3 Likes

I have a similar issue - I’m not trying to create a MIDI effect, just one that uses MIDI CCs for parameters (using IMidiMapping).

Steinberg’s LegacyMIDICCOutEvent workaround has caused ambiguity which actively breaks some use-cases. Here’s a diagram I posted in another thread about how MIDI is passed through an effect chain:

Effects which used IMidiMapping used to all function like (3). WithLegacyMIDICCOutEvent, it’s now ambiguous whether they should act like (5).

Any effect could output legacy MIDI events - so if they don’t, hosts have to guess whether they’re MIDI input-only, or whether they’re deliberately absorbing CCs.

1 Like

For synths, CC1, CC74, pitchbend and channel aftertouch are essential performance modulation sources. So, there has to be event types at least for those.

You modulate via parameter changes and the host is free to use any source for modulation like MIDI CC and aftertouch. The host even can modulate single voices via note expression if it likes to support this.

@ESZ: You might be able to do what you want with LegacyMIDICCOutEvent. Although the input takes nice sample-accurate automation, you can output MIDI events, including things like pitch-bend. You have to do the awkward conversion back yourself (even though the DAW converts input MIDI events to automation for you), and if your user connects the parameter to a different controller then you’ll be outputting the wrong MIDI events, but I think that’s all we can do for now.

IMO, the VST3 standard has made MIDI controller output very ambiguous, by half-supporting it with LegacyMIDICCOutEvent. The simple solution would be to let you tag output parameters with IMidiMapping as well, at which point you could use processData.outputParameterChanges in the obvious way.

It’s been several years since these MIDI-output issues were first raised though, and they haven’t yet acknowledged that making users manually route MIDI or connect parameters up is awkward, so :person_shrugging:.

2 Likes

@Arne_Scheffler so what is the correct way for an host to send an “all notes off” event to a plug-in ? Surely one is not supposed to allocate 16*128*number_of_midi_busses explicit VstEvent note off events ?

As a host you should know which noteOn events you have send to the plug-in without a noteOff event thus you send the corresponding noteOff events to the plug-in.

As a host you should know which noteOn events you have send to the plug-in without a noteOff

1/ yes, but storing those has a cost… needs dynamic allocations, etc… for no good reason.
2/ this won’t catch event that weren’t generated from the host, e.g. clicking on a note in a virtual keyboard in a plug-in UI, plug-ins that get MIDI data from external sources such as custom reading of MIDI through OS API (unrelated, but, while mentioned here, this is definitely not a good solution as e.g. on Linux apps may have an exclusive access to MIDI devices, so if the host is using a MIDI controller keyboard for note input, the plug-in may not necessarily be able to go read the native MIDI CC events of said keyboard), OSC or whatever

If you want to have the equivalent of “all sounds off” then deactivate and reactivate the plugin.

How come the whole community is asking for true MIDI 1.0 support and you just refuse to do so?

2 Likes

I think that a DAW is actually intended for the users. And not necessarily just for the programmers. And in my opinion you should simply stick to the current circumstances.
I would also have been very happy if MIDI 2.0 had become established 20 years ago. Unfortunately it hasn’t to this day.
So we’ll just have to live with it, O.K. As long as all DAWs don’t suddenly only support 2.0 and no one has the right hardware for it.
I think it’s a shame that I still have to use VST2 versions (if they still exist) of plugins to make certain MIDI things work.