Forum
    • Categories
    • Register
    • Login

    Volume+Freq as One

    Scheduled Pinned Locked Moved General Questions
    48 Posts 5 Posters 2.1k 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.
    • JayJ
      Jay @David Healey
      last edited by

      @d-healey So there is no way I can tell in the script than when when the freq is in 20hz change the type of the eq otherwise do something else?

      Joansi Villalona

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

        @Jay Of course there is. Just use the value of the frequency selector knob (Knob2).

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

        JayJ 1 Reply Last reply Reply Quote 0
        • JayJ
          Jay @David Healey
          last edited by Jay

          @d-healey the problem is that I don't know how to, I try this is and is giving me an error

          If (value = knob2.getValue())

          eq.setAttribute(index, 4)

          Joansi Villalona

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

            I think the issue is you don't have the basics down. You need to play around with HISE script some more and get a bit more experience, asking questions like in this thread is a good idea too. And it's also important to ask yourself questions, the most important one is 'why'.

            if (value = knob2.getValue())

            So I'll ask, why did you write this? What do you think it does or should do?

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

            JayJ 1 Reply Last reply Reply Quote 0
            • JayJ
              Jay @David Healey
              last edited by

              @d-healey I think it should get the value of knob2

              Joansi Villalona

              David HealeyD LindonL 2 Replies Last reply Reply Quote 0
              • David HealeyD
                David Healey @Jay
                last edited by David Healey

                You're right to expect knob2.getValue() to get the value of knob2, but your code won't work because you have a typo, the variable reference for the knob is called Knob2 with a capital K.

                Where do you think value is coming from in this if statement?

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

                JayJ 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @Jay
                  last edited by

                  @Jay
                  also what do you think this line is doing?

                  if (value = knob2.getValue())
                  

                  hint: check online java courses to see the difference between assignment and comparison.

                  HISE Development for hire.
                  www.channelrobot.com

                  JayJ 1 Reply Last reply Reply Quote 1
                  • JayJ
                    Jay @David Healey
                    last edited by

                    @d-healey eqfreq1?

                    Joansi Villalona

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • JayJ
                      Jay @Lindon
                      last edited by

                      @Lindon if (value ==

                      Joansi Villalona

                      LindonL 1 Reply Last reply Reply Quote 1
                      • David HealeyD
                        David Healey @Jay
                        last edited by David Healey

                        @Jay You're inside a control callback. All control callbacks are declared like this:

                        inline function mycallbackname(component, value)

                        Component refers to the UI widget that the callback is assigned to, in this case Knob1, value refers to the current value of that control. So inside Knob1's callback function, value will always be the current value of Knob1.

                        So we can rewrite your if statement like this (with correct operators as pointed out by Lindon).

                        if (Knob1.getValue() == Knob2.getValue())

                        And hopefully you can see now why your if doesn't do what you want.

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

                        JayJ 1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @Jay
                          last edited by

                          @Jay yep nice catch..

                          HISE Development for hire.
                          www.channelrobot.com

                          1 Reply Last reply Reply Quote 0
                          • JayJ
                            Jay @David Healey
                            last edited by

                            @d-healey is not working

                            Joansi Villalona

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

                              @Jay said in Volume+Freq as One:

                              @d-healey is not working

                              What's not working?

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

                              JayJ 2 Replies Last reply Reply Quote 0
                              • JayJ
                                Jay @David Healey
                                last edited by

                                @d-healey its saying unknown function 'getValue'

                                Joansi Villalona

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

                                  @d-healey

                                  HiseSnippet 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JAjFvlCvP2ZkqcEkqidUqcHRhpIdFb.H1mFKYJu2ZG5YvzwzV5Es2glbhTzWi2rJMHfciH9Ci2v5mTe33Ee5OpiLryctQvaXmWYXmOKpGQx4gta8HlueHssHgoR5ltKbMg9cXejZdm.zUmdAyPE9CBIxIGrp5+mwPYWyIXpoTbX+FZZ4uHSausv8A1sYRudSGuElBdU0gegwa1cWVxNcHcNXWzt4q+JeQkueTUciAwmQ28zLbPOcBbr+fnlrP3FHpdAVE.2QMbx0LpoHTMmv90UDpM4sN49qdYBqYVWpHrdFg+7e9wmpIrwXI13uzD17x13IWFGOMmv8q2r4g6xIPTJMhtvjQzEtcc1lRB82ECjL9w6QfQdv4NaHF0AtPrGExmbNMbbnJasqZsBRcn5Pms0+BOYLqpVakwr5HleU1iHhWr3cdocOUkG2USA7at957Eg+WArFOtmqssaEWDzcg8NOOUwxigproqSs4PmUmCcVaNzY84PmMlCc1bNz4IWqNp+YyKFHEQoMz.Bs2UO9xxxnRG8eP807tM
                                  

                                  Joansi Villalona

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

                                    @Jay I think you've misunderstood my last post.

                                    I was rewriting your if statement in a way that made it more clear what you had already written. It will do exactly the same as yours (which is not work), I just wrote it that way to show you what it was doing, I haven't changed the logic.

                                    Incidentally, the reason for the unknown function error you're now seeing is because there is no variable called Knob1.

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

                                    JayJ 1 Reply Last reply Reply Quote 0
                                    • JayJ
                                      Jay @David Healey
                                      last edited by

                                      @d-healey

                                      HiseSnippet 1211.3ocuWstaaaCElxIZs1aoqEX+Z+hM+Rdq0Q14VKJBpabhGL5Rh2bZPwJJJnknhIhDoiDcZcCBPeT5ixdD1ixdB11gTxVzI1IYFnUv1P7biemK7bnaGK7nIIhXjUwCG1mhr9N6NC4xdM5QXbTqcPV2ydORhjFiSIs8v9jjDpOxxZ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Z4uHSausv8A1sYRudSGuElBdU0gegwa1cWVxNcHcNXWzt4q+JeQkueTUciAwmQ28zLbPOcBbr+fnlrP3FHpdAVE.2QMbx0LpoHTMmv90UDpM4sN49qdYBqYVWpHrdFg+7e9wmpIrwXI13uzD17x13IWFGOMmv8q2r4g6xIPTJMhtvjQzEtcc1lRB82ECjL9w6QfQdv4NaHF0AtPrGExmbNMbbnJasqZsBRcn5Pms0+BOYLqpVakwr5HleU1iHhWr3cdocOUkG2USA7at957Eg+WArFOtmqssaEWDzcg8NOOUwxigproqSs4PmUmCcVaNzY84PmMlCc1bNz4IWqNp+YyKFHEQoMz.Bs2UO9xxxnRG8eP807tM
                                      

                                      Joansi Villalona

                                      David HealeyD JayJ 2 Replies Last reply Reply Quote 0
                                      • David HealeyD
                                        David Healey @Jay
                                        last edited by

                                        @Jay Isn't that the same as your last snippet?

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

                                        JayJ 1 Reply Last reply Reply Quote 0
                                        • JayJ
                                          Jay @David Healey
                                          last edited by

                                          @d-healey oh sorry

                                          Joansi Villalona

                                          1 Reply Last reply Reply Quote 0
                                          • JayJ
                                            Jay @Jay
                                            last edited by

                                            @d-healey I have try but I can't get it to work 😢

                                            Joansi Villalona

                                            David HealeyD ustkU 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            34

                                            Online

                                            2.1k

                                            Users

                                            13.0k

                                            Topics

                                            112.5k

                                            Posts