HISE Logo Forum
    • Categories
    • Register
    • Login

    How do you create an infinitely rotatable knob?

    Scheduled Pinned Locked Moved Scripting
    9 Posts 3 Posters 2.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.
    • E
      elanhickler
      last edited by elanhickler

      I tried: https://puu.sh/vOEqU/3f79419f5a.mp4

      How should I do it?

      btw, how do you use onControl callback? Can't find any info. Edit: Err, can't find much info. There's some in the document but I think I need some more examples.

      edit: oh I see, the more correct code is this (still doesn't work of course)

      function onControl(controller, value)
      {	
      	if (controller == InfKnob)
      		InfKnob.setValue(value - Math.floor(value));	
      }
      
      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Link Preview Image
        How do you use onControl(number,value)?

        Sorry, 'number' is a bit outdated as parameter name - it is the actual interface as variable and 'value' is the current value (so you don't need Knob.getValu...

        favicon

        Forum (forum.hise.audio)

        Use a switch statement instead of if/else though

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

        1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart
          last edited by

          The JUCE slider is not really suitable for making endless encoders. You might want to customize a ScriptPanel for this behaviour (also what parameter do you want to control? Normally you don't have delta values in a plugin but a absolute range)

          1 Reply Last reply Reply Quote 0
          • E
            elanhickler
            last edited by

            360 degree rotation requires an endless encoder to allow for easy rotation of the stereo field.

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

              Edit: Oops, I (Christoph) accidently edited your post instead of replying :)

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

              1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart
                last edited by

                Yes, and setting the value in the callback would cause an endless loop (there is a safety mechanism that prevents this).

                You'll definitely need to make a custom widget for this behaviour (but this should be rather easy). If you send me the filmstrip, I'll sketch it for you.

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

                  lol Christoph such power is dangerous in your hands is extremely reassuring :)

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

                  1 Reply Last reply Reply Quote 0
                  • E
                    elanhickler
                    last edited by

                    https://puu.sh/vSclu/ff3baeb0df.png
                    headsprite!

                    1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart
                      last edited by

                      favicon

                      (hise.audio)

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

                      37

                      Online

                      1.8k

                      Users

                      12.0k

                      Topics

                      104.7k

                      Posts