Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::structure::tracks::ChannelSend Class Reference

Channel send. More...

#include <src/structure/tracks/channel_send.h>

Inheritance diagram for zrythm::structure::tracks::ChannelSend:
Collaboration diagram for zrythm::structure::tracks::ChannelSend:

Public Member Functions

 ChannelSend (dsp::ProcessorBase::ProcessorBaseDependencies dependencies, dsp::PortType signal_type, int slot, bool is_prefader, QObject *parent=nullptr)
dsp::ProcessorParameteramountParam () const
 Send amount (amplitude), 0 to 2 for audio, velocity multiplier for MIDI.
dsp::ProcessorParameterenabledParam () const
 Whether this send is enabled.
QVariant destinationPort () const
 QML accessor for destination port.
void setDestinationPort (const QVariant &port)
Q_SIGNAL void destinationPortChanged ()
void custom_process_block (EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport, const dsp::TempoMap &tempo_map) noexcept override
 Custom processor logic after processing all owned parameters.
void custom_prepare_for_processing (const dsp::graph::GraphNode *node, units::sample_rate_t sample_rate, nframes_t max_block_length) override
void custom_release_resources () override
bool is_prefader () const
bool is_audio () const
bool is_midi () const
dsp::AudioPortget_stereo_in_port () const
dsp::MidiPortget_midi_in_port () const
dsp::AudioPortget_stereo_out_port () const
dsp::MidiPortget_midi_out_port () const
auto destination_port () const
 Returns the destination port reference, if set.
void set_destination_port (dsp::PortUuidReference port)
 Sets the destination port.
void clear_destination_port ()
 Clears the destination port.
bool has_destination () const
 Checks if this send has a destination configured.
Public Member Functions inherited from zrythm::dsp::ProcessorBase
 ProcessorBase (ProcessorBaseDependencies dependencies, utils::Utf8String name={ u8"ProcessorBase" })
void set_name (const utils::Utf8String &name)
 Set a custom name to be used in the DSP graph.
void add_input_port (const dsp::PortUuidReference &uuid)
void add_output_port (const dsp::PortUuidReference &uuid)
void add_parameter (const dsp::ProcessorParameterUuidReference &uuid)
auto & get_input_ports () const
auto & get_output_ports () const
auto & get_parameters () const
utils::Utf8String get_node_name () const final
 Returns a human friendly name of the node.
void process_block (EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport, const dsp::TempoMap &tempo_map) noexcept final
 Calls custom_process_block() internally after processing all the parameters.
void prepare_for_processing (const graph::GraphNode *node, units::sample_rate_t sample_rate, nframes_t max_block_length) final
 Called to allocate resources required for processing.
void release_resources () final
 Called to release resources allocated by prepare_for_processing().
Public Member Functions inherited from zrythm::dsp::graph::IProcessable
virtual nframes_t get_single_playback_latency () const
 Returns the latency of only the given processable, without adding the previous/next latencies.

Properties

zrythm::dsp::ProcessorParameteramountParam
zrythm::dsp::ProcessorParameterenabledParam
QVariant destinationPort

Friends

void to_json (nlohmann::json &j, const ChannelSend &p)
void from_json (const nlohmann::json &j, ChannelSend &p)
void init_from (ChannelSend &obj, const ChannelSend &other, utils::ObjectCloneType clone_type)

Additional Inherited Members

Protected Member Functions inherited from zrythm::dsp::ProcessorBase
auto dependencies () const

Detailed Description

Channel send.

Sends route audio or MIDI signals from a channel to a destination port. The destination must be an input port of the same type (Audio or MIDI).

Definition at line 22 of file channel_send.h.

Constructor & Destructor Documentation

◆ ChannelSend()

zrythm::structure::tracks::ChannelSend::ChannelSend ( dsp::ProcessorBase::ProcessorBaseDependencies dependencies,
dsp::PortType signal_type,
int slot,
bool is_prefader,
QObject * parent = nullptr )
Parameters
slotSlot, used only in parameter/port names.

