LMMS
Loading...
Searching...
No Matches
calf_plugins::wavetable_voice Class Reference

#include <wavetable.h>

Inheritance diagram for calf_plugins::wavetable_voice:
dsp::voice

Public Types

enum  {
  Channels = 2 , BlockSize = 64 , MaxSampleRun = MAX_SAMPLE_RUN , EnvCount = 3 ,
  OscCount = 2
}

Public Member Functions

 wavetable_voice ()
void set_params_ptr (wavetable_audio_module *_parent, int _srate)
void reset ()
 reset voice to default state (used when a voice is to be reused)
void note_on (int note, int vel)
 a note was pressed
void note_off (int)
 a note was released
void channel_pressure (int value)
void steal ()
 very fast note off
void render_block (int current_snapshot)
const int16_tget_last_table (int osc) const
virtual int get_current_note ()
 return the note used by this voice
virtual bool get_active ()
 check if voice can be removed from active voice list
void calc_derived_dests (float env0)
Public Member Functions inherited from dsp::voice
 voice ()
virtual void setup (int sr)
 reset voice to default state (used when a voice is to be reused)
virtual void render_to (float(*buf)[2], int nsamples)=0
 render voice data to buffer
virtual float get_priority ()
virtual ~voice ()
 empty virtual destructor

Public Attributes

float output_buffer [BlockSize][Channels]
Public Attributes inherited from dsp::voice
int sample_rate
bool released
bool sostenuto
bool stolen

Protected Attributes

int note
wavetable_audio_moduleparent
float ** params
dsp::decay amp
wavetable_oscillator oscs [OscCount]
dsp::adsr envs [EnvCount]
float velocity
 Current MIDI velocity.
float moddest [wavetable_metadata::moddest_count]
 Current calculated mod matrix outputs.
float last_oscshift [OscCount]
 Last oscillator shift (wavetable index) of each oscillator.
float last_oscamp [OscCount]
 Last oscillator amplitude of each oscillator.
float cur_oscamp [OscCount]
 Current osc amplitude.
dsp::triangle_lfo lfo1
dsp::triangle_lfo lfo2

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Channels 
BlockSize 
MaxSampleRun 
EnvCount 
OscCount 

Constructor & Destructor Documentation

◆ wavetable_voice()

calf_plugins::wavetable_voice::wavetable_voice ( )

Member Function Documentation

◆ calc_derived_dests()

void calf_plugins::wavetable_voice::calc_derived_dests ( float env0)
inline

◆ channel_pressure()

void calf_plugins::wavetable_voice::channel_pressure ( int value)

◆ get_active()

virtual bool calf_plugins::wavetable_voice::get_active ( )
inlinevirtual

check if voice can be removed from active voice list

Implements dsp::voice.

◆ get_current_note()

virtual int calf_plugins::wavetable_voice::get_current_note ( )
inlinevirtual

return the note used by this voice

Implements dsp::voice.

◆ get_last_table()

const int16_t * calf_plugins::wavetable_voice::get_last_table ( int osc) const

◆ note_off()

void calf_plugins::wavetable_voice::note_off ( int vel)
virtual

a note was released

Implements dsp::voice.

◆ note_on()

void calf_plugins::wavetable_voice::note_on ( int note,
int vel )
virtual

a note was pressed

Implements dsp::voice.

◆ render_block()

void calf_plugins::wavetable_voice::render_block ( int current_snapshot)

◆ reset()

void calf_plugins::wavetable_voice::reset ( )
virtual

reset voice to default state (used when a voice is to be reused)

Implements dsp::voice.

◆ set_params_ptr()

void calf_plugins::wavetable_voice::set_params_ptr ( wavetable_audio_module * _parent,
int _srate )

◆ steal()

void calf_plugins::wavetable_voice::steal ( )
virtual

very fast note off

Implements dsp::voice.

Member Data Documentation

◆ amp

dsp::decay calf_plugins::wavetable_voice::amp
protected

◆ cur_oscamp

float calf_plugins::wavetable_voice::cur_oscamp[OscCount]
protected

Current osc amplitude.

◆ envs

dsp::adsr calf_plugins::wavetable_voice::envs[EnvCount]
protected

◆ last_oscamp

float calf_plugins::wavetable_voice::last_oscamp[OscCount]
protected

Last oscillator amplitude of each oscillator.

◆ last_oscshift

float calf_plugins::wavetable_voice::last_oscshift[OscCount]
protected

Last oscillator shift (wavetable index) of each oscillator.

◆ lfo1

dsp::triangle_lfo calf_plugins::wavetable_voice::lfo1
protected

◆ lfo2

dsp::triangle_lfo calf_plugins::wavetable_voice::lfo2
protected

◆ moddest

float calf_plugins::wavetable_voice::moddest[wavetable_metadata::moddest_count]
protected

Current calculated mod matrix outputs.

◆ note

int calf_plugins::wavetable_voice::note
protected

◆ oscs

wavetable_oscillator calf_plugins::wavetable_voice::oscs[OscCount]
protected

◆ output_buffer

float calf_plugins::wavetable_voice::output_buffer[BlockSize][Channels]

◆ params

float** calf_plugins::wavetable_voice::params
protected

◆ parent

wavetable_audio_module* calf_plugins::wavetable_voice::parent
protected

◆ velocity

float calf_plugins::wavetable_voice::velocity
protected

Current MIDI velocity.


The documentation for this class was generated from the following file: