HISE Logo Forum
    • Categories
    • Register
    • Login

    Help a newbie, i need a solution that a knob (slider) shows both values/modes Frequency and TempoSync

    Scheduled Pinned Locked Moved Solved Newbie League
    19 Posts 5 Posters 825 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.
    • Xearox73X
      Xearox73 @Lindon
      last edited by

      @Lindon
      apparently didn't copy the whole snippet 😠
      it will still not be easy to integrate this into an already rather large project.
      I'm struggling with it right now 😵

      www.zentriertinsantlitz.de

      Steve LydfordS 1 Reply Last reply Reply Quote 0
      • Steve LydfordS
        Steve Lydford @Xearox73
        last edited by

        @Xearox73 You can set the mode of the slider (either Frequency or TempoSync) based on the value of the button. This may be easier to integrate into your project.

        HiseSnippet 1354.3oc0X8taiSDDecR8IRtiBENg3iVQ7gTQUUx0xAHTooMs4Hhl1n5dEP7gSasWmrp16ZVutzbnJwqA7lvaAOJ2a.LqsS751z1zPOJ3OD0c1Ym42L67us8EbGRTDWfLpbznPBx3Il1iXxgsGhoLT2cPFOxrm5O2dTHNJh3hLLJ+BEAiJKfR9dylai8wLGRNID5XN0grGMfJyo1u02R886fcIGQCz3d8Vcc3r1bedLfixlMPgXmSwCH6iUrUxD.wttTIWXKwRRDxXgs4tirGx+YVJ+GSinm3STKZhrAAkRtC22UgXEUT6gTe29is2HDxvret0WN05epYOpKcB8buv6mrgU9Iz8GFkJBuxEfWyqCdSARFZPZgTHsjosifFJy2QgmGa1kIIBOL310gRJunR+PIy1bfClb0.7ojNBXwjSTesFMVw5YMZr7WUsZUJymxHVdwLGIkyr3rSjriHAgbHRvQIEA2utCGHv.4sh0YX+XxxU+kpU74NXeKeOt0FVIgMqNfH6wci8wf6nds85bf0jkMqApqBv7pQD4VRofdRrjTWQXh1FKbfwpUnd0SVYswFVMVtZEPgUFaTfdZOFQ0qcJ6DPUcDjeJlvbFUaYkJpWKf6RpshUMsM.AeQ0JD+Hx+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+lmJl8TqsZd0GYE.SR7JGmhh5JG7Yy6AWadO35y6A+r48fOedO3mOuG7Kt8CpFzaqXnVZZ6ODpW+cSqhZLoDtQYzeC1XTfoC
        
        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @Steve Lydford
          last edited by

          @Steve-Lydford said in Help a newbie, i need a solution that a knob (slider) shows both values/modes Frequency and TempoSync:

          @Xearox73 You can set the mode of the slider (either Frequency or TempoSync) based on the value of the button. This may be easier to integrate into your project.

          HiseSnippet 1354.3oc0X8taiSDDecR8IRtiBENg3iVQ7gTQUUx0xAHTooMs4Hhl1n5dEP7gSasWmrp16ZVutzbnJwqA7lvaAOJ2a.LqsS751z1zPOJ3OD0c1Ym42L67us8EbGRTDWfLpbznPBx3Il1iXxgsGhoLT2cPFOxrm5O2dTHNJh3hLLJ+BEAiJKfR9dylai8wLGRNID5XN0grGMfJyo1u02R886fcIGQCz3d8Vcc3r1bedLfixlMPgXmSwCH6iUrUxD.wttTIWXKwRRDxXgs4tirGx+YVJ+GSinm3STKZhrAAkRtC22UgXEUT6gTe29is2HDxvret0WN05epYOpKcB8buv6mrgU9Iz8GFkJBuxEfWyqCdSARFZPZgTHsjosifFJy2QgmGa1kIIBOL310gRJunR+PIy1bfClb0.7ojNBXwjSTesFMVw5YMZr7WUsZUJymxHVdwLGIkyr3rSjriHAgbHRvQIEA2utCGHv.4sh0YX+XxxU+kpU74NXeKeOt0FVIgMqNfH6wci8wf6nds85bf0jkMqApqBv7pQD4VRofdRrjTWQXh1FKbfwpUnd0SVYswFVMVtZEPgUFaTfdZOFQ0qcJ6DPUcDjeJlvbFUaYkJpWKf6RpshUMsM.AeQ0JD+Hx+.4MAtYx6BvMNcAo6ISkRl+rM12+DHJu9T81fX0tN1mKIGvpm3wqdQUqKukm2T2KSV9DwT2VkCJtoCVmEGbBQneeqXDBLKFs+nYKZ2I0AowHm0kQkGDRxVeyoqnLOLjkTJCg.qxjbjEyxQr8otDAh5pRatzkHJwLxq57IsPWmX1NVJ4rDwrno90ykkA78xt6fkXUpaF9.LGRDRpx0XrC4LnNXZhbEycHQmJ4gIFPVHBTv8NXBmmq5cZMJewW2JRRBsouFDjoYiUahBvmqWfUE4pJZjKJI4bP4umoJEMmZ3XGdWWUMuh4uPYYATQFJhn1UWXAo8C98eS88GaFE64QOWAEqu40pKtIFq4r5nuFK8WOtUJvehYBuVILitZUSnd8XbqWDW04JaCHVuPkSU0QVDUNRuy1cnxdiarx9rBwkL6SkNCmNFKMELpRGdKfwr9guq4tddDGYN.Wvry2OuM+lc0uXp5eroMzZJoyRhx+nj0VeG9Lh0KHLhHMt75mM4Om0YSBm4YSNvQBp+HAlEExiJHXaR.8HHRORm3KiHpDkCU2l5zaywhot0a1rCXjS8L1XYrHIrXq.dLSVHLn7MMiz0VVtXFgF+SY5jEd.FX59Is5ALyuvLcUFiQaZPnOYW1YDencQBF+.n+fGN1WNlZw.6dbFObHmQczu0Oj.yQMX.Qni8oZPvDWv7F4TdZqCI9DbTgVh6AQdXQujtEyku3tOe6Tuu9XyT3ZoxFs9+aE6xucqXWvetTJHMUcsyB5uT+6a04sMMj6iEpVM4M20BOT0G6xzMEUoXOtHHaDmIRZOx.Pm5bl2aWufV.mKGRYCJV0Eg1iyC2kgAufqN49Cg.VXfWXP5BhAD6Q7dXXJHQa3QImpuY2ALtfjNDcgBvwQRdvXCH4cl1vTTIiyY7ilOe8UgOuOU86W1F9YsCteVit+RmJMiwneXRjvjqbULwcOSZgYKJ8Vlh+Ng3IAg+GAwODSEcHOVBIH8vPgd0L06GGXCCi3P.syXvKYAZFkTwyoqanVmNMByMYweAeYa1Ts1Hayli27eEcDfcD7W4j9jKUv66jPAraVx+lmJl8TqsZd0GYE.SR7JGmhh5JG7Yy6AWadO35y6A+r48fOedO3mOuG7Kt8CpFzaqXnVZZ6ODpW+cSqhZLoDtQYzeC1XTfoC
          

          you re going to have to set the max and min values, the middle position and possibly the step size as well if you do this.

          HISE Development for hire.
          www.channelrobot.com

          Xearox73X 1 Reply Last reply Reply Quote 0
          • Xearox73X
            Xearox73 @Lindon
            last edited by

            @Lindon and Steve
            Wow, thats much easier to integrate 😊
            How do i set the max and min values, the middle position and possibly the step size?
            It`s one knob/slider ?

            www.zentriertinsantlitz.de

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

              @Xearox73 You can use the .set function to set the properties of components.

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

              Xearox73X 2 Replies Last reply Reply Quote 0
              • Xearox73X
                Xearox73 @d.healey
                last edited by

                @d-healey
                thanks, solved

                www.zentriertinsantlitz.de

                1 Reply Last reply Reply Quote 0
                • Xearox73X
                  Xearox73 @d.healey
                  last edited by

                  @d-healey
                  uhhps, the defaultValue function runs only with one
                  the second will be ignored:

                  inline function onbtnTempoSyncControl(component, value)
                  {
                  local lfo = Synth.getModulator("LFO Modulator1");
                  lfo.setAttribute(lfo.TempoSync, value);

                  if(value == 0)
                  {
                  	Content.getComponent("knbLFOFrequency").set("mode", "Frequency");
                  	Content.getComponent("knbLFOFrequency").set("defaultValue", "10.0"); //OK
                  }
                  else
                  {
                  	Content.getComponent("knbLFOFrequency").set("mode", "TempoSync");
                  	Content.getComponent("knbLFOFrequency").set("defaultValue", "1.0"); //Ignored
                  }
                  

                  };

                  Content.getComponent("btnTempoSync").setControlCallback(onbtnTempoSyncControl);

                  www.zentriertinsantlitz.de

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

                    @Xearox73 said in Help a newbie, i need a solution that a knob (slider) shows both values/modes Frequency and TempoSync:

                    local lfo = Synth.getModulator("LFO Modulator1");

                    Content.getComponent("knbLFOFrequency")

                    Store your references as const in on init instead of getting them within the function.

                    If I remember correctly the defaultValue can only be changed after you change either the min or max. Here's a thread about it - https://forum.hise.audio/topic/8354/is-it-possible-to-change-default-value-after-on-init

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

                    Xearox73X 2 Replies Last reply Reply Quote 0
                    • Xearox73X
                      Xearox73 @d.healey
                      last edited by Xearox73

                      @d-healey
                      Thanks !!!
                      Another question, how can i set the start size of the "ZoomHandler.js"
                      a bit crazy ... HISE shows only in 75% the Original 2800x1500px
                      At 100% its to big ... zooomed ????

                      namespace ZoomHandler
                      {
                      const var MIN_ZOOM = 0.25;
                      const var MAX_ZOOM = 1.0; //should be 2800x1500 or not ??
                      const var ZOOM_STEP = 0.10;
                      const var INTERFACE_WIDTH = 2800;
                      const var INTERFACE_HEIGHT = 1500;

                      Correction - HISE shows never the exact ZOOM, is it not possible to set the interface at 100% Original ??

                      www.zentriertinsantlitz.de

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

                        @Xearox73

                        Option 1: Design your UI to look the way you want on a 1920x1080 screen at 100%.

                        Option 2: The size setting is stored in the project's GeneralSettings.xml file, so you would need to modify that to change the default value on a user's system. - Search the forum, this has been discussed before.

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

                        Xearox73X 1 Reply Last reply Reply Quote 0
                        • Xearox73X
                          Xearox73 @d.healey
                          last edited by Xearox73

                          @d-healey
                          Ok, i read many postings, but this has to do with the zoom level of your interface.
                          The Interface Designer himself never shows a pixel by pixel pictore/preview
                          I checked all possibility and make screenshots
                          then imported them into my graphics software and no shot has 100% 2800x1500px ??

                          A 75% in HISE has to be scaled up to 104,56% to show the exact 100% of the Original GUI px by px

                          www.zentriertinsantlitz.de

                          1 Reply Last reply Reply Quote 0
                          • Xearox73X
                            Xearox73 @d.healey
                            last edited by

                            @d-healey
                            Best Solution for all LFO controlled modulators - solved:

                            inline function onOSC12LFOPitchSyncControl(component, value)
                            {
                            local lfo = Synth.getModulator("LFO Modulator3");
                            lfo.setAttribute(lfo.TempoSync, value);

                            // if needed you can set a defaultValue for the Frequency
                            if(value == 0)
                            {
                            	Content.getComponent("pitchLFO12").set("mode", "Frequency");
                            	Content.getComponent("pitchLFO12").set("min", "0.5");
                            	Content.getComponent("pitchLFO12").set("max", "40.0");
                            }
                            else
                            {
                            	Content.getComponent("pitchLFO12").set("mode", "TempoSync");
                            	Content.getComponent("pitchLFO12").set("defaultValue", "5.0");
                            	Content.getComponent("pitchLFO12").set("min", "0.0");
                            	Content.getComponent("pitchLFO12").set("max", "18.0");
                            }
                            

                            };

                            Content.getComponent("OSC12LFOPitchSync").setControlCallback(onOSC12LFOPitchSyncControl);

                            www.zentriertinsantlitz.de

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

                              @Xearox73 said in Help a newbie, i need a solution that a knob (slider) shows both values/modes Frequency and TempoSync:

                              Content.getComponent("pitchLFO12").set("mode", "Frequency");

                              Grab your component references within on init and store them in a const instead of getting them in the callback function.

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

                              1 Reply Last reply Reply Quote 0
                              • Xearox73X Xearox73 has marked this topic as solved on
                              • First post
                                Last post

                              8

                              Online

                              1.7k

                              Users

                              11.9k

                              Topics

                              103.5k

                              Posts