HISE Logo Forum
    • Categories
    • Register
    • Login

    How to check that the preset has finished loading?

    Scheduled Pinned Locked Moved General Questions
    11 Posts 3 Posters 594 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 @civet
      last edited by

      @civet You can use the postCallback() of the preset handler.

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

      C 1 Reply Last reply Reply Quote 1
      • C
        civet @d.healey
        last edited by

        @d-healey are there any examples of this?I tried it, but the callback does not seem to fire :(

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

          @civet

          are there any examples of this?

          Not that I know of, but there isn't much to it:

          const uph = Engine.createUserPresetHandler();
          
          uph.setPostCallback(function()
          {
             Console.print("The preset is loaded"); 
          });
          

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

          C 1 Reply Last reply Reply Quote 0
          • C
            civet @d.healey
            last edited by

            @d-healey I see... It’s only for user preset system such as using a UserPreset browser, not what I wanted.

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

              @civet What do you want?

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

              C 1 Reply Last reply Reply Quote 0
              • ulrikU
                ulrik @civet
                last edited by

                @civet said in How to check that the preset has finished loading?:

                @d-healey I see... It’s only for user preset system such as using a UserPreset browser, not what I wanted.

                You can also use it for the "loadUserPreset()" function

                Hise Develop branch
                MacOs 15.3.1, Xcode 16.2
                http://musikboden.se

                C 2 Replies Last reply Reply Quote 0
                • C
                  civet @ulrik
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • C
                    civet @ulrik
                    last edited by

                    @ulrik

                    You can also use it for the "loadUserPreset()" function

                    yea, I think it does the same thing as clicking on a PresetBrowser.

                    1 Reply Last reply Reply Quote 0
                    • C
                      civet @d.healey
                      last edited by civet

                      @d-healey
                      I'm using a hidden UI control to save the state about which samplemap is selected.

                      And then, restore it in a DAW Session without touching the loadUserPreset() function

                      ref: https://docs.hise.audio/working-with-hise/project-management/user-presets/index.html

                      my solution doesn't work properly in the compiled plugin:

                      restoreSamplemapFrom( hiddenLabel.get("text")  ); // this text is empty on Init
                      

                      Maybe I could use a ComboBox with ControlCallback instead of this simple Label.

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

                        @civet So this has nothing to do with presets. You can use the onloading callback to check if samples have finished loading from a sample map.

                        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

                        19

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.5k

                        Posts