HISE Logo Forum
    • Categories
    • Register
    • Login

    Passing Large Data Objects into ScriptProcessors

    Scheduled Pinned Locked Moved General Questions
    34 Posts 4 Posters 1.3k 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

      So Im building an arp that has 128 steps, each step has an object associated with it containing up to 20 attributes.

      So I end up with a large array of objects, and I now want to pass this into the ScriptProcessor where the "arp work" gets done...

      So what's the current best way to do this - I can use a global but thats messy - and I cant seem to work out how to pass the array to a panel in the ScriptProcessor

      HISE Development for hire.
      www.channelrobot.com

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

        @Lindon Can you include it, like a regular script?

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

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @d.healey
          last edited by

          @d-healey said in Passing Large Data Objects into ScriptProcessors:

          @Lindon Can you include it, like a regular script?

          er sorry I really dont understand - I've only ever used inculude to add code scripts...

          heres the simplest example of what I mean:

          HiseSnippet 1024.3oc6W8taaaCDmz1LHVsqXEqO.DB6C1.ct1cccCsXXo1IovXKoFycA6SqfQh1hHRjBTTsyHHuE8EoOR6MXuAaGkjijS0BbExF1+7Gr8w6Nd+tS2c+rmoUd7jDkFg69xUwbD91j4qjlfIALgDMceD9NjiXIFtllez3UwrjDtOBia+b6A3tcPYu90uYLKjI83kGgPmnDd7uSDILkmNauuUDFdHym+RQTEqezdS8TxIpPUJfm1jgnXl2Yrk7iYVyZQP3cNvWXT54FlgmfvcFq7WMOP8FYt8mHRDmFxsBiPygKJ+3CUg9VDa+NZRfHze157NAgvjYkUg14Ug6QNR3Kt77xpwGmofV5Q05At00AuQMDd3JvqSN7tKYtmVDaJ0Xw1sHSkvCpEL3QPUXkaKp0ufISTfERyfH1Y7C0fvkdz6wCGdeJ7V+m53.OFRLzWyzzqDmQzull0eLXI2rQIpmatokklQt1qRHCERNcQpzyHTRpRNN0XTxQVnnUg87TQwJI.p6CALLk224bmtO3A9JZhJhaBDKkz.tlSMJZbpgBmjPER3SNMlI4gqEtZ7s2B8b2m49D2wtW3z04hm5rN+AzOYcb64VfH29CRrmmgqIrvvSg1udWEvPRUIYNVY3uP1KCzNW3PuppEKpUWwcEx00p1NWnuNG6ISiNkqqVxrFBMHa1Aty10A5kWVpXnRNUJLuHlWHW1iNpldTTQc01sVfPvTSVu5cJ5UyqhHAbIcIEkTTF7qtBA8CS2mYXquH3Ng3Dy0FgMcv6yeMrOIeHnKYedxYFUblsEOLgJvVD1eFF5woP.WY+xayVJ8dCYvntxOMjY1b92tzqPA7HYiAM6vjLQXVUMi9.VJLr1kB0Vv2R3dWxLgwKnd71pF7BE9+rwawJ1OhbvhEbOSIX6PN7Ga59zlAkc+C37tc1hRPhqGcSv3Eu0Ld31alxs2NFtZnM57uDVsOg7dDK0xt8NLgVxaMyxLXYqpeietZKAUgk1M+mXWF0CVkRcnccYP9pMtzmPcY4qYccnWX8vg1.RM54vkBpSTg7AwZAfBi1x6VD+kqie+91X.bUzaFxJ5+bXqH2TrU+8igpUEFpcLEK.KZ2sM.YQcWRdyfkepbgxFameiv2DXIsdHHDvEKCLVo6gxRwOTRv026OsWkf7o68+jg+mgL76UoFgb4QLiVX+UQGmFMGHi73.RjPuncpD2x1bkKOzJaqLy4R+LgeCdUnbjUFWnbzZk+kDiHlmV8Ju7IaK+xtYm.4sL6OO1E9WrfL8xAZBY3fgnHf16Udd1x8mA0m584gMvmOuA97nF3yWz.edbC74KafOe005i8Wb7rTiJJeTDNX1AYKVw3CjLnSNqqG86.poxkGC
          

          HISE Development for hire.
          www.channelrobot.com

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

            @Lindon If it's in a js file then you can include it directly in your script processor, in the same way you include scripts in the main interface. Or is this data you will be generating at run time in the interface?

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

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by Lindon

              @d-healey said in Passing Large Data Objects into ScriptProcessors:

              @Lindon If it's in a js file then you can include it directly in your script processor, in the same way you include scripts in the main interface. Or is this data you will be generating at run time in the interface?

              all generated at run time.. so the user moves widgets in the deferred interface, and this data is collated and sent to the ScriptProcessor... really classic MVC

              HISE Development for hire.
              www.channelrobot.com

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

                The way I do this is my secondary script has a duplicate of the controls of UI script, then I just link the UI script controls to the secondary script controls.

                This allows the secondary script to be completely standalone/modular/portable.

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

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @d.healey
                  last edited by Lindon

                  @d-healey said in Passing Large Data Objects into ScriptProcessors:

                  The way I do this is my secondary script has a duplicate of the controls of UI script, then I just link the UI script controls to the secondary script controls.

                  This allows the secondary script to be completely standalone/modular/portable.

                  cant do this - its a custom ARP - so it will all be drawn in a panel, and the number of controls in the secondary script would be 128 x20 = 2560... as I say in the title - LARGE data object

                  HISE Development for hire.
                  www.channelrobot.com

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

                    @Lindon said in Passing Large Data Objects into ScriptProcessors:

                    and the number of controls in the secondary script would be 128 x20 = 2560...

                    If it's just numeric values then sliderpacks are perfect for this situation.

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

                    LindonL 1 Reply Last reply Reply Quote 0
                    • LindonL
                      Lindon @d.healey
                      last edited by Lindon

                      @d-healey said in Passing Large Data Objects into ScriptProcessors:

                      @Lindon said in Passing Large Data Objects into ScriptProcessors:

                      and the number of controls in the secondary script would be 128 x20 = 2560...

                      If it's just numeric values then sliderpacks are perfect for this situation.

                      20 sliderpacks? Where every element of every slider pack needs to be referenced and changed -----???!

                      I guess I dont see this as perfect.

                      HISE Development for hire.
                      www.channelrobot.com

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

                        @Lindon

                        Where every element of every slider pack needs to be referenced and changed -----???!

                        You could use a single sliderpack - I don't there is a limit on the number of sliders (I could be wrong), of course it won't look pretty, but that doesn't matter.

                        You'll have one sliderpack on your UI, and link it to the sliderpack in the secondary script. You can pull and push data to the sliderpack instead of your panel. Are you using a single panel for the whole arp display and controls, or are you using child panels too?

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

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

                          @Lindon
                          I guess Im saying:

                          In a ScriptProcessor I can reference and change the value of every widget, but I cant reference or change the .data value of a panel held inside a ScriptProcessor......

                          HISE Development for hire.
                          www.channelrobot.com

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

                            @Lindon Correct, but, now that I think about it, I believe you can set a panel's value to an object. I don't know if this works via setAttribute but worth trying.

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

                            LindonL 1 Reply Last reply Reply Quote 0
                            • LindonL
                              Lindon @d.healey
                              last edited by

                              @d-healey said in Passing Large Data Objects into ScriptProcessors:

                              @Lindon Correct, but, now that I think about it, I believe you can set a panel's value to an object. I don't know if this works via setAttribute but worth trying.

                              tried already - cant get it to work...

                              HISE Development for hire.
                              www.channelrobot.com

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

                                @Lindon why not just store it as a global?

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

                                  @aaronventure said in Passing Large Data Objects into ScriptProcessors:

                                  @Lindon why not just store it as a global?

                                  globals = bad code.

                                  HISE Development for hire.
                                  www.channelrobot.com

                                  LindonL A 2 Replies Last reply Reply Quote 1
                                  • LindonL
                                    Lindon @Lindon
                                    last edited by

                                    Ok so @Christoph-Hart - before I raise a feature request for this - do you know of a way to do this?

                                    HISE Development for hire.
                                    www.channelrobot.com

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

                                      @Lindon said in Passing Large Data Objects into ScriptProcessors:

                                      @d-healey said in Passing Large Data Objects into ScriptProcessors:

                                      @Lindon Correct, but, now that I think about it, I believe you can set a panel's value to an object. I don't know if this works via setAttribute but worth trying.

                                      tried already - cant get it to work...

                                      Got a snippet?

                                      @aaronventure said in Passing Large Data Objects into ScriptProcessors:

                                      @Lindon why not just store it as a global?

                                      Yeah I avoid globals too. They make code less reusable/portable. Where possible i try to make everything standalone.

                                      @Lindon said in Passing Large Data Objects into ScriptProcessors:

                                      Ok so @Christoph-Hart - before I raise a feature request for this - do you know of a way to do this?

                                      I think a dual control approach is the right paradigm here. Maybe start with a much simpler arp to test the concept

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

                                      LindonL 2 Replies Last reply Reply Quote 0
                                      • LindonL
                                        Lindon @d.healey
                                        last edited by

                                        @d-healey said in Passing Large Data Objects into ScriptProcessors:

                                        @Lindon said in Passing Large Data Objects into ScriptProcessors:

                                        Ok so @Christoph-Hart - before I raise a feature request for this - do you know of a way to do this?

                                        I think a dual control approach is the right paradigm here. Maybe start with a much simpler arp to test the concept

                                        I think this just doesnt scale....it will be nearly unmanageable - globals are better than this - in the case of thousands of controls....

                                        HISE Development for hire.
                                        www.channelrobot.com

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

                                          @d-healey said in Passing Large Data Objects into ScriptProcessors:

                                          @Lindon said in Passing Large Data Objects into ScriptProcessors:

                                          @d-healey said in Passing Large Data Objects into ScriptProcessors:

                                          @Lindon Correct, but, now that I think about it, I believe you can set a panel's value to an object. I don't know if this works via setAttribute but worth trying.

                                          tried already - cant get it to work...

                                          Got a snippet?

                                          its nearly exactly the same as the one I posted before but here you go:

                                          HiseSnippet 1113.3oc6WEtaaaCDlxNrHVqqXEaO.DB6GxXYt1accConXN1IYvXKoFyYACXnsfVh1hKRjBTTsyHH.6EXuO6wZuAaGkjskcbxBTSB1OlLfMH4c79ti799jGpjdrjDoBY03jYwLj0CwilIzA8CnbAZv9HqGgOhlnYJR9T8lESSRX9HKq5emYBqFagxd9qusGMjJ7XKmBgNUx8X+.OhqWN6vteOOL7PpO6DdTIqeZ2AdRQeYnLEvScbaTL06L5T1wTiY0vHqGbfOWKUizTMKAYsUOo+rQAx2Ixs+TdBebHyLnCZDrQ4SenLz2fXyrn9A7P+gyy6DDxBObYUnddU3SvGw84KleY03ixVfrzix0CqZWG75TFds2H7ZuI3YUBdakCuGiG4o3w5kqXv1GfGHfCpIT3HnLrxsEU6Opg6KAKD5VQzyXGpfAK7v8YsauCA9p4yssgigDM4sTEYs3zg7BR18iVSY5UJQtN4ltrzzwwrUbQHWvHSREdZtTPjhdoZsTzw.EkLz0SFEKE.n1ABXXJqo841MdxS7kjDYDSGvmJHALEinkj3TMAlIgvEvuLRLUvBmOX83a1Ex4N64rqSOmKranXSIQyFZxf0RJSxrmVq3iS0LWSEnAftDYHqUrhKztN7HhPpIfcZtXJgRTrI.lfK6jeMEJUTRrLgaRvccHelILlMI+ykhVR4n4LzjCcb1YARy77hmaO+rBBZ+40HWmhpmSSy1TTC6SCCGCsJtqWbgspTg+Xol8RgaVA19Bax5KMYxFWqXuBYpMtroGVccN5JRiFyTkOdMFBWlWsaAe0cKkal8xKKkLTJFH35WFyDWUKNpnVZ5lJPEXpNqW5QE8R4UNDGZYZfKJinLHWlhC8SC1mpoy2HXOg3DyTZtIEr1m8VfuKuIsAdeVxYZYblsEGfPVeCB6usHjceU2YKF76i6htLY.PII8SCo5U4oLjyEK.GGqPHXZ5Ev00Ykyr2axqMV3ugv8w3gbsWvlwasMfW3.3tFuERAeH9fISXd5kfcK7g+7sKu++FT19JzleXFgNLho5banLGeiUlspeWnDu0ckRb8a1Ix6i56Giuj.3FUg+SKLYo9ZN6OnIsY19BwAfGuvxV9.6SK5IAFYnWP9EfLkXSZ3PgLUocH6Rbn4DsN1jKdE3mMoBRvjygMcUMPsx7VBygA.ySMl51roAbfbE41Quh7+BV+GPvpVIAqGnK3AKt0at.jE0sw4WFJIWAOqPR+NtuNX4DC5Fv3SCzkYVPUVaD85RZinO8dTarxzI2i5g2JXr5ZfUO7+nL07R1GQgWQFNrwGmFMBzc7XPzEv8MSmmUMSOR931lwlJvHlvOaveCOEK1wL1pXwNyW7dIFQTOk7Md4cuFojsylAxaQ1+msA7GqgwjEMsXb6VsQQfp1a77Lk3OGnF1rOeQE74KqfOOsB97UUvmmUAe95J3y2bs9Xdgh8R0xn7VNXhgGjQdZYcffB2dytoi9Gv5WkbL
                                          

                                          HISE Development for hire.
                                          www.channelrobot.com

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

                                            @Lindon said in Passing Large Data Objects into ScriptProcessors:

                                            globals = bad code.

                                            How so?

                                            @d-healey said in Passing Large Data Objects into ScriptProcessors:

                                            Yeah I avoid globals too. They make code less reusable/portable. Where possible i try to make everything standalone.

                                            How are they worse than latching onto a referenced parameter via setAttribute?

                                            You can either write all the large data to a global and have it just be there for the arp to grab, or you can store the arp controls references into a global, change their values from anywhere based on your data output and have a broadcaster fire on control value change if you need precision regarding when the controls need to do things.

                                            LindonL d.healeyD 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            32

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.7k

                                            Posts