|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
Abstract time-stretch engine. More...
#include <src/dsp/timestretch_engine.h>

Public Member Functions | |
| virtual std::string_view | id () const =0 |
| A stable, non-translatable identifier for persistence (settings). | |
| virtual bool | supports (StretchOptions::Algorithm algorithm) const =0 |
| Whether this engine supports the given algorithm. | |
| utils::audio::AudioBuffer | stretch (const utils::audio::AudioBuffer &input, const TimeWarpMap &warp, const StretchOptions &options) |
Stretch input according to warp (Non-Virtual Interface). | |
Abstract time-stretch engine.
Implementations consume a sample-domain TimeWarpMap and produce a stretched buffer. The engine has no knowledge of tempo maps or warp markers — only the composed source→output mapping — which keeps auto-timestretch and (future) manual warp points sharing the same engine. Add new engines by implementing this interface and adding a case to create_timestretch_engine; callers never name a concrete engine type.
Definition at line 68 of file timestretch_engine.h.
|
nodiscardpure virtual |
A stable, non-translatable identifier for persistence (settings).
Implemented in zrythm::dsp::RubberBandTimeStretchEngine.
|
inlinenodiscard |
Stretch input according to warp (Non-Virtual Interface).
Validates the preconditions below, then dispatches to stretch_impl.
warp.is_valid() warp.source_length == input.getNumSamples() options.algorithm) warp.output_length frames.| std::invalid_argument | if any precondition is violated. |
Definition at line 96 of file timestretch_engine.h.
|
nodiscardpure virtual |
Whether this engine supports the given algorithm.
Implemented in zrythm::dsp::RubberBandTimeStretchEngine.