Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
passthrough_processors.h
1// SPDX-FileCopyrightText: © 2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "dsp/processor_base.h"
7
8namespace zrythm::dsp
9{
13class MidiPassthroughProcessor : public ProcessorBase
14{
15public:
16 MidiPassthroughProcessor (
18 size_t num_ports = 1);
19
20 ~MidiPassthroughProcessor () override;
21
22 auto get_midi_in_port (size_t index) -> dsp::MidiPort &
23 {
24 return *get_input_ports ().at (index).get_object_as<dsp::MidiPort> ();
25 }
26 auto get_midi_out_port (size_t index) -> dsp::MidiPort &
27 {
28 return *get_output_ports ().at (index).get_object_as<dsp::MidiPort> ();
29 }
30};
31
35class AudioPassthroughProcessor : public ProcessorBase
36{
37public:
38 AudioPassthroughProcessor (
40 AudioPort::BusLayout bus_layout,
41 size_t num_channels);
42
43 ~AudioPassthroughProcessor () override;
44
45 auto get_audio_in_port () -> dsp::AudioPort &
46 {
47 return *get_input_ports ().at (0).get_object_as<dsp::AudioPort> ();
48 }
49 auto get_audio_out_port () -> dsp::AudioPort &
50 {
51 return *get_output_ports ().at (0).get_object_as<dsp::AudioPort> ();
52 }
53};
54
55class StereoPassthroughProcessor : public AudioPassthroughProcessor
56{
57public:
58 StereoPassthroughProcessor (
60
61 ~StereoPassthroughProcessor () override;
62};
63
64} // namespace zrythm::dsp
Audio port specifics.
Definition audio_port.h:25
BusLayout
Description of the channel layout of this port.
Definition audio_port.h:35
MIDI port specifics.
Definition midi_port.h:22