Hello everybody,
I’m experiencing something weird with my plugin. I’m receiving OSC messages from touchOSC that moves the sliders on my GUI, everything is working great for that part except that the host doesn’t get anything I’m doing when the parameters are modified through the OSC messages.
What I’ve done is that I’ve created three different “setParameters” in my PluginProcessor to avoid infinite loop, so I have :
setParameterFromUI() -> used by the main window to change my internal parameters. This one also send an OSC message to replicate the modification on touchOSC and calls “sendParamChangesToListeners()” that seems to be necessary to notify the host about the changes occuring. This method is working as expected, when I move a slider on my GUI, the internal value is updated, the OSC message is transmitted and received on the iPad and the slider is also moving in my host (Ableton Live in my case, but I’ve also tried on Reaper it works great with both).
[code]void MyPlugin::SetParameterFromUI(int index,float newValue)
{
// Internal parameter change
parameterTable[index].value = newValue;
// Sending information to OSC only
oscSender->updateOsc(index,newValue);
// Sending information to the Host
sendParamChangeMessageToListeners(index, newValue);
}[/code]
setParameter() -> original juce method from the AudioProcessor, this one is called when the slider is moved from the host, it sends an OSC message to the iPad and notify the main window about the change. No problem here, everything’s working great too.
[code]void MyPlugin::SetParameter(int index,float newValue)
{
// Internal parameter change
parameterTable[index].value = newValue;
// Sending information to UI only
/* here I create a string saying that a value has change on my processor
and that the UI should update the corresponding slider */
sendActionMessage(string);
// Sending information to OSC only
oscSender->updateOsc(index,newValue);
}[/code]
Where it gets complicated is when I receive and OSC message.
setParameterFromOSC() -> uses the same instruction as setParameterFromUI() except that instead of sending a notification to the OSC it sends to the main window. In this case, the GUI and the internal value are updated but the host slider won’t move at all even though I call explicitly the “sendParamChangesToListeners()” method.
[code]void MyPlugin::SetParameterFromOSC(int index,float newValue)
{
// Internal parameter change
parameterTable[index].value = newValue;
// Sending information to UI only
/* here I create a string saying that a value has change on my processor
and that the UI should update the corresponding slider */
sendActionMessage(string);
// Sending information to the Host
sendParamChangeMessageToListeners(index, newValue);
}[/code]
I suspect something that as to do with my threads : it’s the OSC Receiver in one of its method that calls the setParameterFromOSC() method from the PluginProcessor. The thing is the OSC Receiver has its own thread because it needs to be continuously listening to the udp port to receive osc messages.
Another thing, is that this bug is only appearing in the VST version of my plugin (mac or win). In the AU version, the setParameterFromOSC() works as expected and I get to see the host slider moving regardless of where the notification comes from (OSC or GUI), but that’s not happening in VST where only the UI get to move the host slider. I don’t know why it’s working in AU but I can’t get it to work in VST.
Is there something I’m doing wrong ? What should be the good thing to do for this kind of scenario ?
Thanks a lot for your time !
Adrien

Can only suggest to step through the sendParamChangeMessageToListeners() as you call it from SetParameterFromOSC().