Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
port_identifier.h File Reference

Port identifier. More...

#include "zrythm-config.h"
#include <stdbool.h>
#include "plugins/plugin_identifier.h"
#include "utils/string.h"
#include "utils/yaml.h"
Include dependency graph for port_identifier.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PortIdentifier
 Struct used to identify Ports in the project. More...
 

Macros

#define PORT_IDENTIFIER_SCHEMA_VERSION   1
 
#define PORT_IDENTIFIER_MAGIC   3411841
 
#define IS_PORT_IDENTIFIER(tr)    (tr && ((PortIdentifier *) tr)->magic == PORT_IDENTIFIER_MAGIC)
 

Enumerations

enum  PortFlow { FLOW_UNKNOWN , FLOW_INPUT , FLOW_OUTPUT }
 Direction of the signal. More...
 
enum  PortType {
  TYPE_UNKNOWN , TYPE_CONTROL , TYPE_AUDIO , TYPE_EVENT ,
  TYPE_CV
}
 Type of signals the Port handles. More...
 
enum  PortUnit {
  PORT_UNIT_NONE , PORT_UNIT_HZ , PORT_UNIT_MHZ , PORT_UNIT_DB ,
  PORT_UNIT_DEGREES , PORT_UNIT_SECONDS , PORT_UNIT_MS , PORT_UNIT_US
}
 Port unit to be displayed in the UI. More...
 
enum  PortOwnerType {
  PORT_OWNER_TYPE_AUDIO_ENGINE , PORT_OWNER_TYPE_PLUGIN , PORT_OWNER_TYPE_TRACK , PORT_OWNER_TYPE_CHANNEL ,
  PORT_OWNER_TYPE_FADER , PORT_OWNER_TYPE_CHANNEL_SEND , PORT_OWNER_TYPE_TRACK_PROCESSOR , PORT_OWNER_TYPE_HW ,
  PORT_OWNER_TYPE_TRANSPORT , PORT_OWNER_TYPE_MODULATOR_MACRO_PROCESSOR
}
 Type of owner. More...
 
enum  PortFlags {
  PORT_FLAG_STEREO_L = 1 << 0 , PORT_FLAG_STEREO_R = 1 << 1 , PORT_FLAG_PIANO_ROLL = 1 << 2 , PORT_FLAG_SIDECHAIN = 1 << 3 ,
  PORT_FLAG_MAIN_PORT = 1 << 4 , PORT_FLAG_MANUAL_PRESS = 1 << 5 , PORT_FLAG_AMPLITUDE = 1 << 6 , PORT_FLAG_STEREO_BALANCE = 1 << 7 ,
  PORT_FLAG_WANT_POSITION = 1 << 8 , PORT_FLAG_TRIGGER = 1 << 9 , PORT_FLAG_TOGGLE = 1 << 10 , PORT_FLAG_INTEGER = 1 << 11 ,
  PORT_FLAG_FREEWHEEL = 1 << 12 , PORT_FLAG_REPORTS_LATENCY = 1 << 13 , PORT_FLAG_NOT_ON_GUI = 1 << 14 , PORT_FLAG_PLUGIN_ENABLED = 1 << 15 ,
  PORT_FLAG_PLUGIN_CONTROL = 1 << 16 , PORT_FLAG_FADER_MUTE = 1 << 17 , PORT_FLAG_CHANNEL_FADER = 1 << 18 , PORT_FLAG_AUTOMATABLE = 1 << 19 ,
  PORT_FLAG_MIDI_AUTOMATABLE = 1 << 20 , PORT_FLAG_SEND_RECEIVABLE = 1 << 21 , PORT_FLAG_BPM = 1 << 22 , PORT_FLAG_GENERIC_PLUGIN_PORT = 1 << 23 ,
  PORT_FLAG_PLUGIN_GAIN = 1 << 24 , PORT_FLAG_TP_MONO = 1 << 25 , PORT_FLAG_TP_INPUT_GAIN = 1 << 26 , PORT_FLAG_HW = 1 << 27 ,
  PORT_FLAG_MODULATOR_MACRO = 1 << 28 , PORT_FLAG_LOGARITHMIC = 1 << 29 , PORT_FLAG_IS_PROPERTY = 1 << 30
}
 Port flags. More...
 
