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

#include <note_repeat.hpp>

Public Types

using Block = note_schedule::Block

Public Member Functions

constexpr NoteRepeat (NoteRepeatSpec spec={}) noexcept
constexpr bool valid () const noexcept
constexpr NoteRepeatSpec spec () const noexcept
MidiUtilityProcessReport process (const MidiBuffer &input, MidiBuffer &output, const Block &block) noexcept
MidiUtilityProcessReport flush (MidiBuffer &output, const Block &block) noexcept
 Cancel unstarted hits and release every note the kernel still owns.
MidiUtilityProcessReport reset (MidiBuffer &output, const Block &block) noexcept
MidiUtilityProcessReport replace_spec (NoteRepeatSpec 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 (NoteRepeatSpec spec) noexcept
static constexpr bool is_identity (NoteRepeatSpec spec) noexcept
 True when the kernel cannot change the stream, which is its declared bypass identity.
static std::int64_t hit_stride (NoteRepeatSpec spec, const Block &block) noexcept
 Sample stride between consecutive hits, derived from division arithmetic alone.
static std::int64_t hit_sample (NoteRepeatSpec spec, const Block &block, std::int64_t attack_absolute, std::size_t index) noexcept
 Absolute sample of hit index for an attack at attack_absolute.
static constexpr std::uint8_t hit_velocity (NoteRepeatSpec spec, std::uint8_t velocity, std::size_t index) noexcept
 Velocity of hit index under the shipped decay law.
static bool hit_sounds (NoteRepeatSpec spec, std::uint8_t channel, std::uint8_t note, std::int64_t attack_absolute, std::size_t index) noexcept
 Whether hit index of the attack at attack_absolute survives its probability draw.

Member Typedef Documentation

◆ Block

template<std::size_t MaximumScheduledNotes = 128>
using pulp::midi::NoteRepeat< MaximumScheduledNotes >::Block = note_schedule::Block

Constructor & Destructor Documentation

◆ NoteRepeat()

template<std::size_t MaximumScheduledNotes = 128>
pulp::midi::NoteRepeat< MaximumScheduledNotes >::NoteRepeat ( NoteRepeatSpec spec = {})
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ contract()

template<std::size_t MaximumScheduledNotes = 128>
constexpr MidiUtilityContract pulp::midi::NoteRepeat< MaximumScheduledNotes >::contract ( )
inlinestaticconstexprnoexcept

◆ empty()

template<std::size_t MaximumScheduledNotes = 128>
bool pulp::midi::NoteRepeat< MaximumScheduledNotes >::empty ( ) const
inlinenoexcept

◆ flush()

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

Cancel unstarted hits and release every note the kernel still owns.

Offsets are clamped into block.

◆ hit_sample()

template<std::size_t MaximumScheduledNotes = 128>
std::int64_t pulp::midi::NoteRepeat< MaximumScheduledNotes >::hit_sample ( NoteRepeatSpec spec,
const Block & block,
std::int64_t attack_absolute,
std::size_t index )
inlinestaticnoexcept

Absolute sample of hit index for an attack at attack_absolute.

◆ hit_sounds()

template<std::size_t MaximumScheduledNotes = 128>
bool pulp::midi::NoteRepeat< MaximumScheduledNotes >::hit_sounds ( NoteRepeatSpec spec,
std::uint8_t channel,
std::uint8_t note,
std::int64_t attack_absolute,
std::size_t index )
inlinestaticnoexcept

Whether hit index of the attack at attack_absolute survives its probability draw.

Depends only on the spec and the attack's own coordinate, so it is invariant under block partition.

◆ hit_stride()

template<std::size_t MaximumScheduledNotes = 128>
std::int64_t pulp::midi::NoteRepeat< MaximumScheduledNotes >::hit_stride ( NoteRepeatSpec spec,
const Block & block )
inlinestaticnoexcept

Sample stride between consecutive hits, derived from division arithmetic alone.

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

◆ hit_velocity()

template<std::size_t MaximumScheduledNotes = 128>
constexpr std::uint8_t pulp::midi::NoteRepeat< MaximumScheduledNotes >::hit_velocity ( NoteRepeatSpec spec,
std::uint8_t velocity,
std::size_t index )
inlinestaticconstexprnoexcept

Velocity of hit index under the shipped decay law.

◆ is_identity()

template<std::size_t MaximumScheduledNotes = 128>
constexpr bool pulp::midi::NoteRepeat< MaximumScheduledNotes >::is_identity ( NoteRepeatSpec spec)
inlinestaticconstexprnoexcept

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

◆ process()

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

◆ replace_spec()

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

◆ reset()

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

◆ scheduled()

template<std::size_t MaximumScheduledNotes = 128>
std::size_t pulp::midi::NoteRepeat< MaximumScheduledNotes >::scheduled ( ) const
inlinenoexcept

◆ sounding()

template<std::size_t MaximumScheduledNotes = 128>
std::size_t pulp::midi::NoteRepeat< MaximumScheduledNotes >::sounding ( ) const
inlinenoexcept

◆ spec()

template<std::size_t MaximumScheduledNotes = 128>
NoteRepeatSpec pulp::midi::NoteRepeat< MaximumScheduledNotes >::spec ( ) const
inlineconstexprnoexcept

◆ valid()

template<std::size_t MaximumScheduledNotes = 128>
bool pulp::midi::NoteRepeat< MaximumScheduledNotes >::valid ( ) const
inlineconstexprnoexcept

◆ valid_spec()

template<std::size_t MaximumScheduledNotes = 128>
constexpr bool pulp::midi::NoteRepeat< MaximumScheduledNotes >::valid_spec ( NoteRepeatSpec spec)
inlinestaticconstexprnoexcept

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