HISE Logo Forum
    • Categories
    • Register
    • Login

    button to override values recalled by preset

    Scheduled Pinned Locked Moved Scripting
    10 Posts 4 Posters 496 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.
    • M
      mwplugs
      last edited by

      im trying to figure out a way to have a button that when clicked overrides a specific recalled value when a preset is changed.

      for instance each preset would be returning a different value of parameter A. 1.3, 0.13, 6.2 etc

      but when the button is clicked it overrides the value to 0 for that given parameter even when a new preset is recalled and stays that way even when presets are changed unless the button is disengaged.

      i have the first half done by making a button control callback that if=0 and it changes the paramter to 0 when clicked..as of now however when a new preset is recalled the value is recalled from the preset

      i disabled saveinpreset for the button so that isnt affected when switching presets but the values obviously are still pulling from the preset unless the button is clicked again

      const var Effect = Synth.getEffect("Effect");
      
      
      inline function onOverrideControl(component, value)
      {
          if(value)
          {
      		Effect.setAttribute("0","0");
          }
          else
          {
                      
          }
      };
      Content.getComponent("Override").setControlCallback(onOverrideControl);
      

      this solves the first part of overriding the value but im not sure how to code a way to make a getvalue or something to make it so it checks to see if the button is engaged when a value is recalled from preset

      A 1 Reply Last reply Reply Quote 0
      • A
        arminh @mwplugs
        last edited by

        @mwplugs dont use " while defining module

        for example

        inline function onOverrideControl(component, value)
        {
            if(effect.getValue() == 1)
            {
        		Effect.setAttribute(0, 25);
            }
        };
        Content.getComponent("Override").setControlCallback(onOverrideControl);
        M 2 Replies Last reply Reply Quote 1
        • M
          mwplugs @arminh
          last edited by

          @arminh well its working and in the latest scriptnode does not having "x" quotaties around it affect the recall?

          1 Reply Last reply Reply Quote 0
          • M
            mwplugs @arminh
            last edited by

            @arminh yeah that broke it. clicking the button is not setting the value to 0 now

            1 Reply Last reply Reply Quote 0
            • M
              mwplugs
              last edited by

              @arminh said in button to override values recalled by preset:

              inline function onOverrideControl(component, value)
              {
              if(effect.getValue() == 1)
              {
              Effect.setAttribute(0, 25);
              }
              };
              Content.getComponent("Override").setControlCallback(onOverrideControl);

              yeah unfortunately that just broke everything. getValue() shouldnt it be referring to something? it seems like its pulling from nothing. should there be something in the getValue() parenthesis? because as is this just broke the override button and makes it so it doesnt change the value any more and im getting a function not found error on that line

              1 Reply Last reply Reply Quote 0
              • M
                mwplugs
                last edited by

                any ideas anyone? thanks in advance

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

                  Sounds like you want something like this

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

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    mwplugs @d.healey
                    last edited by

                    @d-healey like what i dont see anything lol

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

                      @mwplugs "this" is actually the link

                      here's a solution that uses an external file to store the "Reset button state" (because you don't want it to be saved with preset obviously)

                      HiseSnippet 1315.3ocsWstaaaCElxIJq1ctaEXO.L9OyFH00dqsaXCE0MNIatsIwHNKX+X.EzRz1rghzPjJqFAAXOh6QXOB6MX6PJIKIG4rTCL4.DQdt8ctQdzvPoGUojgHmpmuXNE474tiVHzy5OivDnAGfbdj6wDklFhi2Z+EyIJE0G43r0OY1vo51H6ye+p8IbhvilsEBcgj4QeGKfoy1cXu2x37iH9zyYA439Y8F3IE8kbYDfmsb6flS7tjLkdBwvVEWjyNG5yzxvQZhlp.d1W5uXzL4uKh4+BlhMlSMK5hFAJJdaT+YLt+vTeUgPNaOLyy2J1y+J2iY9rk6mEA9RKAblD4iANUJBosK.otqCRGI49FErF34jCdaGCuG6NxKjMWmQwfsG5NP.ImIDHrmGVw7hp3riaeIvgP2NfbI8nPXwRIZ9hNc1C+7NcZ8i0qArojbZaONkD1zri4GjPTZ7UjP76Hio7t3WhS02TptuLXtT.KZ1HlbCibYxDRUTskx9ZwZEs.WVMrTVaTED75Fgp3EM9gN2jfs50XBNSPwShDdZlTfkh2Jji6ZLSnj2zK0F6AngGQaUu100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2yyDJdBf8xk4a1.Y91MPlmsAx77MPlWrAx7cafLe+cJi4S2dcjVFD2l.aL7P6Y1NNGJLm5YqHQ+KmwEOgB
                      

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

                      M 1 Reply Last reply Reply Quote 1
                      • M
                        mwplugs @ustk
                        last edited by

                        @ustk said in button to override values recalled by preset:

                        HiseSnippet 1315.3ocsWstaaaCElxIJq1ctaEXO.L9OyFH00dqsaXCE0MNIatsIwHNKX+X.EzRz1rghzPjJqFAAXOh6QXOB6MX6PJIKIG4rTCL4.DQdt8ctQdzvPoGUojgHmpmuXNE474tiVHzy5OivDnAGfbdj6wDklFhi2Z+EyIJE0G43r0OY1vo51H6ye+p8IbhvilsEBcgj4QeGKfoy1cXu2x37iH9zyYA439Y8F3IE8kbYDfmsb6flS7tjLkdBwvVEWjyNG5yzxvQZhlp.d1W5uXzL4uKh4+BlhMlSMK5hFAJJdaT+YLt+vTeUgPNaOLyy2J1y+J2iY9rk6mEA9RKAblD4iANUJBosK.otqCRGI49FErF34jCdaGCuG6NxKjMWmQwfsG5NP.ImIDHrmGVw7hp3riaeIvgP2NfbI8nPXwRIZ9hNc1C+7NcZ8i0qArojbZaONkD1zri4GjPTZ7UjP76Hio7t3WhS02TptuLXtT.KZ1HlbCibYxDRUTskx9ZwZEs.WVMrTVaTED75Fgp3EM9gN2jfs50XBNSPwShDdZlTfkh2Jji6ZLSnj2zK0F6AngGQaUu100qUMFpsA02rgl9QciTxfdqB+8zmhOUfmaA.1aFQLktGlMAqmQwiA+XFQgGSoB.hdDNm5iaP.6eEsQrvmYEzvM2Xo50tIN7VhqagaiVFrj.59fFGCk8MK5KsV5yk40Ehf2s2igG.iiHWQsPTYivxLuiIvPLgFJHb7DFmFKxZyFVUabPCWGJlBHqseTv7WqdynSOoYlb6gWJU6Onro40GWVojn73SYdc93T8Zfi9yLeeHUMmHnb7GhfBSsDxff2SvdI5BqCYSmRCgLobkDuUGmOioRzPfQCiMYV3+PnxD0VFnwblBh1JIlADUY0GjIlCPg2wWB4T0dXp1qc61kkJGZLS26UN7LJw2B.S4WDg23VIyRxcIoHtj3CGFDXSR2JwXjJmYdhs71HuUuQZM.UngPPovgX3liA+LRESsPzy1pDuASCXuJHTtRh1o1skosLynKAcZx0j+uv3+M6lBuhbWRKciAecPbq3t6tK3UVdu4tJ5hC8qqZqPhoXYl4WtT3IRM8TQyV0ttV0Z2TCuJoISJkVhp4zvRIatqL7tDroHJXLMLsRIkQ3Bjh2P8v62MTdwwnbLJECDL8oyoIqytCyPK1qSo1AszYyuUlOleWqqUBaYac6qHQI4P3xxJIrCrpsWU9njqJGwY9zPDCv3m4ZOMEYiMYib7muBspv0Sum0jusx9.23b+pBCO+xfCHZh4B6D3.PbNMTyLAZmCnWAS+De8cU2CnpK0x4P9XYMG79+Ih+3RC9G7dKxV7ldnb5Ymhf21Oj.93dib5AGjWO+VOJTdPrU.PL.ZdLvIeyCJugbKB38sGFXszW3VnmMmA6k2f+keOEb76.wPK6FidGNRIYAPutNuDzzByKX3kqRqfc1ZEUWAc6Aofw4j9Qbht3LdlgYSH.sUEFlxLvjPwzKxOr6mvfecJcvutkUUeOg6icGxzdyJGuUJAul1j+mwaxXz0cObxDpmNCra6dzutoyL+I.kyjQZlX5wD31bSMxIQAifujviBHQ.UNJS4REyIGwq6XVahLinBe6h+AdRH10r1IgX2Thn.hWn78dwGYXFT+A1c.LIreiRU3ikf03kmU351ocGT.78Cu2yyDJdBf8xk4a1.Y91MPlmsAx77MPlWrAx7cafLe+cJi4S2dcjVFD2l.aL7P6Y1NNGJLm5YqHQ+KmwEOgB

                        ok ill mess with this

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

                        32

                        Online

                        1.8k

                        Users

                        12.1k

                        Topics

                        105.0k

                        Posts