jass.generators
Class TwoMassModel

java.lang.Object
  extended by jass.engine.Out
      extended by jass.generators.GlottalModel
          extended by jass.generators.TwoMassModel
All Implemented Interfaces:
Source

public class TwoMassModel
extends GlottalModel

Ishizaka-Flanagan two-mass model.

Author:
Kees van den Doel (kvdoel@cs.ubc.ca)

Nested Class Summary
static interface TwoMassModel.PressureServer
           
static class TwoMassModel.Test
           
 class TwoMassModel.Vars
          Parameters of the model (which are themselves parametrized).
 
Field Summary
protected  double flowNoiseBandwidth
           
protected  double flowNoiseFrequency
           
protected  double flowNoiseLevel
           
protected  int nOverSamplings
           
protected  TwoMassModel.PressureServer pressureServer
           
protected  double ugold
           
protected  TwoMassModel.Vars vars
           
protected  double x1
           
protected  double x2
           
protected  double xold1
           
protected  double xold2
           
 
Fields inherited from class jass.generators.GlottalModel
srate, ug, ug2
 
Fields inherited from class jass.engine.Out
buf, bufferSize, bufOld, lock
 
Constructor Summary
TwoMassModel(int bufferSize, double srate)
           
 
Method Summary
 void advance(double lambda)
          Advance state by one sample
protected  void advanceMasses()
           
protected  void advanceUg(boolean addNoise)
           
protected  void computeBuffer()
          Compute the next buffer and store in member float[] buf.
protected  double computeForceOnMass1()
           
protected  double computeForceOnMass2(double f1)
           
 double getFlowNoiseBandwidth()
           
 double getFlowNoiseFrequency()
           
 double getFlowNoiseLevel()
           
 TwoMassModel.PressureServer getPressureServer()
           
 double getUg()
          Get glottal volume velocity
 TwoMassModel.Vars getVars()
           
 void reset()
           
 void setFlowNoiseBandwidth(double v)
           
 void setFlowNoiseFrequency(double v)
           
 void setFlowNoiseLevel(double v)
           
 void setPressureServer(TwoMassModel.PressureServer pressureServer)
           
 void setVars(TwoMassModel.Vars vars)
           
protected  void updateFlowFilter()
           
protected  void updateP1()
           
 
Methods inherited from class jass.engine.Out
clearBuffer, copyToOld, getBuffer, getBuffer, getBufferSize, getTime, peekAtBuffer, resetTime, setBufferSize, setTime, setTimeAndNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x1

protected double x1

x2

protected double x2

xold1

protected double xold1

xold2

protected double xold2

ugold

protected double ugold

flowNoiseLevel

protected double flowNoiseLevel

flowNoiseBandwidth

protected double flowNoiseBandwidth

flowNoiseFrequency

protected double flowNoiseFrequency

vars

protected TwoMassModel.Vars vars

pressureServer

protected TwoMassModel.PressureServer pressureServer

nOverSamplings

protected int nOverSamplings
Constructor Detail

TwoMassModel

public TwoMassModel(int bufferSize,
                    double srate)
Method Detail

setPressureServer

public void setPressureServer(TwoMassModel.PressureServer pressureServer)

getPressureServer

public TwoMassModel.PressureServer getPressureServer()

setFlowNoiseLevel

public void setFlowNoiseLevel(double v)

getFlowNoiseLevel

public double getFlowNoiseLevel()

setFlowNoiseFrequency

public void setFlowNoiseFrequency(double v)

getFlowNoiseFrequency

public double getFlowNoiseFrequency()

setFlowNoiseBandwidth

public void setFlowNoiseBandwidth(double v)

getFlowNoiseBandwidth

public double getFlowNoiseBandwidth()

updateFlowFilter

protected void updateFlowFilter()

getUg

public double getUg()
Description copied from class: GlottalModel
Get glottal volume velocity

Overrides:
getUg in class GlottalModel
Returns:
glottal volume velocity

updateP1

protected void updateP1()

getVars

public TwoMassModel.Vars getVars()

setVars

public void setVars(TwoMassModel.Vars vars)

computeForceOnMass1

protected double computeForceOnMass1()

computeForceOnMass2

protected double computeForceOnMass2(double f1)

advanceMasses

protected void advanceMasses()

advanceUg

protected void advanceUg(boolean addNoise)

advance

public void advance(double lambda)
Advance state by one sample

Specified by:
advance in class GlottalModel

computeBuffer

protected void computeBuffer()
Description copied from class: Out
Compute the next buffer and store in member float[] buf. This is the core processing method which will be implemented for each generator.

Specified by:
computeBuffer in class GlottalModel

reset

public void reset()