TriangleGen

Generates a variable triangle signal. If shape is set to 0.5, a regular triangle wave will be generated. 0 and 1 will generate regular saw waves. Any inbetween values generate asymmetric triangle waves.

Constructors

this
this(int _slmpFreq, float _frequency, float shape)
Undocumented in source.

Members

Functions

frequency
float frequency(float val)
Undocumented in source. Be warned that the author may not have intended to support it.
generate
void generate(float[] output)
Undocumented in source. Be warned that the author may not have intended to support it.
recalc
void recalc()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

position
float position;
Undocumented in source.
shape
float shape;
Undocumented in source.
slopeDown
float slopeDown;
Undocumented in source.
slopeUp
float slopeUp;
Undocumented in source.
state
float state;
Undocumented in source.
stepRate
float stepRate;
Undocumented in source.

Inherited Members

From Oscillator

_frequency
float _frequency;

The current frequency of the oscillator

_slmpFreq
int _slmpFreq;

Sampling frequency of the output

slmpFreq
int slmpFreq()

Returns the sampling frequency set in this oscillator.

slmpFreq
int slmpFreq(int val)

Sets the sampling frequency of the oscillator. In devived classes, this might also change the internal state of the oscillator.

frequency
float frequency()

Returns the current output frequency of the oscillator.

frequency
float frequency(float val)

Sets the new frequency of the oscillator. In devived classes, this might also change the internal state of the oscillator.

generate
void generate(float[] output)

Generates an output based on the oscillator's internal states.

Meta