Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::chardelay::ReverseSegmenter Class Reference

#include <reverse.hpp>

Public Member Functions

void prepare (std::size_t capacity_samples)
 Allocates both buffers.
void reset () noexcept
double process (double x, double segment_samples, double mod_offset_samples) noexcept
 One sample of capture-forward / play-backward.

Static Public Member Functions

static constexpr std::size_t minimum_capacity_samples () noexcept
 Smallest capacity this segmenter can be prepared with.

Member Function Documentation

◆ minimum_capacity_samples()

constexpr std::size_t pulp::signal::chardelay::ReverseSegmenter::minimum_capacity_samples ( )
inlinestaticconstexprnoexcept

Smallest capacity this segmenter can be prepared with.

A segment carries a raised-cosine fade at each end, so it cannot be shorter than two fade widths. reset() starts the segment at exactly this length, which means a smaller buffer would be overrun on the first block. Callers sizing their own buffer must respect this floor; it is public so the precondition is knowable rather than implied.

◆ prepare()

void pulp::signal::chardelay::ReverseSegmenter::prepare ( std::size_t capacity_samples)
inline

Allocates both buffers.

Control thread only.

A request below minimum_capacity_samples() is raised to it rather than honored: the segment length is independent of the requested capacity, so a shorter buffer would be written and read past its end.

◆ process()

double pulp::signal::chardelay::ReverseSegmenter::process ( double x,
double segment_samples,
double mod_offset_samples )
inlinenoexcept

One sample of capture-forward / play-backward.

segment_samples is the requested segment length; it is latched at the next boundary so a slewing delay time never tears the segment in flight. mod_offset_samples displaces the read head (tape instability).

◆ reset()

void pulp::signal::chardelay::ReverseSegmenter::reset ( )
inlinenoexcept

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