QM816.Operator

Implements a single operator.

Contains an oscillator, an ADSR envelop generator, and locals.

Members

Functions

resetEG
void resetEG(int sampleRate)

Resets the Envelop generator

setFrequency
void setFrequency(int slmpFreq, ubyte note, double pitchBend, double tuning)

Sets the frequency of the operator

Variables

eg
ADSREnvelopGenerator eg;

The envelop generator of the operator.

feedback
int feedback;

Feedback register. Either out_0[n-1] or out[n-1] multiplied by feedback amount. The amount which the oscillator will be offsetted. Negative if inverted.

input
int input;

Input register. The amount which the oscillator will be offsetted.

output
int output;

Output register. Not affected by either level or EG Might be used for ring modulation.

output_0
int output_0;

Output affected by EEG and level. Either used for audible output, or to modulate other operators

pos
uint pos;

The current position of the oscillator, including fractions.

preset
Preset.Op preset;

Local copy of operator preset data.

shpA0
float shpA0;

Live calculated out of shpA

shpR0
float shpR0;

Live calculated out of shpR

step
uint step;

The amount the oscillator must be stepped forward each cycle, including fractions.

Meta