Does MATLAB 2022a audio toolbox support VSTi (MIDI instrument)?

2 Ansichten (letzte 30 Tage)
Yimin Pang
Yimin Pang am 11 Mär. 2022
Can I send MIDI message to a VSTi plugin and get the audio waveforms back in MATLAB 2022a audio toolbox?

Antworten (1)

Gabriele Bunkheila
Gabriele Bunkheila am 31 Jan. 2024
In short - yes, this is possible in principle.
Let me break this question into a few separate ones:
  1. MATLAB can send (and receive) MIDI messages. A good starting point is the documentation page MIDI Device Interface, which includes examples on how to use functions such as mididevice or midimsg.
  2. In general, MATLAB can host VST plugins directly via the function loadAudioPlugin. Subsequent calls to the process method of the returned externalAudioPlugin or externalAudioPluginSource object return buffers (aka frames, blocks) of output samples directly as MATLAB arrays. The page Host External Audio Plugins includes a lot more details and code examples.
  3. If the plugin is running in an DAW or other application external to MATLAB, the output is routed to the audio output of the application. An easy way to route that signal back into MATLAB is to install a virtual audio channel (e.g. this application - just an example, not an endorsement). That will create in your OS at least:
  • A virtual audio output - use this to playback from your plugin-hosting application
  • A virtual audio input (connected to the virtual output above) - read from this in MATLAB using an audioDeviceReader object using a simple for or while loop as described in this example and many others.

Kategorien

Mehr zu Simulation, Tuning, and Visualization finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by