OpenWareLaboratory
ColourScreenPatch Class Referenceabstract

Abstract base class for patches that use a colour screen. More...

Inheritance diagram for ColourScreenPatch:
Collaboration diagram for ColourScreenPatch:

Public Member Functions

virtual void buttonChanged (PatchButtonId bid, uint16_t value, uint16_t samples)
 
 ColourScreenPatch ()
 
AudioBuffercreateMemoryBuffer (int channels, int samples)
 
virtual void encoderChanged (PatchParameterId pid, int16_t delta, uint16_t samples)
 
float getBlockRate ()
 
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)
 
int getNumberOfChannels ()
 
FloatParameter getParameter (const char *name, float defaultValue)
 
float getParameterValue (PatchParameterId pid)
 
ResourcegetResource (const char *name)
 Get a resource (such as a stored FloatArray) from the firmware. More...
 
float getSampleRate ()
 
int getSamplesSinceButtonPressed (PatchButtonId bid)
 
uint16_t getScreenHeight ()
 
uint16_t getScreenWidth ()
 
bool isButtonPressed (PatchButtonId bid)
 
virtual void processAudio (AudioBuffer &audio)=0
 
virtual void processScreen (ColourScreenBuffer &screen)=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 ~ColourScreenPatch ()
 

Static Public Attributes

static const float EXP
 constant skew values for exponential, linear and logarithmic parameters More...
 
static const float LIN
 
static const float LOG
 
static const uint16_t OFF
 
static const uint16_t ON
 

Detailed Description

Abstract base class for patches that use a colour screen.

Colour format is 16 bits RGB565: RRRRR GGGGGG BBBBB Compatible OLED drivers: SSD1331, SEPS1114A

Definition at line 24 of file ColourScreenPatch.h.

Constructor & Destructor Documentation

◆ ColourScreenPatch()

ColourScreenPatch::ColourScreenPatch ( )

Definition at line 20 of file ColourScreenPatch.cpp.

References onDrawCallback().

◆ ~ColourScreenPatch()

ColourScreenPatch::~ColourScreenPatch ( )
virtual

Definition at line 25 of file ColourScreenPatch.cpp.

Member Function Documentation

◆ buttonChanged()

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

Definition at line 60 of file Patch.h.

◆ createMemoryBuffer()

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

◆ encoderChanged()

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

Definition at line 59 of file Patch.h.

◆ getBlockRate()

float Patch::getBlockRate ( )
inherited

◆ getBlockSize()

int Patch::getBlockSize ( )
inherited

◆ getElapsedBlockTime()

float Patch::getElapsedBlockTime ( )
inherited

◆ getElapsedCycles()

int Patch::getElapsedCycles ( )
inherited

◆ getFloatParameter()

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 
)
inherited

◆ getIntParameter()

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

◆ getNumberOfChannels()

int Patch::getNumberOfChannels ( )
inherited

◆ getParameter()

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

◆ getParameterValue()

float Patch::getParameterValue ( PatchParameterId  pid)
inherited

◆ getResource()

Resource* Patch::getResource ( const char *  name)
inherited

Get a resource (such as a stored FloatArray) from the firmware.

If the resource does not exist, this raises an error. If the resource exists but is not memory mapped, this will allocate new memory.

◆ getSampleRate()

float Patch::getSampleRate ( )
inherited

◆ getSamplesSinceButtonPressed()

int Patch::getSamplesSinceButtonPressed ( PatchButtonId  bid)
inherited

◆ getScreenHeight()

uint16_t ColourScreenPatch::getScreenHeight ( )

Definition at line 30 of file ColourScreenPatch.cpp.

◆ getScreenWidth()

uint16_t ColourScreenPatch::getScreenWidth ( )

Definition at line 27 of file ColourScreenPatch.cpp.

◆ isButtonPressed()

bool Patch::isButtonPressed ( PatchButtonId  bid)
inherited

◆ processAudio()

virtual void Patch::processAudio ( AudioBuffer audio)
pure virtualinherited

Implemented in TemplatePatch.

◆ processScreen()

virtual void ColourScreenPatch::processScreen ( ColourScreenBuffer screen)
pure virtual

Referenced by onDrawCallback().

◆ registerParameter() [1/2]

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

◆ registerParameter() [2/2]

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

Definition at line 42 of file Patch.h.

References Patch::registerParameter().

◆ setButton()

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

◆ setParameterValue()

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

Field Documentation

◆ EXP

const float Patch::EXP
staticinherited

constant skew values for exponential, linear and logarithmic parameters

Definition at line 26 of file Patch.h.

◆ LIN

const float Patch::LIN
staticinherited

Definition at line 27 of file Patch.h.

◆ LOG

const float Patch::LOG
staticinherited

Definition at line 28 of file Patch.h.

◆ OFF

const uint16_t Patch::OFF
staticinherited

Definition at line 30 of file Patch.h.

◆ ON

const uint16_t Patch::ON
staticinherited

Definition at line 29 of file Patch.h.


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