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

Send every mapped parameter's value back out as its Control Change. More...

Detailed Description

Send every mapped parameter's value back out as its Control Change.

For a controller that takes its values back: after a reset, or at startup, each row of a CcMapper's table is sent as a Control Change with the target's value, so the controller's encoders show where the parameters are. A 14-bit row sends its MSB only.

request() may come from the control tick; poll() runs in the main loop and sends as many rows as the sender takes, resuming on the next call. A request during a walk starts it again from the first row.

if (seeded) echo.request(); // the tick
echo.poll(CHANNEL, // the main loop
[](Param p) { return params.value(p); },
[](const sbl::midi::MidiEvent& e) { return sbl::usb::MidiPort::send(e); });
static bool send(const sbl::midi::MidiEvent &event, uint8_t port=0)
Send a MidiEvent over USB MIDI (TX)
Definition midi.cpp:33

Definition in file param_echo.hpp.

#include <atomic>
#include <cstddef>
#include <cstdint>
#include <sbl/control/cc_mapper.hpp>
#include <sbl/math/clamp.hpp>
#include <sbl/protocol/midi/types.hpp>

Go to the source code of this file.

Classes

class  sbl::control::ParamEcho< Target >
 

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::control
 The control stack: scheduler, event queue, merge, CC mapping, calibration.