HISE Logo Forum
    • Categories
    • Register
    • Login

    Script Processor component state does not load with preset.

    Scheduled Pinned Locked Moved General Questions
    13 Posts 2 Posters 346 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.
    • CyberGenC
      CyberGen
      last edited by

      Hi,

      I have a script processor that handles arpeggiator and glide functionality. The components in this processor do not load their values when a preset is loaded, unlike the UI script. I’ve tried using customLoadSave and encountered the same issue. Looking for a solution, I created a callback that invokes all the control callbacks from an object after loading a preset. This works in the HISE editor but does nothing in the compiled application.

      I’ve put together a minimal snippet with a couple of knobs to demonstrate the problem.

      I think there might be a bug here, but I’m not sure. Can you help me confirm?

      thx.

      HiseSnippet 751.3oc0V0saSCCE1tqdhVfASvCPubCMgZZ65ZEWvX8GnZzsJxXh6lbcbVrVhcjiyfJDuI7vviDuAfcR1RKsZqqZfD4hHcNG+4yWN9ymSFIEDZTjPBfkOYRHE.eDxdBW40wCy3fAcAvMPCwQJprRpqClDhihnN.Hbs2Zb.KUDj77yWe.1GyIzbW.voBFg9dV.Sk6cz9Gx786icnmvBlZ0M1e.Qv6H7EwZ9rFpJHDSt.eN8HrYYEPf2gi7.vWfp4NlTycu5srZa0duFssr1s03FUqQb1sc85Mq63VqEtYKMn064vTBosBqnQ5M8.gyDaOwm4oI3TVDarO0XXAr0YN0MniGy2YzUEmH..VbTdoZszR0yQCYNrq8mWxdZRfJ4HltnAKbSTx5NPoBSQohoTZSjMQxBU4QL74YYdyYj0LTJMJ.9cTE2XNQwD7JB9QBE8X9VaW9qkKU9akmKjq6Bi0QvURguOUtvvlib4MAbKdbvXpbmJWh8ioWuP8m3r0MzxU2zJJEkqlZgB9.NScbHMyd9JKnSJHcMFlwJ8RUIU3Mxpk19LGpDvbLG2inZWdTI1+PtXLHg4SeK.7wAcwJ7U6mdq0oKjJULyWBrK8R8sjzSvRntznKThvj0FDJ3Fh.Kt7Y+KSm4IyPikUv7Pz.MKktX8k4EIT9AJ6y3kA3Kn8kZiqArUspU2oh901u5+Gwz52Who9BeGSs5dQX8j7ig+85p+L42IYktCnvI1GqlssnYfQV.8wzLRKSx3QL0joGnbG5UV8F6UtrTbSzHlh3sXNVXAbzzF9u.Gylv7XTOWWJQkSvhn9eZUGmbKo+ChXEie9PrRxzG1nihCr0ShITc14bpuomKrfQDmZW0Xap.1TtShwuzOYAsL1vrfVWEDDfIRwYjTouYF1CR7n4DOYFeI8OansqXMuVOPOR8LBY1sZNf0VUf0WUfMVUf6tp.atp.2aUA151AZ9im2DqDAoWa.fgi5kzaBB6wwZEXhZE7a.EOM24A
      
      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @CyberGen
        last edited by

        @CyberGen Presets only store/restore the state of controls on the Interface script. So whatever controls you have in your secondary script that you want to restore with the preset need to be linked to some control on the Interface script.

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

        CyberGenC 1 Reply Last reply Reply Quote 0
        • CyberGenC
          CyberGen @d.healey
          last edited by

          @d-healey in doing that don't I loose the other parts of the controlCallback for that knob in the UI?

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

            @CyberGen said in Script Processor component state does not load with preset.:

            don't I loose the other parts of the controlCallback for that knob in the UI?

            Not sure what you mean.

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

            CyberGenC 1 Reply Last reply Reply Quote 0
            • CyberGenC
              CyberGen @d.healey
              last edited by

              @d-healey sorry, so when I link a control from the property editor, It takes over the controlCallback and only operates the linked component but does not run the controlCallback. Is there any other way to link them without loosing the controllCallback?

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

                @CyberGen When I said linked, I didn't necessarily mean through the property editor. You can do it through your control callback using setAttribute

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

                CyberGenC 1 Reply Last reply Reply Quote 0
                • CyberGenC
                  CyberGen @d.healey
                  last edited by

                  @d-healey yeah, that is the way I have all the controls linked. But that does not seem to automatically recall the state of the non-UI script for me. Even recalling all the controllCallbacks post load only works inside HISE but not in the exported app.

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

                    @CyberGen Maybe it's the order of your scripts, put the secondary script below the Interface script.

                    @CyberGen said in Script Processor component state does not load with preset.:

                    that does not seem to automatically recall the state of the non-UI script for me

                    It won't. It will recall the state of the controls on the UI - that is all a preset does - and the UI controls will set the secondary script's controls.

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

                    CyberGenC 2 Replies Last reply Reply Quote 0
                    • CyberGenC
                      CyberGen @d.healey
                      last edited by

                      @d-healey said in Script Processor component state does not load with preset.:

                      Maybe it's the order of your scripts, put the secondary script below the Interface scrip

                      I've thought about that, but I believe that is not an option for me. I've tried that in the past (not because of this issue) and nothing works. That processor handles arpeggiator and glide functionality.

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

                        @CyberGen said in Script Processor component state does not load with preset.:

                        I've thought about that, but I believe that is not an option for me. I've tried that in the past (not because of this issue) and nothing works. That processor handles arpeggiator and glide functionality.

                        I'd need to see an example where it's necessary to put the script before the Interface script, sounds unusual to me.

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

                        CyberGenC 1 Reply Last reply Reply Quote 0
                        • CyberGenC
                          CyberGen @d.healey
                          last edited by

                          @d-healey Let me experiment moving things around a bit. Maybe a can split things up. I'll get back to you. I do think the solution could be there.

                          1 Reply Last reply Reply Quote 0
                          • CyberGenC
                            CyberGen @d.healey
                            last edited by

                            @d-healey said in Script Processor component state does not load with preset.:

                            Maybe it's the order of your scripts, put the secondary script below the Interface script.

                            So, I was able to move the glide/arp script below the interface one. Unfortunately, the problem persists. I can't think of a reason why it would work inside of HISE and not in the compiled version. Any other suggestions?

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

                              @CyberGen Can you make a minimal example that demonstrates the issue with the scripts in those positions?

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

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

                              21

                              Online

                              1.7k

                              Users

                              11.9k

                              Topics

                              103.5k

                              Posts