HISE Logo Forum
    • Categories
    • Register
    • Login

    How to make a button to lock a value even as a new preset is loaded?

    Scheduled Pinned Locked Moved Scripting
    21 Posts 2 Posters 1.2k 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 how to make a lock button to lock in whatever the current value is for the wet amount and it to stay and override that value as a new preset is loaded.

      how can i do so? thanks!

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

        Do I have this right?

        You have a button on your UI and when that button is active you want the user to be able to change preset without affecting the value of a particular knob. And if the button isn't active, changing the preset will change the knob's value.

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

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

          @d-healey yes exactly

          its for basically having a wet level keeping the same value if desired...say for instance you know you like the wet blend but want to hear it with different reverbs and your wet level not needing to be readjusted evrytime you load a preset

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

            @d-healey basically putting a lock button next to the wet level knob and if the lock is engaged the wet level doesnt change when a new preset is loaded

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

              You could use a hidden knob that holds the value that is saved in the preset, and in that knob's callback you check the state of the lock button. If you are going to have more than one knob that will be affected by the lock button it would be better to use a sliderpack for this hidden control, rather than have two copies of every knob.

              HiseSnippet 1384.3ocuW8zaaTDEeVmrQ0tPKUBw4kHgjiTH0toTPTghiiiAKRRshKIUpBUFu6ywCY2Yrlc1j3VEIDeB3ZuwWANxM9nfDm3F23X4M6Lq20oNgTqB6gDOueu++dyaeaWovGhiERhS4GOdDPbdG2di4pgaMjx3jNsHN2xcWZrBjdFRMGOhFGCADGmE9RMAmxKRRe9qMZRCobeHmDgbff4C6vhXpbpca70rvv1z.3wrnBbe+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+BOq9FRGI+so1XGVrZSIPmjarVX0Y8uIRY7r8Em1kFDfMdWW45ATo+vlTYSQBOPGoO0.jk0LYoBnUNmbpNALoM929wFCA1QCy2s66NqA4ZM83BSttjYHjVusmgbR1ba7d8quuEtomHHIjpld8O8dtV.s5JtykduJrMRMt3dvuA6DV6J2I755h2wsKS4Ob19XoY3i3aD9uvGsaR+ttlsFycvEca+j4cs4ZW+0lseCC1uUXOMaQb5EXmxY1WHh5gsS17yO+xW9mazhFMBuMYI0X80+iMxV2qXotkb7EnQHGV3RRptZKA34vtocuYT+0MbV3szWNP1WjnekytTbMU7FfKN+pG9FAe.K.bNDhJ20ojd6By4Z5yZOsGvCRO7J7wBVWe1wBVOC7+EaDQ8khm4a16QWauQJELt4oeAXY7SQwyd0y1zw0s1Z0z21YOy2W2k8w3RUyVl6MGxr9bHy8mCY9j4PlGLGx7oygLe1UJi9Ci2LQIhLScPBc2Nc2CGms4Tr6M89E4e.MJilvB
              

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

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

                @d-healey its just one parameter. ill pull up the snippet and figure out how to implement it. thanks for everything youre the man!

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

                  @d-healey this isnt working for me

                  im not using a simple reverb module im using a routing matrix split to simple gain for a send effect to an IR module

                  simple gain module controlling send level is called Wet

                  i altered all the code and added the elements and copied all the settings but it isnt sending the value to the hidden knob or recalling it when a new preset is loaded. it works in the snippet but not in my setup :/

                  heres my modified code

                  const var Wet = Synth.getEffect("Wet");
                  
                  // btnLock
                  const btnLock = Content.getComponent("btnLock");
                  
                  // knbWet
                  const knbWet = Content.getComponent("knbWet");
                  knbWet.setControlCallback(onknbWetControl);
                  
                  inline function onknbWetControl(component, value)
                  {
                  	Wet.setAttribute(Wet.GainLevel, value);
                  	knbWetHidden.setValue(value);
                  }
                  
                  // knbWetHidden
                  const knbWetHidden = Content.getComponent("knbWetHidden");
                  knbWetHidden.setControlCallback(onknbWetHiddenControl);
                  
                  inline function onknbWetHiddenControl(component, value)
                  {
                  	if (!btnLock.getValue())
                  	{
                  		knbWet.setValue(value);
                  		knbWet.changed();
                  	}
                  }
                  
                  
                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @mwplugs
                    last edited by d.healey

                    @mwplugs

                    im not using a simple reverb module im using a routing matrix split to simple gain for a send effect to an IR module

                    Why don't you use a send container + send effect?

                    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 i never heard of that. ive been doing it the old way of splitting the signal then routing it so a simple gain and then to a effect and then bring the audio back

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

                        @mwplugs

                        i never heard of that.

                        It was added a few months ago I think. Much easier than doing it the old way :)

                        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 ok i see it. but how do you actually use it lol. is there a thread anywhere?

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

                            @mwplugs https://forum.hise.audio/topic/1223/send-bus-routing-please-help/11

                            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 alright i restructured everything and adjusted the code and all elements have the same identifiers as the code. but it is still recalling send level when preset is changed and lock is engaged.

                              const var SendEffect = Synth.getEffect("SendEffect");
                              
                              // btnLock
                              const btnLock = Content.getComponent("btnLock");
                              
                              // knbWet
                              const knbWet = Content.getComponent("knbWet");
                              knbWet.setControlCallback(onknbWetControl);
                              
                              inline function onknbWetControl(component, value)
                              {
                              	SendEffect.setAttribute(SendEffect.Gain, value);
                              	knbWetHidden.setValue(value);
                              }
                              
                              // knbWetHidden
                              const knbWetHidden = Content.getComponent("knbWetHidden");
                              knbWetHidden.setControlCallback(onknbWetHiddenControl);
                              
                              inline function onknbWetHiddenControl(component, value)
                              {
                              	if (!btnLock.getValue())
                              	{
                              		knbWet.setValue(value);
                              		knbWet.changed();
                              	}
                              }
                              

                              and i doing something wrong here? are there special settings adjustments that need to be made to each element in order for this tom function?

                              as of now the lock is doing nothing and the "hidden knobs values arent being affected or drawing from the main send knob at all it stays the same regardless

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

                                @mwplugs Post a snippet.

                                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

                                  This post is deleted!
                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    mwplugs @mwplugs
                                    last edited by

                                    @mwplugs a bit unrelated but can you embed all of the audio file within the plugin so it doesnt have to be in applications folder with convolution. i know before for whatever reason it didnt work

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

                                      @mwplugs Yes if it's less than 50MB.

                                      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 i just tested just the function of it and put a sine and it made a terrible infinite feedback loop? what the...it workd perfect the old way lol

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

                                          @mwplugs nvrmnd it was something dumb smh lol

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

                                            @mwplugs still didnt figure out the lock button but got everything else situated

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

                                            47

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.9k

                                            Posts