12#ifndef __AUDIO_PORT_IDENTIFIER_H__
13#define __AUDIO_PORT_IDENTIFIER_H__
15#include "zrythm-config.h"
29#define PORT_IDENTIFIER_SCHEMA_VERSION 1
31#define PORT_IDENTIFIER_MAGIC 3411841
32#define IS_PORT_IDENTIFIER(tr) \
33 (tr && ((PortIdentifier *) tr)->magic == PORT_IDENTIFIER_MAGIC)
77port_unit_to_str (
const PortUnit unit);
97 PORT_OWNER_TYPE_AUDIO_ENGINE,
145 MANUAL_PRESS = 1 << 5,
272 TRANSPORT_STOP = 1 << 1,
273 TRANSPORT_BACKWARD = 1 << 2,
274 TRANSPORT_FORWARD = 1 << 3,
275 TRANSPORT_LOOP_TOGGLE = 1 << 4,
276 TRANSPORT_REC_TOGGLE = 1 << 5,
358 int schema_version = PORT_IDENTIFIER_SCHEMA_VERSION;
409 inline const char * get_label ()
const {
return label; }
443 NONNULL
void print_to_str (
char * buf,
size_t buf_sz)
const;
445 bool validate ()
const;
446 uint32_t get_hash ()
const;
460port_identifier_get_label (
void * data);
463port_identifier_get_hash (
const void * data);
466port_identifier_destroy_notify (
void * data);
ZPortType
Type of signals the Port handles.
int port_identifier_port_group_cmp(const void *p1, const void *p2)
Port group comparator function where p1 and p2 are pointers to Port.
PortUnit
Port unit to be displayed in the UI.
ZPortFlow
Direction of the signal.
int port_identifier_is_equal_func(const void *a, const void *b)
To be used as GEqualFunc.
@ Z_PORT_UNIT_MS
Milliseconds.
@ Z_PORT_UNIT_US
Microseconds.
Piano roll serializable backend.
Struct used to identify Ports in the project.
WARN_UNUSED_RESULT bool is_equal(const PortIdentifier &other) const
Returns if the 2 PortIdentifier's are equal.
@ ENUMERATION
Port's only reasonable values are its scale points.
@ MIDI_POLY_KEY_PRESSURE
MIDI poly key pressure.
@ CHANNEL_SEND_ENABLED
Channel send enabled.
@ POSTFADER
Port is owned by postfader.
@ MonitorFader
Port is owned by monitor fader.
@ MIDI_PITCH_BEND
MIDI pitch bend.
@ SEQUENCE
Atom port buffer type is sequence.
@ URI_PARAM
Parameter port's value type is URI.
@ TRACK_RECORDING
Track recording.
@ CHANNEL_SEND_AMOUNT
Channel send amount.
@ FADER_LISTEN
Fader listen.
@ TP_OUTPUT_GAIN
Track processor output gain.
@ SAMPLE_PROCESSOR_FADER
Port is owned by the sample processor fader.
@ SUPPORTS_MIDI
Atom or event port supports MIDI.
@ MIDI_CHANNEL_PRESSURE
MIDI channel pressure.
@ PREFADER
Port is owned by prefader.
@ TRANSPORT_ROLL
Transport ports.
@ SAMPLE_PROCESSOR_TRACK
Port is owned by sample processor track/channel (including faders owned by those tracks/channels).
@ FADER_MONO_COMPAT
Fader mono compat.
@ TP_MONITOR_AUDIO
Track processor monitor audio.
@ BEATS_PER_BAR
Beats per bar.
@ SUPPORTS_PATCH_MESSAGE
LV2 control atom port supports patch messages.
@ FADER_SWAP_PHASE
Fader swap phase.
char * label
Human readable label.
char * port_group
Port group this port is part of (only applicable for LV2 plugin ports).
int get_midi_channel() const
Returns the MIDI channel for a MIDI CC port, or -1 if not a MIDI CC port.
ZPortType type
Data type (e.g.
ZPortFlow flow
Flow (IN/OUT).
PortIdentifier::Flags flags
Flags (e.g.
unsigned int track_name_hash
Track name hash (0 for non-track ports).
char * uri
URI, if LV2 property.
char * comment
Comment, if any.
@ HW
Port is part of a HardwareProcessor.
@ CHANNEL_SEND
Channel send.
@ MODULATOR_MACRO_PROCESSOR
Modulator macro processor owner.
@ PORT_OWNER_TYPE_TRANSPORT
Port is owned by engine transport.
PortIdentifier::OwnerType owner_type
Owner type.
int port_index
Index (e.g.
PluginIdentifier plugin_id
Identifier of plugin.
char * ext_port_id
ExtPort ID (type + full name), if hw port.
@ MAIN_PORT
See http://lv2plug.in/ns/ext/port-groups/port-groups.html#mainInput and http://lv2plug....
@ REPORTS_LATENCY
Used for plugin ports.
@ TP_MONO
Track processor input mono switch.
@ TOGGLE
Whether the port is a toggle (on/off).
@ CHANNEL_FADER
Port is for channel fader.
@ MODULATOR_MACRO
Port is part of a modulator macro processor.
@ WANT_POSITION
Whether the port wants to receive position events.
@ NOT_ON_GUI
Port should not be visible to users.
@ AMPLITUDE
Amplitude port.
@ PLUGIN_CONTROL
Port is a plugin control.
@ PLUGIN_ENABLED
Port is a switch for plugin enabled.
@ INTEGER
Whether the port is an integer.
@ STEREO_BALANCE
Port controls the stereo balance.
@ MIDI_AUTOMATABLE
MIDI automatable control, such as modwheel or pitch bend.
@ FREEWHEEL
Whether port is for letting the plugin know that we are in freewheeling (export) mode.
@ SIDECHAIN
See http://lv2plug.in/ns/ext/port-groups/port-groups.html#sideChainOf.
@ AUTOMATABLE
Port has an automation track.
@ IS_PROPERTY
Plugin control is a property (changes are set via atom message on the plugin's control port),...
@ GENERIC_PLUGIN_PORT
Generic plugin port not belonging to the underlying plugin.
@ PLUGIN_GAIN
This is the plugin gain.
@ FADER_MUTE
Port is for fader mute.
@ LOGARITHMIC
Logarithmic.
@ TRIGGER
Trigger ports will be set to 0 at the end of each cycle.
@ SEND_RECEIVABLE
Channels can send to this port (ie, this port is a track processor midi/stereo in or a plugin sidecha...
@ TP_INPUT_GAIN
Track processor input gain.