public class RaisedCosineEnvelope extends GrainCommon implements GrainEnvelope
output = 0.5 - (0.5 * cos(phase))
GrainFarm
Modifier and Type | Field and Description |
---|---|
protected double |
phase |
protected double |
phaseIncrement |
frameRate
Constructor and Description |
---|
RaisedCosineEnvelope() |
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreValues()
Are there any more values to be generated in the envelope?
|
double |
next() |
void |
reset()
Reset the envelope back to the beginning.
|
void |
setDuration(double duration) |
getFrameRate, setFrameRate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFrameRate, setFrameRate
public double next()
next
in interface GrainEnvelope
public boolean hasMoreValues()
GrainEnvelope
hasMoreValues
in interface GrainEnvelope
public void reset()
reset
in interface GrainEnvelope
reset
in class GrainCommon
public void setDuration(double duration)
setDuration
in interface GrainEnvelope
duration
- in seconds.