Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
processable_track.h
1// SPDX-FileCopyrightText: © 2024-2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "structure/tracks/automation_tracklist.h"
7#include "structure/tracks/track.h"
8#include "structure/tracks/track_processor.h"
9
10#define DEFINE_PROCESSABLE_TRACK_QML_PROPERTIES(ClassType) \
11public: \
12 Q_PROPERTY ( \
13 zrythm::structure::tracks::AutomationTracklist * automationTracklist READ \
14 automationTracklist CONSTANT)
15
16namespace zrythm::structure::tracks
17{
18class TrackProcessor;
19
29class ProcessableTrack : virtual public Track
30{
31public:
32 using Dependencies = AutomationTrackHolder::Dependencies;
33 ProcessableTrack (
34 const dsp::ITransport &transport,
35 PortType signal_type,
36 Dependencies dependencies);
37
38 ~ProcessableTrack () override = default;
39 Z_DISABLE_COPY_MOVE (ProcessableTrack)
40
41 AutomationTracklist * automationTracklist () const
42 {
43 return automation_tracklist_.get ();
44 }
45
46protected:
47 friend void init_from (
48 ProcessableTrack &obj,
49 const ProcessableTrack &other,
50 utils::ObjectCloneType clone_type);
51
52private:
53 static constexpr auto kProcessorKey = "processor"sv;
54 static constexpr auto kAutomationTracklistKey = "automationTracklist"sv;
55 friend void to_json (nlohmann::json &j, const ProcessableTrack &p)
56 {
57 j[kProcessorKey] = p.processor_;
58 j[kAutomationTracklistKey] = p.automation_tracklist_;
59 }
60 friend void from_json (const nlohmann::json &j, ProcessableTrack &p);
61
62private:
64
65public:
72};
73
74using ProcessableTrackVariant = std::variant<
85using ProcessableTrackPtrVariant = to_pointer_variant<ProcessableTrackVariant>;
86}
Interface for transport.
Definition itransport.h:14
An audio bus track that can be processed and has channels.
An audio group track that can be folded and is a target for other tracks.
Track containing AudioRegion's.
Definition audio_track.h:23
A container that manages a list of automation tracks.
The ChordTrack class is responsible for managing the chord and scale information in the project.
Definition chord_track.h:39
A track that processes MIDI data.
A track that can host modulator plugins.
utils::QObjectUniquePtr< TrackProcessor > processor_
The TrackProcessor, used for processing.
A TrackProcessor is a standalone processor that is used as the first step when processing a track in ...
Track(Type type, PortType in_signal_type, PortType out_signal_type, BaseTrackDependencies dependencies)
Constructor to be used by subclasses.
A unique pointer for QObject objects that also works with QObject-based ownership.
Definition qt.h:40