Compiling C++ nodes and Scriptnode Networks
-
@Christoph-Hart That was just to show you that there is no warning or that the compiler doesn't fail when toggling the
isPolyphonic
flag! Just to be clear I don't usually do this, I just uncheckAllowPolyphonic
.Perhaps some misunderstanding on my part about what you were asking. I recall there used to be a warning that would say you need to have this flag checked if you are working from the autogenerated template.
So to be clear I believe you've solved my initial inquiry: Delete the Binaries folder, make sure the flags are set correctly!
-
@HISEnberg ah ok. But if you delete the binary folder, and compile the C++ network without the flags being set then it will fail, right?
-
@Christoph-Hart Wrong this is what I am trying to show. The
isPolyphonic
flag, in so far as a single C++ node is concerned, doesn't trigger any warnings or build errors (Though I can certainly remember their were warnings not too long ago).Hopefully this shows the process, I cut-out the compilation waiting time in this gif, but I think this is what you are suggesting.
I create the node, compile it with the flags. I then delete the Binaries folder, disable the flags and compile again.
This should be producing an error, but it isn't: -
@HISEnberg are you referencing the c++ nodes in a compiled network?
-
@Christoph-Hart No not in this example though I suppose that would bring us back to the original topic!
So if this C++ node is placed in a Scriptnode network and I compile both simultaneously:
Without the
isPolyphonic
flag: FAILS
With the
isPolyphonic
flag: SUCCEEDS
So you identified my issue exactly:
- Delete the Binaries folder
- Set
isPolyphonic
to enabled (if it's designed on the template).
I'll give it a go in a project I have where all the C++ nodes I made are using the template and are embedded in their own Scriptnode Networks. I'm pretty sure it is going to work this time.
-
@HISEnberg ah ok now that's as expected. I think the irritation here is that if there is already a successfully compiled version of the C++ node that is being loaded into the network when you compile the network, it supersedes the
isPolyphonic
flag (which makes the compilation succeed despite the flag being wrong but as soon as you clean out the Binaries folder the compilation will fail the next time.TLDR: just set the
isPolyphonic
flag correctly (as it's also described in the help popup of the dialog) and then the compilation should succeed in all cases / series of events. -
@Christoph-Hart Ya I will admit that was pretty ignorant of me to overlook that, clicking the help popup immediately clarifies what its for. I suppose that the flag being named isPolyphonic made me think I just didn't need it if the effect isn't polyphonic, but I see how it relates to them template of the node (voice count) now!
Thanks for your help by the way I really appreciate that!
-
@Christoph-Hart seems to work in real world projects I have with some C++ external nodes and Scriptnode Networks. The behaviour isn't consistent, on Windows it's not fully working but I'm chalking that up to something I may have done in one of the C++ nodes.
As a side note, is it possible to add a toggle on the compiler menu for selecting which nodes to compile? I think this could really speed up development time if we want to just compile and focus on one node, or skip a bunch of Scriptnode Networks we don't intend to use. Basically just a checkmark box to "AllowCompilation" before compiling.
If I'm being petty you can just ignore this feature request, I see a lot of value in this but I don't want to burden you with unimportant features.
-
@HISEnberg I can second this feature.
Checking which network to compile would be such a time saver
-
@HISEnberg I also think it's a good idea, often when debugging issues the problem is just with a single network, but if you have lots of networks you have to keep recompiling to test them and using a check box instead of having to shuffle xml files around would be much nicer.
-
@HISEnberg I agree