Realtime pitch shifting and time-scale modification for coherent channel groups, built on SpectralFrameEngine (STFT/WOLA), MultichannelPhaseCoordinator (Laroche-Dolson phase propagation with identity peak locking) and SpectralEnvelopeShifter (formant preservation / shifting). More...
#include <pulp/signal/detail/fractional_synthesis_hop_accumulator.hpp>#include <pulp/signal/realtime_pitch_time_geometry.hpp>#include <pulp/signal/freeze_hold.hpp>#include <pulp/signal/latency_aware_control_smoother.hpp>#include <pulp/signal/multichannel_phase_coordinator.hpp>#include <pulp/signal/noise_morpher.hpp>#include <pulp/signal/sinc_resampler.hpp>#include <pulp/signal/spectral_envelope_shifter.hpp>#include <pulp/signal/spectral_frame_engine.hpp>#include <pulp/signal/stn_decomposer.hpp>#include <pulp/signal/transient_phase_policy.hpp>#include <algorithm>#include <cassert>#include <cmath>#include <complex>#include <cstdint>#include <limits>#include <vector>Go to the source code of this file.
Classes | |
| class | pulp::signal::RealtimePitchTimeProcessorT< SampleType > |
Namespaces | |
| namespace | pulp |
| namespace | pulp::signal |
Typedefs | |
| using | pulp::signal::RealtimePitchTimeProcessor = RealtimePitchTimeProcessorT<float> |
| using | pulp::signal::RealtimePitchTimeProcessor64 = RealtimePitchTimeProcessorT<double> |
Realtime pitch shifting and time-scale modification for coherent channel groups, built on SpectralFrameEngine (STFT/WOLA), MultichannelPhaseCoordinator (Laroche-Dolson phase propagation with identity peak locking) and SpectralEnvelopeShifter (formant preservation / shifting).
Pitch shifting is realized as time-scale modification followed by resampling (Laroche & Dolson, "New Phase-Vocoder Techniques for Pitch-Shifting, Harmonizing and Other Exotic Effects," WASPAA 1999): the synthesis hop tracks pitch_ratio * analysis_hop through a fractional accumulator, and an internal Catmull-Rom reader maps each output sample to its stretched-stream position through the producer's own frame map (input frame position -> synthesized start), so process() emits exactly as many samples as it consumes with a fixed, exactly-reported latency at every ratio — the reader cannot drift against the synthesis hops by construction.
Two modes, chosen at prepare():
Geometry is derived from the quality mode and the COLA conditions of the Hann window only (quality: 4096/512 at a 96 ms latency budget; low_latency: 1024/256 at 26.7 ms @ 48 kHz) — constants come from the algorithm's own geometry, not from any reference product.
No allocation or locks after prepare().