iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
ControlRamp Struct Reference

A ControlRamp describes one value changing over time. More...

#include <ControlRamp.h>

Public Types

template<size_t N>
using RampArray = std::array< ControlRamp, N >
 

Public Member Functions

void Clear ()
 
bool IsNonzero () const
 
void Write (float *buffer, int startIdx, int nFrames)
 Writes the ramp signal to an output buffer. More...
 

Public Attributes

double startValue
 
double endValue
 
int transitionStart
 
int transitionEnd
 

Detailed Description

A ControlRamp describes one value changing over time.

It can be easily converted into a signal for more processing, or if sample accuracy is not needed, just the end value can be used. It describes a piecewise function in three pieces: from [0, startValue] to [transitionStart, startValue] from [transitionStart, startValue] to [transitionEnd, endValue] from [transitionEnd, endValue] to [blockSize, endValue]

Definition at line 32 of file ControlRamp.h.

Member Typedef Documentation

◆ RampArray

template<size_t N>
using ControlRamp::RampArray = std::array<ControlRamp, N>

Definition at line 75 of file ControlRamp.h.

Member Function Documentation

◆ Clear()

void ControlRamp::Clear ( )
inline

Definition at line 39 of file ControlRamp.h.

◆ IsNonzero()

bool ControlRamp::IsNonzero ( ) const
inline

Definition at line 45 of file ControlRamp.h.

◆ Write()

void ControlRamp::Write ( float *  buffer,
int  startIdx,
int  nFrames 
)
inline

Writes the ramp signal to an output buffer.

Parameters
bufferPointer to the start of an output buffer.
startIdxSample index of the start of the desired write within the buffer.
nFramesThe number of samples to be written.

Definition at line 54 of file ControlRamp.h.

Member Data Documentation

◆ endValue

double ControlRamp::endValue

Definition at line 35 of file ControlRamp.h.

◆ startValue

double ControlRamp::startValue

Definition at line 34 of file ControlRamp.h.

◆ transitionEnd

int ControlRamp::transitionEnd

Definition at line 37 of file ControlRamp.h.

◆ transitionStart

int ControlRamp::transitionStart

Definition at line 36 of file ControlRamp.h.


The documentation for this struct was generated from the following file: