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Ba2XgbqMt5ULtF4M6tMUSwhqYzAnXeVrliqdmsYmAcsRK0VzcaVxIZUeCeyR.f.1Mx3OMdBqcRsgiG7a+RMhketyMRdK+7FK+76pZ8n4xH2sVOdTjf0TkvwMc6kKz9teK9uxr6UStZWEn2lJZffpmrgGVWNS.5W6NKX2CILeCs87mktf2V59.2lbcX2oy2BSguXd3mY9lclhkbSadlS1Eca7148.DS+7MA2zAH95QY00GDeFamSy3A6zI3w9C50fKfSFf0BbJ.KGroQfcTCApjCreMDn5jmFTFs1kAVOG39FS1HC3O96G9LCvli0Xy+z.7jK6imdYd7Lam1nwg6HoPTJMhtvjQzEtcQzorg9ypAZt738nPmH36NWHF0BNnZHC1OkRlXbnJab.NFoTKlIz457OvUlvJ3XmLgUFI7+k4nGMLV8gvzpmX5wcMHv5VZNlcQ379vXuw0bccCVIf.UW3eHLDSVdLjvOcapNG1r1bXy5ygMaLG1r4bXySlCad50ZC9ONd0.spWZAM.n4Nl1WNNVY5j+EP0G24Y
-
@d-healey I don't know if this is the right way
-
I don't know what is your purpose but Parametric eq is not for frequency modulation. It will cause clicks in most daws because eq nodes are not smoothed.
-
@Jay said in Volume+Freq as One:
is this right?
Well the first thing I see when I open that snippet is an error, so probably not.
-
if(value = startFreq(20)) // Freq Selected
value
here is the value of knob1. Knob1 has a range of 0 - 1 so it could never be equal tostartFreq(20)
. AndstartFreq(20);
doesn't make sense anyway because()
indicates a function and you don't have a function calledstartFreq
. There is a variable that I created calledstartFreq
which is pulling a value from youreqfreq1
array, but the values in that array are not within the range of Knob1.You're also re-declaring
local index
, you can't have 2 variables with the same name in the same scope. -
@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?
-
@Jay Of course there is. Just use the value of the frequency selector knob (Knob2).
-
@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)
-
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?
-
@d-healey I think it should get the value of knob2
-
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 calledKnob2
with a capital K.Where do you think
value
is coming from in this if statement? -
@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.
-
@d-healey eqfreq1?
-
@Lindon if (value ==
-
@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. -
@Jay yep nice catch..
-
@d-healey is not working
-
-
@d-healey its saying unknown function 'getValue'