tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
tracktion::engine::ExpEnvelope Class Reference

Classes

struct  Parameters
 Holds the parameters being used by an ADSR object. More...
 

Public Member Functions

void setParameters (const Parameters &newParameters)
 Sets the parameters that will be used by an ADSR object.
 
void setSampleRate (double d)
 
void reset ()
 Resets the envelope to an idle state.
 
void noteOn ()
 Starts the attack phase of the envelope.
 
void noteOff ()
 Starts the release phase of the envelope.
 
bool isActive () const
 Returns true if the envelope is in its attack, decay, sustain or release stage.
 
float getNextSample ()
 Returns the next sample value for an ADSR object.
 
template<typename FloatType >
void applyEnvelopeToBuffer (juce::AudioBuffer< FloatType > &buffer, int startSample, int numSamples)
 This method will conveniently apply the next numSamples number of envelope values to an AudioBuffer.
 
void setAnalog (bool a)
 

Detailed Description

Definition at line 15 of file tracktion_Envelope.h.


Class Documentation

◆ tracktion::engine::ExpEnvelope::Parameters

struct tracktion::engine::ExpEnvelope::Parameters

Holds the parameters being used by an ADSR object.

Definition at line 22 of file tracktion_Envelope.h.

Class Members
float attack Attack time in seconds.
float decay Decay time in seconds.
float release Release time in seconds.
float sustain Sustain level.

Constructor & Destructor Documentation

◆ ExpEnvelope()

tracktion::engine::ExpEnvelope::ExpEnvelope ( )

Definition at line 14 of file tracktion_Envelope.cpp.

Member Function Documentation

◆ applyEnvelopeToBuffer()

template<typename FloatType >
void tracktion::engine::ExpEnvelope::applyEnvelopeToBuffer ( juce::AudioBuffer< FloatType > &  buffer,
int  startSample,
int  numSamples 
)

This method will conveniently apply the next numSamples number of envelope values to an AudioBuffer.

See also
getNextSample

Definition at line 144 of file tracktion_Envelope.h.

◆ getNextSample()

float tracktion::engine::ExpEnvelope::getNextSample ( )

Returns the next sample value for an ADSR object.

See also
applyEnvelopeToBuffer

Definition at line 83 of file tracktion_Envelope.h.

◆ isActive()

bool tracktion::engine::ExpEnvelope::isActive ( ) const

Returns true if the envelope is in its attack, decay, sustain or release stage.

Definition at line 76 of file tracktion_Envelope.h.

◆ noteOff()

void tracktion::engine::ExpEnvelope::noteOff ( )

Starts the release phase of the envelope.

Definition at line 67 of file tracktion_Envelope.h.

◆ noteOn()

void tracktion::engine::ExpEnvelope::noteOn ( )

Starts the attack phase of the envelope.

Definition at line 64 of file tracktion_Envelope.h.

◆ reset()

void tracktion::engine::ExpEnvelope::reset ( )

Resets the envelope to an idle state.

Definition at line 56 of file tracktion_Envelope.h.

◆ setAnalog()

void tracktion::engine::ExpEnvelope::setAnalog ( bool  a)

Definition at line 161 of file tracktion_Envelope.h.

◆ setParameters()

void tracktion::engine::ExpEnvelope::setParameters ( const Parameters newParameters)

Sets the parameters that will be used by an ADSR object.

You must have called setSampleRate() with the correct sample rate before this otherwise the values may be incorrect!

See also
getParameters

Definition at line 44 of file tracktion_Envelope.h.

◆ setSampleRate()

void tracktion::engine::ExpEnvelope::setSampleRate ( double  d)

Definition at line 52 of file tracktion_Envelope.h.


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