jass.generators
Class GlottalWave

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

public class GlottalWave
extends Out

Output glottal wave. See Rubin et al JASA vol 70 no 2 1981 p323

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

Field Summary
protected  float freq
          Freq.
protected  boolean odd
           
protected  float openQuotient
           
protected  float phase
          Current phase
protected  float speedQuotient
           
 float srate
          Sampling rate in Hertz of Out.
protected  float volume
          Amplitude or volume
 
Fields inherited from class jass.engine.Out
buf, bufferSize, bufOld, lock
 
Constructor Summary
GlottalWave(float srate, int bufferSize)
           
 
Method Summary
protected  void computeBuffer()
          Compute the next buffer and store in member float[] buf.
 float getFrequency()
           
 float getOpenQuotient()
           
 float getSpeedQuotient()
           
 float getVolume()
           
 void setFrequency(float f)
          Set frequency
 void setOpenQuotient(float oq)
          Set Open Quotient
 void setSpeedQuotient(float sq)
          Set Speed Quotient
 void setVolume(float val)
          Set amplitude
 
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

srate

public float srate
Sampling rate in Hertz of Out.


volume

protected float volume
Amplitude or volume


phase

protected float phase
Current phase


odd

protected boolean odd

freq

protected float freq
Freq. in Hertz


openQuotient

protected float openQuotient

speedQuotient

protected float speedQuotient
Constructor Detail

GlottalWave

public GlottalWave(float srate,
                   int bufferSize)
Method Detail

setVolume

public void setVolume(float val)
Set amplitude

Parameters:
val - Volume.

getVolume

public float getVolume()

setFrequency

public void setFrequency(float f)
Set frequency

Parameters:
f - frequency.

getFrequency

public float getFrequency()

setSpeedQuotient

public void setSpeedQuotient(float sq)
Set Speed Quotient

Parameters:
sq - Speed Quotient

getSpeedQuotient

public float getSpeedQuotient()

setOpenQuotient

public void setOpenQuotient(float oq)
Set Open Quotient

Parameters:
oq - Open Quotient

getOpenQuotient

public float getOpenQuotient()

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 Out