com.softsynth.jmsl.util
Class EnvelopeDataMaker
java.lang.Object
com.softsynth.jmsl.util.EnvelopeDataMaker
public class EnvelopeDataMaker
- extends java.lang.Object
Use an arbitrary interpolator to make a sequence of linear segments approximating function shape
Constructor Summary |
EnvelopeDataMaker(double totalTime,
int steps,
Interpolator interpolator)
Build envelope data approximating an interpolator's shape, last value is 0.0 |
EnvelopeDataMaker(double totalTime,
int steps,
Interpolator interpolator,
boolean zeroLast)
Build envelope data approximating an interpolator's shape, flag whether to zero out the last value
Assumes interpolator is defined over range 0..totalTime. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EnvelopeDataMaker
public EnvelopeDataMaker(double totalTime,
int steps,
Interpolator interpolator)
- Build envelope data approximating an interpolator's shape, last value is 0.0
EnvelopeDataMaker
public EnvelopeDataMaker(double totalTime,
int steps,
Interpolator interpolator,
boolean zeroLast)
- Build envelope data approximating an interpolator's shape, flag whether to zero out the last value
Assumes interpolator is defined over range 0..totalTime. This method just chops 0..totalTime into steps
and evaluates the interpolator at these intervals.
getData
public double[] getData()
- Returns:
- data ready for JSyn-style envelope
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object