Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::midi::MpeSynthVoice Class Referenceabstract

Abstract base for a single MPE voice. More...

#include <mpe_synth_voice.hpp>

Public Member Functions

virtual ~MpeSynthVoice ()=default
virtual void on_note_on (const MpeNoteState &note)
 Called by the allocator when this voice is activated.
virtual void on_note_off ()
 Called by the allocator when this voice should release.
void advance_smoothers ()
 Called once per sample before rendering. Advances smoothers.
virtual void render (float *out, int num_samples)=0
 Render num_samples of audio into out (additive or replacing — subclass decides).
virtual void reset ()
 Hard-reset the voice (e.g. on allocation steal).
void set_pitch_bend (float semitones)
void set_pressure (float p)
void set_timbre (float t)
void set_smoothing (float coeff)
 Smoothing coefficient in [0, 1). 0 = instant; 0.99 = ~100 sample TC.
bool active () const
bool releasing () const
MpeNoteGeneration note_id () const
uint8_t channel () const
uint8_t note_number () const
uint8_t velocity () const
float pitch_bend () const
float pressure () const
float timbre () const

Protected Member Functions

void finish_release ()

Detailed Description

Abstract base for a single MPE voice.

Subclasses render audio and respond to note lifecycle; expression smoothing is handled here.

Constructor & Destructor Documentation

◆ ~MpeSynthVoice()

virtual pulp::midi::MpeSynthVoice::~MpeSynthVoice ( )
virtualdefault

Member Function Documentation

◆ active()

bool pulp::midi::MpeSynthVoice::active ( ) const
inline

◆ advance_smoothers()

void pulp::midi::MpeSynthVoice::advance_smoothers ( )
inline

Called once per sample before rendering. Advances smoothers.

◆ channel()

uint8_t pulp::midi::MpeSynthVoice::channel ( ) const
inline

◆ finish_release()

void pulp::midi::MpeSynthVoice::finish_release ( )
inlineprotected

◆ note_id()

MpeNoteGeneration pulp::midi::MpeSynthVoice::note_id ( ) const
inline

◆ note_number()

uint8_t pulp::midi::MpeSynthVoice::note_number ( ) const
inline

◆ on_note_off()

virtual void pulp::midi::MpeSynthVoice::on_note_off ( )
inlinevirtual

Called by the allocator when this voice should release.

◆ on_note_on()

virtual void pulp::midi::MpeSynthVoice::on_note_on ( const MpeNoteState & note)
inlinevirtual

Called by the allocator when this voice is activated.

◆ pitch_bend()

float pulp::midi::MpeSynthVoice::pitch_bend ( ) const
inline

◆ pressure()

float pulp::midi::MpeSynthVoice::pressure ( ) const
inline

◆ releasing()

bool pulp::midi::MpeSynthVoice::releasing ( ) const
inline

◆ render()

virtual void pulp::midi::MpeSynthVoice::render ( float * out,
int num_samples )
pure virtual

Render num_samples of audio into out (additive or replacing — subclass decides).

The allocator calls this once per block per active voice; subclasses should call advance_smoothers() at the start of each sample or block as appropriate.

◆ reset()

virtual void pulp::midi::MpeSynthVoice::reset ( )
inlinevirtual

Hard-reset the voice (e.g. on allocation steal).

◆ set_pitch_bend()

void pulp::midi::MpeSynthVoice::set_pitch_bend ( float semitones)
inline

◆ set_pressure()

void pulp::midi::MpeSynthVoice::set_pressure ( float p)
inline

◆ set_smoothing()

void pulp::midi::MpeSynthVoice::set_smoothing ( float coeff)
inline

Smoothing coefficient in [0, 1). 0 = instant; 0.99 = ~100 sample TC.

◆ set_timbre()

void pulp::midi::MpeSynthVoice::set_timbre ( float t)
inline

◆ timbre()

float pulp::midi::MpeSynthVoice::timbre ( ) const
inline

◆ velocity()

uint8_t pulp::midi::MpeSynthVoice::velocity ( ) const
inline

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