Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::PortConnection Class Referencefinal

A connection between two ports. More...

#include <src/dsp/port_connection.h>

Inheritance diagram for zrythm::dsp::PortConnection:
Collaboration diagram for zrythm::dsp::PortConnection:

Public Types

using PortUuid = dsp::PortIdentifier::PortUuid
 

Public Member Functions

 PortConnection (QObject *parent=nullptr)
 
 PortConnection (const PortUuid &src, const PortUuid &dest, float multiplier, bool locked, bool enabled, QObject *parent=nullptr)
 
void update (float multiplier, bool locked, bool enabled)
 

Data Fields

PortUuid src_id_
 
PortUuid dest_id_
 
float multiplier_ = 1.0f
 Multiplier to apply, where applicable.
 
bool locked_ = false
 Whether the connection can be removed or the multiplier edited by the user.
 
bool enabled_ = true
 Whether the connection is enabled.
 
float base_value_ = 0.0f
 Used for CV -> control port connections.
 

Friends

void to_json (nlohmann::json &j, const PortConnection &port_connection)
 
void from_json (const nlohmann::json &j, PortConnection &port_connection)
 
void init_from (PortConnection &obj, const PortConnection &other, utils::ObjectCloneType clone_type)
 
bool operator== (const PortConnection &lhs, const PortConnection &rhs)
 

Detailed Description

A connection between two ports.

Definition at line 18 of file port_connection.h.

Member Typedef Documentation

◆ PortUuid

Member Function Documentation

◆ update()

void zrythm::dsp::PortConnection::update ( float multiplier,
bool locked,
bool enabled )
inline

Definition at line 36 of file port_connection.h.

Friends And Related Symbol Documentation

◆ from_json

void from_json ( const nlohmann::json & j,
PortConnection & port_connection )
friend

Definition at line 61 of file port_connection.h.

◆ operator==

bool operator== ( const PortConnection & lhs,
const PortConnection & rhs )
friend

Definition at line 76 of file port_connection.h.

◆ to_json

void to_json ( nlohmann::json & j,
const PortConnection & port_connection )
friend

Definition at line 51 of file port_connection.h.

Field Documentation

◆ base_value_

float zrythm::dsp::PortConnection::base_value_ = 0.0f

Used for CV -> control port connections.

Definition at line 112 of file port_connection.h.

◆ dest_id_

PortUuid zrythm::dsp::PortConnection::dest_id_

Definition at line 86 of file port_connection.h.

◆ enabled_

bool zrythm::dsp::PortConnection::enabled_ = true

Whether the connection is enabled.

Note
The user can disable port connections only if they are not locked.

Definition at line 109 of file port_connection.h.

◆ locked_

bool zrythm::dsp::PortConnection::locked_ = false

Whether the connection can be removed or the multiplier edited by the user.

Ignored when connecting things internally and only used to deter the user from breaking necessary connections.

Definition at line 102 of file port_connection.h.

◆ multiplier_

float zrythm::dsp::PortConnection::multiplier_ = 1.0f

Multiplier to apply, where applicable.

Range: 0 to 1. Default: 1.

Definition at line 94 of file port_connection.h.

◆ src_id_

PortUuid zrythm::dsp::PortConnection::src_id_

Definition at line 85 of file port_connection.h.


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