Find out how many bands my EQ has
-
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 -
@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.
-
@clevername27
Unfortunately, I don't know what you mean. Do you have a small code example? -
@Oli-Ullmann This is not an exact solution but the EQ broadcaster example might help shed some light on the matter
-
@HISEnberg
Yes, I had already looked at that example. I'll take another close look at it. Thanks to you. -
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.
-
-
@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?
-
@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! :-) -
@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.
-
@d-healey
Yes, of course I meant a knob! :-)
Thank you very much.