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.
    • 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
                        • d.healeyD
                          d.healey @SteveRiggs
                          last edited by

                          @SteveRiggs You can only have one callback for a control so you have to make sure all the action you need happens in one of those callbacks you've declared already and delete the other one.

                          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 Thanks mate. Just moved it down and it's working now. Saved the day yet again. Nice one. I'm gonna have to start crediting you on my plugins at this rate 🤣

                            www.anarchyaudioworx.com

                            www.facebook.com/groups/audioworx/

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

                            44

                            Online

                            1.7k

                            Users

                            11.7k

                            Topics

                            101.8k

                            Posts