HISE Logo Forum
    • Categories
    • Register
    • Login

    Volume+Freq as One

    Scheduled Pinned Locked Moved General Questions
    48 Posts 5 Posters 1.7k 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 @d.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

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

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

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

        JayJ 1 Reply Last reply Reply Quote 0
        • JayJ
          Jay @d.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
          • d.healeyD
            d.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?

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

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

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

              Joansi Villalona

              d.healeyD LindonL 2 Replies Last reply Reply Quote 0
              • d.healeyD
                d.healey @Jay
                last edited by d.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?

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public 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 @d.healey
                    last edited by

                    @d-healey eqfreq1?

                    Joansi Villalona

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

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public 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 @d.healey
                            last edited by

                            @d-healey is not working

                            Joansi Villalona

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

                              @Jay said in Volume+Freq as One:

                              @d-healey is not working

                              What's not working?

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

                              JayJ 2 Replies Last reply Reply Quote 0
                              • JayJ
                                Jay @d.healey
                                last edited by

                                @d-healey its saying unknown function 'getValue'

                                Joansi Villalona

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

                                  @d-healey

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

                                  Joansi Villalona

                                  1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @Jay
                                    last edited by d.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.

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

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

                                      @d-healey

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

                                      Joansi Villalona

                                      d.healeyD JayJ 2 Replies Last reply Reply Quote 0
                                      • d.healeyD
                                        d.healey @Jay
                                        last edited by

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

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

                                        JayJ 1 Reply Last reply Reply Quote 0
                                        • JayJ
                                          Jay @d.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

                                            d.healeyD ustkU 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            30

                                            Online

                                            1.8k

                                            Users

                                            12.0k

                                            Topics

                                            104.4k

                                            Posts