OpenWareLaboratory
Patch Class Referenceabstract
Inheritance diagram for Patch:

Public Member Functions

virtual void buttonChanged (PatchButtonId bid, uint16_t value, uint16_t samples)
 
AudioBuffercreateMemoryBuffer (int channels, int samples)
 
virtual void encoderChanged (PatchParameterId pid, int16_t delta, uint16_t samples)
 
int getBlockSize ()
 
float getElapsedBlockTime ()
 
int getElapsedCycles ()
 
FloatParameter getFloatParameter (const char *name, float min, float max, float defaultValue=0.0f, float lambda=0.0f, float delta=0.0, float skew=LIN)
 
IntParameter getIntParameter (const char *name, int min, int max, int defaultValue=0, float lambda=0.0f, float delta=0.0, float skew=LIN)
 
FloatParameter getParameter (const char *name, float defaultValue)
 
float getParameterValue (PatchParameterId pid)
 
float getSampleRate ()
 
int getSamplesSinceButtonPressed (PatchButtonId bid)
 
bool isButtonPressed (PatchButtonId bid)
 
 Patch ()
 
virtual void processAudio (AudioBuffer &audio)=0
 
void registerParameter (PatchParameterId pid, const char *name)
 
void registerParameter (PatchParameterId pid, const char *name, const char *desc)
 
void setButton (PatchButtonId bid, uint16_t value, uint16_t samples=0)
 
void setParameterValue (PatchParameterId pid, float value)
 
virtual ~Patch ()
 

Static Public Attributes

static const float EXP = 0.5
 constant skew values for exponential, linear and logarithmic parameters More...
 
static const float LIN = 1.0
 
static const float LOG = 2.0
 
static const uint16_t OFF = 0
 
static const uint16_t ON = 4095
 

Detailed Description

Definition at line 30 of file Patch.h.

Constructor & Destructor Documentation

Patch::Patch ( )

Definition at line 14 of file Patch.cpp.

Patch::~Patch ( )
virtual

Definition at line 16 of file Patch.cpp.

Member Function Documentation

virtual void Patch::buttonChanged ( PatchButtonId  bid,
uint16_t  value,
uint16_t  samples 
)
inlinevirtual

Definition at line 65 of file Patch.h.

AudioBuffer * Patch::createMemoryBuffer ( int  channels,
int  samples 
)

Definition at line 64 of file Patch.cpp.

References AudioBuffer::create().

virtual void Patch::encoderChanged ( PatchParameterId  pid,
int16_t  delta,
uint16_t  samples 
)
inlinevirtual

Definition at line 64 of file Patch.h.

int Patch::getBlockSize ( )

Definition at line 27 of file Patch.cpp.

Referenced by getElapsedBlockTime().

float Patch::getElapsedBlockTime ( )

Definition at line 70 of file Patch.cpp.

References DWT_CYCCNT, and getBlockSize().

int Patch::getElapsedCycles ( )

Definition at line 74 of file Patch.cpp.

References DWT_CYCCNT.

FloatParameter Patch::getFloatParameter ( const char *  name,
float  min,
float  max,
float  defaultValue = 0.0f,
float  lambda = 0.0f,
float  delta = 0.0,
float  skew = LIN 
)

Definition at line 96 of file Patch.cpp.

References getInitialisingPatchProcessor().

Referenced by getParameter().

IntParameter Patch::getIntParameter ( const char *  name,
int  min,
int  max,
int  defaultValue = 0,
float  lambda = 0.0f,
float  delta = 0.0,
float  skew = LIN 
)

Definition at line 100 of file Patch.cpp.

References getInitialisingPatchProcessor().

FloatParameter Patch::getParameter ( const char *  name,
float  defaultValue 
)

Definition at line 92 of file Patch.cpp.

References getFloatParameter(), and LIN.

float Patch::getParameterValue ( PatchParameterId  pid)

Definition at line 31 of file Patch.cpp.

float Patch::getSampleRate ( )

Definition at line 23 of file Patch.cpp.

int Patch::getSamplesSinceButtonPressed ( PatchButtonId  bid)
Deprecated:

Definition at line 59 of file Patch.cpp.

bool Patch::isButtonPressed ( PatchButtonId  bid)

Definition at line 55 of file Patch.cpp.

virtual void Patch::processAudio ( AudioBuffer audio)
pure virtual
void Patch::registerParameter ( PatchParameterId  pid,
const char *  name 
)

Definition at line 18 of file Patch.cpp.

Referenced by registerParameter().

void Patch::registerParameter ( PatchParameterId  pid,
const char *  name,
const char *  desc 
)
inline

Definition at line 50 of file Patch.h.

References registerParameter().

void Patch::setButton ( PatchButtonId  bid,
uint16_t  value,
uint16_t  samples = 0 
)

Definition at line 51 of file Patch.cpp.

void Patch::setParameterValue ( PatchParameterId  pid,
float  value 
)

Definition at line 44 of file Patch.cpp.

Field Documentation

const float Patch::EXP = 0.5
static

constant skew values for exponential, linear and logarithmic parameters

Definition at line 35 of file Patch.h.

const float Patch::LIN = 1.0
static

Definition at line 36 of file Patch.h.

Referenced by getParameter().

const float Patch::LOG = 2.0
static

Definition at line 37 of file Patch.h.

const uint16_t Patch::OFF = 0
static

Definition at line 39 of file Patch.h.

const uint16_t Patch::ON = 4095
static

Definition at line 38 of file Patch.h.


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