OnezeroUG Class Reference

OnezeroUG is a one-zero (FIR) fiter useful for mild low and high-pass filtering. More...

#import <OnezeroUG.h>

List of all members.

Public Member Functions

(id) - setInput:
 Sets the input patchpoint to aPatchPoint.
(id) - setOutput:
 Sets the output patchpoint to aPatchPoint.
(id) - setB0:
 Sets the filter's gain.
(id) - setB1:
 Sets the filter's coefficient.
(id) - clear
 Clears the filter by setting the delayed sample (the previous input sample) to 0.0.

Static Public Member Functions

(BOOL) + shouldOptimize:
 Specifies that all arguments are to be optimized if possible except the filter state.


Detailed Description

OnezeroUG is a one-zero (FIR) fiter useful for mild low and high-pass filtering.

OnezeroUG is a one-zero filter that's implemented by adding the previous input sample (initialized as 0.0) to the current input sample:

output = (b0 * input) + (b1 * previousInput)

previousInput = input

Note that the two samples have their own scalers:

Similar to the OnezeroUG is the OnepoleUG; it, too, is either a low-pass or a high-pass filter, but the frequency roll-off is steeper than with a OnezeroUG. You should also note that the high-pass/low-pass determination with regard to the sign of the coefficent is switched in the OnepoleUG.

Memory Spaces

OnezeroUGab a output b input


Member Function Documentation

- (id) setInput: (id)  aPatchPoint  

Sets the input patchpoint to aPatchPoint.

Parameters:
aPatchPoint is an id.
Returns:
Returns an id. Returns nil if the argument isn't a patchpoint; otherwise returns self.

- (id) setOutput: (id)  aPatchPoint  

Sets the output patchpoint to aPatchPoint.

Parameters:
aPatchPoint is an id.
Returns:
Returns an id. Returns nil if the argument isn't a patchpoint; otherwise returns self.

- (id) setB0: (double)  value  

Sets the filter's gain.

Parameters:
value is a double.
Returns:
Returns self. Effective gain values are between 0.0 and 1.0 (a negative gain is the same as its absolute value, but with a 180 degree phase shift).

- (id) setB1: (double)  value  

Sets the filter's coefficient.

Parameters:
value is a double.
Returns:
Returns self. If value is less than 0.0, the OnezeroUG is a high-pass filter; if it's greater than 0.0, the object is a low-pass filter. For stability, the value should be between -1.0 and 1.0.

+ (BOOL) shouldOptimize: (unsigned)  arg  

Specifies that all arguments are to be optimized if possible except the filter state.

Parameters:
arg is an unsigned.
Returns:
Returns an BOOL.

- (id) clear  

Clears the filter by setting the delayed sample (the previous input sample) to 0.0.

Returns:
Returns self.


The documentation for this class was generated from the following file:

Generated on Sat Dec 5 17:01:16 2009 for MusicKit by  doxygen 1.5.6