|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beadsproject.beads.ugens.BiquadCustomCoeffCalculator
public class BiquadCustomCoeffCalculator
BiquadCustomCoeffCalculator provides a mechanism to define custom filter
coefficients for a BiquadFilter
based on frequency and Q. Users can
create their own coefficient calculator classes by extending this class and
passing it to a BiquadFilter instance with BiquadFilter.setType(int)
.
An instance of such a custom class should override
calcCoeffs(float, float, float)
to define the coefficient
calculation algorithm. The floats a0, a1, a2, b0, b1, and b2 should be set
according to the input parameters freq, q, and gain, as well as the useful
class variables sampFreq
and two_pi_over_sf
.
Field Summary | |
---|---|
float |
a0
|
float |
a1
|
float |
a2
|
float |
b0
|
float |
b1
|
float |
b2
|
protected float |
sampFreq
The sampling frequency. |
protected float |
two_pi_over_sf
Two * pi / sampling frequency. |
Method Summary | |
---|---|
void |
calcCoeffs(float freq,
float q,
float gain)
Override this function with code that sets a0, a1, etc. in terms of frequency, Q, and sampling frequency. |
void |
setSamplingFrequency(float sf)
Sets the sampling frequency. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float a0
public float a1
public float a2
public float b0
public float b1
public float b2
protected float sampFreq
protected float two_pi_over_sf
Method Detail |
---|
public void setSamplingFrequency(float sf)
sf
- The sampling frequency in Hertz.public void calcCoeffs(float freq, float q, float gain)
freq
- The frequency of the filter in Hertz.q
- The Q-value of the filter.gain
- The gain of the filter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |