Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
audio_track.h
1
// SPDX-FileCopyrightText: © 2018-2020, 2024-2025 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#pragma once
5
6
#include "dsp/stretcher.h"
7
#include "structure/tracks/track.h"
8
9
namespace
zrythm::structure::tracks
10
{
14
class
AudioTrack :
public
Track
15
{
16
Q_OBJECT
17
QML_ELEMENT
18
QML_UNCREATABLE (
""
)
19
20
public
:
21
using
AudioRegion =
arrangement::AudioRegion
;
22
23
AudioTrack (
FinalTrackDependencies
dependencies);
24
25
friend
void
init_from (
26
AudioTrack &obj,
27
const
AudioTrack &other,
28
utils::ObjectCloneType
clone_type);
29
30
// ========================================================================
31
// QML Interface
32
// ========================================================================
33
34
// ========================================================================
35
36
void
timestretch_buf (
37
const
AudioRegion * r,
38
dsp::FileAudioSource
* clip,
39
unsigned_frame_t
in_frame_offset,
40
double
timestretch_ratio,
41
float
* lbuf_after_ts,
42
float
* rbuf_after_ts,
43
unsigned_frame_t
out_frame_offset,
44
unsigned_frame_t
frames_to_process);
45
46
private
:
47
friend
void
to_json (nlohmann::json &j,
const
AudioTrack &track)
48
{
49
to_json (j,
static_cast<
const
Track
&
>
(track));
50
}
51
friend
void
from_json (
const
nlohmann::json &j, AudioTrack &track)
52
{
53
from_json (j,
static_cast<
Track
&
>
(track));
54
}
55
56
bool
initialize ();
57
58
private
:
60
std::unique_ptr<zrythm::dsp::Stretcher> rt_stretcher_;
61
69
units::sample_rate_t samplerate_;
70
};
71
}
zrythm::dsp::FileAudioSource
Audio clips for the pool.
Definition
file_audio_source.h:25
zrythm::structure::arrangement::AudioRegion
A region for playing back audio samples.
Definition
audio_region.h:22
zrythm::structure::tracks::Track::Track
Track(Type type, PortType in_signal_type, PortType out_signal_type, TrackFeatures enabled_features, BaseTrackDependencies dependencies)
Constructor to be used by subclasses.
unsigned_frame_t
uint_fast64_t unsigned_frame_t
Unsigned type for frame index.
Definition
types.h:78
zrythm::utils::ObjectCloneType
ObjectCloneType
Definition
icloneable.h:19
zrythm::structure::tracks::FinalTrackDependencies
Definition
track.h:796
src
structure
tracks
audio_track.h
Generated by
1.15.0