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

#include <instrument_voice_allocator.hpp>

Public Member Functions

 InstrumentVoiceAllocator ()=default
bool prepare (std::uint32_t max_voices)
void reset () noexcept
std::uint32_t max_voices () const noexcept
std::uint32_t active_voice_count () const noexcept
std::uint32_t allocated_voice_count () const noexcept
std::span< const InstrumentVoice > voices () const noexcept
void set_steal_policy (VoiceStealPolicy policy) noexcept
VoiceStealPolicy steal_policy () const noexcept
void set_termination_fade_frames (std::uint32_t frames) noexcept
std::uint32_t termination_fade_frames () const noexcept
VoiceAllocationResult trigger (const InstrumentVoiceTrigger &trigger, std::span< VoiceTermination > terminations={}) noexcept
bool release_voice (std::uint32_t voice_index) noexcept
std::uint32_t release_note (int note, std::uint32_t sample_id=kInvalidSampleId) noexcept
bool finish_voice (std::uint32_t voice_index) noexcept

Constructor & Destructor Documentation

◆ InstrumentVoiceAllocator()

pulp::audio::InstrumentVoiceAllocator::InstrumentVoiceAllocator ( )
default

Member Function Documentation

◆ active_voice_count()

std::uint32_t pulp::audio::InstrumentVoiceAllocator::active_voice_count ( ) const
noexcept

◆ allocated_voice_count()

std::uint32_t pulp::audio::InstrumentVoiceAllocator::allocated_voice_count ( ) const
noexcept

◆ finish_voice()

bool pulp::audio::InstrumentVoiceAllocator::finish_voice ( std::uint32_t voice_index)
noexcept

◆ max_voices()

std::uint32_t pulp::audio::InstrumentVoiceAllocator::max_voices ( ) const
inlinenoexcept

◆ prepare()

bool pulp::audio::InstrumentVoiceAllocator::prepare ( std::uint32_t max_voices)

◆ release_note()

std::uint32_t pulp::audio::InstrumentVoiceAllocator::release_note ( int note,
std::uint32_t sample_id = kInvalidSampleId )
noexcept

◆ release_voice()

bool pulp::audio::InstrumentVoiceAllocator::release_voice ( std::uint32_t voice_index)
noexcept

◆ reset()

void pulp::audio::InstrumentVoiceAllocator::reset ( )
noexcept

◆ set_steal_policy()

void pulp::audio::InstrumentVoiceAllocator::set_steal_policy ( VoiceStealPolicy policy)
inlinenoexcept

◆ set_termination_fade_frames()

void pulp::audio::InstrumentVoiceAllocator::set_termination_fade_frames ( std::uint32_t frames)
inlinenoexcept

◆ steal_policy()

VoiceStealPolicy pulp::audio::InstrumentVoiceAllocator::steal_policy ( ) const
inlinenoexcept

◆ termination_fade_frames()

std::uint32_t pulp::audio::InstrumentVoiceAllocator::termination_fade_frames ( ) const
inlinenoexcept

◆ trigger()

VoiceAllocationResult pulp::audio::InstrumentVoiceAllocator::trigger ( const InstrumentVoiceTrigger & trigger,
std::span< VoiceTermination > terminations = {} )
noexcept

◆ voices()

std::span< const InstrumentVoice > pulp::audio::InstrumentVoiceAllocator::voices ( ) const
inlinenoexcept

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