Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
Loading...
Searching...
No Matches
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

◆ setup()

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.

◆ process()

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().


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