HISE Logo Forum
    • Categories
    • Register
    • Login

    [feature request] skew factor for sliders

    Scheduled Pinned Locked Moved Feature Requests
    feature request
    7 Posts 4 Posters 706 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

      A skew factor entry box in the property editor would be handy :)

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

      Christoph HartC 1 Reply Last reply Reply Quote 1
      • Christoph HartC
        Christoph Hart @d.healey
        last edited by

        @d-healey The middlePosition property does exactly that but more intuitively.

        d.healeyD 1 Reply Last reply Reply Quote 1
        • d.healeyD
          d.healey @Christoph Hart
          last edited by d.healey

          @Christoph-Hart I feel so dumb sometimes :)

          What about with a bi-polar slider where you want the skew to go from the middle position out?

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

          Christoph HartC ustkU 2 Replies Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @d.healey
            last edited by

            @d-healey Yes, that's not possible at the moment. I know the JUCE class has a symmetric skew, but I'm afraid using this will break our current middlePoint implementation.

            You can always roll your own with some highschool school math though...

            d.healeyD 1 Reply Last reply Reply Quote 1
            • ustkU
              ustk @d.healey
              last edited by

              @d-healey @Christoph-Hart Here's what I use:

                  // Get SkewFactor from MidPosition
                  inline function getSkewFactor(start, midPosition, end)
                  {
                      return Math.log10(0.5) / Math.log10((midPosition - start) / (end - start));
                  }
                  
                  // Map from Skew
                  inline function mapFromSkew(valueNormalized, skew, start, end)
                  {
                      return Math.pow(10, (Math.log10(valueNormalized) / (1/skew)) + Math.log10(end - start)) - start;
                  }
              

              Can't help pressing F5 in the forum...

              1 Reply Last reply Reply Quote 2
              • d.healeyD
                d.healey @Christoph Hart
                last edited by

                @Christoph-Hart said in [feature request] skew factor for sliders:

                @d-healey Yes, that's not possible at the moment. I know the JUCE class has a symmetric skew, but I'm afraid using this will break our current middlePoint implementation.

                Would adding a slider.setSkew function allow us to avoid breaking the middlePoint setting?

                You can always roll your own with some highschool school math though...

                The problem with this is the display value of the slider won't match the output value.

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

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @d.healey
                  last edited by

                  @d-healey said in [feature request] skew factor for sliders:

                  The problem with this is the display value of the slider won't match the output value.

                  Its been a long outstanding request that we can add a custom value list to the slider for this...like in KnobMan (1,2,3,4,5,6,7 etc.)

                  HISE Development for hire.
                  www.channelrobot.com

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

                  15

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  103.2k

                  Posts