[Stk] signal processing super class?

Gary Scavone gary@ccrma.Stanford.EDU
Fri, 28 Feb 2003 12:19:02 -0800 (PST)


On Fri, 28 Feb 2003, Perry R Cook wrote:

>>Why not make them subclasses of Filter?  A filter is anything
>>that takes an input and yields an output and hopefully does
>>something interesting in the process.  

The problem with that is that the Filter interface doesn't directly
"map" to effects-based processors.  So, if you're going to go that
route, you'd have to make them protected subclasses.  Personally, I
think it's easier to create a new superclass called "Effects" with a
common "setEffectsMix" function.

--gary

>>On Fri, 21 Feb 2003, greg kellum wrote:
>>
>>> hello all
>>> 
>>> i've been developing an application with the stk that among other things 
>>> allows users to chain effects together to process the output of the 
>>> instruments, and it has occurred to me that it would be really nice if there 
>>> was a super class for all the effects and sound processing classes. if there 
>>> was a super class with a virtual tick(MY_FLOAT) method, then you iterate 
>>> through a vector of effects calling tick on each effect without having to 
>>> know what effect is actually being used. at the moment you first have to 
>>> figure out what kind of object it is you're working with and using an ugly 
>>> block of if / else statements cast down to it. the only problem that a super 
>>> class presents is finding a suitable name for it...
>>> 
>>> greg kellum