Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
|
Connect a stepped potentiometer and handle it at audio rate from Bela. More...
#include <BelaSteppedPot.h>
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 () |
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.
void BelaSteppedPot::setup | ( | BelaContext * | context, |
unsigned int | analogInCh, | ||
const std::vector< float > & | levelsV, | ||
float | toleranceV, | ||
float | fullScale = 1 |
||
) |
context | the Bela context |
analogInCh | which analog input channel the potentiometer is connected to. |
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().