Synth.cpp
 All Data Structures Namespaces Files Functions Variables Macros
Public Member Functions | Private Member Functions | Private Attributes
ADSR Class Reference

#include <synth.h>

Public Member Functions

 ADSR ()
 
void setA (float a)
 
void setD (float d)
 
void setS (float s)
 
void setR (float r)
 
uint32_t state ()
 
void quiet (void)
 
int32_t output ()
 
void keydown (void)
 
void keyup (void)
 
void step (void)
 

Private Member Functions

void rare_step (void)
 

Private Attributes

uint32_t _value
 
int32_t dvalue
 
uint32_t count
 
uint8_t _state
 
float attack
 
float decay
 
float sustain
 
float release
 

Detailed Description

Definition at line 176 of file synth.h.

Constructor & Destructor Documentation

ADSR::ADSR ( )
inline

Definition at line 186 of file synth.h.

Member Function Documentation

void ADSR::keydown ( void  )

Definition at line 253 of file synth.cpp.

Referenced by SimpleVoice::keydown(), TwoSquaresVoice::keydown(), and NoisyVoice::keydown().

Here is the caller graph for this function:

void ADSR::keyup ( void  )

Definition at line 258 of file synth.cpp.

Referenced by SimpleVoice::keyup(), TwoSquaresVoice::keyup(), and NoisyVoice::keyup().

Here is the caller graph for this function:

int32_t ADSR::output ( void  )
inline

Definition at line 203 of file synth.h.

Referenced by SimpleVoice::output(), TwoSquaresVoice::output(), NoisyVoice::output(), and NoisyVoice::step().

Here is the caller graph for this function:

void ADSR::quiet ( void  )
inline

Definition at line 198 of file synth.h.

Referenced by SimpleVoice::quiet(), TwoSquaresVoice::quiet(), and NoisyVoice::quiet().

Here is the caller graph for this function:

void ADSR::rare_step ( void  )
private

Definition at line 210 of file synth.cpp.

Referenced by step().

Here is the caller graph for this function:

void ADSR::setA ( float  a)

Definition at line 237 of file synth.cpp.

Referenced by NoisyVoice::NoisyVoice(), SimpleVoice::SimpleVoice(), and TwoSquaresVoice::TwoSquaresVoice().

Here is the caller graph for this function:

void ADSR::setD ( float  d)

Definition at line 241 of file synth.cpp.

Referenced by NoisyVoice::NoisyVoice(), SimpleVoice::SimpleVoice(), and TwoSquaresVoice::TwoSquaresVoice().

Here is the caller graph for this function:

void ADSR::setR ( float  r)

Definition at line 249 of file synth.cpp.

Referenced by NoisyVoice::NoisyVoice(), SimpleVoice::SimpleVoice(), and TwoSquaresVoice::TwoSquaresVoice().

Here is the caller graph for this function:

void ADSR::setS ( float  s)

Definition at line 245 of file synth.cpp.

Referenced by NoisyVoice::NoisyVoice(), SimpleVoice::SimpleVoice(), and TwoSquaresVoice::TwoSquaresVoice().

Here is the caller graph for this function:

uint32_t ADSR::state ( )
inline

Definition at line 195 of file synth.h.

Referenced by SimpleVoice::idle(), TwoSquaresVoice::idle(), and NoisyVoice::idle().

Here is the caller graph for this function:

void ADSR::step ( void  )

Definition at line 262 of file synth.cpp.

Referenced by SimpleVoice::step(), TwoSquaresVoice::step(), and NoisyVoice::step().

Here is the call graph for this function:

Here is the caller graph for this function:

Field Documentation

uint8_t ADSR::_state
private

Definition at line 180 of file synth.h.

Referenced by ADSR(), keydown(), keyup(), quiet(), rare_step(), and state().

uint32_t ADSR::_value
private

Definition at line 177 of file synth.h.

Referenced by ADSR(), output(), quiet(), rare_step(), and step().

float ADSR::attack
private

Definition at line 181 of file synth.h.

Referenced by rare_step(), and setA().

uint32_t ADSR::count
private

Definition at line 179 of file synth.h.

Referenced by ADSR(), keydown(), and step().

float ADSR::decay
private

Definition at line 181 of file synth.h.

Referenced by rare_step(), and setD().

int32_t ADSR::dvalue
private

Definition at line 178 of file synth.h.

Referenced by ADSR(), quiet(), rare_step(), and step().

float ADSR::release
private

Definition at line 181 of file synth.h.

Referenced by rare_step(), and setR().

float ADSR::sustain
private

Definition at line 181 of file synth.h.

Referenced by rare_step(), and setS().


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