Member Function Documentation

◆ amountParam()

dsp::ProcessorParameter * zrythm::structure::tracks::ChannelSend::amountParam ( ) const
inline

Send amount (amplitude), 0 to 2 for audio, velocity multiplier for MIDI.

Definition at line 62 of file channel_send.h.

◆ custom_prepare_for_processing()

void zrythm::structure::tracks::ChannelSend::custom_prepare_for_processing ( const dsp::graph::GraphNode * node,
units::sample_rate_t sample_rate,
nframes_t max_block_length )
overridevirtual

Reimplemented from zrythm::dsp::ProcessorBase.

◆ custom_process_block()

void zrythm::structure::tracks::ChannelSend::custom_process_block ( EngineProcessTimeInfo time_nfo,
const dsp::ITransport & transport,
const dsp::TempoMap & tempo_map )
overridevirtualnoexcept

Custom processor logic after processing all owned parameters.

By default, this does passthrough to same-type ports.

Reimplemented from zrythm::dsp::ProcessorBase.

◆ custom_release_resources()

void zrythm::structure::tracks::ChannelSend::custom_release_resources ( )
overridevirtual

Reimplemented from zrythm::dsp::ProcessorBase.

◆ destination_port()

auto zrythm::structure::tracks::ChannelSend::destination_port ( ) const
inlinenodiscard

Returns the destination port reference, if set.

Definition at line 130 of file channel_send.h.

◆ enabledParam()

dsp::ProcessorParameter * zrythm::structure::tracks::ChannelSend::enabledParam ( ) const

Whether this send is enabled.

When disabled, the send outputs silence (audio) or no events (MIDI).

◆ get_midi_in_port()

dsp::MidiPort & zrythm::structure::tracks::ChannelSend::get_midi_in_port ( ) const
inline

Definition at line 111 of file channel_send.h.

◆ get_midi_out_port()

dsp::MidiPort & zrythm::structure::tracks::ChannelSend::get_midi_out_port ( ) const
inline

Definition at line 121 of file channel_send.h.

◆ get_stereo_in_port()

dsp::AudioPort & zrythm::structure::tracks::ChannelSend::get_stereo_in_port ( ) const
inline

Definition at line 106 of file channel_send.h.

◆ get_stereo_out_port()

dsp::AudioPort & zrythm::structure::tracks::ChannelSend::get_stereo_out_port ( ) const
inline

Definition at line 116 of file channel_send.h.

◆ has_destination()

bool zrythm::structure::tracks::ChannelSend::has_destination ( ) const
inline

Checks if this send has a destination configured.

Definition at line 149 of file channel_send.h.

◆ is_audio()

bool zrythm::structure::tracks::ChannelSend::is_audio ( ) const
inline

Definition at line 103 of file channel_send.h.

◆ is_midi()

bool zrythm::structure::tracks::ChannelSend::is_midi ( ) const
inline

Definition at line 104 of file channel_send.h.

◆ is_prefader()

bool zrythm::structure::tracks::ChannelSend::is_prefader ( ) const
inline

Definition at line 102 of file channel_send.h.

◆ set_destination_port()

void zrythm::structure::tracks::ChannelSend::set_destination_port ( dsp::PortUuidReference port)

Sets the destination port.

Parameters
portThe destination port reference.
Exceptions
std::invalid_argumentif the port is not an input port of a compatible type (Audio or MIDI matching this send's type).

Property Documentation

◆ amountParam

zrythm::dsp::ProcessorParameter * zrythm::structure::tracks::ChannelSend::amountParam
read

Definition at line 25 of file channel_send.h.

◆ destinationPort

QVariant zrythm::structure::tracks::ChannelSend::destinationPort
readwrite

Definition at line 27 of file channel_send.h.

◆ enabledParam

zrythm::dsp::ProcessorParameter * zrythm::structure::tracks::ChannelSend::enabledParam
read

Definition at line 26 of file channel_send.h.


The documentation for this class was generated from the following file: