Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | List of all members
BelaSteppedPot Class Reference

Connect a stepped potentiometer and handle it at audio rate from Bela. More...

#include <BelaSteppedPot.h>

Inheritance diagram for BelaSteppedPot:
SteppedPot

Public Member Functions

 BelaSteppedPot (BelaContext *context, unsigned int analogInCh, const std::vector< float > &levelsV, float toleranceV, float fullScale=1)
 
void setup (BelaContext *context, unsigned int analogInCh, const std::vector< float > &levelsV, float toleranceV, float fullScale=1)
 
bool process (BelaContext *context)
 
- Public Member Functions inherited from SteppedPot
 SteppedPot (const std::vector< float > &levelsV, float toleranceV, float fullScale=1)
 
void setup (const std::vector< float > &levelsV, float toleranceV, float fullScale=1)
 
bool process (float value)
 
unsigned int get ()
 

Detailed Description

Connect a stepped potentiometer and handle it at audio rate from Bela.

This class is a Bela-specific wrapper for SteppedPot, which is Bela-agnostic. All the methods of BelaEncoder map to those of SteppedPot, and so only the differences between the two are documented here.

Examples:
Sensors/stepped-pot/render.cpp.

Member Function Documentation

void BelaSteppedPot::setup ( BelaContext context,
unsigned int  analogInCh,
const std::vector< float > &  levelsV,
float  toleranceV,
float  fullScale = 1 
)
Parameters
contextthe Bela context
analogInChwhich analog input channel the potentiometer is connected to.
Examples:
Sensors/stepped-pot/render.cpp.
bool BelaSteppedPot::process ( BelaContext context)

Call this method once per block.

A built-in one-pole lowpass filter smooths the analog reads before they are processed through SteppedPot::process().

Examples:
Sensors/stepped-pot/render.cpp.

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