A stack of N captured spectral "moments" (layers) that can be sustained and morphed. More...
#include <spectral_stack.hpp>
Public Member Functions | |
| virtual | ~SpectralStack ()=default |
| virtual uint32_t | fft_size () const =0 |
| virtual uint32_t | num_layers () const =0 |
| virtual bool | available () const =0 |
| True if this stack's compute backend is live. | |
| virtual bool | capture (uint32_t layer, const float *frame_in)=0 |
| Analyze frame_in (fft_size real samples) with the analysis window and freeze its magnitude + phase into layer, activating it. | |
| virtual void | clear (uint32_t layer)=0 |
| Deactivate a layer (its magnitude goes silent; phase keeps advancing). | |
| virtual bool | layer_active (uint32_t layer) const =0 |
| virtual bool | render (float *frame_out, const float *weights, float smear, float jitter)=0 |
| Advance + smear + weighted-sum the stack into frame_out (fft_size real samples). | |
A stack of N captured spectral "moments" (layers) that can be sustained and morphed.
capture() freezes the windowed spectrum of one frame into a layer; render() advances every layer's phase, optionally smears (magnitude blur) and jitters each layer, weights the layers, and synthesizes ONE combined real frame. This is the authoring surface shared by the CPU reference (CpuSpectralStack) and the GPU-resident batched engine (GpuSpectralStack) so the framing/host code is identical regardless of where the per-bin work runs.
|
virtualdefault |
|
pure virtual |
True if this stack's compute backend is live.
The CPU stack is always available; the GPU stack is available only with a GPU device.
Implemented in pulp::gpu_audio::CpuSpectralStack, and pulp::gpu_audio::GpuSpectralStack.
|
pure virtual |
Analyze frame_in (fft_size real samples) with the analysis window and freeze its magnitude + phase into layer, activating it.
Implemented in pulp::gpu_audio::CpuSpectralStack, and pulp::gpu_audio::GpuSpectralStack.
|
pure virtual |
Deactivate a layer (its magnitude goes silent; phase keeps advancing).
Implemented in pulp::gpu_audio::CpuSpectralStack, and pulp::gpu_audio::GpuSpectralStack.
|
pure virtual |
Implemented in pulp::gpu_audio::CpuSpectralStack, and pulp::gpu_audio::GpuSpectralStack.
|
pure virtual |
Implemented in pulp::gpu_audio::CpuSpectralStack, and pulp::gpu_audio::GpuSpectralStack.
|
pure virtual |
Implemented in pulp::gpu_audio::CpuSpectralStack, and pulp::gpu_audio::GpuSpectralStack.
|
pure virtual |
Advance + smear + weighted-sum the stack into frame_out (fft_size real samples).
weights (length num_layers) scales each layer; smear (0..1) blurs magnitude across frequency; jitter (0..1) adds phase wander. Returns false if no layer is active or the backend is unavailable.
Implemented in pulp::gpu_audio::CpuSpectralStack, and pulp::gpu_audio::GpuSpectralStack.