HISE Logo Forum
    • Categories
    • Register
    • Login

    Compiling C++ nodes and Scriptnode Networks

    Scheduled Pinned Locked Moved Solved Bug Reports
    39 Posts 7 Posters 2.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HISEnbergH
      HISEnberg @Christoph Hart
      last edited by HISEnberg

      @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!

      HISEnbergH 1 Reply Last reply Reply Quote 0
      • HISEnbergH
        HISEnberg @HISEnberg
        last edited by HISEnberg

        @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. 😉

        Screenshot 2025-09-22 at 7.02.13 PM.png

        oskarshO d.healeyD ulrikU 3 Replies Last reply Reply Quote 4
        • oskarshO
          oskarsh @HISEnberg
          last edited by

          @HISEnberg I can second this feature.

          Checking which network to compile would be such a time saver

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @HISEnberg
            last edited by

            @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.

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            1 Reply Last reply Reply Quote 0
            • ulrikU
              ulrik @HISEnberg
              last edited by

              @HISEnberg I agree

              Hise Develop branch
              MacOs 15.3.1, Xcode 16.2
              http://musikboden.se

              DanHD 1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @ulrik
                last edited by

                @Christoph-Hart ok I'm back in compile fail land.... I tried to add in a c++ sampler that compiles fine outside of this project and recompile all my (previously working!) scriptnodes etc...

                Fails reliably every time with same errors. Removed c++ samper, same erros (so potentially not that).

                Set all to non-polyphonic, deleted binaries folder. At this point I'd go through the networks and remove allow compilation, compile the nodes, then re-allow network compilation one by one (there are a few).

                Is there anything else I should be trying?

                At least I have a working dll to fall back to... (minus the new bits of course)

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

                Christoph HartC 1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart @DanH
                  last edited by

                  @DanH what's the error?

                  The old DLL will not load any longer as I've changed the API.

                  Christoph HartC DanHD 2 Replies Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart @Christoph Hart
                    last edited by

                    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.

                    I don't see a real use case to be honest. Either stuff compiles or it doesn't and if it doesn't then you can throw out the node by moving it into another folder or delete it. On the other hand I would have to keep another list around that contains basically the same information as the AllowCompilation flag.

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Christoph Hart
                      last edited by

                      @Christoph-Hart The problem is if you have a lot of networks you don't always know which one(s) is causing the issue, so you have to remove all the xmls from the project and add them back one at a time between each compile until you figure it out - or maybe there's a better way I don't know about.

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      1 Reply Last reply Reply Quote 0
                      • DanHD
                        DanH @Christoph Hart
                        last edited by

                        @Christoph-Hart in which commit? I'm one behind current.

                        I've just gone through the motions of compiling the network list one by one and it's finally built them all. Let me see if I can recreate the error, but in Xcode there were 'too many'. In general there was a lot of pma node needs extra arguments style errors

                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                        https://dhplugins.com/ | https://dcbreaks.com/
                        London, UK

                        Christoph HartC 1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart @DanH
                          last edited by

                          The problem is if you have a lot of networks you don't always know which one(s) is causing the issue,

                          That's what the compiler error messages are there for. If they don't show up in the export dialog (which happens on macOS under some circumstances), you can always open the Xcode project and compile it there, then it should give you the error message.

                          Let me see if I can recreate the error

                          Yes let me know if you can pinpoint this, I'll rather add another safe check that will popup during the compilation process.

                          ulrikU DanHD 2 Replies Last reply Reply Quote 1
                          • ulrikU
                            ulrik @Christoph Hart
                            last edited by

                            @Christoph-Hart said in Compiling C++ nodes and Scriptnode Networks:

                            That's what the compiler error messages are there for. If they don't show up in the export dialog (which happens on macOS under some circumstances), you can always open the Xcode project and compile it there, then it should give you the error message.

                            Ok, that is what happens to me, I have not tried the Xcode way, thank you for the tip

                            Hise Develop branch
                            MacOs 15.3.1, Xcode 16.2
                            http://musikboden.se

                            1 Reply Last reply Reply Quote 0
                            • DanHD
                              DanH @Christoph Hart
                              last edited by

                              @Christoph-Hart ok so the new commit brought the errors back! yay 😆

                              This has been consistently the errors that I've been having for months now when compiling. The fix has always been to remove networks from compiling and do the nodes, followed by networks one by one. Even that hasn't been fully reliable and I've had to clear the networks agin...

                              Screenshot 2025-09-25 at 16.00.22.png

                              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                              https://dhplugins.com/ | https://dcbreaks.com/
                              London, UK

                              Christoph HartC 1 Reply Last reply Reply Quote 0
                              • Christoph HartC
                                Christoph Hart @DanH
                                last edited by

                                @DanH can you send over the DspNetworks folder (without the Binaries subfolder, don't need that trash) then I'll take a look.

                                DanHD 1 Reply Last reply Reply Quote 0
                                • DanHD
                                  DanH @Christoph Hart
                                  last edited by

                                  @Christoph-Hart thanks, check DMs

                                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                  https://dhplugins.com/ | https://dcbreaks.com/
                                  London, UK

                                  Christoph HartC 1 Reply Last reply Reply Quote 0
                                  • Christoph HartC
                                    Christoph Hart @DanH
                                    last edited by Christoph Hart

                                    @DanH alright, there were two corrupted networks, Filter_H3 and MULTIBAND_DISTORTION (they threw an error at the code generation stage so you can easily identify them and move them out of the compilation folder or try to fix the error).

                                    All your C++ nodes are templated like this:

                                    template <int NV> struct SomeClass {};
                                    

                                    so they need the IsPolyphonic flag to be set. Note that whenever you see a compile error like this:

                                    Use of class template 'project::Griffin_Chorus_C' requires template arguments
                                    

                                    it's always because the compiler expects a voice count as argument but the C++ code generator didn't treat the node as polyphonic class because the flag wasn't set correctly.

                                    If I enable the IsPolyphonic flag for all C++ nodes, the compilation then fails with some weird error message but that's on me (probably the same issue that @Orvillain ran against in the other post.

                                    So to recap:

                                    • fix / remove FILTER_H3 / MULTIBAND_DISTORTION
                                    • toggle the IsPolyphonic flag for all nodes
                                    • wait for me to fix the most recent codegen issue - that's unfortunately not too trivial so I need to take a proper look into how to solve that.
                                    DanHD ustkU 2 Replies Last reply Reply Quote 2
                                    • DanHD
                                      DanH @Christoph Hart
                                      last edited by DanH

                                      @Christoph-Hart ok thanks! Are there any clues to the errors in the filter and distortion networks? I rebuilt the distortion one to get through a previous compilation issue. They're both pretty complex networks... But they do compile (after I go through that tedious process), and happily compile on their own.

                                      Edit - Oh I see the errors in the new commit....

                                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                      https://dhplugins.com/ | https://dcbreaks.com/
                                      London, UK

                                      DanHD 1 Reply Last reply Reply Quote 0
                                      • DanHD
                                        DanH @DanH
                                        last edited by

                                        @Christoph-Hart update:

                                        Those networks may have thrown errors due to faust? At least that was the issue here.

                                        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                        https://dhplugins.com/ | https://dcbreaks.com/
                                        London, UK

                                        1 Reply Last reply Reply Quote 0
                                        • ustkU
                                          ustk @Christoph Hart
                                          last edited by ustk

                                          @Christoph-Hart I get a DLL compilation fail caused by a colon added after Gain: <--

                                          namespace MainDSP_network_impl
                                          {
                                          // ==============================| Node & Parameter type declarations |==============================
                                          
                                          using MACRO1_global_mod1_t_index = runtime_target::indexers::fix_hash<1>;
                                          using MACRO1_global_mod1_t_config = modulation::config::constant<false, 
                                                                                                           modulation::TargetMode::Gain:>; // <--
                                          

                                          So when I remove it I can compile in XCode
                                          I'm on the last commit

                                          Hise made me an F5 dude, browser just suffers...

                                          Christoph HartC 1 Reply Last reply Reply Quote 0
                                          • Christoph HartC
                                            Christoph Hart @ustk
                                            last edited by

                                            @ustk ah yes, that was indeed a typo in the code generator, I guess I haven't tested all the configurations...

                                            Should be fixed now.

                                            ustkU 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            32

                                            Online

                                            2.0k

                                            Users

                                            12.6k

                                            Topics

                                            109.5k

                                            Posts