|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttoxi.math.waves.AbstractWave
toxi.math.waves.FMHarmonicSquareWave
public class FMHarmonicSquareWave

Frequency modulated bandwidth-limited square wave using a fourier series of harmonics. Also uses a secondary wave to modulate the frequency of the main wave.
Note: You must NEVER call the update() method on the modulating wave.
| Field Summary | |
|---|---|
AbstractWave |
fmod
|
int |
maxHarmonics
Maximum harmonics to add (make sure you stay under Nyquist freq), default = 9 |
| Fields inherited from class toxi.math.waves.AbstractWave |
|---|
amp, frequency, offset, phase, PI, TWO_PI, value |
| Constructor Summary | |
|---|---|
FMHarmonicSquareWave(float phase,
float freq,
AbstractWave fmod)
|
|
FMHarmonicSquareWave(float phase,
float freq,
float amp,
float offset)
Convenience constructor to create a non frequency modulated square wave |
|
FMHarmonicSquareWave(float phase,
float freq,
float amp,
float offset,
AbstractWave fmod)
|
|
| Method Summary | |
|---|---|
void |
pop()
|
void |
push()
|
void |
reset()
Resets this wave and its modulating wave as well. |
float |
update()
Progresses the wave and updates the result value. |
| Methods inherited from class toxi.math.waves.AbstractWave |
|---|
cyclePhase, cyclePhase, hertzToRadians, radiansToHertz, setPhase, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public AbstractWave fmod
public int maxHarmonics
| Constructor Detail |
|---|
public FMHarmonicSquareWave(float phase,
float freq,
AbstractWave fmod)
public FMHarmonicSquareWave(float phase,
float freq,
float amp,
float offset)
phase - freq - base frequency (in radians)amp - offset -
public FMHarmonicSquareWave(float phase,
float freq,
float amp,
float offset,
AbstractWave fmod)
| Method Detail |
|---|
public void pop()
pop in class AbstractWavepublic void push()
push in class AbstractWavepublic void reset()
reset in class AbstractWaveAbstractWave.reset()public float update()
update in class AbstractWaveAbstractWave.update()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||