Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Struct used to identify Ports in the project. More...
#include <src/dsp/port_identifier.h>
Public Types | |
enum class | OwnerType { AudioEngine , Plugin , Track , Channel , Fader , ChannelSend , TrackProcessor , HardwareProcessor , Transport , ModulatorMacroProcessor } |
Type of owner. More... | |
enum class | Flags : std::uint64_t { StereoL = UINT64_C (1) << 0 , StereoR = UINT64_C (1) << 1 , PianoRoll = UINT64_C (1) << 2 , Sidechain = UINT64_C (1) << 3 , MainPort = UINT64_C (1) << 4 , ManualPress = UINT64_C (1) << 5 , Amplitude = UINT64_C (1) << 6 , StereoBalance = UINT64_C (1) << 7 , WantPosition = UINT64_C (1) << 8 , Trigger = UINT64_C (1) << 9 , Toggle = UINT64_C (1) << 10 , Integer = UINT64_C (1) << 11 , Freewheel = UINT64_C (1) << 12 , ReportsLatency = UINT64_C (1) << 13 , NotOnGui = UINT64_C (1) << 14 , PluginEnabled = UINT64_C (1) << 15 , PluginControl = UINT64_C (1) << 16 , FaderMute = UINT64_C (1) << 17 , ChannelFader = UINT64_C (1) << 18 , Automatable = UINT64_C (1) << 19 , MidiAutomatable = UINT64_C (1) << 20 , SendReceivable = UINT64_C (1) << 21 , GenericPluginPort = UINT64_C (1) << 22 , PluginGain = UINT64_C (1) << 23 , TpMono = UINT64_C (1) << 24 , TpInputGain = UINT64_C (1) << 25 , Hw = UINT64_C (1) << 26 , ModulatorMacro = UINT64_C (1) << 27 , Logarithmic = UINT64_C (1) << 28 , IsProperty = UINT64_C (1) << 29 , TransportRoll = UINT64_C (1) << 30 , TransportStop = UINT64_C (1) << 31 , TransportBackward = UINT64_C (1) << 32 , TransportForward = UINT64_C (1) << 33 , TransportLoopToggle = UINT64_C (1) << 34 , TransportRecToggle = UINT64_C (1) << 35 , SupportsPatchMessage = UINT64_C (1) << 36 , Enumeration = UINT64_C (1) << 37 , UriParam = UINT64_C (1) << 38 , Sequence = UINT64_C (1) << 39 , SupportsMidi = UINT64_C (1) << 40 , TpOutputGain = UINT64_C (1) << 41 , MidiPitchBend = UINT64_C (1) << 42 , MidiPolyKeyPressure = UINT64_C (1) << 43 , MidiChannelPressure = UINT64_C (1) << 44 , ChannelSendEnabled = UINT64_C (1) << 45 , ChannelSendAmount = UINT64_C (1) << 46 , FaderSolo = UINT64_C (1) << 47 , FaderListen = UINT64_C (1) << 48 , FaderMonoCompat = UINT64_C (1) << 49 , TrackRecording = UINT64_C (1) << 50 , TpMonitorAudio = UINT64_C (1) << 51 , Prefader = UINT64_C (1) << 52 , Postfader = UINT64_C (1) << 53 , MonitorFader = UINT64_C (1) << 54 , SampleProcessorFader = UINT64_C (1) << 55 , SampleProcessorTrack = UINT64_C (1) << 56 , FaderSwapPhase = UINT64_C (1) << 57 , MidiClock = UINT64_C (1) << 58 } |
Port flags. More... | |
using | TrackUuid |
using | PluginUuid |
using | PortUuid = utils::UuidIdentifiableObject<Port>::Uuid |
Public Member Functions | |
utils::Utf8String | get_label () const |
bool | is_control () const |
bool | is_midi () const |
bool | is_cv () const |
bool | is_audio () const |
bool | is_input () const |
bool | is_output () const |
bool | is_monitor_fader_stereo_in_or_out_port () const |
auto | get_track_id () const |
void | set_track_id (TrackUuid track_id) |
auto | get_plugin_id () const |
void | set_plugin_id (PluginUuid plugin_id) |
auto | get_symbol () const |
std::string | print_to_str () const |
void | print () const |
size_t | get_hash () const |
Static Public Member Functions | |
static utils::Utf8String | port_unit_to_string (PortUnit unit) |
Data Fields | |
size_t | port_index_ {} |
Index (e.g. | |
std::optional< TrackUuid > | track_id_ |
Track identifier. | |
PortIdentifier::OwnerType | owner_type_ {} |
Owner type. | |
PortType | type_ { PortType::Unknown } |
Data type (e.g. | |
PortFlow | flow_ { PortFlow::Unknown } |
Flow (IN/OUT). | |
PortUnit | unit_ { PortUnit::None } |
Port unit. | |
PortIdentifier::Flags | flags_ {} |
Flags (e.g. | |
std::optional< PluginUuid > | plugin_id_ |
Identifier of plugin. | |
utils::Utf8String | label_ |
Human readable label. | |
utils::Utf8String | sym_ |
Unique symbol. | |
std::optional< utils::Utf8String > | uri_ |
URI, if LV2 property. | |
std::optional< utils::Utf8String > | comment_ |
Comment, if any. | |
std::optional< utils::Utf8String > | port_group_ |
Port group this port is part of (only applicable for LV2 plugin ports). | |
std::optional< utils::Utf8String > | ext_port_id_ |
ExtPort ID (type + full name), if hw port. | |
std::optional< midi_byte_t > | midi_channel_ |
MIDI channel if MIDI CC port, starting from 1 (so [1, 16]). | |
Friends | |
bool | operator== (const PortIdentifier &lhs, const PortIdentifier &rhs) |
void | init_from (PortIdentifier &obj, const PortIdentifier &other, utils::ObjectCloneType clone_type) |
void | to_json (nlohmann::json &j, const PortIdentifier &port) |
void | from_json (const nlohmann::json &j, PortIdentifier &port) |
Struct used to identify Ports in the project.
Definition at line 70 of file port_identifier.h.
Definition at line 75 of file port_identifier.h.
Definition at line 77 of file port_identifier.h.
Definition at line 73 of file port_identifier.h.
|
strong |
Port flags.
Enumerator | |
---|---|
Sidechain | See http://lv2plug.in/ns/ext/port-groups/port-groups.html#sideChainOf. |
MainPort | See http://lv2plug.in/ns/ext/port-groups/port-groups.html#mainInput and http://lv2plug.in/ns/ext/port-groups/port-groups.html#mainOutput. |
ManualPress | Piano roll user (piano) key press. |
Amplitude | Amplitude port. |
StereoBalance | Port controls the stereo balance. This is used in channels for the balance control. |
WantPosition | Whether the port wants to receive position events. This is only applicable for LV2 Atom ports. |
Trigger | Trigger ports will be set to 0 at the end of each cycle. This mostly applies to LV2 Control Input ports. |
Toggle | Whether the port is a toggle (on/off). |
Integer | Whether the port is an integer. |
Freewheel | Whether port is for letting the plugin know that we are in freewheeling (export) mode. |
ReportsLatency | Used for plugin ports. |
NotOnGui | Port should not be visible to users. |
PluginEnabled | Port is a switch for plugin enabled. |
PluginControl | Port is a plugin control. |
FaderMute | Port is for fader mute. |
ChannelFader | Port is for channel fader. |
Automatable | Port has an automation track. If this is set, it is assumed that the automation track at PortIdentifier.port_index is for this port. |
MidiAutomatable | MIDI automatable control, such as modwheel or pitch bend. |
SendReceivable | Channels can send to this port (ie, this port is a track processor midi/stereo in or a plugin sidechain in). |
GenericPluginPort | Generic plugin port not belonging to the underlying plugin. This is for ports that are added by Zrythm such as Enabled and Gain. |
PluginGain | This is the plugin gain. |
TpMono | Track processor input mono switch. |
TpInputGain | Track processor input gain. |
Hw | Port is a hardware port. |
ModulatorMacro | Port is part of a modulator macro processor. Which of the ports it is can be determined by checking flow/type. |
Logarithmic | Logarithmic. |
IsProperty | zrythm::gui::old_dsp::plugins::Plugin control is a property (changes are set via atom message on the plugin's control port), as opposed to conventional float control ports. An input Port is created for each parameter declared as either writable or readable (or both). |
TransportRoll | Transport ports. |
SupportsPatchMessage | LV2 control atom port supports patch messages. |
Enumeration | Port's only reasonable values are its scale points. |
UriParam | Parameter port's value type is URI. |
Sequence | Atom port buffer type is sequence. |
SupportsMidi | Atom or event port supports MIDI. |
TpOutputGain | Track processor output gain. |
MidiPitchBend | MIDI pitch bend. |
MidiPolyKeyPressure | MIDI poly key pressure. |
MidiChannelPressure | MIDI channel pressure. |
ChannelSendEnabled | Channel send enabled. |
ChannelSendAmount | Channel send amount. |
FaderSolo | Fader solo. |
FaderListen | Fader listen. |
FaderMonoCompat | Fader mono compat. |
TrackRecording | Track recording. |
TpMonitorAudio | Track processor monitor audio. |
Prefader | Port is owned by prefader. |
Postfader | Port is owned by postfader. |
MonitorFader | Port is owned by monitor fader. |
SampleProcessorFader | Port is owned by the sample processor fader. |
SampleProcessorTrack | Port is owned by sample processor track/channel (including faders owned by those tracks/channels). |
FaderSwapPhase | Fader swap phase. |
MidiClock | MIDI clock. |
Definition at line 123 of file port_identifier.h.
|
strong |
Type of owner.
Enumerator | |
---|---|
Plugin | |
Track | Track owner. |
Channel | Channel owner. |
Fader | Fader. |
ChannelSend | Channel send. PortIdentifier.port_index will contain the send index on the port's track's channel. |
HardwareProcessor | Port is part of a HardwareProcessor. |
Transport | Port is owned by engine transport. |
ModulatorMacroProcessor | Modulator macro processor owner. |
Definition at line 82 of file port_identifier.h.
|
inline |
Definition at line 339 of file port_identifier.h.
|
inline |
Definition at line 357 of file port_identifier.h.
|
inline |
Definition at line 359 of file port_identifier.h.
|
inline |
Definition at line 355 of file port_identifier.h.
|
inline |
Definition at line 344 of file port_identifier.h.
|
inline |
Definition at line 341 of file port_identifier.h.
|
inline |
Definition at line 343 of file port_identifier.h.
|
inline |
Definition at line 346 of file port_identifier.h.
|
inline |
Definition at line 342 of file port_identifier.h.
|
inline |
Definition at line 349 of file port_identifier.h.
|
inline |
Definition at line 347 of file port_identifier.h.
|
inline |
Definition at line 358 of file port_identifier.h.
|
inline |
Definition at line 356 of file port_identifier.h.
|
friend |
Definition at line 440 of file port_identifier.h.
|
friend |
Definition at line 367 of file port_identifier.h.
|
friend |
Definition at line 420 of file port_identifier.h.
std::optional<utils::Utf8String> zrythm::dsp::PortIdentifier::comment_ |
Comment, if any.
Definition at line 409 of file port_identifier.h.
std::optional<utils::Utf8String> zrythm::dsp::PortIdentifier::ext_port_id_ |
ExtPort ID (type + full name), if hw port.
Definition at line 415 of file port_identifier.h.
PortIdentifier::Flags zrythm::dsp::PortIdentifier::flags_ {} |
PortFlow zrythm::dsp::PortIdentifier::flow_ { PortFlow::Unknown } |
Flow (IN/OUT).
Definition at line 388 of file port_identifier.h.
utils::Utf8String zrythm::dsp::PortIdentifier::label_ |
Human readable label.
Definition at line 400 of file port_identifier.h.
std::optional<midi_byte_t> zrythm::dsp::PortIdentifier::midi_channel_ |
MIDI channel if MIDI CC port, starting from 1 (so [1, 16]).
Definition at line 418 of file port_identifier.h.
PortIdentifier::OwnerType zrythm::dsp::PortIdentifier::owner_type_ {} |
Owner type.
Definition at line 384 of file port_identifier.h.
std::optional<PluginUuid> zrythm::dsp::PortIdentifier::plugin_id_ |
Identifier of plugin.
Definition at line 397 of file port_identifier.h.
std::optional<utils::Utf8String> zrythm::dsp::PortIdentifier::port_group_ |
Port group this port is part of (only applicable for LV2 plugin ports).
Definition at line 412 of file port_identifier.h.
size_t zrythm::dsp::PortIdentifier::port_index_ {} |
Index (e.g.
in plugin's output ports, the modulator macro processor slot, etc.).
Definition at line 378 of file port_identifier.h.
utils::Utf8String zrythm::dsp::PortIdentifier::sym_ |
Unique symbol.
Definition at line 403 of file port_identifier.h.
std::optional<TrackUuid> zrythm::dsp::PortIdentifier::track_id_ |
Track identifier.
Definition at line 381 of file port_identifier.h.
PortType zrythm::dsp::PortIdentifier::type_ { PortType::Unknown } |
PortUnit zrythm::dsp::PortIdentifier::unit_ { PortUnit::None } |
Port unit.
Definition at line 391 of file port_identifier.h.
std::optional<utils::Utf8String> zrythm::dsp::PortIdentifier::uri_ |
URI, if LV2 property.
Definition at line 406 of file port_identifier.h.