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

Streaming pitch-family mechanism for one sampler voice. More...

#include <sample_heritage_pitch.hpp>

Public Member Functions

 SampleHeritagePitchProcessor ()=default
 SampleHeritagePitchProcessor (const SampleHeritagePitchProcessor &)=delete
SampleHeritagePitchProcessor & operator= (const SampleHeritagePitchProcessor &)=delete
 SampleHeritagePitchProcessor (SampleHeritagePitchProcessor &&)=delete
SampleHeritagePitchProcessor & operator= (SampleHeritagePitchProcessor &&)=delete
SampleHeritagePitchStatus prepare (SampleHeritagePitchFamily family, double factor, std::size_t channel_count) noexcept
void release () noexcept
void reset () noexcept
bool prepared () const noexcept
bool exact_bypass () const noexcept
bool fixed_clock_processing () const noexcept
SampleHeritagePitchFamily family () const noexcept
double factor () const noexcept
SampleHeritagePitchStatus set_factor (double factor) noexcept
 Updates note pitch without reallocating or discontinuously resetting the source cursor.
double machine_clock_multiplier () const noexcept
 Multiplier applied to the voice machine clock.
double source_frames_per_machine_frame () const noexcept
 Source advance per fixed-rate machine frame.
SampleHeritagePitchPlan plan (std::size_t output_frames) const noexcept
SampleHeritagePitchStatus process (const BufferView< const float > &input, BufferView< float > output) noexcept

Static Public Attributes

static constexpr double kMinimumFactor = 0.015625
static constexpr double kMaximumFactor = 64.0

Detailed Description

Streaming pitch-family mechanism for one sampler voice.

Variable-clock playback changes the rate of the machine clock and therefore copies machine-domain samples without interpolation. Drop/repeat and early linear playback keep the machine clock fixed and move through the source at the requested factor using zero-order selection or linear interpolation. The profile clock ratio remains an independent multiplier in either route; factor is the note/source pitch factor supplied by the sampler at runtime. prepare() allocates the bounded two-frame history used by fixed-clock modes; plan() and process() do not allocate.

Constructor & Destructor Documentation

◆ SampleHeritagePitchProcessor() [1/3]

pulp::audio::SampleHeritagePitchProcessor::SampleHeritagePitchProcessor ( )
default

◆ SampleHeritagePitchProcessor() [2/3]

pulp::audio::SampleHeritagePitchProcessor::SampleHeritagePitchProcessor ( const SampleHeritagePitchProcessor & )
delete

◆ SampleHeritagePitchProcessor() [3/3]

pulp::audio::SampleHeritagePitchProcessor::SampleHeritagePitchProcessor ( SampleHeritagePitchProcessor && )
delete

Member Function Documentation

◆ exact_bypass()

bool pulp::audio::SampleHeritagePitchProcessor::exact_bypass ( ) const
inlinenoexcept

◆ factor()

double pulp::audio::SampleHeritagePitchProcessor::factor ( ) const
inlinenoexcept

◆ family()

SampleHeritagePitchFamily pulp::audio::SampleHeritagePitchProcessor::family ( ) const
inlinenoexcept

◆ fixed_clock_processing()

bool pulp::audio::SampleHeritagePitchProcessor::fixed_clock_processing ( ) const
inlinenoexcept

◆ machine_clock_multiplier()

double pulp::audio::SampleHeritagePitchProcessor::machine_clock_multiplier ( ) const
inlinenoexcept

Multiplier applied to the voice machine clock.

◆ operator=() [1/2]

SampleHeritagePitchProcessor & pulp::audio::SampleHeritagePitchProcessor::operator= ( const SampleHeritagePitchProcessor & )
delete

◆ operator=() [2/2]

SampleHeritagePitchProcessor & pulp::audio::SampleHeritagePitchProcessor::operator= ( SampleHeritagePitchProcessor && )
delete

◆ plan()

SampleHeritagePitchPlan pulp::audio::SampleHeritagePitchProcessor::plan ( std::size_t output_frames) const
inlinenoexcept

◆ prepare()

SampleHeritagePitchStatus pulp::audio::SampleHeritagePitchProcessor::prepare ( SampleHeritagePitchFamily family,
double factor,
std::size_t channel_count )
inlinenoexcept

◆ prepared()

bool pulp::audio::SampleHeritagePitchProcessor::prepared ( ) const
inlinenoexcept

◆ process()

SampleHeritagePitchStatus pulp::audio::SampleHeritagePitchProcessor::process ( const BufferView< const float > & input,
BufferView< float > output )
inlinenoexcept

◆ release()

void pulp::audio::SampleHeritagePitchProcessor::release ( )
inlinenoexcept

◆ reset()

void pulp::audio::SampleHeritagePitchProcessor::reset ( )
inlinenoexcept

◆ set_factor()

SampleHeritagePitchStatus pulp::audio::SampleHeritagePitchProcessor::set_factor ( double factor)
inlinenoexcept

Updates note pitch without reallocating or discontinuously resetting the source cursor.

A fresh/reset factor-one fixed-clock processor takes the exact copy path; after another factor has displaced the cursor, factor one continues through the indexed path until reset.

◆ source_frames_per_machine_frame()

double pulp::audio::SampleHeritagePitchProcessor::source_frames_per_machine_frame ( ) const
inlinenoexcept

Source advance per fixed-rate machine frame.

Member Data Documentation

◆ kMaximumFactor

double pulp::audio::SampleHeritagePitchProcessor::kMaximumFactor = 64.0
staticconstexpr

◆ kMinimumFactor

double pulp::audio::SampleHeritagePitchProcessor::kMinimumFactor = 0.015625
staticconstexpr

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