HISE Logo Forum
    • Categories
    • Register
    • Login

    Slider value display - customisation

    Scheduled Pinned Locked Moved Feature Requests
    22 Posts 4 Posters 1.6k 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.
    • LindonL
      Lindon
      last edited by

      So having the ability to show the value in a slider(showValuePopUp) is great, but it would be nice (for those "custom" sliders)- to be able to set an array of values to use so in JSON like this:

      [
        {
          "type": "ScriptSlider",
          "id": "NoteName1",
          "x": 133.0,
          "y": 30.0,
          "numStrips": 120.0,
          "filmstripImage": "{PROJECT_FOLDER}StdSmallKnob.png",
          "width": 30.0,
          "height": 30.0,
          "defaultValue": 0,
          "showValuePopup": "Above",
          "middlePosition": 6,
          "mode": "Custom",
          "suffix": "  Note",
          "min": 0,
          "max": 11,
          "stepSize": 1,
          "isPluginParameter": "1",
          "pluginParameterName": "Note Name 1",
          "CustomValues": ["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"]
        }
      ]
      

      Unless of course this is already possible and I just missed it...

      HISE Development for hire.
      www.channelrobot.com

      SteveRiggsS 1 Reply Last reply Reply Quote 1
      • Dan KorneffD
        Dan Korneff
        last edited by

        Something like this?

        HiseSnippet 1152.3ocsV0faaaCElJIJq1ctXcXG.BOfAG.mX6tzsATLLm33TXzlDi4zfATTTPKQEyYIRCIpz3Uj6xNC6Brcj1MX68HkrjSb5ZMvThLz6OxuuGejONLV4wSRTwDmJmOeFm374tilK0S5MgIjjAGQbdj6IrDMOlZUc37YrjDtOwwYymiJbprEw772+zgrPlziWnhPtPI73uTDIzEZG18EhvviY97yEQk7d+tC7TxdpPUJfmMcaSlw7lxtjeJCcaCWhy188EZU7HMSyS.eNT4OezD06jV+uPjHFGxQgNjQv.YUS5MQD5OLmqIDhyVCKX9lVl+UtmH7EKzWjA9BiAZQDkyANarLj1ZIH049fzwpPeb.tG34TBdaYg2icG4EKloKrfX6gtCjvhS.CR6kgk0W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Dy2sFw78qQL+vGLF7huGjBWKxtMATLru4zWGm9RFTkYpHI+qKTSkT
        

        Dan Korneff - Producer / Mixer / Audio Nerd

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @Dan Korneff
          last edited by

          @dustbro said in Slider value display - customisation:

          • yep but (obviously) without any of the coding...

          HISE Development for hire.
          www.channelrobot.com

          1 Reply Last reply Reply Quote 1
          • SteveRiggsS
            SteveRiggs @Lindon
            last edited by SteveRiggs

            @dustbro This is really cool. I've been wondering how to do something like this for a while.

            I just made an edited version below without the timer so that the label always shows the value :) I had a digital screen graphic on my GUI before where I was attempting to do that but I scrapped it in the end as I couldn't make it work. This should fix it! Nice one

            I definitely agree with @Lindon though. It would be cool to have it built-in as a feature without any coding.

            HiseSnippet 956.3ocsV8nZaaDF+jSzVs1bYE5CvgGLb.mD60zsBkwbhrcwzlTyTWXPoTNKcN9HR2INcJqdk9trWg8FrGo8Fr88cR1Ro0IqXHmQF8ce+6288uSS0pPdVlRSbZ9pkobhyW6FrTZV3ufIjjICIN228TVlgqoEacxxTVVFOh33ryyvMbZtKwt9me9DVLSFxq1hPNWIB4uPjHLU6NcvyEwwiYQ7WIRpI8QClDpj9pXUNfmcb6QRYgWxtfeFCEqgKw4KFEILJcfgY3YDmcOQEsLXg52kExetHSLKliD8IAfgJ1drJNBQLtKwegHNZ5pycFArxzpnvNEQgG5dpHRrd+pnw2XYPqznd7vowsAu90gWuOe34TCd6V.uG3FDpEolJNH19J2IRHQMmAof5vpPVRi+pgquBjPZNHgcIerFHVqQmG2qWW5Q85s2Sa40xCRDYF5ULM84R0r9zehtR0K3FeURpRBDcZa41F0oRiWvlwiuYUJX29i8yYJC+XslsDT70s8a2ss+2B+MDevWFAOiwGj3Y3C9xw3C9xIsei0f3uCOb+xEk5mmYTIzopz7TJc+0qBIExXgjSmmKCMBkjpj1CDBbsJtS3JT2EfXbNeuVduukGEVGdnXNMKVDAMFhLZh5JdTWZFjqow34ixjQzLCSanFnHW2xqYw49.TlU12nAa9zZ73P7wvemoc2p3wqsPBChmiXnyduwpRKuOXOv2ZdAsXoy7Ywwyf9oNW+Lh1p1wG85Kkc1y68dM89fG8iYMe9F4UZrXtdirw9b8soXGYdxLtdUXdkfPA+06nbu4Np5M7gEwjZBpjSjByKS4xapOiTFHwNtRTAhZr8a2ureKvlvIBns5KcsQQhEv0m3Q90ICYF1Jy.VD7RJWaD3AvYH+JXhXQabS2g7rKMpTX315bGLj6+0ouqxggCVVQDL.lTmFH9Cd8wxIrZx+cCHepqZU5JaYn0S2ysnjrlq9ynZt5umM.qSwfoOgC4HlMM3rC4SmVAyLUQ4wLy0Gjh2dTx.pEt1DKbpjLSXVV+XbmLc8yEtOvcpvDtXy3swFvKj+uqwa4cUsbGMeNOzTA1ccG+a28WLQ9EUtQHu3TlQKfxD2yxSBfqtC4.RjRdL1u5z.6rJn6gz1xTtLxR7uvpjYej1ojY+ULIIrPs5sgE8i3sg2ytCfIo8iBZBecBPSW2H5516fdjD3R52FFhgh8AruYc99sPmGsE5bzVnyi2Bc9gsPmebKz4I2pN32GcbNbmaQaBrwzQ1AhNNij3TBaEI4+.78bNKB
            

            www.anarchyaudioworx.com

            www.facebook.com/groups/audioworx/

            1 Reply Last reply Reply Quote 0
            • SteveRiggsS
              SteveRiggs
              last edited by

              Can anybody see where the mistake is in my edit of the code for this? It compiles but the value isnt showing up in the label for some reason. It looks right but I must have missed something 🤔

              // Speed Knob Value Readout Label
              const var SpeedKnob = Content.getComponent("SpeedKnob");
              const var SpeedKnobLabel = Content.getComponent("SpeedKnobLabel");
              
              const var NoteArray = ["1/1","1/2D","1/2","1/2T","1/4D","1/4","1/4T","1/8D","1/8","1/8T","1/16D","1/16","1/16T","1/32D","1/32","1/32T","1/64D","1/64","1/64T"];
              
              //--------  Custom Popup  ----------
              
              inline function onSpeedKnobControl(component, value)
              {
                  //if slider is moved, show label
                  SpeedKnobLabel.showControl(true);
                  SpeedKnobLabel.set("text", NoteArray[SpeedKnob.getValue()]);
                  
              };
              
              Content.getComponent("SpeedKnob").setControlCallback(onSpeedKnobControl);
              

              www.anarchyaudioworx.com

              www.facebook.com/groups/audioworx/

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

                @SteveRiggs said in Slider value display - customisation:

                SpeedKnobLabel.set("text", NoteArray[SpeedKnob.getValue()]);

                Not the fix but just something I noticed. You don't need to put SpeedKnob.getValue() you can just put value.

                What is the value range of the knob?

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

                SteveRiggsS 2 Replies Last reply Reply Quote 0
                • SteveRiggsS
                  SteveRiggs @d.healey
                  last edited by

                  @d-healey Cheers dude. Just changed that bit. Still not showing up though yet 🤔

                  The range is 32 as it's set to the tempo-synced speeds of an LFO modulator

                  www.anarchyaudioworx.com

                  www.facebook.com/groups/audioworx/

                  1 Reply Last reply Reply Quote 0
                  • SteveRiggsS
                    SteveRiggs @d.healey
                    last edited by SteveRiggs

                    @d-healey Snippet here if it's easier to see

                    HiseSnippet 
                    

                    www.anarchyaudioworx.com

                    www.facebook.com/groups/audioworx/

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

                      @SteveRiggs

                      I looked at your snippet and I found the problem.

                      Here's a simple test you should use all the time for everything, Console.print();

                      Put this in your callback (obviously with something in the parenthesis) and when you move the knob you will see that nothing appears in the console. This is the first thing I did. This tells me that your callback isn't being called. The usual reason for this is that you have the knob linked to something via processor/parameter ID in the interface designer. So I checked it out and that is the case.

                      The processor ID system overrides control callbacks, so you can only have one or the other.

                      You also made a little typo value() instead of value.

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

                      SteveRiggsS 1 Reply Last reply Reply Quote 1
                      • SteveRiggsS
                        SteveRiggs @d.healey
                        last edited by SteveRiggs

                        @d-healey Ahhh thanks! Typo removed.

                        I don't think I've ever used a hardcoded way to link UI sliders to module controls yet. I usually just use the processor id. Where would I need to start for doing it this way around? I'm imagining something like this? (but probably wrong, like usual) 🤣

                        inline function onSpeedKnobControl(component, value)
                        {
                            local SpeedKnobValue = SpeedKnob.getValue();
                        
                            
                            if (SpeedKnobValue >= 0)
                            {
                                local index = 0 * LFOModulator1.Frequency;
                                LFOModulator1.setAttribute(index, SpeedKnob.getValue());
                            }
                            
                            if (SpeedKnobValue <= 0)
                            {
                                local index = 1 * LFOModulator1.Frequency;
                                LFOModulator1.setAttribute(index, SpeedKnob.getValue());
                            }
                        };
                        

                        www.anarchyaudioworx.com

                        www.facebook.com/groups/audioworx/

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

                          Here's a simple example

                          HiseSnippet 1077.3oc0WstaaaCElzNraVaNX8xCffAFfCVlgcaVWGFFlabhGLZtXLk1Mf8iBZoiiIrDolDUV7J5yvdU2av1g5taLxRMZ+wzODLOW34imKeTdZjxEhiUQDZqKVEBD5mybVI0KFsfKjjIGQn6xNkGqgH6LQGtJjGGCdDJs4OYDPasCI84u+wC49boKTIhPdkR3BmHBD5JoSG9Bgu+XtGbgHnl0GLbhqRNR4qRP7zj0mDxcWxuDNiaLqAiPu2wdBsJxQy0PLgtygJuUNKT+gLy9WIhEy7AyhADGbixDOV46YPr42jQKD9dSKN2wDbWlVkEZlkEdD6TgmnTdU13KRUXW4Q87AswsAuAaI7n0f2NYv69LG2HQntRiAaOLWZE5FrF7xzRZ7kMXXdNVaeEOxdoblSH.d1+f8HkTCRcOtm2KjpYc6Tnqy91C5uuc+8991VEx5EC5tczv0ZTamLyto9.kGXzeADDpvFK2TaZaUE+SFe9oJuDeNl2FffHs6q2kftTZ2NnM1UFkuEssDRegDrmmHc0BkzVIKBt4jDo765pvvJwyz9Xr7Sf8Za8l1VsVKlFf9bsNRLKQCcWW03H32S.o6pB+wH+1znWjqPfNpHH0RX6Y10bTLh66OCaj6dC7Y1tZn+LkFNW1cOq2X0x5sV1uqp4y2nt7MyGh1nZyLVzs4XWYRvLHp3HVXH1rsd2r0cqa1MKyTyPkbhTnOODJWmcRKjzmTd.qKp5bUWZ5wYClUI5liPj7pkYXJ2bzTc5nzt4CMN9BOHhHvIEKVQchjlRpymQd4ji3ZdwNgaJFnPHRKLoH5QvUHeW1PZK1QP7RsJL017dDjf8tD2qITF0BC2JyOLwMVuxjquGyLZRBDdd9vTUrvTKq.XmgHUcni3Og57xA7qqV93gyE9AwXCe3j.jbkPe.6kwfsGLmm3qsiWhTc3f0Rv6BUJqqYHmP+DVFzLizD5mwJGoQB8aPPgzjESQ04NMWXjqv.65jSSLIS73rpNv+3SntaFdYLbvOGjqy17eCxRRh58Ila2lTUXF9WC+E9UvbUTPdyQo6m.WhAptjpLaMgNAJkdgPd452Y9ngmnTgGK4XZvqt8SWviMSTHOTcbMJIVqBJvRZ40A6XR6oo+F6oGzCel+Ul2e2H70SN+CyZx6VJad2Jkan703N1t8vzJYYIyTS+f1w0eicbC1D+y6EhK6m9e.huOapP6tXyyzM1.dIjO53M+S3ZyNd9bvUWA1cXi+0s860dOfxOqRz3b5objh0vieVRfC9Est.hDoD7iMT5MLyhYq6WPw6.RuzE+C9jqbfYMMW4fBkj.taj50tY2kYFJ9zTIHljoeqbK7i1w01CJtAiw52qu4ZCwqccMohuFw9l84wagOOYK74fsvmuYK74oagOe6V3yytUeL+sgmmfbuYiInfoGmw5RKYuoMI+K.ZIaZp
                          

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

                          SteveRiggsS 1 Reply Last reply Reply Quote 0
                          • SteveRiggsS
                            SteveRiggs @d.healey
                            last edited by SteveRiggs

                            @d-healey Thanks man. I've just edited the slider names and added it into my project but I'm getting a couple of bad errors now. My interface preview has disappeared and there are some duplicate declarations. I tried removing one but it still won't compile.

                            HiseSnippet 
                            

                            www.anarchyaudioworx.com

                            www.facebook.com/groups/audioworx/

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

                              The error is pretty clear

                              Line 74, column 11: Duplicate const var declaration.

                              Go to line 74 and remove it because you've already got it somewhere else.

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

                              SteveRiggsS 1 Reply Last reply Reply Quote 0
                              • SteveRiggsS
                                SteveRiggs @d.healey
                                last edited by

                                @d-healey Doh. Last time I did that just it threw me another error. Compiled this time :)

                                Still no value in the label though. Pain in the ass this one is lol

                                www.anarchyaudioworx.com

                                www.facebook.com/groups/audioworx/

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

                                  @SteveRiggs Console.print()

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

                                  SteveRiggsS 1 Reply Last reply Reply Quote 0
                                  • SteveRiggsS
                                    SteveRiggs @d.healey
                                    last edited by

                                    @d-healey I'm not sure I'm putting the Console.print in the right place. Still just getting errors. Tried it here and in the onControl callback

                                    //Link SpeedKnob to LFOModulator1
                                    const var SpeedKnob = Content.addKnob("SpeedKnob", 248, 15);
                                    SpeedKnob.set("text", "Speed");
                                    SpeedKnob.set("mode", "TempoSync");
                                    
                                    const var LFOModulator1 = Synth.getModulator("LFOModulator1");
                                    
                                    
                                    inline function onSpeedKnobControl(component, value)
                                    {
                                        Console.print(work you bugger);
                                        LFOModulator1.setAttribute(LFOModulator1.Frequency, value);
                                    };
                                    
                                    Content.getComponent("SpeedKnob").setControlCallback(onSpeedKnobControl);
                                    
                                    
                                    

                                    The error:

                                    Interface:! Line 83, column 24: Found identifier when expecting ',' {SW50ZXJmYWNlfHwyMjc5fDgzfDI0}
                                    

                                    www.anarchyaudioworx.com

                                    www.facebook.com/groups/audioworx/

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

                                      @SteveRiggs strings need to be in quotes

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

                                      SteveRiggsS 1 Reply Last reply Reply Quote 0
                                      • SteveRiggsS
                                        SteveRiggs @d.healey
                                        last edited by

                                        @d-healey I see! Thanks. Well, it's printing to the console now when I turn the slider. I still don't understand why it's not showing the value if that's working now. Head boggler this one 🤔 Sorry about this

                                        Screen Shot 2019-11-07 at 15.04.45.png

                                        www.anarchyaudioworx.com

                                        www.facebook.com/groups/audioworx/

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

                                          @SteveRiggs

                                          inline function onSpeedKnobControl(component, value)
                                          {
                                              Console.print(work you bugger);
                                              LFOModulator1.setAttribute(LFOModulator1.Frequency, value);
                                          };
                                          

                                          You're not setting the value of the label in the callback function.

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

                                          SteveRiggsS 1 Reply Last reply Reply Quote 0
                                          • SteveRiggsS
                                            SteveRiggs @d.healey
                                            last edited by

                                            @d-healey Oh shit. Sorry. What should I put in there? Confused a bit as I already have this above...

                                            inline function onSpeedKnobControl(component, value)
                                            {
                                                //if slider is moved, show label
                                                SpeedKnobLabel.showControl(true);
                                                SpeedKnobLabel.set("text", NoteArray[value]);
                                            

                                            www.anarchyaudioworx.com

                                            www.facebook.com/groups/audioworx/

                                            d.healeyD 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            66

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.8k

                                            Posts