Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::ParticlePercussionVoiceT< SampleType > Class Template Reference

Single particle-percussion voice composed from the shared collision model and Pulp's existing resonators. More...

#include <particle_percussion_voice.hpp>

Public Types

enum class  Model : std::uint8_t { shaker , maraca , rattle , tambourine }

Public Member Functions

 ParticlePercussionVoiceT ()
void prepare (double sample_rate)
 Prepares at 8 kHz or above.
void set_model (Model model)
 Changes the body recipe and clears the voice's exciter and resonators.
void set_seed (std::uint64_t seed) noexcept
void set_particle_count (int count) noexcept
void set_event_rate (SampleType rate) noexcept
void set_energy_decay (SampleType milliseconds) noexcept
void set_sustain_floor (SampleType floor) noexcept
void set_collision_energy_loss (SampleType loss) noexcept
void reset () noexcept
void excite (SampleType amount01) noexcept
SampleType process () noexcept
void process (SampleType *output, int num_samples) noexcept
Model model () const noexcept
double sample_rate () const noexcept
bool prepared () const noexcept
std::size_t retained_bytes () const noexcept
 Heap storage retained by the prepared five-mode ModalBankT.
int tail_samples () const noexcept
 Conservative render tail: remaining collision-envelope settling plus six T60 intervals for the longest configured body resonance.

Static Public Member Functions

static constexpr int latency_samples () noexcept

Static Public Attributes

static constexpr std::size_t kMaxBands = 4
static constexpr std::size_t kTambourineModes = 5
static constexpr double kMinSupportedSampleRate

Detailed Description

template<typename SampleType = float>
class pulp::signal::ParticlePercussionVoiceT< SampleType >

Single particle-percussion voice composed from the shared collision model and Pulp's existing resonators.

This type owns no graph or instrument-level voice allocation.

prepare() may allocate through ModalBankT. Parameter setters and set_model() are control-side operations. process(), excite(), and reset() are bounded and allocation-free after preparation.

Member Enumeration Documentation

◆ Model

template<typename SampleType = float>
enum class pulp::signal::ParticlePercussionVoiceT::Model : std::uint8_t
strong
Enumerator
shaker 
maraca 
rattle 
tambourine 

Constructor & Destructor Documentation

◆ ParticlePercussionVoiceT()

template<typename SampleType = float>
pulp::signal::ParticlePercussionVoiceT< SampleType >::ParticlePercussionVoiceT ( )
inline

Member Function Documentation

◆ excite()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::excite ( SampleType amount01)
inlinenoexcept

◆ latency_samples()

template<typename SampleType = float>
constexpr int pulp::signal::ParticlePercussionVoiceT< SampleType >::latency_samples ( )
inlinestaticconstexprnoexcept

◆ model()

template<typename SampleType = float>
Model pulp::signal::ParticlePercussionVoiceT< SampleType >::model ( ) const
inlinenodiscardnoexcept

◆ prepare()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::prepare ( double sample_rate)
inline

Prepares at 8 kHz or above.

Invalid, non-finite, or lower rates retain the prior valid rate; every call consistently resets dynamic state.

◆ prepared()

template<typename SampleType = float>
bool pulp::signal::ParticlePercussionVoiceT< SampleType >::prepared ( ) const
inlinenodiscardnoexcept

◆ process() [1/2]

template<typename SampleType = float>
SampleType pulp::signal::ParticlePercussionVoiceT< SampleType >::process ( )
inlinenoexcept

◆ process() [2/2]

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::process ( SampleType * output,
int num_samples )
inlinenoexcept

◆ reset()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::reset ( )
inlinenoexcept

◆ retained_bytes()

template<typename SampleType = float>
std::size_t pulp::signal::ParticlePercussionVoiceT< SampleType >::retained_bytes ( ) const
inlinenodiscardnoexcept

Heap storage retained by the prepared five-mode ModalBankT.

Its seven aligned buffers each round one 16-lane group to the SIMD alignment.

◆ sample_rate()

template<typename SampleType = float>
double pulp::signal::ParticlePercussionVoiceT< SampleType >::sample_rate ( ) const
inlinenodiscardnoexcept

◆ set_collision_energy_loss()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::set_collision_energy_loss ( SampleType loss)
inlinenoexcept

◆ set_energy_decay()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::set_energy_decay ( SampleType milliseconds)
inlinenoexcept

◆ set_event_rate()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::set_event_rate ( SampleType rate)
inlinenoexcept

◆ set_model()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::set_model ( Model model)
inline

Changes the body recipe and clears the voice's exciter and resonators.

◆ set_particle_count()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::set_particle_count ( int count)
inlinenoexcept

◆ set_seed()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::set_seed ( std::uint64_t seed)
inlinenoexcept

◆ set_sustain_floor()

template<typename SampleType = float>
void pulp::signal::ParticlePercussionVoiceT< SampleType >::set_sustain_floor ( SampleType floor)
inlinenoexcept

◆ tail_samples()

template<typename SampleType = float>
int pulp::signal::ParticlePercussionVoiceT< SampleType >::tail_samples ( ) const
inlinenodiscardnoexcept

Conservative render tail: remaining collision-envelope settling plus six T60 intervals for the longest configured body resonance.

Member Data Documentation

◆ kMaxBands

template<typename SampleType = float>
std::size_t pulp::signal::ParticlePercussionVoiceT< SampleType >::kMaxBands = 4
staticconstexpr

◆ kMinSupportedSampleRate

template<typename SampleType = float>
double pulp::signal::ParticlePercussionVoiceT< SampleType >::kMinSupportedSampleRate
staticconstexpr
Initial value:
=
static constexpr double kMinSupportedSampleRate
Definition particle_collision_exciter.hpp:30

◆ kTambourineModes

template<typename SampleType = float>
std::size_t pulp::signal::ParticlePercussionVoiceT< SampleType >::kTambourineModes = 5
staticconstexpr

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