LMMS
Loading...
Searching...
No Matches
ADnote Class Reference

#include <ADnote.h>

Inheritance diagram for ADnote:
SynthNote

Classes

struct  Global
struct  Voice

Public Member Functions

 ADnote (ADnoteParameters *pars, Controller *ctl_, float freq, float velocity, int portamento_, int midinote_, bool besilent)
 ~ADnote ()
void legatonote (float freq, float velocity, int portamento_, int midinote_, bool externcall)
int noteout (float *outl, float *outr)
void relasekey ()
int finished () const
Public Member Functions inherited from SynthNote
 SynthNote (float freq, float vel, int port, int note, bool quiet)
virtual ~SynthNote ()
void setVelocity (float velocity_)

Private Member Functions

void setfreq (int nvoice, float in_freq)
void setfreqFM (int nvoice, float in_freq)
void compute_unison_freq_rap (int nvoice)
void computecurrentparameters ()
void initparameters ()
void KillVoice (int nvoice)
void KillNote ()
float getvoicebasefreq (int nvoice) const
float getFMvoicebasefreq (int nvoice) const
void ComputeVoiceOscillator_LinearInterpolation (int nvoice)
void ComputeVoiceOscillator_CubicInterpolation (int nvoice)
void ComputeVoiceOscillatorMorph (int nvoice)
void ComputeVoiceOscillatorRingModulation (int nvoice)
void ComputeVoiceOscillatorFrequencyModulation (int nvoice, int FMmode)
void ComputeVoiceOscillatorPitchModulation (int nvoice)
void ComputeVoiceNoise (int nvoice)
void fadein (float *smps) const

Private Attributes

