HISE Logo Forum
    • Categories
    • Register
    • Login

    Is it Possible to Deactivate Nodes by Name Inside a Compiled ScriptNode?

    Scheduled Pinned Locked Moved Solved ScriptNode
    7 Posts 3 Posters 95 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.
    • clevername27C
      clevername27
      last edited by clevername27

      I'm at the 20 parameter limit, so I can't do it that way...? Cheers.

      A 1 Reply Last reply Reply Quote 0
      • clevername27C clevername27 marked this topic as a question on
      • A
        aaronventure @clevername27
        last edited by aaronventure

        @clevername27 not by name, but by ID. You can get the node reference from the network reference, see this: https://forum.hise.audio//post/92587

        After that, you can use the Node class to bypass a target node.

        It only works for bypassing, not for value setting.

        I've requested tree-navigated name targeting for nodes. Consider voicing your support or expanding on the idea here: https://forum.hise.audio/topic/11414/request-scriptnode-direct-access?_=1735604461313

        clevername27C 2 Replies Last reply Reply Quote 1
        • clevername27C
          clevername27 @aaronventure
          last edited by

          @aaronventure Thanks, man!

          1 Reply Last reply Reply Quote 1
          • clevername27C
            clevername27 @aaronventure
            last edited by clevername27

            @aaronventure And this will work with compiled nodes? It's definitely working with uncompiled, and this is a total game-changer—thank you!

            I've noticed then when the node is turned off, the power icon still shows green—it's the node title that dims.

            I'm guessing this still deactivates the node? I ask because I want to turn off parts of the ScriptNode that I'm not using (to save CPU).

            But maybe I'm doing this wrong.

            My Network is an additive synthesiser, and I don't know how many oscillators I'll need at compile time. So, my Network has the maximum number that I"ll need—but this is probably a huge waste of CPU cycles. So, I wanted to know how to turn off the ones I'm not using.

            Ideally, I would be constructing the Network ad-hoc during runtime, but then it can't be compiled.

            But then, why is it possible to even do that in API?

            I'm a little confused and very ignorant, if you could please help. :)

            d.healeyD A 2 Replies Last reply Reply Quote 0
            • d.healeyD
              d.healey @clevername27
              last edited by

              @clevername27 said in Is it Possible to Deactivate Nodes by Name Inside a Compiled ScriptNode?:

              My Network is an additive synthesiser, and I don't know how many oscillators I'll need at compile time. So, my Network has the maximum number that I"ll need—but this is probably a huge waste of CPU cycles. So, I wanted to know how to turn off the ones I'm not using.

              Are you using a clone container, might be useful here.

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

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

                @clevername27 said in Is it Possible to Deactivate Nodes by Name Inside a Compiled ScriptNode?:

                And this will work with compiled nodes?

                What do you mean by compiled nodes? This targets a node inside of a network. It's unlikely to work if you compile the network and replace it with a hardcoded network, because it's expecting a reference. The point of that whole API is to eventually be able to create and operate fully dynamic scriptnode networks at runtime, but it's unfinished as of today.

                If you compile a network and load it as a node in another network, that should work because you're again targeting a node in a network.

                You can confirm if it deactivates the node by targetting an oscillator or an effect and hearing whether it goes away (it should). You can enable CPU usage display in scriptnode from the toolbar and see if if the usage goes down when the node gets bypassed (again, it should). It's probably easier to test it on something like convolution because the oscillators have very little cpu impact, it barely even reads out sometimes over here.

                For an additive synth, consider using the clone nodes which will let you dynamically bypass higher overtones.

                clevername27C 1 Reply Last reply Reply Quote 1
                • clevername27C
                  clevername27 @aaronventure
                  last edited by

                  @aaronventure said in Is it Possible to Deactivate Nodes by Name Inside a Compiled ScriptNode?:

                  What do you mean by compiled nodes? This targets a node inside of a network. It's unlikely to work if you compile the network and replace it with a hardcoded network, because it's expecting a reference. The point of that whole API is to eventually be able to create and operate fully dynamic scriptnode networks at runtime, but it's unfinished as of today.

                  I meant "Nodes that are compiled as part of a Network." Are you talking about compiling a version of a plugin, but not compiling the ScriptNode networks? (I get an instant crash if I try to do that.)

                  1 Reply Last reply Reply Quote 0
                  • clevername27C clevername27 has marked this topic as solved on
                  • First post
                    Last post

                  63

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  101.8k

                  Posts