class: mStringSynthInstrument
Polyphonic string synthesizer
Description
Polyphonic string synth inspired by 80s analog sawtooth-based string synths like the ARP Solina. Inherits all functions from the mInstrument parent class and adds the following functionality.
Template Parameters
template<int32_t mPOLYPHONY = 4>mPOLYPHONY: number of voices the instrument can play simultaneously
Class Methods
Constructor
mStringSynthInstrument(uint8_t *midi_table_name = NULL)midi_table_name: (OPTIONAL) table of MIDI data for the instrument to play
void update()Internally updates envelopes/LFOs. MUST BE CALLED IN updateControl()
void update()Calculates a sample of output. Nominally 16-bit signal level. MUST BE CALLED IN updateAUDIO()
void setADSR(uint32_t attack_time, uint32_t decay_time, int16_t sustain_level, int32_t release_time)Configures amplitude envelope. Times in milliseconds. Sustain level from silence to unity gain (0 to 255)
void setCutoffFreqAndResonance(uint8_t cutoff, uint8_t resonance)Sets cutoff (0-255 corresponding to 0 Hz and and 16384Hz) and resonance (0 to 255) of lowpass filter.
void setDetune(uint32_t float)Sets detune amount (0 to 1.0)
Example