Exchange Data between Plugins

Hi again,

I have written a little plugin that receives OSC parameters by starting a server using a given port.
The problem I encountered is that if I have multiple instances of my plugin on different audio channels I can’t use the same port.

Do the plugins know each other? Or would it be possible to access the host-plugin relationship like a tree-structure?
This way I could at least set up a master OSC-server which distributes the data to the seperate channels.

Thanks in advance

Or would it in this case be easier to have 2 Plugins?

  • one OSC Server which converts the incoming Messages to MIDI commands and sends them to the Host
  • and a second Plugin which will be assigned to several channels and decodes the MIDI commands

At least this seems be a possible workaround…

Hi all I made some progress but still could really use some help.

Right now I’m translating the incoming OSC Messages to MIDI events (as already proposed above) and sending them to a given Port as controller Data (MidiMessage::controllerEvent).
The question would be: how do I receive them in any of my plugins? The processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) method only seems to process noteOn-like events and only if the plugin is running on a MIDI track (I use Ableton Live as testing host).
I want my plugin to run on an audio track and receive MIDI controller data - would this be possible at all or should I set up a MIDI listener that operates independent from the host’s internal MIDI routing?


You will most likely have to use traditional parameters (not MIDI messages) and map those paramters inside the host.
Many plugins will ignore CC messages they have not been trained to learn to parameters; plus, it’s never guaranteed that a plugin
will actually expose all possible parameters to MIDI CCs.

I really would like to avoid MIDI here but since only one instance of my plugin can connect to the given OSC port I have to distribute my data somehow within the host… so MIDI would be my only chance I guess.

Would it be possible with the Juce API to just foward my MIDI message to a given MIDI-Input and handle it with MidiHandler::handleIncomingMidiMessage (MidiInput *source, const MidiMessage &message) without using some kind of routing in the host?

Or use sockets ?

see InterprocessConnection and InterprocessConnectionServer

Thanks for the hint. This looks interesting but also kind of tricky - I didn’t get it to work yet. Is there any documented Sample Code?
Just for sending a simple Message from one instance of my Plugin to another.
To show what I already tried to do: subclassing both IPC and IPCS, implementing the messageReceived() and createConnectionObject() methods. The returns are true but especially the messageReceived() never gets called where I was hoping to get my data…

_ipcsChild = new IPCSChild();
_ipcChild = new IPCChild();
bool connectionStatus = _ipcChild->connectToSocket("", 2002, -1);
MemoryBlock * mBlock = new MemoryBlock();
bool sendStatus = _ipcChild->sendMessage(*mBlock);


in Juce Demo :slight_smile: