Possible to communicate between plugins?
-
Is there a way to communicate between plugins, send data from one plugin to another plugin loaded in a daw?
I'm thinking of the fairly new BroadCaster system, is it able to do that or is there another way without diving in to c++?
-
The most sane approach would be OSC messages.
-
@Christoph-Hart sounds exiting, thanks :)
-
-
I haven't got around to trying it myself yet but Christoph posted an example for me
https://forum.hise.audio/topic/6306/osc-has-arrived/13?_=1667038909341
-
@d-healey Ah yes, now I remember that was me :)
-
@Christoph-Hart I've got it working, from one vst3 plugin to another vst3 plugin in the same daw :)
I've set it up so I have one main plugin, sending information via OSC and a "receiver" plugin and it works nicely but if I use more than 1 instance of the receiver plugin, only 1 of them is receiving the data, why is that?
Is it possible to make all of them receive the data? -
@Christoph-Hart Do I need a "SourcePort" per instance maybe?
And set the port when it's already loaded..hmm... I'll try some things -
@Christoph-Hart I'm not able to have more than 1 instance of the receiver plugin, this is my setup
This is the "main" plugin that sends information to the receiver plugins
The "subdomains" array is working great, I'm able to switch between the sub domains while running.Also the callback works, it will receive data from the all the instances of the receiver plugin, and I can clearly see from which instance it comes.
But only 1 of the receivers get the send data, even though the "dead" instances can send back to the "main" plugin.
// Testing communiction between plugins const subdomains = ["/ch1", "/ch2", "/ch3", "/ch4"]; const var rm = Engine.getGlobalRoutingManager(); rm.connectToOSC({ "SourcePort": 6666, "TargetPort": 6667, "Domain": "/ostinarp" }, 0); inline function OSCCallback(id, value) { LogLbl1.set("text", value); }; for (i = 0; i < 4; i++) rm.addOSCCallback(subdomains[i], OSCCallback);
This is how I set up the receiver plugins
const var rm = Engine.getGlobalRoutingManager(); rm.connectToOSC({ "SourcePort": 6667, // Note how the source port and target port are "TargetPort": 6666, // reversed here to allow bidirectional communication "Domain": "/ostinarp" }, 0); inline function OSCCallback(id, value) { local ch = ChannelKnob.getValue(); if (value[0] == ch) { local ev = Synth.addNoteOn(value[0], value[1], value[2], 0); Synth.noteOffDelayedByEventId(ev, value[3]); LogPanel.setValue(value); LogPanel.repaint(); rm.sendOSCMessage(subdomains[ch-1], "Hi there from "+subdomains[ch-1]); } };
What have done wrong?
-
@ulrik and the data sent is an array, and that works great
-
@Christoph-Hart is it possible to send to more than 1 "TargetPort"
const var rm = Engine.getGlobalRoutingManager(); rm.connectToOSC({ "SourcePort": 6666, "TargetPort": several ports, "Domain": "/ostinarp" }, 0);
-
@ulrik Does
rm.connectToOSC({ "SourcePort": 6666, "TargetPort": [1234, 5678], "Domain": "/ostinarp" }, 0);
Work?
-
@ulrik I am not very familiar with OSC but I am assuming this would need a user to install OSC specifically to use this ?
-
@lalalandsynth Nope, OSC is a network protocol and doesn't need any 3rd party software.
However I don't have too much knowledge about OSC, I just implemented a wrapper around the JUCE classes so I can imagine that port numbers need to be exclusive in order to receive messages.
"TargetPort": [1234, 5678],
pretty sure this will not work, because I implemented this and the
TargetPort
property gets parsed as a single integer value, but I can try to take a look at this and create multiple OSC senders which send the same message to multiple target ports here. Not sure when I find the time for that though... -
@Christoph-Hart @lalalandsynth I've tried using an array but it will not work, at least not the way I've set it up
-
@Christoph-Hart Using only 1 sender and 1 receiver works great, also using using different sub domain.
When the first receiver instance has successfully connected and is receiving data, it is like this instance is blocking the senders port so the second instance is not able to connect.
If that is the case, it would be great if the sender could send on several ports.And as I understand it, you can't use
Engine.getGlobalRoutingManager();
for more than one time right?
-
Guys sorry about my ignorance.
What are the use cases of the communication between the plugins?
What does this feature stand for? -
@harris-rosendahl in my case I wan't to send midi information from a multichannel arpeggiator (which will not work in some daws), to several "receiver! plugins to control multi instruments
-
@ulrik Could I for example control a gain module on track 2, and having my main control module on track 1?
-
@lalalandsynth Be careful about "persistent" states in conjunction with OSC, this is one of the main drawbacks I found in this protocol because restoring these settings from a DAW project will not restore the values (especially because you can't guarantee that the gain module 2 exists already when the gain module 1 is created and restored).