QM816.Operator

Implements a single operator.

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

Members

Enums

OpCtrlFlags
enum OpCtrlFlags

Defines control values

TuneCtrlFlags
enum TuneCtrlFlags
Undocumented in source.

Functions

opAssign
auto opAssign(Preset.Op value)
Undocumented in source. Be warned that the author may not have intended to support it.
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

atk
ubyte atk;

Attack time control (between 0 and 127)

dec
ubyte dec;

Decay time control (between 0 and 127)

eg
ADSREnvelopGenerator eg;

The envelop generator of the operator.

fbL
float fbL;

Feedback level (between 0.0 and 1.0)

fbLCtrl
__m128 fbLCtrl;

Feedback level controller assignment Index notation: 0: velocity 1: modulation wheel 2: Amplitude LFO 3: Extra envelop generator

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.

opCtrl
uint opCtrl;

Control flags and Wavetable selector

outL
float outL;

Output level (between 0.0 and 1.0)

outLCtrl
__m128 outLCtrl;

Output level controller assignment Index notation: 0: velocity 1: modulation wheel 2: Amplitude LFO 3: unused

output
int output;

Output register. Not affected by either level or EG

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.

rel
ubyte rel;

Release time control (between 0 and 127)

shpA
float shpA;

ADSR shaping parameter (for the attack phase)

shpA0
float shpA0;

Live calculated out of shpA

shpAVel
float shpAVel;

Assigns velocity to shpA

shpR
float shpR;

ADSR shaping parameter (for the decay/release phase)

shpR0
float shpR0;

Live calculated out of shpR

shpRVel
float shpRVel;

Assigns velocity to shpR

step
uint step;

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

susCC
ubyte susCC;

Sustain curve control (between 0 and 127) 0: Percussive mode 1 - 63: Descending over time 64: Constant 65 - 127: Ascending over time

tune
uint tune;

Operator tuning Bit 31-25: Coarse detuning (-24 to +103 seminotes) Bit 24-0: Fine detuning (-100 to 100 cents), 0x1_00_00_00 is center If fixed mode is being used, then top 7 bits are the note, the rest are fine tuning.

Meta