Package toxi.math.waves
Class FMTriangleWave
java.lang.Object
toxi.math.waves.AbstractWave
toxi.math.waves.FMTriangleWave
Implements a frequency modulated triangular wave with its peak at PI: "/\"
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFMTriangleWave
(float phase, float freq) FMTriangleWave
(float phase, float freq, float amp, float offset) FMTriangleWave
(float phase, float freq, float amp, float offset, AbstractWave fmod) -
Method Summary
Methods inherited from class toxi.math.waves.AbstractWave
cyclePhase, cyclePhase, hertzToRadians, radiansToHertz, setPhase, toString
-
Field Details
-
fmod
-
-
Constructor Details
-
FMTriangleWave
public FMTriangleWave(float phase, float freq) -
FMTriangleWave
public FMTriangleWave(float phase, float freq, float amp, float offset) -
FMTriangleWave
-
-
Method Details
-
pop
public void pop()- Overrides:
pop
in classAbstractWave
-
push
public void push()- Overrides:
push
in classAbstractWave
-
reset
public void reset()Resets this wave and its modulating wave as well.- Overrides:
reset
in classAbstractWave
- See Also:
-
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 callingAbstractWave.cyclePhase()
.- Specified by:
update
in classAbstractWave
- Returns:
- current (newly calculated) wave value
-