34 return stft_.device_usable();
36 uint32_t
fft_size()
const {
return stft_.fft_size(); }
37 uint32_t
hop()
const {
return hop_; }
50 bool render(
float* frame_out,
float phase_jitter = 0.0f);
55 std::vector<float> mag_;
56 std::vector<float> phase_;
57 std::vector<float> scratch_;
58 std::uint32_t seed_ = 0x9E3779B9u;
59 bool captured_ =
false;
Phase-vocoder spectral freeze: capture one analysis frame and sustain it indefinitely with a SEAMLESS...
Definition gpu_spectral_freeze.hpp:20
uint32_t hop() const
Definition gpu_spectral_freeze.hpp:37
bool gpu_available() const
Definition gpu_spectral_freeze.hpp:31
uint32_t fft_size() const
Definition gpu_spectral_freeze.hpp:36
bool capture(const float *frame_in)
Analyze frame_in (fft_size real samples) and capture its magnitude + phase as the frozen content.
bool prepare(uint32_t fft_size, uint32_t hop, signal::WindowFunction::Type window=signal::WindowFunction::Type::hann, render::GpuCompute *shared_device=nullptr)
shared_device (optional) reuses an existing GpuCompute so this freeze and a sibling spectral primitiv...
bool render(float *frame_out, float phase_jitter=0.0f)
Render the next synthesis frame (fft_size real samples), advancing each bin's phase by its nominal pe...
bool device_usable() const
False once the prepared device is lost or its generation changed.
Definition gpu_spectral_freeze.hpp:33
bool is_captured() const
Definition gpu_spectral_freeze.hpp:38
GPU short-time Fourier transform primitive (spectral toolkit).
Definition gpu_stft.hpp:21
GPU compute pipeline for non-rendering workloads (e.g.
Definition gpu_compute.hpp:48
Type
Definition windowing.hpp:43
@ hann
Definition windowing.hpp:45
Definition flow_pans.hpp:19