|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjass.generators.HalfSampleDelayKLFilter
public class HalfSampleDelayKLFilter
Half sample delay Kelly-Lochbaum filter. See Master thesis of Siddarth Mathur, Univ. of Arizona 2003 for details of the algorithm. This implementation defines a tube of a certain maximum number of segments. the actual end segment depends on the actual length and can be modified at run-time.
| Nested Class Summary | |
|---|---|
class |
HalfSampleDelayKLFilter.State
|
| Field Summary | |
|---|---|
protected float |
srate
Sampling rate in Hertz. |
protected HalfSampleDelayKLFilter.State |
state
|
| Constructor Summary | |
|---|---|
HalfSampleDelayKLFilter()
|
|
HalfSampleDelayKLFilter(float srate,
int nTubeSections)
Create and initialize. |
|
| Method Summary | |
|---|---|
protected void |
allocate()
|
protected void |
computeReflectionCoeff()
Compute reflection coefficients from areas |
void |
filter(float[] output,
float[] input,
int nsamples,
int inputOffset)
Proces input (may be same as output). |
void |
resetFilter()
Clear filter of past history |
void |
setAllCylinderRadii(double[] r)
Set all radii |
void |
setCylinderRadius(int k,
double r)
Set an individual segment radius |
void |
setDampingCoeff(double val)
Set damping coeff. |
void |
setEnd(int end)
Set actual number of segments used |
void |
setGlottalReflectionCoeff(double val)
Set the glottal reflection coeff. |
void |
setLipReflectionCoeff(double val)
Set the end (lip) reflection coeff. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float srate
protected HalfSampleDelayKLFilter.State state
| Constructor Detail |
|---|
public HalfSampleDelayKLFilter(float srate,
int nTubeSections)
srate - sampling rate in Hertz.nTubeSection - maximum number of sections (must be even)public HalfSampleDelayKLFilter()
| Method Detail |
|---|
protected void allocate()
public void resetFilter()
public void setEnd(int end)
end - number of segments (so last segment used has index end-1)protected void computeReflectionCoeff()
public void setGlottalReflectionCoeff(double val)
val - glottal reflection coefficientpublic void setLipReflectionCoeff(double val)
val - glottal reflection coefficient (positive, actual coeff is negative)public void setDampingCoeff(double val)
val - damping coefficient
public void setCylinderRadius(int k,
double r)
k - index of segment (0,...)r - radius to setpublic void setAllCylinderRadii(double[] r)
array - of r radii
public void filter(float[] output,
float[] input,
int nsamples,
int inputOffset)
filter in interface Filteroutput - user provided buffer for returned result.input - user provided input buffer.nsamples - number of samples written to output buffer.inputOffset - where to start in circular buffer input (unused)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||