Forum
    • Categories
    • Register
    • Login

    Custom third party C++ methods...

    Scheduled Pinned Locked Moved Feature Requests
    6 Posts 4 Posters 47 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.
    • ustkU
      ustk
      last edited by

      @Christoph-Hart This might be (and probably is) a dumb question.

      After seing the benefit added by third party C++ nodes, I can't help thinking about something similar for custom added script API.
      Sometimes script algorithms can be CPU expensive, slowing down considerably the thread.

      In the past, I added my own methods for deporting heavy script functions into C++, but this requires to recompile Hise and keep a custom branch per project... (and it doesn't appear in the API list because this is built separately)

      I also relied in third party C++ nodes to create complex graphic paths, that are then passed to the script via data cable, just to get rid of the computational load off the script.

      So this dumb idea popped out of my head (but seeing the cold weather it might just be some jammed neurones in my brain being the cause of this...)

      Is having a way to create custom third party C++ methods be something that worth a discussion around a pint or is it just a dead-born idea?

      Hise made me an F5 dude, any other app just suffers...

      David HealeyD 1 Reply Last reply Reply Quote 0
      • OrvillainO
        Orvillain
        last edited by

        Can't you just use the cable system to pass data to and from the C++ layer and HISE JS layer?

        Musician - Instrument Designer - Sonic Architect - Creative Product Owner
        Crafting sound at every level. From strings to signal paths, samples to systems.

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

          @Orvillain

          It sounds like OP has already tried that. And that method does work, sending json packets to a c++ node and back again via global cable works fine. I doubt that Christoph will add anything bespoke for this since it's a method that technically works fine.

          I do agree that it feels a little bit hacky to use, but in practice it works and I've not hit any project killing limitations with it yet. You can organise all the offline c++ logic neatly if you create a single node to interface with hisescript, and design a data packet key so that you can call your c++ functions using keyed data packets down global cables and it will know what c++ functions to call based on that.

          Possibly a thing that would make a bigger difference is improving the c++ node template with more features and callbacks. I find it quite fiddly to implement proper offline processing in c++ nodes, you have to do all the threading yourself. The nodes feel like they are designed for straightforward sample in sample out processing and the optimizations sometimes step on your feet.

          ustkU 1 Reply Last reply Reply Quote 1
          • ustkU
            ustk @griffinboy
            last edited by ustk

            @griffinboy said in Custom third party C++ methods...:

            The nodes feel like they are designed for straightforward sample in sample out processing and the optimizations sometimes step on your feet.

            That’s precisely it. The node feel and will always feel signal oriented, hence the need for script oriented methods.
            Making a node in a network to implement a function on the script side makes me uncomfortable. The threading too, because in the end a script method doesn't have to move out the message thread...

            And since a node should still be compiled, I’d rather prefer to implement it as a script method (even if recompiling hise is longer)

            That being said it would be interesting to see your implementation process for multiple functions, should you wish to share it of course ☺

            Hise made me an F5 dude, any other app just suffers...

            1 Reply Last reply Reply Quote 1
            • David HealeyD
              David Healey @ustk
              last edited by

              @ustk said in Custom third party C++ methods...:

              a custom branch per project.

              Why per project? I have one fork + branch where all my customisations go for all project, and if I add something useful to others I push it upstream too.

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              ustkU 1 Reply Last reply Reply Quote 1
              • ustkU
                ustk @David Healey
                last edited by

                @David-Healey Yeah very true, that came from a mod I've made for audio inputs that couldn't be shared with other projects, but that's a different matter...

                Hise made me an F5 dude, any other app just suffers...

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

                18

                Online

                2.2k

                Users

                13.3k

                Topics

                115.9k

                Posts