HISE Logo Forum
    • Categories
    • Register
    • Login

    About C++ Nodes

    Scheduled Pinned Locked Moved Solved ScriptNode
    16 Posts 5 Posters 904 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.
    • griffinboyG
      griffinboy
      last edited by griffinboy

      So, I've set up a c++ node in scriptnode (tools > create3rdpartynodetemplate)

      It's all working and I can compile it in HISE.

      But I'm a little confused at how I can debug this! I can't run the code outside of HISE (not sure how this would be done) and the console out, as well as the juce commands for printing to console don't work.

      Hise gives me an error reports when I compile nodes that have issues,
      and from that I can debug,

      But I've quickly reached a point where I need access to better testing, for example I've been trying to fetch the sample rate and I cannot tell if I've done it right because I can't print it.

      Perhaps I have not set everything up properly for developing 3rd party nodes? Advice would be appreciated thank you!

      I've got the node template all set up in c++

      958df91b-0cbc-4adf-88e7-b2ddb81bbb4b-image.png

      My second question is to do with what I was attempting to do in the first place, get hold of sample rate to keep track of time as each sample is processed. Very Important a lot of dsp I should think.

      griffinboyG 1 Reply Last reply Reply Quote 1
      • griffinboyG griffinboy marked this topic as a question on
      • griffinboyG
        griffinboy @griffinboy
        last edited by

        @griffinboy

        Perhaps it's a question for @Christoph-Hart !

        I really like the idea of writing c++ nodes for use in scriptnode, but for a beginner it's very hard getting set up, because the docs don't describe the process of c++ nodes very well, it's vague from my perspective.

        If I can get it figured out I'd definitely like to upload a library of C++ dsp here.
        for people to use in their sample libraries.

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

          You can use the Visual Studio debugger for debugging C++ nodes, which is a very nice workflow (so nice that I'm doing this more often than actually writing SNEX code lol).

          The setup is really simple:

          1. Build the Debug version (or Minimal Build configuration) of HISE.
          2. Export the dll.
          3. Open the solution (.sln) file in VS2022. It can be found under DspNetworks/Binaries/Builds/VisualStudio2022.
          4. Choose "Debug" as configuration. Head over to the project properties and ensure that the HISE debug binary is being set as debugging command (the solution should have filled this out for you automatically)
          5. Compile the solution from within VS2022. When it's done (which should take < 30 s), it should open HISE automatically
          6. Add a hardcoded FX and select the node you want to debug
          7. Add breakpoints & profit
          griffinboyG 3 Replies Last reply Reply Quote 2
          • griffinboyG
            griffinboy @Christoph Hart
            last edited by

            @Christoph-Hart
            I will test this and then close the topic if all goes well!
            Thanks for your response, I've been working on this in the dark a bit for a few weeks, I'll be very happy to have this working 😄

            1 Reply Last reply Reply Quote 0
            • griffinboyG
              griffinboy @Christoph Hart
              last edited by griffinboy

              @Christoph-Hart

              Okay the bit that I'm struggling with is:

              "Head over to the project properties and ensure that the HISE debug binary is
               being set as debugging command (the solution should have filled this out for 
              you automatically)"
              
              

              I'm not sure what this means.

              I've got both the debug and the release version of HISE built on my PC now.

              I go into my hise project files and find "projectname .sln"

              Opening that up in visual studio and building it as debug, doesn't open up HISE automatically.

              I'm guessing it's because it's using the release version of HISE instead of the debugging version?

              A 1 Reply Last reply Reply Quote 0
              • A
                aaronventure @griffinboy
                last edited by

                @griffinboy project properties in visual studio once you open the solution

                griffinboyG 1 Reply Last reply Reply Quote 0
                • griffinboyG
                  griffinboy @aaronventure
                  last edited by griffinboy

                  @aaronventure

                  ede67c90-4802-420c-b0f5-6f956cd904e2-image.png

                  I did this and it still didn't launch hise as expected once built : (

                  This was obviously the wrong thing, Christoph talks about pointing it at hise debug, but I'm not sure where to do this.

                  "Check that HISE debug binary is being set as debugging command "
                  

                  Perhaps it's something I have to write here?

                  4ab4a224-c9c0-43cb-b888-f2877a653d72-image.png

                  griffinboyG 1 Reply Last reply Reply Quote 0
                  • griffinboyG
                    griffinboy @griffinboy
                    last edited by griffinboy

                    @griffinboy
                    bump. Apologies

                    griffinboyG 1 Reply Last reply Reply Quote 0
                    • griffinboyG
                      griffinboy @griffinboy
                      last edited by

                      @griffinboy Womp womp

                      1 Reply Last reply Reply Quote 0
                      • S
                        spider
                        last edited by

                        You're almost there, you need to right-click the "Parallel Bandpasses_DynamicLibrary", not the Solution. It's the first nested entry in the solution browser.
                        Then, check the path set to "Command", visible when navigating "Configuration Properties" -> "Debugging". This path needs to reference your HISE binary.

                        Save and hit run

                        griffinboyG 3 Replies Last reply Reply Quote 1
                        • griffinboyG
                          griffinboy @spider
                          last edited by griffinboy

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • griffinboyG griffinboy has marked this topic as solved on
                          • griffinboyG
                            griffinboy @spider
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • griffinboyG griffinboy has marked this topic as unsolved on
                            • griffinboyG
                              griffinboy @Christoph Hart
                              last edited by griffinboy

                              This post is deleted!
                              1 Reply Last reply Reply Quote 0
                              • griffinboyG griffinboy has marked this topic as solved on
                              • griffinboyG
                                griffinboy @spider
                                last edited by

                                @spider

                                Okay I solved it.
                                I think I'll make a whole video about this process later for any noobs like myself.

                                A 1 Reply Last reply Reply Quote 8
                                • A
                                  ally @griffinboy
                                  last edited by

                                  @griffinboy that would be epic for a noob like myself!

                                  griffinboyG 1 Reply Last reply Reply Quote 0
                                  • griffinboyG
                                    griffinboy @ally
                                    last edited by

                                    @ally

                                    It's in the works!

                                    I've spent two months diving into the source code,
                                    to find the best practices for writing dsp in Hise.
                                    It's a deep rabbit hole, but luckily I'm getting close.

                                    I'm looking forward to releasing a lot of freebies and sharing my templates.

                                    1 Reply Last reply Reply Quote 2
                                    • First post
                                      Last post

                                    39

                                    Online

                                    1.7k

                                    Users

                                    11.7k

                                    Topics

                                    102.2k

                                    Posts