Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::format::mpe Namespace Reference

Functions

std::uint8_t to_7bit (double norm) noexcept
 Quantize a normalized [0,1] axis value to a 7-bit MIDI data byte.
midi::MidiEvent pitch_bend_from_semitones (std::uint8_t channel, double semitones)
 Per-note pitch as a channel-wide 14-bit pitch bend.
midi::MidiEvent channel_pressure (std::uint8_t channel, double norm)
 Per-note pressure as channel pressure (status 0xD0).
midi::MidiEvent timbre_cc (std::uint8_t channel, double norm)
 Per-note timbre as CC 74.

Variables

constexpr std::uint8_t kTimbreController = 74
 MPE timbre controller.

Function Documentation

◆ channel_pressure()

midi::MidiEvent pulp::format::mpe::channel_pressure ( std::uint8_t channel,
double norm )
inline

Per-note pressure as channel pressure (status 0xD0).

There is no MidiEvent factory for channel pressure, so the message is built directly.

◆ pitch_bend_from_semitones()

midi::MidiEvent pulp::format::mpe::pitch_bend_from_semitones ( std::uint8_t channel,
double semitones )
inline

Per-note pitch as a channel-wide 14-bit pitch bend.

semitones is the signed detune the host asked for. It is normalized to MpeVoiceTracker::kDefaultMemberBendSemitones (and clamped to ±1 of that range) so the tracker's inverse expansion recovers the requested detune; a request beyond the member range saturates rather than wrapping.

◆ timbre_cc()

midi::MidiEvent pulp::format::mpe::timbre_cc ( std::uint8_t channel,
double norm )
inline

Per-note timbre as CC 74.

◆ to_7bit()

std::uint8_t pulp::format::mpe::to_7bit ( double norm)
inlinenoexcept

Quantize a normalized [0,1] axis value to a 7-bit MIDI data byte.

Values outside the range are clamped, so a host that overshoots cannot produce a malformed MIDI byte.

Variable Documentation

◆ kTimbreController

std::uint8_t pulp::format::mpe::kTimbreController = 74
inlineconstexpr

MPE timbre controller.