Package toxi.math.waves
Class AMFMSineWave
java.lang.Object
toxi.math.waves.AbstractWave
toxi.math.waves.AMFMSineWave
Amplitude and frequency modulated sine wave. Uses 2 secondary waves to modulate the shape of the main wave.
Note: You must NEVER call the update() method on the modulating waves.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAMFMSineWave
(float phase, float freq, float offset, AbstractWave fmod, AbstractWave amod) AMFMSineWave
(float phase, float freq, AbstractWave fmod, AbstractWave amod) Creates a new instance from -
Method Summary
Methods inherited from class toxi.math.waves.AbstractWave
cyclePhase, cyclePhase, hertzToRadians, radiansToHertz, setPhase, toString
-
Field Details
-
fmod
-
amod
-
-
Constructor Details
-
AMFMSineWave
Creates a new instance from- Parameters:
phase
-freq
-fmod
-amod
-
-
AMFMSineWave
- Parameters:
phase
-freq
-offset
-fmod
-amod
-
-
-
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 waves as well.- Overrides:
reset
in classAbstractWave
- See Also:
-
update
public float update()Progresses the wave and updates the result value. You must NEVER call the update() method on the 2 modulating wave since this is handled automatically by this method.- Specified by:
update
in classAbstractWave
- Returns:
- current (newly calculated) wave value
- See Also:
-