Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
rubberband_timestretch_engine.h
1// SPDX-FileCopyrightText: © 2026 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "dsp/timestretch_engine.h"
7#include "utils/units.h"
8
9namespace zrythm::dsp
10{
11
21{
22public:
26 explicit RubberBandTimeStretchEngine (units::sample_rate_t sample_rate);
28
29 [[nodiscard]] std::string_view id () const override;
30 [[nodiscard]] bool
31 supports (StretchOptions::Algorithm algorithm) const override;
32
33private:
34 [[nodiscard]] utils::audio::AudioBuffer stretch_impl (
35 const utils::audio::AudioBuffer &input,
36 const TimeWarpMap &warp,
37 const StretchOptions &options) [[clang::blocking]] override;
38
39 units::sample_rate_t sample_rate_;
40};
41
42} // namespace zrythm::dsp
Abstract time-stretch engine.
RubberBandTimeStretchEngine(units::sample_rate_t sample_rate)
bool supports(StretchOptions::Algorithm algorithm) const override
Whether this engine supports the given algorithm.
std::string_view id() const override
A stable, non-translatable identifier for persistence (settings).
Options governing a stretch operation.
Algorithm
Material-aware timestretch algorithm.
A monotonic time-warp mapping from source samples to output samples.