com.jsyn.unitgen
Class Grain
java.lang.Object
com.jsyn.unitgen.Grain
- All Implemented Interfaces:
- GrainEnvelope
public class Grain
- extends java.lang.Object
- implements GrainEnvelope
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Grain
public Grain(GrainSource source,
GrainEnvelope envelope)
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()