HISE Logo Forum
    • Categories
    • Register
    • Login

    Can I update a parameter on my node from inside the C++

    Scheduled Pinned Locked Moved C++ Development
    5 Posts 4 Posters 56 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.
    • OrvillainO
      Orvillain
      last edited by

      Custom c++ node. I have loads of parameters. I have one parameter that changes a bunch of internal state variables, and also changes the values of the incoming UI parameters. Is there a way to update the scriptnode UI with the relevant new parameter?

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

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

        @Orvillain Global cable perhaps? So you send back what you want to the UI

        Hise made me an F5 dude, browser just suffers...

        HISEnbergH 1 Reply Last reply Reply Quote 0
        • HISEnbergH
          HISEnberg @ustk
          last edited by

          @ustk @Orvillain Yes Global cables, though it can become fairly cumbersome it there are a lot of parameters you need to set. Luckily you can pack a lot of info into 1 cable however.

          You just need to create the global cable, use Tools>Create C++ Code for Global Cables, copy the code printed in the console, and HISE guides you on the rest (subclass your node from the cable manager template, etc.)

          It's all here:

          https://docs.hise.dev/scriptnode/list/routing/global_cable.html

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

            Thanks ! I'll check it out.

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

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

              Is there a way to update the scriptnode UI with the relevant new parameter

              Not without hacks. The best way of thinking about this is a black box communication of parameters into the node. Now if you want to update a UI state that you display on the plugin interface, global cables (and their data callback) are the way to go, there you can easily pack everything up into a nice JSON and send it back to HISE Script (on a deferred thread!), but I wouldn't recommend going the extra mile of updating the internal scriptnode parameters only so that you can look at them in the network with the right value.

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

              16

              Online

              2.0k

              Users

              12.6k

              Topics

              109.7k

              Posts