How to interpret MIDI message in DataEvent by VST3 SDK?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi everyone! I'm developing plugins using VST3 SDK, but found some difficults on MIDI handling.

The Vst::Event struct has no explicit controller messages, so I guess it is recorded in DataEvent member. However, the DataTypes enum member in DataEvent only has one value kMidiSysEx. So How can I fetch controller messages from DataEvents?

Thanks for a lot!

Post

In VST3 they decided you don't have direct access to CC messages. Instead you can only map a controller to a plugin parameter.

You'll find the answer in the docs FAQ (also as comment in "pluginterfaces\vst\ivsteditcontroller.h"):
Q. How receive MIDI Controllers from the host?

A. MIDI controllers are not transmitted directly to a VST component. MIDI as hardware protocol has restrictions that can be avoided in software. Controller data in particular come along with unclear and often ignored semantics. On top of this they can interfere with regular parameter automation and the host is unaware of what happens in the Plug-in when passing MIDI controllers directly.

So any functionality that is to be controlled by MIDI controllers must be exported as regular parameter. The host will transform incoming MIDI controller data using this interface and transmit them as normal parameter change. This allows the host to automate them in the same way as other parameters.

To inform the host about this MIDI CCs to Plug-in parameters mapping, the Plug-in should implement the IMidiMapping interface.
If the mapping has changed, the Plug-in should call IComponentHandler::restartComponent (kMidiCCAssignmentChanged) to inform the host about this change.

Post

Max M. wrote:In VST3 they decided you don't have direct access to CC messages. Instead you can only map a controller to a plugin parameter.

You'll find the answer in the docs FAQ (also as comment in "pluginterfaces\vst\ivsteditcontroller.h"):
Q. How receive MIDI Controllers from the host?

A. MIDI controllers are not transmitted directly to a VST component. MIDI as hardware protocol has restrictions that can be avoided in software. Controller data in particular come along with unclear and often ignored semantics. On top of this they can interfere with regular parameter automation and the host is unaware of what happens in the Plug-in when passing MIDI controllers directly.

So any functionality that is to be controlled by MIDI controllers must be exported as regular parameter. The host will transform incoming MIDI controller data using this interface and transmit them as normal parameter change. This allows the host to automate them in the same way as other parameters.

To inform the host about this MIDI CCs to Plug-in parameters mapping, the Plug-in should implement the IMidiMapping interface.
If the mapping has changed, the Plug-in should call IComponentHandler::restartComponent (kMidiCCAssignmentChanged) to inform the host about this change.
Thanks for a lot!

Post

Max M. wrote:In VST3 they decided you don't have direct access to CC messages. Instead you can only map a controller to a plugin parameter.

You'll find the answer in the docs FAQ (also as comment in "pluginterfaces\vst\ivsteditcontroller.h"):
Q. How receive MIDI Controllers from the host?

A. MIDI controllers are not transmitted directly to a VST component. MIDI as hardware protocol has restrictions that can be avoided in software. Controller data in particular come along with unclear and often ignored semantics. On top of this they can interfere with regular parameter automation and the host is unaware of what happens in the Plug-in when passing MIDI controllers directly.

So any functionality that is to be controlled by MIDI controllers must be exported as regular parameter. The host will transform incoming MIDI controller data using this interface and transmit them as normal parameter change. This allows the host to automate them in the same way as other parameters.

To inform the host about this MIDI CCs to Plug-in parameters mapping, the Plug-in should implement the IMidiMapping interface.
If the mapping has changed, the Plug-in should call IComponentHandler::restartComponent (kMidiCCAssignmentChanged) to inform the host about this change.
thanks but....wait a seconds....

What if I'm making a virtual instrument, which don't need to map controller to a parameter? like, I only need to get the value of the MIDI controller message to modify performance switch or switch different layers of samples. And I don't want host to know them; at least, I don't
want the host to show them on track automation window because there's so many...

so.... What should I do?

Post

See ParameterInfo::ParameterFlags. You can decide if your parameter can be automated.

Post Reply

Return to “DSP and Plugin Development”