Capture-and-loop "freeze": snapshot a slice of recent audio and play it back as a seamless loop. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <cstdint>#include <limits>#include <type_traits>#include <vector>Go to the source code of this file.
Classes | |
| class | pulp::signal::FreezeLoopSamplerT< SampleType > |
Namespaces | |
| namespace | pulp |
| namespace | pulp::signal |
Typedefs | |
| using | pulp::signal::FreezeLoopSampler = FreezeLoopSamplerT<float> |
| using | pulp::signal::FreezeLoopSampler64 = FreezeLoopSamplerT<double> |
Capture-and-loop "freeze": snapshot a slice of recent audio and play it back as a seamless loop.
Distinct from a spectral freeze (which holds one STFT frame forever): this is a time-domain sampler. It records the incoming signal into a ring continuously, so the instant freeze() is called the last loop_samples of audio are already captured; that slice is then looped with an equal-power crossfade across the loop boundary so the wrap is click-free. Because it produces an ordinary audio stream, downstream stages (pitch shift, formant, delay) keep working on the frozen loop — freeze a moment, then bend it.
Crossfade scheme: the captured slice is loop_samples long plus a crossfade tail of the samples that followed it. At bake time the head crossfade samples are constant-power-blended with that tail (head fading in, tail fading out), so playing the slice on repeat transitions the end smoothly back into the start. Real-time-safe after prepare(); freeze()/read() allocate nothing.