A class for graphing poles and zeros on the Z-plane. Filters of arbitrary order can be designed by specifying the location of the desired poles and zeros on the Z-plane and feeding these polar coordinates to FilterCoef. ZPlane can also calculate the frequency and phase response of the desired filter. A number of convenience methods are also implemented for easier use, like automatic detection of identical pole/zero pairs and autmatic conjugate adding when specifying a pole/zero (thus resulting in real-valued filter coefficients).
Create a new instance of ZPlane.
| poles | |
| zeros | |
| function |
A Function evaluated each time the mouse is moved in the gui. Can be used to update specific settings when a pole or zero is dragged to another location on the Z-plane. |
| real |
A Boolean indicating whether the filter should be real or complex. When set to |
A new instance of ZPlane.
DISCUSSION:

Add a pole to the Z-plane. Index must be a valid Integer index into the poles array. Alternatively, index can be specified as nil, which means the pole will be added to the tail of the poles array. Poles can also be added by calling -gui on an instance of ZPlane, clicking somewhere inside the graphical representation of the Z-plane and pressing 'ctr-p'.
| index |
An instance of Integer or |
| loc |
An instance of Polar. |
Add a zero to the Z-plane. Index must be a valid Integer index into the zeros array. Alternatively, index can be specified as nil, which means the zero will be added to the tail of the zeros array. Zeros can also be added by calling -gui on an instance of ZPlane, clicking somewhere inside the graphical representation of the Z-plane and pressing 'ctr-z'.
| index |
An instance of Integer or |
| loc |
An instance of Polar. |
Removes the pole specified by index. If there is a conjugate, this is removed too.
| index |
An instance of Integer. |
The (possibly modified) index in response to a method call.
Removes the zero specified by index. If there is a conjugate, this is removed too.
| index |
An instance of Integer. |
The (possibly modified) index in response to a method call.
Change the location of a particular pole specified by index. If there is a conjugate this will be moved too.
| index |
An instance of Integer or |
| newLoc |
An instance of Polar. |
Change the location of a particular pole specified by index. If there is a conjugate this will be moved too.
| index |
An instance of Integer or |
| newLoc |
An instance of Polar. |
Change the location of a particular zero specified by index. If there is a conjugate this will be moved too.
| index |
An instance of Integer or |
| newLoc |
An instance of Polar. |
Removes all poles associated with this instance of ZPlane.
Removes all zeros associated with this instance of ZPlane.
Calculate the amplitude response of the filter.
| res |
An Integer denoting the resolution of the amplitude response. |
| norm |
A Boolean indicating whether the peak value of the amplitude response should be normalized to unity. |
An Array holding the amplitude response of size res.
Calculate the amplitude response of the filter.
| res |
An Integer denoting the resolution of the phase response. |
| unwrap |
A Boolean indicating whether the phase response should be unwrapped. |
| derivative |
A Boolean indicating whether the negative derivative of the phase response (group delay) should be calculated too. |
An Array (of arrays) holding the phase response and possibly the group delay of size res.
Calculate the amplitude and phase response of the filter.
| res |
An Integer denoting the resolution of the frequency response. |
| norm |
A Boolean indicating whether the peak value of the amplitude response should be normalized to unity. |
| unwrap |
A Boolean indicating whether the phase response should be unwrapped. |
| derivative |
A Boolean indicating whether the negative derivative of the phase response (group delay) should be calculated too. |
An Array of arrays holding the amplitude and phase response and possibly the group delay, all of size res.
Make a window with a graphical interface for an instance of ZPlane.
| bounds |
A Rect indicating the bounds of the window holding the graphical interface. |
Close the gui associated with a particular instance of ZPlane.