VST3 and MIDI CC pitfall

SDK for VST 3 audio plug-in and host development.
Dewdman42
Posts: 13
Joined: Sun Dec 30, 2018 7:32 pm

Re: VST3 and MIDI CC pitfall

Post by Dewdman42 »

Studio one also supports au but not aumfx yet.

Windows users are completely subject to vst rules

Dewdman42
Posts: 13
Joined: Sun Dec 30, 2018 7:32 pm

Re: VST3 and MIDI CC pitfall

Post by Dewdman42 »

Also it would appear that cubase itself may not be using note expressions under the covers to handle multiple expression map articulations on the same timestamp. So even cubase is missing this problem, much less all other hosts.

In order to make everyone happy, all hosts need to detect cc-note-cc-note sequences on the same timestamp and convert that to the right series of note expressions and notes before calling back to the vst3 plugin. Trying to use parameters for that will lose the sequence. So all hosts including cubase would need to detect that and handle it with internal note expressions instead of parameters.

Likewise all vst3 plugins everywhere need to be looking for note expressions which not all are. But they should be anyway before shipping a vst3 plugin.

As noted earlier, cubase expression maps are unable to resolve this problem either. Poly articulation chords are impossible with cc keyswitches in the instrument.

Dewdman42
Posts: 13
Joined: Sun Dec 30, 2018 7:32 pm

Re: VST3 and MIDI CC pitfall

Post by Dewdman42 »

So i guess one way to work around this the VST3- way, would be to build midi processing into a plugin which also sub-hosts another VST3 instrument plugin from inside my plugin. That way I can do any kind of midi processing I want and send it directly to the instrument rather then trying to send out midi back to the DAW to do it.

Anyone know if there is any good hosting example code out there, particularly for hosting an instrument plugin from within another instrument plugin?

Chris T
Posts: 8
Joined: Mon Jan 27, 2020 11:57 am

Re: VST3 and MIDI CC pitfall

Post by Chris T »

Hey,

am I getting this right? VST3 is not supporting CC messages? I just started developing aVSTi modifying the Again example. Evervthing worked well so far until I wanted to include the damper pedal. I figured that in the eventList there are only noteOn and noteOff messages. Pedals and controller are missing. So how do I get the pedal message? I hope that I am just to blind to see. How does an instrument work without CC?


Arne Scheffler wrote: ↑Fri Jan 17, 2020 12:04 pm
your frustration comes from the misunderstanding that you can build MIDI plug-ins with VST. VST describes an audio plugin API.

A VSTi has at least a midi input. Is that not supported by VST3?

Thanks for your help!
Cheers
Chris

Arne Scheffler
Posts: 375
Joined: Mon Jun 20, 2016 7:53 am

Re: VST3 and MIDI CC pitfall

Post by Arne Scheffler »

Hi Chris,
in VST3 an instrument declares all its changeable properties via parameters. In your case, you create a parameter for the damper pedal and you can use IMidiMapping to tell the host that this parameter should map to the damper pedal MIDI control change message. The host will then translate the MIDI CC message to a parameter change and send it to your audio processor.

Cheers,
Arne

Chris T
Posts: 8
Joined: Mon Jan 27, 2020 11:57 am

Re: VST3 and MIDI CC pitfall

Post by Chris T »

Thanks Arne. Is there a simple example showing how to to this? Thanks a lot..

User avatar
ygrabit
Posts: 172
Joined: Fri Jun 17, 2016 7:52 am
Location: Hamburg
Contact:

Re: VST3 and MIDI CC pitfall

Post by ygrabit »

You could check the examples:
  • public.sdk/samples/vst/again/source/againcontroller.h
    or
  • public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_controller.h
which supports IMidiMapping interface.

Cheers
YVan Grabit

ResonantMind
Posts: 11
Joined: Sun Apr 28, 2019 8:31 pm

Re: VST3 and MIDI CC pitfall

Post by ResonantMind »

Arne Scheffler wrote:
Fri Jan 17, 2020 4:48 pm
For

Does this mean that GRM Tools will not be able to progress their plugin development beyond VST2.4?

MIDI is a foundation aspect of GRM Tools and what they do - they could not exist without MIDI input - there is an entire experimental music and sound design community based around GRM tools and live performance manipulation using MIDI.

https://inagrm.com/en/store

Image

signalsmith
Posts: 11
Joined: Tue Dec 11, 2018 10:19 am

Re: VST3 and MIDI CC pitfall

Post by signalsmith »

ResonantMind wrote:
Fri Jan 31, 2020 6:55 pm
they could not exist without MIDI input
MIDI input is not a problem, it works rather well. 🙂 The DAW translates MIDI events into either note-events or automation envelopes (so MIDI CCs are indistinguishable from parameter automation) for the plugin. The plugin provides a default mapping using IMidiMapping.

MIDI CC output is awkward, emitting kLegacyMidiCCOutEvent - so the DAW translates MIDI to automation, but you have to translate it back yourself.

(I personally still think we should be able to tag output parameters using something similar to IMidiMapping, and instruct DAWs to either translate back to MIDI or automatically hook up to any following IMidiMapping-tagged plugins as sample-accurate automation, as required.)

AFIAIU, the official stance is that MIDI output support in VST2 was kind of an accident, everyone should have just realised this and probably not used it (?), so we don't get to be frustrated that VST3 removed it. The lack of widely-supported alternatives is our problem, not Steinberg's responsibility (even I suspect alternatives are rare partly because VST2 covered it so well).

ResonantMind
Posts: 11
Joined: Sun Apr 28, 2019 8:31 pm

Re: VST3 and MIDI CC pitfall

Post by ResonantMind »

signalsmith wrote:
Fri Jul 24, 2020 10:48 am
ResonantMind wrote:
Fri Jan 31, 2020 6:55 pm
they could not exist without MIDI input
MIDI input is not a problem, it works rather well. 🙂 The DAW translates MIDI events into either note-events or automation envelopes (so MIDI CCs are indistinguishable from parameter automation) for the plugin. The plugin provides a default mapping using IMidiMapping.

MIDI CC output is awkward, emitting kLegacyMidiCCOutEvent - so the DAW translates MIDI to automation, but you have to translate it back yourself.

(I personally still think we should be able to tag output parameters using something similar to IMidiMapping, and instruct DAWs to either translate back to MIDI or automatically hook up to any following IMidiMapping-tagged plugins as sample-accurate automation, as required.)

AFIAIU, the official stance is that MIDI output support in VST2 was kind of an accident, everyone should have just realised this and probably not used it (?), so we don't get to be frustrated that VST3 removed it. The lack of widely-supported alternatives is our problem, not Steinberg's responsibility (even I suspect alternatives are rare partly because VST2 covered it so well).
Thanks for the clarification

Post Reply