HISE Logo Forum
    • Categories
    • Register
    • Login

    AudioLoop Player - Sample loading in different note than originally saved

    Scheduled Pinned Locked Moved General Questions
    10 Posts 3 Posters 604 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.
    • B
      BWSounds
      last edited by BWSounds

      Hello,
      So im attempting to set my preset browser to change presets on a double click

      (because some of my presets with the audio loop sampler have different root note on the 1st attempt at selecting, but once I click on the preset again its correct)

      any who I seen this code and ive been messing with it, but no success..am I missing something?

      const var presetBrowserWatcher = Engine.createBroadcaster({
      	"id": "presetBrowserOnClickStatus",
      	"args": ["component", "event"]
      });
      presetBrowserWatcher.attachToComponentMouseEvents("FloatingTile2", "All Callbacks", "Mouse Listener for PresetBrowser");
      
      presetBrowserWatcher.addListener("RefreshFunction", "Delays the closing of the Preset Browser",function(component, event)
      {
          if(event.doubleClick) {
                     // close the presetbrowser
      	}
      });
      
      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        I believe the preset browser will always load the preset with a single click and there is no way around this.

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

        B 1 Reply Last reply Reply Quote 0
        • B
          BWSounds @d.healey
          last edited by

          @d-healey
          Well how can I get the root note function to load correctly on the 1st attempt?

          It doesn’t happen with every preset but it does occur often.

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

            @BWSounds I noticed it was glitchy too (I think I posted a bug report about it last year) but I didn't know it corrected itself on the second go.

            Is it possible to trigger the pitch detection manually? If so you could set a timer to run after the preset loads and call it then.

            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 @BWSounds or maybe using the postLoadCallback

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

              1 Reply Last reply Reply Quote 1
              • B
                BWSounds
                last edited by

                @d-healey @ustk
                I would need a bit of help with that. I just need to know where to start…

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

                  @BWSounds

                  Start here

                  Is it possible to trigger the pitch detection manually?

                  If the answer is yes then we just have to trigger it.

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

                  B 1 Reply Last reply Reply Quote 0
                  • B
                    BWSounds @d.healey
                    last edited by

                    @d-healey ok, i'll dig around

                    @ustk I didnt see anything onthe docs or in a search about postLoadCallback

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

                      @BWSounds https://docs.hise.audio/scripting/scripting-api/userpresethandler/index.html#setpostcallback

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

                      B 1 Reply Last reply Reply Quote 0
                      • B
                        BWSounds @d.healey
                        last edited by

                        @d-healey
                        thanks,
                        i did, this and its working!

                        const var presetHandler = Engine.createUserPresetHandler();
                        presetHandler.setPostCallback(function()
                        {
                           rootnoteKNOB.changed();
                        });
                        
                        1 Reply Last reply Reply Quote 3
                        • First post
                          Last post

                        21

                        Online

                        1.8k

                        Users

                        11.9k

                        Topics

                        103.7k

                        Posts