Hello,
I am making two independent plugins, but I want one be able remote in some way from other plugin. It would be the best if I could send any int
or enum
.
Is it possible? If yes, how to do that in JUCE. Please help me.
Hey thanks thatâs great. I always have difficult with finding anything in documentation
OK, Iâve just found out I canât use it without any tutorial. I just canât understand the idea. And my English language is poor.
I need some instruction step by step how to do that. PLEASE, could any one help?
First I just tried:
InterprocessConnection myConnection;
But it gives me two errors:
Field type âjuce::InterprocessConnectionâ is an abstract class
and:
Cannot initialize return object of type âjuce::AudioProcessorEditor *â with an rvalue of type myAudioProcessor.
Have no idea what to do.
So the first step looks for me too crazy to manage.
I also tried in my editor constructor just call: InterprocessConnection();
But I get error:
Allocating an object of abstract class type âjuce::InterprocessConnectionâ
OK so if itâs abstract I understand I need to create my own class with InterprocessConnection
as a base.
OK I just tried to inherit from public InterprocessConnection
in myAudioProcessorEditor
.
But I get error in dependent class myAudioProcessor
, exactly here:
AudioProcessorEditor* myAudioProcessor::createEditor() { return new myAudioProcessorEditor (*this); }
And the error says: Allocating an object of abstract class type âmyAudioProcessorâ.
Have no idea how to deal with that. Please give me some advice.
https://docs.juce.com/master/classInterprocessConnection.html
Take a look at those three pure virtual functions. You might want to implement/override them
Basic C++ stuff, the InterprocessConnection has pure virtual methods, you need to implement them in your subclass. (It probably isnât a great idea to inherit your GUI class from it, by the wayâŠ)
OK I found those function. What would I do without you. Great thanks.
By the way. Why it isnât a great idea to inherit GUI class from InterprocessConnection. So which class do you recommend to inherit from it?
That depends on the functionality you want to implement. In general, I would let the processor inherit from it, as itâs lifetime is longer than the editorâs. Or even better: write a new class to keep things tidy.
Another thing comes to mind: both of your pluginâs will probably end up running on the same process (your DAW), so not sure if InterProcessConnection is even necessary. However, not sure of a better alternative, maybe SharedResourcePointer
? Or does it only work with two instances of the same plug-ins?
OK, I will try, thanks.
Only with multiple instances of the same plugin .dll. I think interprocess connection is needed if there are 2 different plugins involved, even if they are in the same process.
I wonder if a simpler solution would be to have 1 plugin that works in different modes?
Or even simpler, if this is supposed to be an analyzer for other plugins : just host the plugins to be analyzed in the analyzer plugin itselfâŠ
Or does it only work with two instances of the same plug-ins?
N. It should works between two different plugins.
OK I just created my own class and inherited from InterprocessConnection. And override three abstract classes, and now itâs compiling properly. But those three classes are empty. I donât know what to write there?
Other question:
Should I create the exactly the same or similar in my second plugin which i want to connect with?
Itâs not analyser of another plugin. I have plugin that calculate FFT of impulse response. Impulse is from other plugin. I want to give ability to change buffer size of FFT, but then I need my impulse generator plugin change his impulse buffe size also. And I want to make it happens automatically.
https://docs.juce.com/master/classInterprocessConnection.html
Sorry, but you have to read it. All of it. Pipe. Socket. Open. Connect. âŠ
Hint: you implement your desired functionality in those virtual methods.
Sorry, but you have to read it. All of it. Pipe. Socket. Open. Connect. âŠ
OK, you are right. I am just as always in harry, and have no patience. I will try to go through that. But thanks for hints, and for introduction
Hey danielrudrich
I tried to createPipe("MyUniquePluginName", -1, true)
And it returns false. So according to manual, the method will fail if the pipe already exists.
But I created it only in one of my plugin. So where it can exist? I use âPlugin Hosâ JUCE example, and has there only that plugin (with createPipe
), my other plugin (where I didnât create pipe), and Fabfilter Pro_Q2. So it looks like Fabfilter has created his pipe? Or what?
OK, as I understand I still can create pipe without bool mustNotExist
or just set it to false. But due to first behaviour described bym me, there are more than one pipe. So how can I say in my other plugin with which pipe it should connect? Does it connect if I use the same âMyUniquePluginNameâ? Or what?
But if âMyUniquePluginNameâ is ID of my pipe, then why createPipe("MyUniquePluginName", -1, true)
gives me false? I am sure âMyUniquePluginNameâ is not exist in my computer. Itâs strange, Polish string of words.
And now I see even I still even didnât open my another plugin, the method connectionMade()
was called. What the hell I though. So i find there is function getConnectedHostName()
. So I put it in connectionMade()
. But it return: 127.0.0.1
And now I wonder: what the hell is it?
Please more hints