public class SquareWave extends Oscillator
TWO_PI
Constructor and Description |
---|
SquareWave(float frequency,
float amplitude,
float sampleRate)
Constructs a square wave with the given frequency, amplitude and sample
rate.
|
Modifier and Type | Method and Description |
---|---|
protected float |
value(float step)
Returns the value of the waveform at
step . |
amplitude, frequency, generate, generate, noPortamento, pan, period, portamento, sampleRate, setAmp, setAudioListener, setFreq, setPan, setPanNoGlide
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 waveprotected float value(float step)
Oscillator
step
. 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 Oscillator
step
- an offset from the beginning of the waveform's periodstep