Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
|
Connect a quadrature rotary encoder, and handle it at audio rate from Bela. More...
#include <BelaEncoder.h>
Classes | |
struct | Pins |
struct | Settings |
Public Member Functions | |
BelaEncoder (const Settings &settings) | |
int | setup (const Settings &settings) |
Rotation | process (BelaContext *context) |
Rotation | process (BelaContext *context, unsigned int frame) |
Public Member Functions inherited from Encoder | |
Encoder (unsigned int debounce, Polarity polarity=ANY) | |
void | setup (unsigned int debounce, Polarity polarity=ANY) |
void | reset (int position=0) |
Rotation | process (bool a, bool b) |
int | get () |
Additional Inherited Members | |
Public Types inherited from Encoder | |
enum | Rotation { CCW = -1, NONE = 0, CW = 1 } |
enum | Polarity { ANY, ACTIVE_LOW, ACTIVE_HIGH } |
Connect a quadrature rotary encoder, and handle it at audio rate from Bela.
This class is a Bela-specific wrapper for Encoder, which is Bela-agnostic. All the methods of BelaEncoder map to those of Encoder, and so only the differences between the two are documented here.
Encoder::Rotation BelaEncoder::process | ( | BelaContext * | context | ) |
Call this method once per block.
If more than one rotation happens during a block, the internal counter is updated for each rotation, but only the direction of the last one is returned.
|
inline |
Call this method once per frame.