enum  PortFlags2 {
  PORT_FLAG2_TRANSPORT_ROLL = 1 << 0 , PORT_FLAG2_TRANSPORT_STOP = 1 << 1 , PORT_FLAG2_TRANSPORT_BACKWARD = 1 << 2 , PORT_FLAG2_TRANSPORT_FORWARD = 1 << 3 ,
  PORT_FLAG2_TRANSPORT_LOOP_TOGGLE = 1 << 4 , PORT_FLAG2_TRANSPORT_REC_TOGGLE = 1 << 5 , PORT_FLAG2_SUPPORTS_PATCH_MESSAGE = 1 << 6 , PORT_FLAG2_ENUMERATION = 1 << 7 ,
  PORT_FLAG2_URI_PARAM = 1 << 8 , PORT_FLAG2_SEQUENCE = 1 << 9 , PORT_FLAG2_SUPPORTS_MIDI = 1 << 10 , PORT_FLAG2_TP_OUTPUT_GAIN = 1 << 11 ,
  PORT_FLAG2_MIDI_PITCH_BEND = 1 << 12 , PORT_FLAG2_MIDI_POLY_KEY_PRESSURE = 1 << 13 , PORT_FLAG2_MIDI_CHANNEL_PRESSURE = 1 << 14 , PORT_FLAG2_CHANNEL_SEND_ENABLED = 1 << 15 ,
  PORT_FLAG2_CHANNEL_SEND_AMOUNT = 1 << 16 , PORT_FLAG2_BEATS_PER_BAR = 1 << 17 , PORT_FLAG2_BEAT_UNIT = 1 << 18 , PORT_FLAG2_FADER_SOLO = 1 << 19 ,
  PORT_FLAG2_FADER_LISTEN = 1 << 20 , PORT_FLAG2_FADER_MONO_COMPAT = 1 << 21 , PORT_FLAG2_TRACK_RECORDING = 1 << 22 , PORT_FLAG2_TP_MONITOR_AUDIO = 1 << 23 ,
  PORT_FLAG2_PREFADER = 1 << 24 , PORT_FLAG2_POSTFADER = 1 << 25 , PORT_FLAG2_MONITOR_FADER = 1 << 26 , PORT_FLAG2_SAMPLE_PROCESSOR_FADER = 1 << 27 ,
  PORT_FLAG2_SAMPLE_PROCESSOR_TRACK = 1 << 28 , PORT_FLAG2_FADER_SWAP_PHASE = 1 << 29 , PORT_FLAG2_MIDI_CLOCK = 1 << 30
}
 

Functions

void port_identifier_init (PortIdentifier *self)
 
int port_identifier_port_group_cmp (const void *p1, const void *p2)
 Port group comparator function where p1 and p2 are pointers to Port.
 
NONNULL void port_identifier_copy (PortIdentifier *dest, const PortIdentifier *src)
 Copy the identifier content from src to dest.
 
WARN_UNUSED_RESULT NONNULL bool port_identifier_is_equal (const PortIdentifier *src, const PortIdentifier *dest)
 Returns if the 2 PortIdentifier's are equal.
 
int port_identifier_is_equal_func (const void *a, const void *b)
 To be used as GEqualFunc.
 
NONNULL void port_identifier_print_to_str (const PortIdentifier *self, char *buf, size_t buf_sz)
 
NONNULL void port_identifier_print (const PortIdentifier *self)
 
NONNULL bool port_identifier_validate (PortIdentifier *self)
 
NONNULL uint32_t port_identifier_get_hash (const void *self)
 
NONNULL PortIdentifierport_identifier_clone (const PortIdentifier *src)
 
NONNULL void port_identifier_free_members (PortIdentifier *self)
 
NONNULL void port_identifier_free (PortIdentifier *self)
 
void port_identifier_free_func (void *self)
 Compatible with GDestroyNotify.
 

Detailed Description

Port identifier.

Definition in file port_identifier.h.