HISE Logo Forum
    • Categories
    • Register
    • Login

    Post init callback

    Scheduled Pinned Locked Moved Feature Requests
    23 Posts 4 Posters 839 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.
    • d.healeyD
      d.healey @Oli Ullmann
      last edited by

      @Oli-Ullmann said in Post init callback:

      Perhaps you could use if(Engine.getCurrentUserPresetName() != "") to
      check whether a preset is loaded. If not, load the Init preset.

      Might be able to do it using this - https://docs.hise.audio/scripting/scripting-api/userpresethandler/index.html#isinternalpresetload

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

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

        really none of this is much use, I have a panel with some data in it - it might be empty it might not.

        if its not empty I want to draw the path it describes in a panel, on init. But on init (no matter the preset you are loading) the data panel load takes longer than the init processing AND any post-load processing(so anything in your post-preset callback)....so it never draws itself...

        What I'm looking for is a "proper" post init call back that accounts for any panel data load scenario...

        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 Post init callback:

          the data panel load takes longer than the init

          Could you provide more detail about what you're doing?

          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 sure:

            23b76baa-bd35-455f-a26a-4456136671d9-image.png

            See that grey circle inside the XY pad? Thats a path, its held in a Panel.data object, when I load this preset the data is passed to an array and from there it gets drawn correctly in the paint routine..., but on init - it all goes too fast and it doesnt get drawn - the array holding the Panel data object = 0.....

            HISE Development for hire.
            www.channelrobot.com

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

              @Lindon What's the reason for storing this in the panel's data object? And why do you need a path to draw a circle, I assume there is more going on?

              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 Post init callback:

                @Lindon What's the reason for storing this in the panel's data object? And why do you need a path to draw a circle, I assume there is more going on?

                So its not always a circle its whatever the user draws (see the Record button in there?)- this is just one of the pre-loadable shapes.... when the user hits Play the XY pad follows this path and this modulates volume in the voices....

                Every preset needs to save its own "XY path shape".

                I would add an video showing you - but the forum wont let me load mp4 files.

                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 Post init callback:

                  Every preset needs to save its own "XY path shape".

                  Ah I understand now. Are you able to store the path as a base64 string? Perhaps that will speed up the loading. Do you have some method to be able to test when the loading is complete?

                  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 Post init callback:

                    @Lindon said in Post init callback:

                    Every preset needs to save its own "XY path shape".

                    Ah I understand now. Are you able to store the path as a base64 string? Perhaps that will speed up the loading. Do you have some method to be able to test when the loading is complete?

                    not really and no in that order - especially the last bit - thats where the problem is - there is no notification that the data is loaded, if there was a callback for this I could do the repaint then...

                    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 Can you make a minimal snippet I can play with? Something that just draws one of these stored paths on a panel and takes too long to load.

                      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 Post init callback:

                        @Lindon Can you make a minimal snippet I can play with? Something that just draws one of these stored paths on a panel and takes too long to load.

                        Well I will try and make the time to do that - but Im in delivery crunch right now.....

                        HISE Development for hire.
                        www.channelrobot.com

                        1 Reply Last reply Reply Quote 0
                        • Oli UllmannO
                          Oli Ullmann @Lindon
                          last edited by

                          @Lindon
                          Ok, if I have understood correctly, the panel is drawn before it has the correct data. Correct?

                          Have you ever tried a ComponentValue-Broadcaster? This then sends a repaint command as soon as the value of the panel has changed.

                          I think you would then have to use the value of the panel and not a panel data object...

                          Something like that:

                          HiseSnippet 1377.3ocsW80SabDDeOfihuzz1H0Gp5CUqtmN2hH1.I31n1R.LsnBDWLgFDxJc8c6cdEm20cu0PrhhT9.zOT8w9woeCRmcuy1qACjXo3GNeyN+62NyryNWCoHjlkIjHGuiGzihb9T2lC3pNa2gv3n81A4fcaP3zT7Ijz9TLrNOgh2RJHQgjLEUh1ZPORVFMB43L+un0xozBHyu+6m2hjR3gzwKgPmHXgz8YcYpwq1XyeikltKIhdLqqkzqu4dgB91hTQe.gy6VA0iDdNIgdHQK1btnekj0A47stqQiVsVMxiVes0Bq880B2HjTiFVs8FUVkDGsVMZT6n0ez5Djyh0iXJgrohnnYfQ2RDMnYGwk7bGbBKi0NkpIphZBdNeYz1cXoQMFFtxPHmEZLN3Medv6KcOfEwFs93f3WXXfGqgcPyYtaCRU+.fjiEjVHGROvsYnj0SMliFO2ycONj6hIPtwFJ4xhl6qbc2V.RvUqzkbNcWIPLRifGWoxxX3Q4m34A4mLE1ThTE+i3gZkPUaK51SvAh.+b19f74usRFUYpmBNCrTkViMDi2quZeRaZZFXsylt4Ram9Bi59kW1COse2ndmVnWKviwBYPJ3QamV1qT5Xz4WWumwpNTLmdI9ByQfNTIUuU7r1LMfDs5HQeEiSCh6yCULAOHor2q8JcAQhIvlQ0gkoAz9hPR5Vh97nr.cHrjWoDsMxKyCx+KakHh77DIcP4mXDHFNfbDMTEPtYUtrCSQ0rSVIRRt7X5qfM8KxO49CXe72MBC4auxmUo0x3yHl+HmU07bUyy0Z05pF5zayPUmzPfDqV4ZVy6MlvFimBgI7vvDVvaq3MKrkNyIEoAgCSaKmG1MgxqU8Xk4.eaAnksSp.frXogxa.bL8ZDKn3WNOFa.z1jzz1PymfogVy15gOztsHNhFy3L8FrnzVWGzSuA9ChJDJhfRh57DHRrRnjBm7sTN30PYsOKxGB11p3qK28IxjLfyY9ihQ9Ki8MQI+VFITjbIZkGwAjQTJRXGrRfoW.Jf0MG7rM8J4RbrXTrnHDO7vKjH88mzZwLIruRY.j4T4ULWTzHKcDMVRy5regfSZSIsm9vidKP61SMv3CqZiCEJ5y3Al7u2a7vWkUb7T4UjYRA2MM156Yj2lhA79caSk1UeZAg9pS1rdw2ul0g4EaVBJ36AkGOqGsfdWQZjtIr98q2ZGUTsBu8781gnH5t8EqAx0iJULMbb1gdAb+Zdu+Rt6PyNWI5AvbTx.dWY3d+g2LnyEHF35kxupuJ5UiuBls4.ahKYQJ3BWWm+EH6PYIcTCoPVt3SlzEligEtv7tsK17OscwOsIIkkv6laFWowCJnADx4ycODZBOpeFhBIBhIV6L+GhyW8lb9a+86x4mdmNeoax42ycz0VV9+s+0Mt4WzMkFOz8es6McUDpHkLzfga1NY3DSkVDV4cnqjbtcHd5sBwICQezfXobH9YEPbq9Jkfav38csZ+Zgx+I0BkPVcTg5eOQg52.T4v8dtMqeL9jmt+yqiXYGHz6HhDrgybYjKn6wa.8rnJS985iUACzIh5mRTSNkmd92BFP2jIFsRO9DOioFXOe7GvneUt0Q+deg3CbavfFzSGiyMELB8Y9XfwhAluua83XXplw.bA2cewrNc7c3974yRNfnjLnvw8v9caB0fgT8G0.88xzEHyoKDyoqno0QflTdjg3cvuBlU0zNELqNjIpKITJdYX9cH5QxWxrBfIt4SVJ4dflFWEYNdXGm6BegvKCCmzTWSwUmUEWaVUb8YUwGMqJ93YUwMlUEqc2Jp+.tm1WI5lerAgNnQcyEwNN045aBLUqn+G.ctgk4
                          
                          LindonL 1 Reply Last reply Reply Quote 0
                          • LindonL
                            Lindon @Oli Ullmann
                            last edited by

                            @Oli-Ullmann thank - I already have a work around - what Im asking for is a post-init callback - as David did right at the start of this thread.

                            HISE Development for hire.
                            www.channelrobot.com

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

                            28

                            Online

                            1.7k

                            Users

                            11.7k

                            Topics

                            102.0k

                            Posts