MATLAB Answers

VST Audio Plugin: Communication

13 views (last 30 days)
Let's say that I created a VST audio plugin using MATLAB called "myVST.vst"
Then I open my DAW (Reaper/Apple Logic X), and load 3 instances of myVST on the channels:
  • Audio: Vocal (myVST)
  • Audio: Piano (myVST)
  • Main Master Out (myVST)
I would like to know if is possible a myVST instance send messages / informations to the another myVST instance.
Example: For some reason internally calculated, the myVST loaded in the Main Master Out must inform the myVST loaded on the Vocal channel that the "myVST Gain parameter" of this myVST needs to be changed to a "-3dB" value.
At the same time the same myVST loaded in the Main Master Out must inform the myVST loaded on the Piano channel that the "myVST Low Pass Filter Frequency" of this myVST needs to me changed to a "100Hz" value.
Now, each individual instance of myVST loaded on the vocal and piano channels receives that messages/informations, and finally they can automatically change their parameters values as prompted.
Looking at the MATLAB documentation I saw that it is possible to establish a communication between MATLAB the MATLAB-generated plugins loaded from DAW using the UDP protocol:
Link: But my question is in direct communication between plugins loaded on different channels in DAW.
It is possible?


Sign in to comment.

Accepted Answer

Gabriele Bunkheila
Gabriele Bunkheila on 21 Mar 2018
Hi Nycholas,
I haven't personally experiemented with this type of configuration, but the UDP-based approach is applicable in theory. The low-level building blocks needed are dsp.UDPSender and dsp.UDPReceiver, and the example that you linked should indeed put you on the right track.
From a practical standpoint though, your specific design idea may have other challenges. You will have to pay attention to things like:
  • Sending UDP messages needs knowledge of a given receiving port, or otherwise needs working in broadcasting mode
  • You may need plugins with different roles to use different local ports
  • You may find it hard for a plugin to discover other running instances of the same type or to configure themselves for a given master/slave role automatically
In summary, my suggestion would be to start small (e.g. create two separate plugins with different pre-configured roles) and to try to grow the complexity incrementally only once you understand all relevant implications.
One important piece to remember - when you generate the VST plugin from MATLAB, any UDP communication will depend on a shared library under matlabroot\bin (see for example the documentation page How To Run a Generated Executable Outside Matlab ). Υou should ensure that folder is on the path before firing up your DAW.
For example, I use the following .bat file to open REAPER in Windows:
set PATH=C:\MATLAB\R2018a\bin\win64;%PATH%
"C:\Program Files\REAPER (x64)\reaper"
Good luck,

  1 Comment

Nycholas Maia
Nycholas Maia on 21 Mar 2018
Thank you Gabriele for your quick response and attention.
I will try!

Sign in to comment.

More Answers (0)

Sign in to answer this question.