|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectddf.minim.signals.Oscillator
ddf.minim.signals.SquareWave
public class SquareWave
A square wave alternates between 1 and -1 at regular intervals.
| Field Summary |
|---|
| Fields inherited from class ddf.minim.signals.Oscillator |
|---|
TWO_PI |
| Constructor Summary | |
|---|---|
SquareWave(float frequency,
float amplitude,
float sampleRate)
Constructs a square wave with the given frequency, amplitude and sample rate. |
|
| Method Summary | |
|---|---|
protected float |
value(float step)
Returns the value of the waveform at step. |
| Methods inherited from class ddf.minim.signals.Oscillator |
|---|
amplitude, frequency, generate, generate, noPortamento, pan, period, portamento, sampleRate, setAmp, setAudioListener, setFreq, setPan, setPanNoGlide |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SquareWave(float frequency,
float amplitude,
float sampleRate)
frequency - the frequency of the pulse waveamplitude - the amplitude of the pulse wavesampleRate - the sample rate of the pulse wave| Method Detail |
|---|
protected float value(float step)
Oscillatorstep. To take
advantage of all of the work that Oscillator does, you can
create your own periodic waveforms by extending Oscillator
and implementing this function. All of the oscillators included with Minim
were created in this way.
value in class Oscillatorstep - an offset from the beginning of the waveform's period
step
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||