Not sure how BiquadFilter has been out there so long with these bugs, but I think these need to be fixed (please tell me if I'm wrong - because I'd be really confused if I was).
I'd like to thank Ollie for some wonderful learning experiences, allowing others to gain insight from the Beads source code. I've been building a unit generator app for a couple years for fun in my spare time. No beads, no dependencies... Triggers and envelopes are "in-line". No clock, but I have a metronome that replaces it. It works great for my use. I hope to make it available to others. At the risk of building a competing product (I consider it an homage to Ollie's work actually), I'll go on a limb here. In my search for better filters, I could not get Beads BiquadFilter to work quite as expected. I think this may be a factor. Q and Gain are being assigned the value of the frequency ugen during setting. This may not be an issue when modulating ugens are used, but when they are all static, the q and gain seem to be incorrect, affecting the coefficient calculations:
q = freqUGen.getValue();
should be
q =
qUGen.getValue();
and
gain = freqUGen.getValue();
should be
gain =
gainUGen.getValue();
See method:
public BiquadFilter setQ(UGen nqval) {
if (nqval == null) {
setQ(q);
} else {
qUGen = nqval;
qUGen.update();
q = freqUGen.getValue();isQStatic = false;
areAllStatic = false;
}
vc.calcVals();
return this;
}
And this method:
public BiquadFilter setGain(UGen ngain) {
if (ngain == null) {
setGain(gain);
} else {
gainUGen = ngain;
gainUGen.update();
gain = freqUGen.getValue();isGainStatic = false;
areAllStatic = false;
}
vc.calcVals();
return this;
}