Forum
    • Categories
    • Register
    • Login

    Show value on knob, but not editable

    Scheduled Pinned Locked Moved Scripting
    24 Posts 3 Posters 96 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.
    • S
      svkpowa @David Healey
      last edited by

      @David-Healey Fine, but the value disappears. I want it to be there, but disable the edit option.

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @svkpowa
        last edited by

        @svkpowa For that I think you'll need to use custom look and feel which is what I used to create the knob I showed.

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        S 1 Reply Last reply Reply Quote 0
        • S
          svkpowa @David Healey
          last edited by

          @David-Healey so there is no way to scale the edit box to be only in the middle, for example?

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @svkpowa
            last edited by

            @svkpowa As far as I know we have no control over it

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            S 1 Reply Last reply Reply Quote 0
            • S
              svkpowa @David Healey
              last edited by

              @David-Healey what about the custom textbox, like for example in the corner? I mean, when I change the volume, it shows: "Volume: 70%", when I'm changing the reverb, it says "ReverbMix: 30%" etc etc. Is it possible?

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @svkpowa
                last edited by

                @svkpowa It just shows the value I think.

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

                S 1 Reply Last reply Reply Quote 0
                • S
                  svkpowa @David Healey
                  last edited by

                  @David-Healey Displaying just the value is fine compromise, is there a script for floating tile to do this?

                  David HealeyD 1 Reply Last reply Reply Quote 0
                  • David HealeyD
                    David Healey @svkpowa
                    last edited by

                    @svkpowa said in Show value on knob, but not editable:

                    Displaying just the value is fine compromise, is there a script for floating tile to do this?

                    I thought it's already displaying the value, isn't that what you showed in your image? There is no control over the text box through scripting. If you can't achieve what you need with the property editor then you need to use custom look and feel.

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      svkpowa @David Healey
                      last edited by

                      You misunderstood me. I meant something like this, for example in Spire:60b97a3b-b0e4-4e19-b1a4-a1bad344fc3a-image.png

                      David HealeyD P 2 Replies Last reply Reply Quote 0
                      • David HealeyD
                        David Healey @svkpowa
                        last edited by

                        @svkpowa For that you'd need to draw the value in a panel using a paint routine. For multiple knobs a broadcaster would be the best method for updating the panel - but it's not the easiest for beginners.

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

                        1 Reply Last reply Reply Quote 0
                        • P
                          pgroslou @svkpowa
                          last edited by

                          @svkpowa You could use a label control then set the text value of the label with the value of the knob in the knob's callback. Then you can place the label where you want in the UI.

                          Something like this...
                          Label1.set("text", knob1.getValue());
                          This code would be in the knob1 callback.

                          S 1 Reply Last reply Reply Quote 0
                          • S
                            svkpowa @pgroslou
                            last edited by svkpowa

                            @pgroslou

                            Okay, Gemini helped me, but it can't solve a problem. Only components named Volume and Balance are giving the text, the rest is not reacing:

                            // 1. Pobieramy okienko wyświetlacza
                            const var Label1 = Content.getComponent("Label1");
                            
                            // 2. Definiujemy jedną, wspólną funkcję dla wszystkich knobów
                            inline function onKnobUpdate(component, value)
                            {
                            	// Pobieramy nazwę z pola "text" komponentu i wartość z 1 miejscem po przecinku
                            	local name = component.get("text");
                            	local val = Engine.doubleToString(value, 1);
                            	
                            	Label1.set("text", name + ": " + val);
                            }
                            
                            // 3. Ręczna lista Twoich knobów (wpisz tutaj ich ID)
                            // To jest najpewniejsza metoda w HISE
                            const var knobList = [
                            	Content.getComponent("Volume"),
                            	Content.getComponent("Gain"),
                            	Content.getComponent("Balance"),
                            	Content.getComponent("ReverbMix1")
                            ];
                            
                            // 4. Przypisujemy funkcję do każdego knoba z listy powyżej
                            for(k in knobList)
                            {
                            	if(k) // Sprawdzamy czy knob w ogóle istnieje
                            	{
                            		k.setControlCallback(onKnobUpdate);
                            	}
                            }
                            
                            David HealeyD 1 Reply Last reply Reply Quote 0
                            • David HealeyD
                              David Healey @svkpowa
                              last edited by David Healey

                              @svkpowa said in Show value on knob, but not editable:

                              if(k)

                              This is not needed.

                              @svkpowa said in Show value on knob, but not editable:

                              Only components named Volume and Balance are giving the text, the rest is not reacing:

                              Components can either use a control callback or they can be connected by processor/parameter ID - the knobs that aren't responding are connected via the latter so the callback will never trigger.

                              Either you need to do it all through the callback or use broadcasters.

                              Free HISE Bootcamp Full Course for beginners.
                              YouTube Channel - Public HISE tutorials
                              My Patreon - HISE tutorials

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                svkpowa @David Healey
                                last edited by

                                @David-Healey needed some time to figure it out 😁 73109c59-30cb-4e50-a4cc-2a3f28bafc60-image.png

                                David HealeyD 1 Reply Last reply Reply Quote 0
                                • David HealeyD
                                  David Healey @svkpowa
                                  last edited by

                                  @svkpowa Noice, what was the secret?

                                  Free HISE Bootcamp Full Course for beginners.
                                  YouTube Channel - Public HISE tutorials
                                  My Patreon - HISE tutorials

                                  S 1 Reply Last reply Reply Quote 0
                                  • S
                                    svkpowa @David Healey
                                    last edited by

                                    @David-Healey i created a second "knob" with the scale of 0.001 to make it invisible and scaled the tile to fit into the real knob, then - linked to it. one knob makes as a controller, the second one as display. had to make it with every knob, but hey - it's just 10 minutes

                                    David HealeyD 1 Reply Last reply Reply Quote 0
                                    • David HealeyD
                                      David Healey @svkpowa
                                      last edited by

                                      @svkpowa

                                      alt text

                                      Free HISE Bootcamp Full Course for beginners.
                                      YouTube Channel - Public HISE tutorials
                                      My Patreon - HISE tutorials

                                      S 1 Reply Last reply Reply Quote 0
                                      • S
                                        svkpowa @David Healey
                                        last edited by

                                        @David-Healey hope it won't cause the gpu eating, there are twice as many knobs 😸

                                        David HealeyD 1 Reply Last reply Reply Quote 0
                                        • David HealeyD
                                          David Healey @svkpowa
                                          last edited by

                                          @svkpowa It's not the best way of doing it, but have fun, if you hit problems you'll learn something new.

                                          Free HISE Bootcamp Full Course for beginners.
                                          YouTube Channel - Public HISE tutorials
                                          My Patreon - HISE tutorials

                                          S 1 Reply Last reply Reply Quote 0
                                          • S
                                            svkpowa @David Healey
                                            last edited by

                                            @David-Healey today I learned how to edit knobs in knobman. knob jumping through actual values is much better looking than a normal 0-10 scale like in the original5a357cd1-2fa5-4ea1-b884-96512c3da37b-image.png

                                            I'm addicted to it right now

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

                                            32

                                            Online

                                            2.1k

                                            Users

                                            13.3k

                                            Topics

                                            115.2k

                                            Posts