[chuck-users] changing a value with a function
Atte André Jensen
atte.jensen at gmail.com
Sat Nov 3 15:55:34 EDT 2007
> Wait.... I just woke up which has been shown to be a bad time to post to
> the list, but isn't FilterBasic a sort of utility class that the other
> filters and (some?) delays inherit from but which shouldn't be
> instantiated on it's own?
Well, I agree it shouldn't be instantiated (which I didn't do in my
example), but isn't the whole idea of a superclass that it can be used
for things like this: Allowing interchangeable use of either subclass
(in this case BPF, LPF and friends)?
> ....then most likely decide you are very happy there are people like Ge
> and Perry who can sort such matters for you ;¬).
I think (hope:-)) you misunderstand my intentions. I just wanted to
write a function that changes BPF.freq with call by reference and that
also can be used on LPF (and friends)...
An I can assure you that I'm extremely happy for LPF, which partly was
implemented due to my whining and inability to get predictable results
from the biquads. And I've been dancing ever since! I admit that I don't
understand much about real, hard-core filter design, so something like
BPF is exactly what I need :-)
> In the meantime I looked it up; FilterBasic isn't in the Ugen list but
> "Filter" is and "Filter" is as versatile and open-ended as they come so
> there is no actual need to instantiate "FilterBasic" at all.
Fortunately I didn't instantiate it, I defined a function that takes one
parameter "f" which is of type BasicFilter so that the function can be
called with an instance any of BasicFilter's subclasses. Am I right?
peace, love & harmony
http://atte.dk | http://myspace.com/attejensen
http://anagrammer.dk | http://modlys.dk
More information about the chuck-users