#import <OnezeroUG.h>
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. | |
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.
OnezeroUGab a output b input
| - (id) setInput: | (id) | aPatchPoint |
Sets the input patchpoint to aPatchPoint.
| aPatchPoint | is an id. |
| - (id) setOutput: | (id) | aPatchPoint |
Sets the output patchpoint to aPatchPoint.
| aPatchPoint | is an id. |
| - (id) setB0: | (double) | value |
Sets the filter's gain.
| value | is a double. |
| - (id) setB1: | (double) | value |
Sets the filter's coefficient.
| value | is a double. |
| + (BOOL) shouldOptimize: | (unsigned) | arg |
Specifies that all arguments are to be optimized if possible except the filter state.
| arg | is an unsigned. |
| - (id) clear |
Clears the filter by setting the delayed sample (the previous input sample) to 0.0.
1.5.6