HISE Logo Forum
    • Categories
    • Register
    • Login

    General Settings

    Scheduled Pinned Locked Moved General Questions
    13 Posts 2 Posters 342 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
      last edited by

      Just fake it like I did with this Fine Tune slider

      fa84d5ab-7c99-4be3-98b2-1b8d3b240fe3-image.png

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

      DanHD 1 Reply Last reply Reply Quote 0
      • DanHD
        DanH @d.healey
        last edited by

        @d-healey it's more the functionality I want (nice slider tho!)

        The analysers are either Save in Preset or the default value whenever the plugin loads (so you might turn them off in a project with several instances, but when you reopen the project they're all back on again - or vice versa)

        Unless there's another way?!

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

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

          @DanH said in General Settings:

          The analysers are either Save in Preset or the default value whenever the plugin loads

          What's that got to do with general settings?

          If you need to store a value outside the preset just write it to a file and read it back on init.

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

          DanHD 1 Reply Last reply Reply Quote 0
          • DanHD
            DanH @d.healey
            last edited by

            @d-healey That's a good idea 😆

            Need to learn how to do this anyway. Any examples to learn from?

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

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

              Link Preview Image
              HISE | Scripting | File

              A object for accessing a file on disk

              favicon

              (docs.hise.audio)

              Or this might be easier - https://docs.hise.audio/scripting/scripting-api/engine/index.html#dumpasjson

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

              DanHD 1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @d.healey
                last edited by

                @d-healey Thanks, so I'm able to write the file from my button callback (no doubt in a super long winded way 😆 )

                if (value == 1)
                    {
                        local data = 
                        {
                        "value": 1
                        };
                        Engine.dumpAsJSON(data, "../AnaData.js");
                    }
                    
                    if (value == 0)
                    {
                        local data = 
                        {
                        "value": 0
                        };
                        Engine.dumpAsJSON(data, "../AnaData.js");
                    }
                

                In the oninit callback I'm not really sure how to extract the info I need to get it to do what I want. Any guidance would be hugely appreciated :)

                inline function checkOnLoadANA()
                    {
                        local aData = Engine.loadFromJSON("../AnaData.js");
                
                        Console.print(aData);
                    }
                
                checkOnLoadANA();
                

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

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

                  If you're writing the same thing twice there is probably a way to write it only once.

                  Engine.dumpAsJSON({"value":value}, "../AnaData.js");

                  Try aData.value in your checkOnLoad function to get the value you saved.

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

                  DanHD 1 Reply Last reply Reply Quote 0
                  • DanHD
                    DanH @d.healey
                    last edited by

                    @d-healey Thanks, not getting much joy from:

                    if (aData.value == 1)
                    
                    do this etc
                    

                    Any idea what I'm doing wrong?

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

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

                      @DanH Snippet time

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

                      DanHD 1 Reply Last reply Reply Quote 0
                      • DanHD
                        DanH @d.healey
                        last edited by

                        @d-healey thanks!

                        HiseSnippet 1077.3ocuV0saaaCElJwpH1ctnEXO.b9JG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.g5Ovv3usPqw8oJ1enNxR+PiqMDEFkKbS7Ix0muqdHSl.n3bsAopgk7XlbQ4j+8XnuUkC8sqp13NB2mXNlIc7pFu6TAdgZj+qwa1SnZZNX5Tpir.r0LO8m112KcOfxOHRjL9ryHxHlplcTRvDnbvgBHgCkawpBncTknZZKEsJyLgxcSI9.rxDZqnMxDZmKDEPbhDuwQeqU8Hs8R4.Xhm99z5vCkAZ7pKqllVcrPAvaGeiiiJU74.1q1lmtE17kagMOaKr44agMuXKr4kagMe0sZi5Y68Rjh.80Dfw3AoMMMLFvIPUVZEI5e.A9GF4
                        

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

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

                          First thing I saw. Your button is set to saveInPreset, this will trigger on init and overwrite any previous value in your file. Other than that your code would work fine if you made sure you had the right amount of curly braces - proper indentation would help.

                          Here's how I'd do it.

                          HiseSnippet 957.3ocsV0kaaaDDdWYyTS1pfDfd.HzSx.trToIoEMnnRVVNPswxBUoF8Mi0KWIt0K2kfboSELLPNJ8HjiPNO8odCRlk+HRqp3FH.yWrme914alclY0zDEkklpRPX6WuLlgvek0rkRc3vPBWhFeDB+PqSHoZVhagpCWFSRSYAHLdmWZTfs2Ek+8u+7gDAQRY0pPnyTbJ6U7HttV6z9+JWHNlDvdMOpg2Os+XpRNTITY.e1wxGESnWRVvlPLt0xBgevn.tVkLSSzrTDd2CUAKmEpdirv+y3o7KDLiPOzL3fJTerRDXXrQKZXHWDLsJuSQvoLstJrSQU3qsNgGvWoutZ7nbCt0HZVOvstK50qI87+7oGtA81sfdO1ZFMgGqqsX31WZMVBWTyIvUPSZU3Kp0aaYMTAdH0dQjKYGm.BqPz8499G39Le+8eQaG3ZHU6dEIwcJQxD8b+I2JjKX5gpnXkDD51ovbGCl1NbofKYtyyjTMWIcUxCyzZkrmAahRzkVA7.3rEYr8a6bsi8H4B.lWPVT7fzeY1oS5dcmbyc9w7+byAtcFHIGQzDu+LEhkicQX8RgRa0YWbf.OtImKaltk7oy9doF84HGRDhKf9rtqS2MmTzPF8xSkuRQBFLYPWSJz1wVnnDga.PQnTUlPBvEnFGkmRc7791++jvb.dkYhiMnMUIXdwIbf7Ms01wE9fb0vv0YzKZbALQoYmJ6tuoN6bii65llOei1J4ifkrQylw1j6BXWYVzErjpq4JGg92aOfX8oGPZN+RKtLa3nRNVx0mFyjepwFTYG.7e+9XSY2LIUpC7Klkn4FJfOhcErhpXtx15HV5kZULrsYUaCB+E5bqOrbpqnMAwCL.J6YP+0p8Xucd+kqDd+48eCOPGVukS1OjwWDVuOzk0OkbEarbZBCZKMSrnFAeuhf2tZj2z0jG68rJ5fZD59m0HzOJcsP+tqWOz+cPetlEUsx09AX7+3aLTq8IF0evF4Wr59+rJBVHpBxDD8s2RZdZnz.zYbq0QlUNxTtdYymNtWVc94R2GaMkqogalus1.egdo6a9V9PTaqQymyn5Zxtq0w+w8+qNneSko4xEmPzIbnAyZRVzLncfx.lHg1NyzKtkYNqP12HapLyXxfbgO.ekF6YjwkF6UYDEQnIpyoE6LLO0sWtFfSx7W7sge5AH61CkuGAvY464ihfWfOmRMkhuA39lw7js.y2sEXd5Vf4YaAlmuEX99s.yObmXL+3mAYZUTwXBnX5n7kqX7HIA5xx6HQeD.CuGMg
                          

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

                          DanHD 1 Reply Last reply Reply Quote 1
                          • DanHD
                            DanH @d.healey
                            last edited by

                            @d-healey Thank you :)

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

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

                            37

                            Online

                            1.8k

                            Users

                            12.0k

                            Topics

                            104.2k

                            Posts