MATLAB Coder/VST Plugin Generation: How to use MIDI devices?
6 views (last 30 days)
I am currently exploring MATLAB's capabilities to generate VST Plugins using MATLAB Coder and the Audio System Toolbox . I arrived at not being able to implement my project as I am failing to read notes from a MIDI keyboard.
- Receiving MIDI notes via VST seems not to be implemented in the Audio System Toolbox as what I could find out so far, although MIDI controls can be connected to Properties of the plugin 
- Direct communication with MIDI devices is possible with MATLAB and seems to work well with direct intrepretation . However, it is not available for MATLAB Coder.
- Using a third-party MEX implementation for MIDI device communication (see ) works well in MATLAB but also fails with the MATLAB Coder as including MEX functions is not supported. With "coder.extrinsic" I get the MATLAB Audio testbench to work, but standalone plugin generation fails.
My impression is that you have to make substantial sacrifices and to cut corners when using MATLAB Coder. The VST plugin generation from the Audio System Toolbox does not seem to be mature yet.
Does anyone of you have an idea of how to receive VST notes from an instrument using any kind of hack? Thank you very much in advance.
Best regards, Max
Charlie DeVane on 13 Dec 2018
Generating VSTi plugins (ie, plugins that receive MIDI messages) is not yet supported.
MATLAB Coder supports MIDI only using coder.extrinsic at present.
Kudos for your clever workaround for these limitations :-)