Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::state::MidiParameterMap Class Reference

#include <midi_parameter_map.hpp>

Public Member Functions

void set_mapping (uint8_t channel, uint8_t cc, ParamID id)
 Map (channel, cc) → parameter across the full range. channel may be kOmni.
void set_mapping (uint8_t channel, uint8_t cc, ParamID id, MidiMapScale scale)
 Map (channel, cc) → parameter, sweeping only scale's normalized window.
void arm_learn (ParamID id)
 Arm learn: the next incoming CC binds to id across the full range.
void arm_learn (ParamID id, MidiMapScale scale)
 Arm learn: the next incoming CC binds to id with scale's window.
void clear (ParamID id)
 Remove any mapping that targets id.
void pump ()
 Drain queued UI commands. Call once at the top of process().
void handle_cc (StateStore &store, uint8_t channel, uint8_t cc, uint8_t value)
 Route one incoming CC.
bool learn_armed () const

Static Public Attributes

static constexpr uint8_t kOmni = 0xFF
 Match any MIDI channel.

Member Function Documentation

◆ arm_learn() [1/2]

void pulp::state::MidiParameterMap::arm_learn ( ParamID id)
inline

Arm learn: the next incoming CC binds to id across the full range.

◆ arm_learn() [2/2]

void pulp::state::MidiParameterMap::arm_learn ( ParamID id,
MidiMapScale scale )
inline

Arm learn: the next incoming CC binds to id with scale's window.

◆ clear()

void pulp::state::MidiParameterMap::clear ( ParamID id)
inline

Remove any mapping that targets id.

◆ handle_cc()

void pulp::state::MidiParameterMap::handle_cc ( StateStore & store,
uint8_t channel,
uint8_t cc,
uint8_t value )
inline

Route one incoming CC.

Binds it if learn is armed, then applies any mapping for (channel, cc) to its parameter through the mapping's scale.

◆ learn_armed()

bool pulp::state::MidiParameterMap::learn_armed ( ) const
inline

◆ pump()

void pulp::state::MidiParameterMap::pump ( )
inline

Drain queued UI commands. Call once at the top of process().

◆ set_mapping() [1/2]

void pulp::state::MidiParameterMap::set_mapping ( uint8_t channel,
uint8_t cc,
ParamID id )
inline

Map (channel, cc) → parameter across the full range. channel may be kOmni.

◆ set_mapping() [2/2]

void pulp::state::MidiParameterMap::set_mapping ( uint8_t channel,
uint8_t cc,
ParamID id,
MidiMapScale scale )
inline

Map (channel, cc) → parameter, sweeping only scale's normalized window.

Member Data Documentation

◆ kOmni

uint8_t pulp::state::MidiParameterMap::kOmni = 0xFF
staticconstexpr

Match any MIDI channel.


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