HISE Logo Forum
    • Categories
    • Register
    • Login

    New script = new message thread?

    Scheduled Pinned Locked Moved General Questions
    20 Posts 3 Posters 756 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
      last edited by d.healey

      I have a question, slightly related to this thread stuff I think...

      I have a panel with a preload callback, in that callback I start a timer, which repaints the panel to create a preload animation. By starting the timer manually I see the animation play, but when the preloader starts the timer the animation freezes after one frame until the loading is complete. How can I get my animation to play while the samples are loaded?

      This is almost the script I'm using

      Link Preview Image
      sofiawoodwinds/Scripts/preloadBar.js at master · davidhealey/sofiawoodwinds

      Contribute to davidhealey/sofiawoodwinds development by creating an account on GitHub.

      favicon

      GitHub (github.com)

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

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @d.healey
        last edited by ustk

        @d-healey This is kind of exactly the issue I have...
        I came up with simply moving the panel's position instead of updating its paint routine.
        As Chris said, the paint routine has a lower priority, so it will repaint only when the highest priority things are done.
        But moving a component works, it certainly has a higher priority over a paint routine AND the sample loading or other heavy functions like in my case... Which is weird, because it is still the script thread that moves the component 🙄

        Can't help pressing F5 in the forum...

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

          @ustk said in New script = new message thread?:

          As Chris said, the paint routine has a lower priority,

          But the code I'm using is Christoph's :cat_face_with_tears_of_joy:

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

          ustkU 1 Reply Last reply Reply Quote 1
          • ustkU
            ustk @d.healey
            last edited by

            @d-healey And my solution might not work in your case. Because on my side, the heavy stuff is in the same script thread. But in your case, it is a higher priority one. Test and report :)

            Can't help pressing F5 in the forum...

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

              @ustk It won't work for me because I need to repaint things (that script I linked too is not 100% the same as the one I'm using).

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

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

                I assume the new BackgroundTask class is related to this thread? Can it be used to solve my preloader issue? I found an old old forum post where someone had the same issue.

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

                ustkU Christoph HartC 2 Replies Last reply Reply Quote 0
                • ustkU
                  ustk @d.healey
                  last edited by

                  @d-healey Yeah it is totally related. If I can build I'm trying today ;)

                  Can't help pressing F5 in the forum...

                  ustkU 1 Reply Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart @d.healey
                    last edited by

                    @d-healey I think there‘s a glitch that prevents the timer from being started in your case so spawning another thread won‘t solve it.

                    Is this reproducable with the code you‘ve linked?

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

                      @christoph-hart I'll check and make a snippet

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

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

                        The above preloadBar code works. I've figured it's something to do with my paint routine, it has a loop in it so I'm investigating that angle now.

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

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

                          Is there a way I can trigger the preload callback for testing purposes without just switching sample maps?

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

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

                            @ustk said in New script = new message thread?:

                            @d-healey Yeah it is totally related.

                            Sorry for misleading you!

                            Can't help pressing F5 in the forum...

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

                              @ustk said in New script = new message thread?:

                              @ustk said in New script = new message thread?:

                              @d-healey Yeah it is totally related.

                              Sorry for misleading you!

                              Actually I think it is related, but in a different way. I made another project to test my preload animation and it works fine. I did some more tests in my main project and I think it's because I'm doing other things when the preset loads, those things are "blocking" the animation. So I'm thinking if I move those things to a background task it might solve it.

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

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

                                I finally solved my preload issue. Not 100% sure what is causing it but moving my sample loading into the post preset callback made it work.

                                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

                                23

                                Online

                                1.8k

                                Users

                                12.0k

                                Topics

                                104.1k

                                Posts