MATLAB Answers

MATLAB Coder/VST Plugin Generation: How to use MIDI devices?

2 views (last 30 days)
Maximilian Kentgens
Maximilian Kentgens on 3 Aug 2018
Answered: Charlie DeVane on 13 Dec 2018
I am currently exploring MATLAB's capabilities to generate VST Plugins using MATLAB Coder and the Audio System Toolbox [1]. I arrived at not being able to implement my project as I am failing to read notes from a MIDI keyboard.
  1. 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 [2]
  2. Direct communication with MIDI devices is possible with MATLAB and seems to work well with direct intrepretation [3]. However, it is not available for MATLAB Coder.
  3. Using a third-party MEX implementation for MIDI device communication (see [4]) 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
[1] https://de.mathworks.com/help/audio/audio-plugin-creation-and-hosting.html
[2] https://de.mathworks.com/help/audio/ug/midi-control-for-audio-plugins.html
[3] https://de.mathworks.com/help/audio/ug/midi-device-interface.html
[4] https://de.mathworks.com/matlabcentral/fileexchange/37769-midi-interface-for-matlab

  0 Comments

Sign in to comment.

Answers (1)

Charlie DeVane
Charlie DeVane on 13 Dec 2018
Hi Max,
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 :-)
Charlie

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!