ADnoteParameterspartparams
unsigned char stereo
int midinote
float velocity
float basefreq
ONOFFTYPE NoteEnabled
Controllerctl
struct ADnote::Global NoteGlobalPar
struct ADnote::Voice NoteVoicePar [NUM_VOICES]
float time
int unison_size [NUM_VOICES]
float unison_stereo_spread [NUM_VOICES]
float * oscposlo [NUM_VOICES]
float * oscfreqlo [NUM_VOICES]
intoscposhi [NUM_VOICES]
intoscfreqhi [NUM_VOICES]
float * oscposloFM [NUM_VOICES]
float * oscfreqloFM [NUM_VOICES]
float * unison_base_freq_rap [NUM_VOICES]
float * unison_freq_rap [NUM_VOICES]
bool * unison_invert_phase [NUM_VOICES]
struct { 
   float   amplitude 
   float *   step 
   float *   position 
unison_vibratto [NUM_VOICES]
unsigned intoscposhiFM [NUM_VOICES]
unsigned intoscfreqhiFM [NUM_VOICES]
float oldamplitude [NUM_VOICES]
float newamplitude [NUM_VOICES]
float FMoldamplitude [NUM_VOICES]
float FMnewamplitude [NUM_VOICES]
float * FMoldsmp [NUM_VOICES]
float * tmpwavel
float * tmpwaver
int max_unison
float ** tmpwave_unison
float * bypassl
float * bypassr
float globaloldamplitude
float globalnewamplitude
char firsttick [NUM_VOICES]
int portamento
float bandwidthDetuneMultiplier

Additional Inherited Members

Protected Attributes inherited from SynthNote
class SynthNote::Legato legato

Detailed Description

The "additive" synthesizer

Constructor & Destructor Documentation

◆ ADnote()

ADnote::ADnote ( ADnoteParameters * pars,
Controller * ctl_,
float freq,
float velocity,
int portamento_,
int midinote_,
bool besilent )

Constructor.

Parameters
parsNote Parameters
ctl_Pointer to system Controller
freqBase frequency for note
velocityVelocity of note
portamento_1 if the note has portamento
midinote_The midi number of the note
besilentStart silent note if true

◆ ~ADnote()

ADnote::~ADnote ( )

Destructor

Member Function Documentation

◆ compute_unison_freq_rap()

void ADnote::compute_unison_freq_rap ( int nvoice)
private

Computes relative frequency for unison and unison's vibratto. Note: Must be called before setfreq* functions.

◆ computecurrentparameters()

void ADnote::computecurrentparameters ( )
private

Compute parameters for next tick

◆ ComputeVoiceNoise()

void ADnote::ComputeVoiceNoise ( int nvoice)
inlineprivate

Generate Noise Samples for Voice

◆ ComputeVoiceOscillator_CubicInterpolation()

void ADnote::ComputeVoiceOscillator_CubicInterpolation ( int nvoice)
inlineprivate

Compute the Oscillator's samples. Affects tmpwave_unison and updates oscposhi/oscposlo

Todo
remove this declaration if it is commented out

◆ ComputeVoiceOscillator_LinearInterpolation()

void ADnote::ComputeVoiceOscillator_LinearInterpolation ( int nvoice)
inlineprivate

Compute the Oscillator's samples. Affects tmpwave_unison and updates oscposhi/oscposlo

◆ ComputeVoiceOscillatorFrequencyModulation()

void ADnote::ComputeVoiceOscillatorFrequencyModulation ( int nvoice,
int FMmode )
inlineprivate

Computes the Frequency Modulated Oscillator.

Parameters
FMmodemodulation type 0=Phase 1=Frequency

◆ ComputeVoiceOscillatorMorph()

void ADnote::ComputeVoiceOscillatorMorph ( int nvoice)
inlineprivate

Computes the Oscillator samples with morphing. updates tmpwave_unison

◆ ComputeVoiceOscillatorPitchModulation()

void ADnote::ComputeVoiceOscillatorPitchModulation ( int nvoice)
inlineprivate

TODO

◆ ComputeVoiceOscillatorRingModulation()

void ADnote::ComputeVoiceOscillatorRingModulation ( int nvoice)
inlineprivate

Computes the Ring Modulated Oscillator.

◆ fadein()

void ADnote::fadein ( float * smps) const
inlineprivate

Fadein in a way that removes clicks but keep sound "punchy"

◆ finished()

int ADnote::finished ( ) const
virtual

Return if note is finished.

Returns
finished=1 unfinished=0

Implements SynthNote.

◆ getFMvoicebasefreq()

float ADnote::getFMvoicebasefreq ( int nvoice) const
inlineprivate

Get modulator's base frequency

◆ getvoicebasefreq()

float ADnote::getvoicebasefreq ( int nvoice) const
inlineprivate

Get the Voice's base frequency

◆ initparameters()

void ADnote::initparameters ( )
private

Initializes All Parameters

◆ KillNote()

void ADnote::KillNote ( )
private

Deallocate Note resources and voice resources

◆ KillVoice()

void ADnote::KillVoice ( int nvoice)
private

Deallocate/Cleanup given voice

◆ legatonote()

void ADnote::legatonote ( float freq,
float velocity,
int portamento_,
int midinote_,
bool externcall )
virtual

Alters the playing note for legato effect

initparameters();

Implements SynthNote.

◆ noteout()

int ADnote::noteout ( float * outl,
float * outr )
virtual

Compute Output Samples

Returns
0 if note is finished

Implements SynthNote.

◆ relasekey()

void ADnote::relasekey ( )
virtual

Release the key for the note and start release portion of envelopes.

Implements SynthNote.

◆ setfreq()

void ADnote::setfreq ( int nvoice,
float in_freq )
private

Changes the frequency of an oscillator.

Parameters
nvoicevoice to run computations on
in_freqnew frequency

◆ setfreqFM()

void ADnote::setfreqFM ( int nvoice,
float in_freq )
private

Set the frequency of the modulator oscillator

Member Data Documentation

◆ amplitude

float ADnote::amplitude

◆ bandwidthDetuneMultiplier

float ADnote::bandwidthDetuneMultiplier
private

◆ basefreq

float ADnote::basefreq
private

◆ bypassl

float* ADnote::bypassl
private

◆ bypassr

float * ADnote::bypassr
private

◆ ctl

Controller* ADnote::ctl
private

◆ firsttick

char ADnote::firsttick[NUM_VOICES]
private

◆ FMnewamplitude

float ADnote::FMnewamplitude[NUM_VOICES]
private

◆ FMoldamplitude

float ADnote::FMoldamplitude[NUM_VOICES]
private

◆ FMoldsmp

float* ADnote::FMoldsmp[NUM_VOICES]
private

◆ globalnewamplitude

float ADnote::globalnewamplitude
private

◆ globaloldamplitude

float ADnote::globaloldamplitude
private

◆ max_unison

int ADnote::max_unison
private

◆ midinote

int ADnote::midinote
private

◆ newamplitude

float ADnote::newamplitude[NUM_VOICES]
private

◆ NoteEnabled

ONOFFTYPE ADnote::NoteEnabled
private

◆ NoteGlobalPar

struct ADnote::Global ADnote::NoteGlobalPar
private

◆ NoteVoicePar

struct ADnote::Voice ADnote::NoteVoicePar[NUM_VOICES]
private

◆ oldamplitude

float ADnote::oldamplitude[NUM_VOICES]
private

◆ oscfreqhi

int * ADnote::oscfreqhi[NUM_VOICES]
private

◆ oscfreqhiFM

unsigned int * ADnote::oscfreqhiFM[NUM_VOICES]
private

◆ oscfreqlo

float * ADnote::oscfreqlo[NUM_VOICES]
private

◆ oscfreqloFM

float * ADnote::oscfreqloFM[NUM_VOICES]
private

◆ oscposhi

int* ADnote::oscposhi[NUM_VOICES]
private

◆ oscposhiFM

unsigned int* ADnote::oscposhiFM[NUM_VOICES]
private

◆ oscposlo

float* ADnote::oscposlo[NUM_VOICES]
private

◆ oscposloFM

float* ADnote::oscposloFM[NUM_VOICES]
private

◆ partparams

ADnoteParameters* ADnote::partparams
private

◆ portamento

int ADnote::portamento
private

◆ position

float* ADnote::position

◆ step

float* ADnote::step

◆ stereo

unsigned char ADnote::stereo
private

◆ time

float ADnote::time
private

◆ tmpwave_unison

float** ADnote::tmpwave_unison
private

◆ tmpwavel

float* ADnote::tmpwavel
private

◆ tmpwaver

float* ADnote::tmpwaver
private

◆ unison_base_freq_rap

float* ADnote::unison_base_freq_rap[NUM_VOICES]
private

◆ unison_freq_rap

float* ADnote::unison_freq_rap[NUM_VOICES]
private

◆ unison_invert_phase

bool* ADnote::unison_invert_phase[NUM_VOICES]
private

◆ unison_size

int ADnote::unison_size[NUM_VOICES]
private

◆ unison_stereo_spread

float ADnote::unison_stereo_spread[NUM_VOICES]
private

◆ [struct]

struct { ... } ADnote::unison_vibratto[NUM_VOICES]

◆ velocity

float ADnote::velocity
private

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