OpenWareLaboratory
AdsrEnvelope Class Reference

Linear ADSR Envelope. More...

Inheritance diagram for AdsrEnvelope:
Collaboration diagram for AdsrEnvelope:

Public Member Functions

 AdsrEnvelope (float newSampleRate)
void attenuate (FloatArray buf)
void gate (bool state)
void gate (bool state, int gateDelay)
void getEnvelope (FloatArray output)
float getNextSample ()
void setAttack (float newAttack)
void setDecay (float newDecay)
void setLevel (float newLevel)
void setRelease (float newRelase)
void setRetrigger (bool on)
void setSampleRate (float sampleRate)
void setSustain (float newSustain)
void trigger ()
void trigger (bool state)
void trigger (bool state, int triggerDelay)
virtual ~AdsrEnvelope ()

Static Public Member Functions

static AdsrEnvelopecreate (float sr)
static void destroy (AdsrEnvelope *env)

Detailed Description

Linear ADSR Envelope.

Definition at line 24 of file Envelope.h.

Constructor & Destructor Documentation

AdsrEnvelope::AdsrEnvelope ( float  newSampleRate)

Definition at line 14 of file Envelope.cpp.

References setAttack(), setDecay(), setRelease(), setRetrigger(), and setSustain().

Referenced by create().

AdsrEnvelope::~AdsrEnvelope ( )
virtual

Definition at line 28 of file Envelope.cpp.

Member Function Documentation

void AdsrEnvelope::attenuate ( FloatArray  buf)

Definition at line 83 of file Envelope.cpp.

References getNextSample(), and FloatArray::getSize().

static AdsrEnvelope* AdsrEnvelope::create ( float  sr)
inlinestatic

Definition at line 49 of file Envelope.h.

References AdsrEnvelope().

static void AdsrEnvelope::destroy ( AdsrEnvelope env)
inlinestatic

Definition at line 52 of file Envelope.h.

void AdsrEnvelope::gate ( bool  state)
virtual

Reimplemented from Envelope.

Definition at line 67 of file Envelope.cpp.

Referenced by trigger().

void AdsrEnvelope::gate ( bool  state,
int  gateDelay 
)
virtual

Reimplemented from Envelope.

Definition at line 71 of file Envelope.cpp.

void AdsrEnvelope::getEnvelope ( FloatArray  output)

Definition at line 88 of file Envelope.cpp.

References getNextSample(), and FloatArray::getSize().

float AdsrEnvelope::getNextSample ( )

Definition at line 93 of file Envelope.cpp.

References trigger().

Referenced by attenuate(), and getEnvelope().

void AdsrEnvelope::setAttack ( float  newAttack)

Definition at line 30 of file Envelope.cpp.

Referenced by AdsrEnvelope().

void AdsrEnvelope::setDecay ( float  newDecay)

Definition at line 35 of file Envelope.cpp.

Referenced by AdsrEnvelope().

void AdsrEnvelope::setLevel ( float  newLevel)

Definition at line 79 of file Envelope.cpp.

void AdsrEnvelope::setRelease ( float  newRelase)

Definition at line 40 of file Envelope.cpp.

Referenced by AdsrEnvelope().

void AdsrEnvelope::setRetrigger ( bool  on)

Definition at line 50 of file Envelope.cpp.

Referenced by AdsrEnvelope().

void AdsrEnvelope::setSampleRate ( float  sampleRate)
inline

Definition at line 32 of file Envelope.h.

void AdsrEnvelope::setSustain ( float  newSustain)

Definition at line 45 of file Envelope.cpp.

Referenced by AdsrEnvelope().

void AdsrEnvelope::trigger ( )
virtual

Reimplemented from Envelope.

Definition at line 54 of file Envelope.cpp.

Referenced by getNextSample(), and trigger().

void AdsrEnvelope::trigger ( bool  state)
virtual

Reimplemented from Envelope.

Definition at line 58 of file Envelope.cpp.

References trigger().

void AdsrEnvelope::trigger ( bool  state,
int  triggerDelay 
)
virtual

Reimplemented from Envelope.

Definition at line 62 of file Envelope.cpp.

References gate().


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