HISE Logo Forum
    • Categories
    • Register
    • Login

    Global variables in 3rd party scriptnode

    Scheduled Pinned Locked Moved C++ Development
    5 Posts 2 Posters 302 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.
    • J
      jdurnil
      last edited by

      Is there a way to access a global variable set in HISE script somewhere in a 3rd party c++ script node? If so how. I am very very new to HISE

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

        No, the third party C++ node follows a very strict blackbox concept with only a few limited ways of communication (global cables, float parameters and external data objects for tables, audio files etc.). Having access to the ref-counted global variable container would cause havoc across DLL boundaries.

        You should be able to send the global variable into a global cable and pick it up in a compiled network that will wrap your custom C++ code.

        1 Reply Last reply Reply Quote 0
        • J
          jdurnil
          last edited by

          Thank you for your reply, I want to have a dropdown with two choices in the ui and have my 3rd party script ode pick that choice up, I am so new to HISE that I don’t know how to set up a global cable to make this happen and how I would achieve grabbing the variable in my c++ code, it all sounds very reasonable but I still don’t know what I’m doing. Is there a snippet that does this or anything I can look at that might shed some light on this?

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

            @jdurnil That's super easy to achieve:

            1. Add a parameter to your third party node. The template already creates one parameter, you should be able to copy & paste your way through there.
            2. Assign the parameter to the scripted UI through the parameterId/ processorId attributes.
            J 1 Reply Last reply Reply Quote 0
            • J
              jdurnil @Christoph Hart
              last edited by

              @Christoph-Hart awesome! Thank you.

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

              16

              Online

              1.7k

              Users

              11.8k

              Topics

              103.2k

              Posts