com.jsyn.unitgen
Class Grain

java.lang.Object
  extended by com.jsyn.unitgen.Grain
All Implemented Interfaces:
GrainEnvelope

public class Grain
extends java.lang.Object
implements GrainEnvelope


Constructor Summary
Grain(GrainSource source, GrainEnvelope envelope)
           
 
Method Summary
 double getAmplitude()
           
 double getFrameRate()
           
 GrainSource getSource()
           
 boolean hasMoreValues()
          Are there any more values to be generated in the envelope?
 double next()
           
 void reset()
          Prepare to start a new envelope.
 void setAmplitude(double amplitude)
           
 void setDuration(double duration)
           
 void setFrameRate(double frameRate)
           
 void setRate(double rate)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grain

public Grain(GrainSource source,
             GrainEnvelope envelope)
Method Detail

next

public double next()
Specified by:
next in interface GrainEnvelope
Returns:
next amplitude value of envelope

hasMoreValues

public boolean hasMoreValues()
Description copied from interface: GrainEnvelope
Are there any more values to be generated in the envelope?

Specified by:
hasMoreValues in interface GrainEnvelope
Returns:
true if more

reset

public void reset()
Description copied from interface: GrainEnvelope
Prepare to start a new envelope.

Specified by:
reset in interface GrainEnvelope

setRate

public void setRate(double rate)

setDuration

public void setDuration(double duration)
Specified by:
setDuration in interface GrainEnvelope
Parameters:
duration - in seconds.

getFrameRate

public double getFrameRate()
Specified by:
getFrameRate in interface GrainEnvelope

setFrameRate

public void setFrameRate(double frameRate)
Specified by:
setFrameRate in interface GrainEnvelope

getAmplitude

public double getAmplitude()

setAmplitude

public void setAmplitude(double amplitude)

getSource

public GrainSource getSource()