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

#include <phase_vocoder.hpp>

Public Member Functions

 PhaseVocoderT ()
 PhaseVocoderT (const PhaseVocoderConfig &config)
void configure (const PhaseVocoderConfig &config)
const PhaseVocoderConfig & config () const noexcept
std::vector< SampleType > time_stretch (const std::vector< SampleType > &input, double factor) const
 Time-stretch input by factor (> 0).
std::vector< SampleType > pitch_shift (const std::vector< SampleType > &input, double semitones) const
 Pitch-shift input by semitones (positive = up), preserving duration.

Constructor & Destructor Documentation

◆ PhaseVocoderT() [1/2]

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

◆ PhaseVocoderT() [2/2]

template<typename SampleType = float>
pulp::signal::PhaseVocoderT< SampleType >::PhaseVocoderT ( const PhaseVocoderConfig & config)
inlineexplicit

Member Function Documentation

◆ config()

template<typename SampleType = float>
const PhaseVocoderConfig & pulp::signal::PhaseVocoderT< SampleType >::config ( ) const
inlinenoexcept

◆ configure()

template<typename SampleType = float>
void pulp::signal::PhaseVocoderT< SampleType >::configure ( const PhaseVocoderConfig & config)
inline

◆ pitch_shift()

template<typename SampleType = float>
std::vector< SampleType > pulp::signal::PhaseVocoderT< SampleType >::pitch_shift ( const std::vector< SampleType > & input,
double semitones ) const
inline

Pitch-shift input by semitones (positive = up), preserving duration.

Returns a new buffer the same length as input. Inputs shorter than fft_size are returned unshifted (one analysis frame is the minimum the phase vocoder can process).

◆ time_stretch()

template<typename SampleType = float>
std::vector< SampleType > pulp::signal::PhaseVocoderT< SampleType >::time_stretch ( const std::vector< SampleType > & input,
double factor ) const
inline

Time-stretch input by factor (> 0).

Output is exactly round(input.size() * factor) frames long and keeps the same pitch. factor == 1 is ~identity. factor is clamped to a sane maximum (kMaxStretch) so an absurd value can't request a multi-gigabyte buffer.


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