Logo Search packages:      
Sourcecode: calf version File versions  Download package

dsp::basic_synth Struct Reference

#include <synth.h>

Inherited by dsp::drawbar_organ.

List of all members.

Detailed Description

Base class for all kinds of polyphonic instruments, provides somewhat reasonable voice management, pedal support - and little else. It's implemented as a base class with virtual functions, so there's some performance loss, but it shouldn't be horrible.
it would make sense to support all notes off controller too

Definition at line 185 of file synth.h.

Public Member Functions

virtual dsp::voice * alloc_voice ()=0
virtual bool check_percussion ()
virtual void control_change (int ctl, int val)
virtual dsp::voice * give_voice ()
virtual void note_off (int note, int vel)
virtual void note_on (int note, int vel)
virtual void on_pedal_release ()
virtual void percussion_note_on (int note, int vel)
virtual void pitch_bend (int amt)
 amt = -8192 to 8191
virtual void render_to (float(*output)[2], int nsamples)
virtual void setup (int sr)
virtual dsp::voice * steal_voice ()
virtual void trim_voices ()

Protected Member Functions

void kill_note (int note, int vel, bool just_one)

Protected Attributes

std::list< dsp::voice * > active_voices
 Voices currently playing.
std::bitset< 128 > gate
 Gate values for all 128 MIDI notes.
bool hold
 Hold pedal state.
unsigned int polyphony_limit
 Maximum allocated number of channels.
int sample_rate
 Current sample rate.
bool sostenuto
 Sostenuto pedal state.
std::stack< dsp::voice * > unused_voices
 Voices allocated, but not used.

The documentation for this struct was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index