HISE Logo Forum
    • Categories
    • Register
    • Login

    How to access nodes via scripting?

    Scheduled Pinned Locked Moved Solved ScriptNode
    5 Posts 3 Posters 340 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.
    • A
      aaronventure
      last edited by

      I assume its via the Node API, but how does that work, exactly?

      Does anyone have an example of directly adjusting node parameters of a scriptnode network by using the node's ID?

      I need a reference to the node itself to use the Node API functions, right? How do I obtain it?

      If the node is a convolution reverb, how do I change the impulse response via script?

      Thanks.

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

        @aaronventure said in How to access nodes via scripting?:

        If the node is a convolution reverb, how do I change the impulse response via script?

        Add an external audio file.

        434f6624-8feb-4f3e-b572-1795dc792645-image.png

        Then create a reference to it in your script

        const af = Engine.createAndRegisterAudioFile(0);

        Then you can use the various audio file functions to interact with it.

        I don't know the answer to your first question.

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

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

          While accessing nodes directly is possible, I wouldn‘t use it in your case - use external audio file slots and create root parameters that you hook up to the knobs you want to control - if yoi treat the network as blackbox like this you can export it to C++ and use a hardcoded FX module which has a few advantages.

          A 1 Reply Last reply Reply Quote 1
          • A
            aaronventure @Christoph Hart
            last edited by

            Thanks guys, got it working. The references need to be assigned in the network script and if the array is declared as global, AudioFile.loadFile can be executed in the interface script to change the loaded IR.

            @Christoph-Hart Out of curiosity, how does accessing the nodes work? I'm aware of creating parameters and linking them to controls, that's how I set up all my networks. Is there any reason whatsoever one would ever need to access a node directly?

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

              @aaronventure theoretically it would allow you to create completely dynamic signal paths but I never found myself using it in a real-world project so it‘s a bit unfinished (some API methods are missing / undocumented etc).

              1 Reply Last reply Reply Quote 0
              • A aaronventure marked this topic as a question on
              • A aaronventure has marked this topic as solved on
              • First post
                Last post

              38

              Online

              1.7k

              Users

              11.9k

              Topics

              103.5k

              Posts