Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::FreezeHoldT< SampleType >::Config Struct Reference

Two sizing modes. More...

#include <freeze_hold.hpp>

Public Attributes

int fft_size = 2048
int channels = 1
int analysis_hop = 512
int capture_frames = 8
 Frames averaged into the hold (rolling capture depth, >= 2).
int crossfade_frames = 6
 Engage/release crossfade length in frames (>= 1).
float phase_jitter = 0.015f
 Random-walk step bound (radians/frame) for de-looping.
int max_capture_frames = 0
 Largest capture depth set_capture_frames() may select later; storage is preallocated for it.
double sample_rate = 0.0
double capture_seconds = FreezeHoldReferenceTiming::kCaptureSeconds
 Capture window in seconds of hop grid: frames = round(s * sr / hop).
double crossfade_seconds = FreezeHoldReferenceTiming::kCrossfadeSeconds
 Crossfade length: frames = round(s * sr / hop).
double phase_jitter_per_sqrt_second
 Random-walk rate in radians per sqrt(second); the per-frame bound is rate * sqrt(hop / sr), so the walk's spread over time does not depend on the hop.
double max_capture_seconds = 0.0
 Longest capture set_capture_seconds() may select later.
FreezeHoldSynthesis synthesis = FreezeHoldSynthesis::polar
 Held-frame synthesis. polar reproduces the original output.
FreezeHoldFrequency frequency = FreezeHoldFrequency::newest
 Per-bin frequency estimate. newest reproduces the original.
FreezeHoldAverage average = FreezeHoldAverage::at_latch
 Capture-window averaging. at_latch reproduces the original.
int engage_bins_per_hop = 0
 With rotor synthesis: bins whose rotor (and, with energy_weighted, frequency) is built per frame group after a latch, starting in the latching group.
FreezeHoldPhaseLock phase_lock = FreezeHoldPhaseLock::none
 Phase structure at the latch. none reproduces the original.
int lobe_half_width = 2
 With peak_lobe: bins either side of a peak locked to it (2 spans a Hann main lobe).

Detailed Description

template<typename SampleType = float>
struct pulp::signal::FreezeHoldT< SampleType >::Config

Two sizing modes.

With sample_rate == 0 (the default) the frame counts are used as given. With sample_rate > 0 the seconds fields are used instead and the frame counts are derived from the hop, so the hold keeps the same real-time behaviour at any geometry; their defaults reproduce the frame-count defaults at a 512-sample hop and 48 kHz (see FreezeHoldReferenceTiming).

Member Data Documentation

◆ analysis_hop

template<typename SampleType = float>
int pulp::signal::FreezeHoldT< SampleType >::Config::analysis_hop = 512

◆ average

template<typename SampleType = float>
FreezeHoldAverage pulp::signal::FreezeHoldT< SampleType >::Config::average = FreezeHoldAverage::at_latch

Capture-window averaging. at_latch reproduces the original.

◆ capture_frames

template<typename SampleType = float>
int pulp::signal::FreezeHoldT< SampleType >::Config::capture_frames = 8

Frames averaged into the hold (rolling capture depth, >= 2).

◆ capture_seconds

template<typename SampleType = float>
double pulp::signal::FreezeHoldT< SampleType >::Config::capture_seconds = FreezeHoldReferenceTiming::kCaptureSeconds

Capture window in seconds of hop grid: frames = round(s * sr / hop).

◆ channels

template<typename SampleType = float>
int pulp::signal::FreezeHoldT< SampleType >::Config::channels = 1

◆ crossfade_frames

template<typename SampleType = float>
int pulp::signal::FreezeHoldT< SampleType >::Config::crossfade_frames = 6

Engage/release crossfade length in frames (>= 1).

◆ crossfade_seconds

template<typename SampleType = float>
double pulp::signal::FreezeHoldT< SampleType >::Config::crossfade_seconds = FreezeHoldReferenceTiming::kCrossfadeSeconds

Crossfade length: frames = round(s * sr / hop).

◆ engage_bins_per_hop

template<typename SampleType = float>
int pulp::signal::FreezeHoldT< SampleType >::Config::engage_bins_per_hop = 0

With rotor synthesis: bins whose rotor (and, with energy_weighted, frequency) is built per frame group after a latch, starting in the latching group.

0 builds them all in the latching frame group. A restored hold is always built in full.

◆ fft_size

template<typename SampleType = float>
int pulp::signal::FreezeHoldT< SampleType >::Config::fft_size = 2048

◆ frequency

template<typename SampleType = float>
FreezeHoldFrequency pulp::signal::FreezeHoldT< SampleType >::Config::frequency = FreezeHoldFrequency::newest

Per-bin frequency estimate. newest reproduces the original.

◆ lobe_half_width

template<typename SampleType = float>
int pulp::signal::FreezeHoldT< SampleType >::Config::lobe_half_width = 2

With peak_lobe: bins either side of a peak locked to it (2 spans a Hann main lobe).

A peak is a bin whose channel-summed power is a maximum over +-lobe_half_width and within 60 dB of the frame's largest.

◆ max_capture_frames

template<typename SampleType = float>
int pulp::signal::FreezeHoldT< SampleType >::Config::max_capture_frames = 0

Largest capture depth set_capture_frames() may select later; storage is preallocated for it.

0 = capture_frames (no headroom).

◆ max_capture_seconds

template<typename SampleType = float>
double pulp::signal::FreezeHoldT< SampleType >::Config::max_capture_seconds = 0.0

Longest capture set_capture_seconds() may select later.

0 = capture_seconds (no headroom).

◆ phase_jitter

template<typename SampleType = float>
float pulp::signal::FreezeHoldT< SampleType >::Config::phase_jitter = 0.015f

Random-walk step bound (radians/frame) for de-looping.

◆ phase_jitter_per_sqrt_second

template<typename SampleType = float>
double pulp::signal::FreezeHoldT< SampleType >::Config::phase_jitter_per_sqrt_second
Initial value:
=
static constexpr double kPhaseJitterPerSqrtSecond
0.015 rad per 512-sample frame, as a random-walk rate: 0.015 * sqrt(48000 / 512) rad per sqrt(second)...
Definition freeze_hold.hpp:398

Random-walk rate in radians per sqrt(second); the per-frame bound is rate * sqrt(hop / sr), so the walk's spread over time does not depend on the hop.

◆ phase_lock

template<typename SampleType = float>
FreezeHoldPhaseLock pulp::signal::FreezeHoldT< SampleType >::Config::phase_lock = FreezeHoldPhaseLock::none

Phase structure at the latch. none reproduces the original.

◆ sample_rate

template<typename SampleType = float>
double pulp::signal::FreezeHoldT< SampleType >::Config::sample_rate = 0.0

0 selects seconds-based sizing.

◆ synthesis

template<typename SampleType = float>
FreezeHoldSynthesis pulp::signal::FreezeHoldT< SampleType >::Config::synthesis = FreezeHoldSynthesis::polar

Held-frame synthesis. polar reproduces the original output.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/freeze_hold.hpp