Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
project_graph_builder.h
1// SPDX-FileCopyrightText: © 2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "dsp/graph_builder.h"
7#include "dsp/port.h"
8
9namespace zrythm::dsp
10{
11class Metronome;
12class Fader;
13}
14
15namespace zrythm::structure::project
16{
17
18class Project;
19
20class ProjectGraphBuilder final : public dsp::graph::IGraphBuilder
21{
22public:
23 ProjectGraphBuilder (
24 Project &project,
25 dsp::Metronome &metronome,
26 dsp::Fader &monitor_fader)
27 : project_ (&project), metronome_ (&metronome),
28 monitor_fader_ (&monitor_fader)
29 {
30 }
31
40 Project &project,
41 const dsp::Port &src,
42 const dsp::Port &dest);
43
44private:
45 void build_graph_impl (dsp::graph::Graph &graph) override;
46
47private:
48 Project * project_{};
49 dsp::Metronome * metronome_{};
50 dsp::Fader * monitor_fader_{};
51};
52}
A Fader is a processor that is used for volume controls and pan.
Definition fader.h:21
Metronome processor.
Definition metronome.h:20
A base class for ports used for connecting processors in the DSP graph.
Definition port.h:30
The Graph class represents a graph of DSP nodes.
Definition graph.h:20
Interface for building a graph of nodes.
static bool can_ports_be_connected(Project &project, const dsp::Port &src, const dsp::Port &dest)
Adds a new connection for the given src and dest ports and validates the graph.
Core functionality of a Zrythm project.
Definition project.h:51