|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jass.generators.KellyLochbaumFilter
public class KellyLochbaumFilter
Kelly-Lochbaum filter. Follow sample code from http://people.ee.ethz.ch/~jniederh/VocSynth/
Field Summary | |
---|---|
protected double[] |
cylRadius
Radii of the segments |
protected double |
dampingCoeff
How much damping in system (1 == no damping) |
protected double[] |
gi
State of filter. |
protected double[] |
go
State of filter. |
protected double[] |
kCoeff
Filter coefficients derived form cylinder radii |
protected double[] |
li
State of filter. |
protected double[] |
lo
State of filter. |
protected int |
nTubeSections
This many cylinder segments |
protected float |
srate
Sampling rate in Hertz. |
Constructor Summary | |
---|---|
KellyLochbaumFilter()
|
|
KellyLochbaumFilter(float srate,
int nTubeSections)
Create and initialize. |
Method Summary | |
---|---|
protected void |
computeKCoeff()
Compute low level filter values from geometry |
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 |
setGlottalReflectionCoeff(double val)
Set the glottal reflection coeff. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double dampingCoeff
protected float srate
protected double[] li
protected double[] lo
protected double[] gi
protected double[] go
protected int nTubeSections
protected double[] cylRadius
protected double[] kCoeff
Constructor Detail |
---|
public KellyLochbaumFilter(float srate, int nTubeSections)
srate
- sampling rate in Hertz.nTubeSection
- number of sectionspublic KellyLochbaumFilter()
Method Detail |
---|
protected void computeKCoeff()
public void setCylinderRadius(int k, double r)
k
- index of segment (0,...)r
- radius to setpublic void setAllCylinderRadii(double[] r)
array
- of r radiipublic void setDampingCoeff(double val)
val
- damping coefficientpublic void resetFilter()
public void setGlottalReflectionCoeff(double val)
val
- glottal reflection coefficientpublic void filter(float[] output, float[] input, int nsamples, int inputOffset)
filter
in interface Filter
output
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |