Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::components::input::KnobGate Class Reference

Detailed Description

Definition at line 29 of file knob_gate.hpp.

#include <knob_gate.hpp>

Public Member Functions

 KnobGate (uint16_t threshold=2000)
 
void arm (uint16_t entry_value)
 Lock the gate and record current knob position.
 
void update (uint16_t current_value)
 Check if knob has moved enough from entry position to unlock.
 
bool live () const
 True when the gate is open (output allowed).
 
void force_live ()
 Force the gate open (e.g., for the initial mode that needs no gating).
 
void set_threshold (uint16_t t)
 Set threshold (0-65535).
 

Constructor & Destructor Documentation

◆ KnobGate()

sbl::components::input::KnobGate::KnobGate ( uint16_t  threshold = 2000)
inlineexplicit
Parameters
thresholdMovement required to unlock (0-65535). Default ~3%.

Definition at line 32 of file knob_gate.hpp.

Member Function Documentation

◆ arm()

void sbl::components::input::KnobGate::arm ( uint16_t  entry_value)
inline

Lock the gate and record current knob position.

Definition at line 36 of file knob_gate.hpp.

◆ update()

void sbl::components::input::KnobGate::update ( uint16_t  current_value)
inline

Check if knob has moved enough from entry position to unlock.

Definition at line 42 of file knob_gate.hpp.

◆ live()

bool sbl::components::input::KnobGate::live ( ) const
inline

True when the gate is open (output allowed).

Definition at line 52 of file knob_gate.hpp.

◆ force_live()

void sbl::components::input::KnobGate::force_live ( )
inline

Force the gate open (e.g., for the initial mode that needs no gating).

Definition at line 55 of file knob_gate.hpp.

◆ set_threshold()

void sbl::components::input::KnobGate::set_threshold ( uint16_t  t)
inline

Set threshold (0-65535).

Definition at line 58 of file knob_gate.hpp.


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