HISE Logo Forum
    • Categories
    • Register
    • Login

    PRESET WITH BUTTON

    Scheduled Pinned Locked Moved General Questions
    17 Posts 4 Posters 459 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.
    • Y
      yall
      last edited by

      @Lindon
      my presets are in the project folder in userspresets directly

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

        @yall You've got a mistake in the callback name:

        the callback name is onPreset1Buttonbut you call onPreset1ButtonControl

        Also (but it is no mistake here), you don't need
        Content.getComponent("Preset1Button")
        Since the component is already declared, Preset1Button.setControlCallback(onPreset1ButtonControl);is enough

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

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

          @yall yes as @d-healey often says:

          Console.print("in the call back");

          is your friend - if its not working - first thing to check is if your call back is being executed.

          HISE Development for hire.
          www.channelrobot.com

          1 Reply Last reply Reply Quote 1
          • Y
            yall
            last edited by

            @Lindon @ustk

            always the same problem. compilation ok but no change of preset.
            would you have a demo to give me if you like?

            const var Preset1Button = Content.getComponent("Preset1Button");

            inline function onPreset1Button(component, value)
            {
            Engine.loadUserPreset (test1);
            };

            Content.getComponent("Preset1Button").setControlCallback(onPreset1ButtonControl).Console.print;

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @yall
              last edited by Lindon

              @yall said in PRESET WITH BUTTON:

              @Lindon @ustk

              always the same problem. compilation ok but no change of preset.
              would you have a demo to give me if you like?

              const var Preset1Button = Content.getComponent("Preset1Button");

              inline function onPreset1Button(component, value)
              {
              Engine.loadUserPreset (test1);
              };

              Content.getComponent("Preset1Button").setControlCallback(onPreset1ButtonControl);

              @ustk has given you the solution..

              look at your code:

              last line...

              Content.getComponent("Preset1Button").setControlCallback(onPreset1ButtonControl);
              

              you tell your Preset Button1 to call a function when it is pressed, called "onPreset1ButtonControl"

              -- can you see a function anywhere in your code called "onPreset1ButtonControl" ???

              -- hint answer -- NO!

              So your button is calling a non existant function....

              you DO have a function called "onPreset1Button(component, value)"

              -- but no one is calling it.. your Engine.loadUserPreset ever gets executed....

              As I said put this in your function call

              inline function onPreset1Button(component, value)
              {
                      Console.print("In the function call ....");
               	Engine.loadUserPreset("test1");
              };
              

              ..and try again - you will see this never gets executed.

              HISE Development for hire.
              www.channelrobot.com

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

                Shouldn't test1 be a string?

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

                LindonL Y 2 Replies Last reply Reply Quote 0
                • LindonL
                  Lindon @d.healey
                  last edited by

                  @d-healey we are not even that far along yet....

                  HISE Development for hire.
                  www.channelrobot.com

                  1 Reply Last reply Reply Quote 1
                  • Y
                    yall @d.healey
                    last edited by

                    @d-healey i don't understand.
                    I tried everything, it doesn't really work. I tried the function "load previous user preset name", it works. but impossible to load a preset with a button it drives me crazy

                    1 Reply Last reply Reply Quote 0
                    • Y
                      yall
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • Y
                        yall
                        last edited by

                        HiseSnippet 1852.3oc4X0saibaElisYik13MaR1KxkCLJJ7hrUPirrjUJBxXKKsPM9GAKuYaQMPB8LTVD6HRENbrWmEAHuF4t8cnW02h9HzGg9Fzd37m3Xq0VwwwX2Vcgg44vCmOdNe7bNj8kBOZXnPhrJczESnHqODO3BtZT6QDFG0aGj0uCOn2NcPaewDRXH0GYYs3yz5rJsDJ92+9q1lDP3dzohPnuQv7n6xFyTSk128qYAAcI9ziXiMlcc2ddBdaQfHBvwh3pnIDuWRNktOQOsEv.H53yTB4.EQQCQVKssv+hAiDmySl+2vBYmDP0CbPCfEJQbWQfuFwZon1iXA98y1ugHjEt+zc+hI69Gi2i4yxkO0K7nXE1SsvzeXsv0AOGS3Uc9gmkA7VJAdeLdfmjMQMUiFaO.2i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cwjQLMasQ2OWpBnbUgdHz8IvCYpKL6262j9clW39w39Lk2nYi2ElAd0U59MFuocOtBtyvgTO0TvtDt6e4dnUwELvxx48wyFOIf9rLn7vTA1ZINWS+7PNVZ.ofC7EEX8n+p6L53uG+LnnaeQ.QdY2+hE2yKNec2Li84RyMGQukr+0voWb9BL2Pe6OLAjXcQgzCaWp7vMBrok4L59ReIpdEhYu.xRLTHGm1oSdpjcomBeHyYdDEROAWxyyT3fwBgZTb4fwEBq6JDS5v0UI8MQU+QjPcaxw4jlN61wkzxvxcUKdCf56I0G9a3F0qjqO190O3tYL5W.C3FnoKLmzzOMlLjG00zh2wS9lf3bJ46AH9SvwYyreuo91mfiy199CfeDtOg+N.bOTDo6mcOhRxftovPyaCfFM8n.T4bZf9d0VKnSRkLtpdbbtOJ2Odv+A9kpzQO1JUoSlRSWBNwkTFmeSsj2hI+lTE7CaGAcFHMtjB76e4BMvcFiddwb1K6dmUv791m7oY8AEeEVcoiT2xiSjXqEY2GNOdY+SwVP9my6SJNYteRQcAu8hu4nQQLcijGIIduD7QyQQuCgZj5aWX9jlCH5lpfHkToSFZrHGRgFhBoEj0EtrUxqZ1D29KNV+9WgGOny1aM3ndc12d2Nun2fiSejhiOIRRIQGSGpemNaORkyImgFq8SIwn36Eis9t+viPA.fiwPltf3cfel9KynVZ9XT2PamK8N8Cnd+c+m6ldEKkgwj9z6.8SG.GfxqhMjDEnxjV7zydBtXxHAm4Uj.Bm5OM94Alh8Ytg1RofCASk7X2CoATnCOy6StKiSIxKeF5tqqIq4Ld8Y3D3ZqOxa++F2acw+u7dq2KkmtO9FiIdRw25k7h3Zt7xwRf8MONYeI7d5w14OENFWsRUHWtO6a87zt6+nCBMaapcKrY8agM0uE1rwsvlF2BaZdKrYyq0Fcwnshf6plbTDDzuSxULsxK7asH5+BsTDoAC
                        
                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @yall
                          last edited by

                          @yall

                          I thought you wanted the button to load the preset, but you've put the function in the knob callback... ?

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

                          1 Reply Last reply Reply Quote 0
                          • Y
                            yall
                            last edited by

                            @d-healey
                            it just worked I had not seen the response from @Lindon thank you all you are cool;)

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

                            25

                            Online

                            1.7k

                            Users

                            11.8k

                            Topics

                            102.7k

                            Posts