Spectral morph: capture two spectra (A and B) and render a blend at position t ∈ [0,1] — the signature "morph between two sounds" effect.
More...
#include <gpu_spectral_morph.hpp>
Spectral morph: capture two spectra (A and B) and render a blend at position t ∈ [0,1] — the signature "morph between two sounds" effect.
Composed from GpuStft: capture_a/capture_b run GPU STFT analysis; render(t) linearly interpolates the stored complex spectra and runs a GPU STFT synthesis. t=0 → A, t=1 → B. Built on the GPU spectral toolkit; not real-time-safe (blocks on readback) — for the worker / offline use.
◆ capture_a()
| bool pulp::gpu_audio::GpuSpectralMorph::capture_a |
( |
const float * | frame_in | ) |
|
◆ capture_b()
| bool pulp::gpu_audio::GpuSpectralMorph::capture_b |
( |
const float * | frame_in | ) |
|
◆ device_usable()
| bool pulp::gpu_audio::GpuSpectralMorph::device_usable |
( |
| ) |
const |
|
inline |
False once the prepared device is lost or its generation changed.
◆ fft_size()
| uint32_t pulp::gpu_audio::GpuSpectralMorph::fft_size |
( |
| ) |
const |
|
inline |
◆ gpu_available()
| bool pulp::gpu_audio::GpuSpectralMorph::gpu_available |
( |
| ) |
const |
|
inline |
◆ prepare()
shared_device (optional) reuses an existing GpuCompute so this morph and a sibling spectral primitive don't each spin up a device; must be initialized and outlive the morph.
null = create + own a device. The device generation is recorded here; capture and render refuse once the device is lost or re-initialized (see GpuStft::prepare).
◆ ready()
| bool pulp::gpu_audio::GpuSpectralMorph::ready |
( |
| ) |
const |
|
inline |
◆ render()
| bool pulp::gpu_audio::GpuSpectralMorph::render |
( |
float | t, |
|
|
float * | frame_out ) |
Render the morph at position t (clamped to [0,1]) into frame_out (fft_size real samples).
Returns false if both endpoints aren't captured or not GPU-ready.
The documentation for this class was generated from the following file: