PCM8.Channel

Defines a single channel's statuses.

Members

Functions

calculateJumpAm
void calculateJumpAm(int sampleRate)

Calculates jump amount for the sample.

decodeMore
void decodeMore(SampleAssignment sa, Sample slmp)

Decodes one more block worth of samples, depending on internal state.

reset
void reset()

Resets all internal states.

setShpVals
void setShpVals(float vel)

Recalculates shape params.

Variables

bankNum
ushort bankNum;

Bank select number.

currNote
ubyte currNote;

The currently played note + Bit 8 indicates suspension.

currShpA
float currShpA;

The current attack shape

currShpR
float currShpR;

The current release shape

decodeAm
uint decodeAm;

Decoded amount

decoderBuffer
int[256] decoderBuffer;

Stores decoded samples.

decoderWorkpad
DecoderWorkpad decoderWorkpad;

Stores the current state of the decoder.

envGen
ADSREnvelopGenerator envGen;

Channel envelop generator.

freqRatio
double freqRatio;

Sampling-to-playback frequency ratio, with pitch bend, LFO, and envGen applied.

jumpAm
uint jumpAm;

Jump amount for current sample, calculated from freqRatio.

modWheel
float modWheel;

Modulation wheel normalized between 0 and 1

outPos
long outPos;

Position in decoded amount with fractions.

pitchBend
float pitchBend;

Current amount of pitch bend.

presetCopy
Preset presetCopy;

The copy of the preset.

presetNum
ubyte presetNum;

Selected preset.

savedDWState
DecoderWorkpad savedDWState;

The state of the decoder when the beginning of the looppoint has been reached.

status
uint status;

Channel status flags. Bit 1: Note on, Bit 2: Sample run out approaching, Bit 3: In loop

velocity
float velocity;

Velocity normalized between 0 and 1

waveModWorkpad
WavemodWorkpad waveModWorkpad;

Stores the current state of the wave modulator.

Meta