MEAP The Library

MOZZI
MEAP The Class
C++ tips
Mozzi Reworks
mOscil
mSample
Generators
mDust
mNoise
mOperator
mSineLFO
mEnvSection
Effects
mBitcrusher
mChorus
mDigitalDelay
mFlanger
mPlateReverb
mSchroederReverb
DSP
mDelayLine
mFeedbackComb
mFeedforwardComb
mFIR
mIIR
mNaturalComb
mOnePoleLPF
mResonz
mRingz
mSchroederAllpass
mInstruments
mDrumRack
mFM4Instrument
mMarimbaInstrument
mPopInstrument
mRompler
mStringInstrument
mStringSynthInstrument
Composition
mMML
mTransitionTable
Utilities
mEventDelayMicros
mRandomDistribution

class: mEnvSection


single section of an envelope

Description

Building block of more complex envelopes. mEnvSection is a single section envelope. You give it a starting value, an ending value and instructions on how to get from one to the other, either linearly or by configuring an exponential function.

Template Parameters

template <uint32_t UPDATE_RATE>

UPDATE_RATE: how often the next() function will be called

Class Methods

Constructor

mEnvSection(uint32_t length_ms, float starting_level, float ending_level, MEAP_ENV_CURVES curve_type = mCURVE_LINEAR, float exp = -4.3)

length_ms: length of envelope section in milliseconds

starting_level: level of output before envelope begins

ending_level: level of output after envelope ends

curve_type: how envelope moves from starting_level to ending_level. Either mCURVE_LINEAR or mCURVE_EXPONENTIAL

exp: exponential curve type if mCURVE_EXPONENTIAL is chosen. 0 is linear, positive pulls curve to right, negative pulls curve to left


void trigger()

Triggers envelope to begin


void setLength(uint32_t length_ms)

Sets length of envelope section in milliseconds


setExpRate(float rate)

Sets curve of envelope section if mCURVE_EXPONENTIAL is chosen. 0 is linear, positive pulls curve to right, negative pulls curve to left


void setStartLevel(float start_level)

Sets starting level of envelope


void setEndLevel(float end_level)

Sets ending level of envelope


void setLevels(float start_level, float end_level)

Sets starting and ending levels of envelope


Example

Relevant Tutorials