HISE Logo Forum
    • Categories
    • Register
    • Login

    Button to Enable/Disable saveinPreset (Snippet)

    Scheduled Pinned Locked Moved Snippet Waiting Room
    5 Posts 2 Posters 196 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.
    • J
      johnmike
      last edited by johnmike

      Just giving back here...I was searching the forum trying to find info on how to create a button that would disable the 'saveinPreset' on another button. I needed to be able to bypass the function on a "tempo knob" that controls the internal bpm of the midi player...so that users(in the standalone application Im building) could bypass the internal bpm and just use the host bpm when scrolling through presets(in standalone) I couldn't really find anything direct...but I was able to stitch this together from reading a few other posts/snippets...it works! I thought I'd just throw it on here to help someone else that may need to do something like this in their project...Im sure there's a probably a better/cleaner way to do this...so feel free to tweak this if my logic is wrong/bad...but it otherwise works in my project

      HiseSnippet 1009.3ocsV0saaaCElxwpX1aqaEnO.D4JGrfD6s1tgFLzV6jL30lTi4rfcWAszQ1DQlzfjJYtE8krWsGi8FrcHojsTsiSlAlPPrHO+78wORcNbfRFAZsTQBZbw7Y.I3qBGNWXlzaBiKH8OlD7vvyXZCnn9o5NeFSqgXRPvN+hchfF0Itm+9EcYoLQDrbJB4RIOBdCeJ2rb1Au707zzSYwvE7ok79IurejTzSlJyP9rSXaxLVzUrwv4Lqa0BIAO3jXtQpFZXFPSBp2UFOe3D4MBu+Wx07QofcPGxPLQ9oOUlFaYrcVRuI7z3AEqaMAyxfkpvNdU3wgmwi4KleoZ7sNCzkQTVOBpUkd6TgdctM5sFJEThR08T5QgCiT7YlkVr74KC6KvMmDFJ6koh2WRsWTOrmD8PXNXJ6J3TENXQDsdV616Sw+s2QMO7PZOEf7lxnixLFofZj3eiGmBTM6ZnuXfBzfglHUTCLcl70hQMwMLsgdMS474Bm6cMB5OSKfcLX5IQuE3fV6Vwqc26HJha2EvABFpOGFy01eq.aIjJ.+VAovg77ewDnXIcCPugIL2AVTonoUP5K3FNKk+9Mn.zQLTxoV9ivv8QP01S.TYRUUoYQPGfYwqEE4b28q5pcEcIKMCZsmeQLDbr1BRTlRgqSTKP6qBRybuQAynjozHVZ5H7CIOsw3y2T8RRStHkK.ZRlHxvwkgTLrb554yRqnB4ceOt607CMo3SNXUkujaQdjhCkII2l5XS2FUHOvG4br.72HGWQTr4NS6Vqwvnrwi4hwNewEhVlBGLSwEeVpobMUHu44zcoe2BP9nSHekVyG6I+J5ItcTcATcGTaOS5BoWdDsVu1hfUR8OWZf2JZY02FHInetojj0ZKOWofZslsUZUaJvVhroi.UocWmiX4mp0zdv8qlVj+CyRNJE1Omd6LHe7lKJSx+xFe626eLyvrEEymC8aFnLbKcBNFtF6v3KQ1H7XPekQNCaVrnb.IHz3r9v7Bn9xMDNh82DVYKi7mnyA+Jh4b6KWguT9XhstJ4dk2lgEmi8o7SEo7uVIkKaURVslO1sQFmkxLUaAY66la.2CqT22VaWn4l4k6K+enuT6M1W59RwGENfahlrdNVaMbD2c++fi4cy+5vSRRfHyRBVO7z+XaaceGv+axLCVy4LlQwsa9mmMcHdglH.QWHfTs8bPM6Ib+311wVEXHHhcC9G7I2XG63fbicJLRlxhTx2kWPxdeguvMCxIg6pRMv6rgiocHtulKqySwqu7tnnpoZk.+9sMveXaC7IaafOcaC7Yaaf+31F3Oc2AZuc4qxLxo9OaHjyFbhq7WPvItKr3NsR9W.5l9c1A
      
      1 Reply Last reply Reply Quote 1
      • d.healeyD
        d.healey
        last edited by

        I don't think that will work once you compile your project. But let us know if it does.

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

        J 1 Reply Last reply Reply Quote 0
        • J
          johnmike @d.healey
          last edited by

          @d-healey I just tested...works perfectly...at least for the case im using it in...something im missing?

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

            @johnmike I remembered it came up before sometime but couldn't recall the details. I just did a search and it was this - https://forum.hise.audio/topic/8353/locking-parameters-out-of-presets/4?_=1731686701236

            nononono, saveInPreset is not a dynamic property and you'll run into undefined behaviour and glitches.

            Use the pre and post callbacks of the user preset handler to store and restore the values / settings, that's how I'm implementing the lock feature.

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

            J 1 Reply Last reply Reply Quote 0
            • J
              johnmike @d.healey
              last edited by

              @d-healey yea I think I remember seeing this but didn't read all the way through...interesting...so far in my situation it's working fine...doing a bunch of tests over the weekend.....its a tempo knob that I programmed to change the bpm of a midi player and I just would need(the end user) to bypass saveinpreset on that knob temporarily to audition loop presets outside of the bpm that's saved into the preset...but been poking around on it all day hadn't had any issues so far...

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

              43

              Online

              1.7k

              Users

              11.7k

              Topics

              101.8k

              Posts