toxi.math.waves
Class FMTriangleWave
java.lang.Object
toxi.math.waves.AbstractWave
toxi.math.waves.FMTriangleWave
public class FMTriangleWave
- extends AbstractWave
Implements a frequency modulated triangular wave with its peak at PI: "/\"
Method Summary |
void |
pop()
|
void |
push()
|
void |
reset()
Resets this wave and its modulating wave as well. |
float |
update()
Updates the wave and returns new value. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
fmod
public AbstractWave fmod
FMTriangleWave
public FMTriangleWave(float phase,
float freq)
FMTriangleWave
public FMTriangleWave(float phase,
float freq,
float amp,
float offset)
FMTriangleWave
public FMTriangleWave(float phase,
float freq,
float amp,
float offset,
AbstractWave fmod)
pop
public void pop()
- Overrides:
pop
in class AbstractWave
push
public void push()
- Overrides:
push
in class AbstractWave
reset
public void reset()
- Resets this wave and its modulating wave as well.
- Overrides:
reset
in class AbstractWave
- See Also:
AbstractWave.reset()
update
public float update()
- Description copied from class:
AbstractWave
- Updates the wave and returns new value. Implementing classes should
manually ensure the phase remains in the 0...TWO_PI interval or by
calling
AbstractWave.cyclePhase()
.
- Specified by:
update
in class AbstractWave
- Returns:
- current (newly calculated) wave value