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 727 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 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

                        14

                        Online

                        1.7k

                        Users

                        11.9k

                        Topics

                        103.4k

                        Posts