Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources > Class Template Reference

MaximumHeldSources bounds how many authored notes can have armed echoes at once. More...

#include <note_delay.hpp>

Public Types

using Block = note_schedule::Block

Public Member Functions

constexpr NoteDelay (NoteDelaySpec spec={}) noexcept
constexpr bool valid () const noexcept
constexpr NoteDelaySpec spec () const noexcept
MidiUtilityProcessReport process (const MidiBuffer &input, MidiBuffer &output, const Block &block) noexcept
MidiUtilityProcessReport flush (MidiBuffer &output, const Block &block) noexcept
 Cancel unstarted echoes and release every echo the kernel still owns, including the ones whose end is still armed.
MidiUtilityProcessReport reset (MidiBuffer &output, const Block &block) noexcept
MidiUtilityProcessReport replace_spec (NoteDelaySpec spec, MidiBuffer &output, const Block &block) noexcept
bool empty () const noexcept
std::size_t scheduled () const noexcept
std::size_t sounding () const noexcept

Static Public Member Functions

static constexpr MidiUtilityContract contract () noexcept
static constexpr bool valid_spec (NoteDelaySpec spec) noexcept
static constexpr bool is_identity (NoteDelaySpec spec) noexcept
 True when the kernel cannot change the stream, which is its declared bypass identity.
static std::int64_t repeat_stride (NoteDelaySpec spec, const Block &block) noexcept
 Sample stride between consecutive repeats under whichever clock the spec selects.
static std::int64_t repeat_gate (NoteDelaySpec spec, const Block &block) noexcept
 Length of an authorable echo gate.
static std::int64_t repeat_sample (NoteDelaySpec spec, const Block &block, std::int64_t attack_absolute, std::size_t index) noexcept
 Absolute sample of repeat index (1-based; index 0 is the dry note).
static constexpr std::uint8_t repeat_velocity (NoteDelaySpec spec, std::uint8_t velocity, std::size_t index) noexcept
 Velocity of repeat index under the shipped decay law.
static constexpr std::optional< std::uint8_t > repeat_note (NoteDelaySpec spec, std::uint8_t note, std::size_t index) noexcept
 Pitch of repeat index, or nothing when the cumulative transposition has walked the repeat off the MIDI note range.

Detailed Description

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
class pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >

MaximumHeldSources bounds how many authored notes can have armed echoes at once.

Like the scheduled-note queue it is a polyphony bound, not the whole 16x128 key space: the key space would make the kernel a 52 KiB object to buy headroom no keyboard can reach.

Member Typedef Documentation

◆ Block

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
using pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::Block = note_schedule::Block

Constructor & Destructor Documentation

◆ NoteDelay()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::NoteDelay ( NoteDelaySpec spec = {})
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ contract()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
constexpr MidiUtilityContract pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::contract ( )
inlinestaticconstexprnoexcept

◆ empty()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
bool pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::empty ( ) const
inlinenoexcept

◆ flush()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
MidiUtilityProcessReport pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::flush ( MidiBuffer & output,
const Block & block )
inlinenoexcept

Cancel unstarted echoes and release every echo the kernel still owns, including the ones whose end is still armed.

◆ is_identity()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
constexpr bool pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::is_identity ( NoteDelaySpec spec)
inlinestaticconstexprnoexcept

True when the kernel cannot change the stream, which is its declared bypass identity.

◆ process()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
MidiUtilityProcessReport pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::process ( const MidiBuffer & input,
MidiBuffer & output,
const Block & block )
inlinenoexcept

◆ repeat_gate()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
std::int64_t pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::repeat_gate ( NoteDelaySpec spec,
const Block & block )
inlinestaticnoexcept

Length of an authorable echo gate.

A zero result means the legacy source-held policy is active and the release remains armed until the authored source release arrives.

◆ repeat_note()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
constexpr std::optional< std::uint8_t > pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::repeat_note ( NoteDelaySpec spec,
std::uint8_t note,
std::size_t index )
inlinestaticconstexprnoexcept

Pitch of repeat index, or nothing when the cumulative transposition has walked the repeat off the MIDI note range.

An out-of-range repeat is skipped rather than folded back, because folding would invent a pitch the authored transposition never asked for.

◆ repeat_sample()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
std::int64_t pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::repeat_sample ( NoteDelaySpec spec,
const Block & block,
std::int64_t attack_absolute,
std::size_t index )
inlinestaticnoexcept

Absolute sample of repeat index (1-based; index 0 is the dry note).

◆ repeat_stride()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
std::int64_t pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::repeat_stride ( NoteDelaySpec spec,
const Block & block )
inlinestaticnoexcept

Sample stride between consecutive repeats under whichever clock the spec selects.

Exposed so a test or a UI can predict the echo series without pushing events through the kernel.

◆ repeat_velocity()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
constexpr std::uint8_t pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::repeat_velocity ( NoteDelaySpec spec,
std::uint8_t velocity,
std::size_t index )
inlinestaticconstexprnoexcept

Velocity of repeat index under the shipped decay law.

◆ replace_spec()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
MidiUtilityProcessReport pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::replace_spec ( NoteDelaySpec spec,
MidiBuffer & output,
const Block & block )
inlinenoexcept

◆ reset()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
MidiUtilityProcessReport pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::reset ( MidiBuffer & output,
const Block & block )
inlinenoexcept

◆ scheduled()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
std::size_t pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::scheduled ( ) const
inlinenoexcept

◆ sounding()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
std::size_t pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::sounding ( ) const
inlinenoexcept

◆ spec()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
NoteDelaySpec pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::spec ( ) const
inlineconstexprnoexcept

◆ valid()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
bool pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::valid ( ) const
inlineconstexprnoexcept

◆ valid_spec()

template<std::size_t MaximumScheduledNotes = 128, std::size_t MaximumHeldSources = 64>
constexpr bool pulp::midi::NoteDelay< MaximumScheduledNotes, MaximumHeldSources >::valid_spec ( NoteDelaySpec spec)
inlinestaticconstexprnoexcept

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/midi/include/pulp/midi/note_delay.hpp