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
merge.hpp File Reference

Merge primitives: one parameter, several sources. More...

Detailed Description

Merge primitives: one parameter, several sources.

The merge step runs once per control tick (Stage::Merge) and is the only writer of each bridged level. These primitives decide that level when more than one source can drive a parameter. Plain summation (pitch = knob + V/Oct + MIDI) needs no type.

  • Priority<N>: the highest-priority active source wins.
  • Latest<N>: the last source to move wins.
  • Pickup: a takeover source must reach the held value before it captures it.

All work on signal floats, hold no pointers, allocate nothing, and run in one context (the control tick).

Usage:

sbl::control::Pickup fold; // knob vs. MIDI CC
// Stage::Drain, on the CC: fold.hold(cc_value);
// Stage::Merge, every tick: fold_value = fold.process(knob.value());
// UI slot: led = fold.caught();
A takeover source must reach the held value before it captures it.
Definition merge.hpp:153

Definition in file merge.hpp.

#include <cstdint>

Go to the source code of this file.

Classes

class  sbl::control::Priority< N >
 The highest-priority active source wins. More...
 
class  sbl::control::Latest< N >
 The last source to move wins. More...
 
class  sbl::control::Pickup
 A takeover source must reach the held value before it captures it. 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.