HISE Logo Forum
    • Categories
    • Register
    • Login

    Loading spinner animation

    Scheduled Pinned Locked Moved Unsolved General Questions
    26 Posts 6 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.
    • S
      Sawer
      last edited by

      Hello everyone,

      How and Where can I implement (probably in the c++ side) a loading spinning animation when:

      1. User Initialise Plugin for the first time?
      2. User select samples folder?

      The plugin is actually taking some time to load due to the number of samplemaps and serial keys embedded.

      The loading spinner could be a great user friendly feature.
      Thanks

      Matt_SFM 1 Reply Last reply Reply Quote 0
      • Matt_SFM
        Matt_SF @Sawer
        last edited by

        @Sawer use a timer and Engine.getPreloadProgress()

        Link Preview Image
        HISE | Docs

        favicon

        (docs.hise.audio)

        Develop branch
        Win10 & VS17 / Ventura & Xcode 14. 3

        S 1 Reply Last reply Reply Quote 0
        • S
          Sawer @Matt_SF
          last edited by

          @Matt_SF Thanks, Matt.

          Just wondering where I should Implement the function?
          Will This preload method occur also after the user selected the samples folder?

          Matt_SFM 2 Replies Last reply Reply Quote 0
          • Matt_SFM
            Matt_SF @Sawer
            last edited by

            @Sawer I've use it once quite some time ago, so I'll have to check how I implemented it but it's simple. I'll take a look when I'm at my computer

            Develop branch
            Win10 & VS17 / Ventura & Xcode 14. 3

            S 1 Reply Last reply Reply Quote 0
            • S
              Sawer @Matt_SF
              last edited by

              @Matt_SF Thanks so much, waiting.

              1 Reply Last reply Reply Quote 0
              • Matt_SFM
                Matt_SF @Sawer
                last edited by

                @Sawer IIRC : when loading new samples (i.e. by use of a button or menu) > start a timer which will get periodically the loading state. You'll get a value from 0.0 to 1.0 which you can use either to run a loading bar, or make a spinner run until the value is 1.0

                Develop branch
                Win10 & VS17 / Ventura & Xcode 14. 3

                S 1 Reply Last reply Reply Quote 0
                • S
                  Sawer @Matt_SF
                  last edited by Sawer

                  @Matt_SF Thanks for answering, however I dont know if I got your answer right.

                  What's IIRC?
                  Where in the code should I implement this? C++ side or Hise IDE side?

                  Maybe I should give more context of the outcome I'm thinking about:

                  For instance; User purchase product and installs it in the computer. Then the user opens the plugin in daw, it takes like 5/6 seconds to ask samples folder. After the user selected samples folder, it takes another 5/6 seconds again to show the alert window.

                  In between these waiting seconds, the spinning loadng progress will animate there.

                  Hope It is clear now. Thanks

                  Matt_SFM 1 Reply Last reply Reply Quote 0
                  • Matt_SFM
                    Matt_SF @Sawer
                    last edited by Matt_SF

                    @Sawer IIRC stands for "If I recall correctly" 😛

                    You have to implement this in HISE. But the loading callback only fires when you change the sample content.
                    If it's not the case you'll have to find a way to implement a timer which will display a spinner according to something else.

                    This is what the docs says about the loading callback :

                    Link Preview Image
                    HISE | Docs

                    favicon

                    (docs.hise.audio)

                    To display a spinner when changin samples, you should write :

                    if(isPreloading)
                         t.startTimer(x);
                    else
                       t.stopTimer();
                    

                    In the timer you'll make the spinner move.

                    Edit: fixed typo

                    Develop branch
                    Win10 & VS17 / Ventura & Xcode 14. 3

                    DanHD 1 Reply Last reply Reply Quote 0
                    • DanHD
                      DanH @Matt_SF
                      last edited by

                      @Matt_SF typo in that code...

                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                      https://dhplugins.com/ | https://dcbreaks.com/
                      London, UK

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

                        This is how I'm doing it https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/branch/main/includes/Spinner.js

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

                        1 Reply Last reply Reply Quote 0
                        • Matt_SFM
                          Matt_SF @DanH
                          last edited by Matt_SF

                          @DanH yeah I just tossed it like that to give an idea. It was not meant to be used as is 😛. I just corrected it.

                          Develop branch
                          Win10 & VS17 / Ventura & Xcode 14. 3

                          clevername27C 1 Reply Last reply Reply Quote 1
                          • clevername27C
                            clevername27 @Matt_SF
                            last edited by

                            @Matt_SF @d-healey Agreed with consensus that the place to do this is in HISE. I'm using Lottie here, hit me up if you'd like more info/code.

                            animation.gif

                            Dan KorneffD clevername27C 2 Replies Last reply Reply Quote 2
                            • Dan KorneffD
                              Dan Korneff @clevername27
                              last edited by

                              @clevername27 please do. I'm looking at adding lottie to my next project. I've only tinkered with it briefly in the past

                              Dan Korneff - Producer / Mixer / Audio Nerd

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

                                @Dan-Korneff I have a video about using lottie in HISE (might only be available for Patrons at the mo though).

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

                                Dan KorneffD 1 Reply Last reply Reply Quote 2
                                • Dan KorneffD
                                  Dan Korneff @d.healey
                                  last edited by

                                  @d-healey I'm a subscriber :)

                                  Dan Korneff - Producer / Mixer / Audio Nerd

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

                                    @Dan-Korneff Thanks :)

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

                                    1 Reply Last reply Reply Quote 0
                                    • clevername27C
                                      clevername27 @clevername27
                                      last edited by

                                      @clevername27 See my next post. There's a great example in the documentation, though, that shows you exactly how to do it. The short answer is, "manually" lol.

                                      S 1 Reply Last reply Reply Quote 0
                                      • S
                                        Sawer @clevername27
                                        last edited by

                                        @clevername27 @d-healey @Matt_SF Thanks so much for replying here.

                                        Should the code be implemented in "onInint" callback right?

                                        clevername27C Matt_SFM 2 Replies Last reply Reply Quote 0
                                        • clevername27C
                                          clevername27 @Sawer
                                          last edited by

                                          @Sawer Not sure I understand the question. Have you seen this? Cheers.

                                          1 Reply Last reply Reply Quote 0
                                          • Matt_SFM
                                            Matt_SF @Sawer
                                            last edited by

                                            @Sawer put anywhere in you UI script == can be on init or in an include file. Remember to defer your UI script :
                                            https://docs.hise.audio/hise-modules/midi-processors/list/scriptprocessor.html#audio-thread-and-deferred-callbacks

                                            Develop branch
                                            Win10 & VS17 / Ventura & Xcode 14. 3

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

                                            12

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            103.2k

                                            Posts