Oscillator

Implements an oscillator base.

Members

Functions

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.

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.

Variables

_frequency
float _frequency;

The current frequency of the oscillator

_slmpFreq
int _slmpFreq;

Sampling frequency of the output

Meta