Offline phase-vocoder time-stretch and pitch-shift. More...
#include <algorithm>#include <cmath>#include <complex>#include <vector>#include <pulp/signal/fft.hpp>#include <pulp/signal/windowing.hpp>Go to the source code of this file.
Classes | |
| struct | pulp::signal::PhaseVocoderConfig |
| class | pulp::signal::PhaseVocoderT< SampleType > |
Namespaces | |
| namespace | pulp |
| namespace | pulp::signal |
Typedefs | |
| using | pulp::signal::PhaseVocoder = PhaseVocoderT<float> |
| using | pulp::signal::PhaseVocoder64 = PhaseVocoderT<double> |
Offline phase-vocoder time-stretch and pitch-shift.
A standard STFT phase-vocoder: analyze overlapping windowed frames, track the instantaneous frequency per bin by unwrapping the phase advance, re-synthesize at a different hop with accumulated phase, and overlap-add. Time-stretching changes duration while preserving pitch; pitch-shifting is a time-stretch followed by resampling, preserving duration. This gives transient-aware stretch/shift without the pitch artifacts of naive resampling — a reusable DSP primitive built only on Pulp's existing FFT and window functions.
These are offline operations (they allocate and process a whole buffer), so configure()/time_stretch()/pitch_shift() are control-thread work, not real-time-audio-safe. Input/output are mono sample buffers. Header-only to match the header-only pulp::signal umbrella.