Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
gate_input.hpp File Reference

Gate input with Schmitt trigger hysteresis. More...

Detailed Description

Gate input with Schmitt trigger hysteresis.

GateInput takes raw ADC values (uint16_t) and applies a Schmitt trigger threshold to produce a clean digital gate signal. Hysteresis prevents chatter near the threshold. One-shot edge detection for triggers.

Usage:

gate.update(adc_value); // Feed raw ADC each tick
if (gate.rising()) { ... } // One-shot rising edge (auto-resets)
if (gate.gate()) { ... } // Current state
Gate input with Schmitt trigger hysteresis and edge detection.
bool gate() const
Current gate state (true = high)
void update(uint16_t raw)
Feed a new raw ADC sample.
bool rising()
True if gate just went high (rising edge)

Definition in file gate_input.hpp.

#include <cstdint>

Go to the source code of this file.

Classes

struct  sbl::control::input::GateConfig
 GateInput construction settings. More...
 
class  sbl::control::input::GateInput
 Gate input with Schmitt trigger hysteresis and edge detection. More...
 

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::control
 The control stack: scheduler, event queue, merge, CC mapping, calibration.
 
namespace  sbl::control::input
 Inputs: debounce, decoding, smoothing and scaling of raw samples.