HISE Logo Forum
    • Categories
    • Register
    • Login

    Find out how many bands my EQ has

    Scheduled Pinned Locked Moved Unsolved Scripting
    10 Posts 4 Posters 250 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.
    • Oli UllmannO
      Oli Ullmann
      last edited by

      Hello to all,

      I am trying to find out how many bands my EQ has. I am trying to do this via the BandOffset with “EQ.getAttribute(5)”.

      If the EQ has one band, I get the value “0.0”. If the EQ has more than one band, I get the value “-9.434481620788574”.

      What am I doing wrong? And is BandOffset even the correct parameter?

      Thank you very much
      Oli

      clevername27C 1 Reply Last reply Reply Quote 0
      • clevername27C
        clevername27 @Oli Ullmann
        last edited by clevername27

        @Oli-Ullmann BandOffset is used to compute how far in the array to go for changing the parameters for the specie band you want. Try dividing getNumAttributes by the number of EQ attributes.

        Oli UllmannO 1 Reply Last reply Reply Quote 0
        • Oli UllmannO
          Oli Ullmann @clevername27
          last edited by

          @clevername27
          Unfortunately, I don't know what you mean. Do you have a small code example?

          HISEnbergH 1 Reply Last reply Reply Quote 0
          • HISEnbergH
            HISEnberg @Oli Ullmann
            last edited by

            @Oli-Ullmann This is not an exact solution but the EQ broadcaster example might help shed some light on the matter

            Link Preview Image
            HISE | Examples | Modules Snippets

            Examples in the category Modules

            favicon

            (docs.hise.dev)

            Oli UllmannO 1 Reply Last reply Reply Quote 0
            • Oli UllmannO
              Oli Ullmann @HISEnberg
              last edited by

              @HISEnberg
              Yes, I had already looked at that example. I'll take another close look at it. Thanks to you.

              1 Reply Last reply Reply Quote 1
              • Oli UllmannO
                Oli Ullmann
                last edited by

                Does anyone else here have any ideas?

                You can track the number of EQ bands in real time with a broadcaster. However, this does not help if you reload the plug-in. Or is there a way to fire the broadcaster callback from “onInit”?

                Even if you query the value with “eq.getAttribute(5)”, you get a value back, even if the second band does not exist. It seems as if there is a predefined array with values, which is why you cannot find out the number of bands this way either.

                d.healeyD 1 Reply Last reply Reply Quote 0
                • Oli UllmannO Oli Ullmann marked this topic as a question on
                • d.healeyD
                  d.healey @Oli Ullmann
                  last edited by

                  @Oli-Ullmann said in Find out how many bands my EQ has:

                  However, this does not help if you reload the plug-in. Or is there a way to fire the broadcaster callback from “onInit”?

                  What about storing the value in a knob?

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

                  Oli UllmannO 1 Reply Last reply Reply Quote 1
                  • Oli UllmannO
                    Oli Ullmann @d.healey
                    last edited by

                    @d-healey
                    Ah, you mean in an invisible button that is then saved in the preset?
                    Brilliant idea! I'll try it out. Thanks to you! :-)

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

                      @Oli-Ullmann said in Find out how many bands my EQ has:

                      Ah, you mean in an invisible button that is then saved in the preset?

                      Yes, but a knob rather than a button so you can have the value set to match the number of bands.

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

                      Oli UllmannO 1 Reply Last reply Reply Quote 1
                      • Oli UllmannO
                        Oli Ullmann @d.healey
                        last edited by

                        @d-healey
                        Yes, of course I meant a knob! :-)
                        Thank you very much.

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

                        11

                        Online

                        1.8k

                        Users

                        12.1k

                        Topics

                        104.9k

                        Posts