HISE Logo Forum
    • Categories
    • Register
    • Login

    Set Panel.value in a ScriptProcessor with setAttribute

    Scheduled Pinned Locked Moved Feature Requests
    4 Posts 2 Posters 197 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.
    • LindonL
      Lindon
      last edited by Lindon

      So it would be useful to be able to set the value of a panel in a ScriptProcessor, in the same manner we can with the other widgets,

      so currently we can:

      const var ScriptProcessor1 = Synth.getMidiProcessor("Script Processor1");
      
      const var myValue = 1;
      
      ScriptProcessor1.setAttribute("myButton",myValue);
      

      but we cant:

      const var ScriptProcessor1 = Synth.getMidiProcessor("Script Processor1");
      
      const var myObj = {"A":"B"};
      
      ScriptProcessor1.setAttribute("myPanel",myObj);
      

      If this was implemented we could pass arbitrary large "blobs" of data into ScriptProcessors - rather than have to wrangle them through sliderpacks, and thus we could have a valuable level of abstraction of Code from Display (MVC)

      HISE Development for hire.
      www.channelrobot.com

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

        @Lindon setAttribute() goes through the HISE parameter API which truncates the value to a float number so this won't be possible.

        There's other methods of shuffling complex data around if you absolutely have to do this (global variables etc), but maybe there's a design change that prevents you from shuffling JSON objects around, which is always a good thing.

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @Christoph Hart
          last edited by

          @Christoph-Hart said in Set Panel.value in a ScriptProcessor with setAttribute:

          @Lindon setAttribute() goes through the HISE parameter API which truncates the value to a float number so this won't be possible.

          There's other methods of shuffling complex data around if you absolutely have to do this (global variables etc), but maybe there's a design change that prevents you from shuffling JSON objects around, which is always a good thing.

          Sadly I cant think of how I could reduce this data set - its an ARP - 128 steps, each step has around 20 attributes - so I'm drawing the arp display in a panel, and letting the user modify it there, but now I'd like to get the data its generating out of the deferred UI thread, and into its own ScriptProcessor where I can do the actual note generation and modification...

          More than willing to look at an alternate way --- I just cant think of one that captures this large data set and passes it into my processor... other than the dreaded Globals...

          HISE Development for hire.
          www.channelrobot.com

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

            @Lindon yeah, use globals and the FixObjectArray as I've mentioned in the other thread, it's exactly what it's made for.

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

            37

            Online

            1.8k

            Users

            12.0k

            Topics

            104.7k

            Posts