Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
port.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2018-2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
11#ifndef __AUDIO_PORTS_H__
12#define __AUDIO_PORTS_H__
13
14#include "zrythm-config.h"
15
16#include <stdbool.h>
17
18#include "dsp/port_identifier.h"
19#include "plugins/lv2/lv2_evbuf.h"
20#include "utils/types.h"
21
22#include "zix/sem.h"
23#include <lilv/lilv.h>
24
25#ifdef HAVE_JACK
26# include "weak_libjack.h"
27#endif
28
29#ifdef HAVE_RTMIDI
30# include <rtmidi_c.h>
31#endif
32
33#ifdef HAVE_RTAUDIO
34# include <rtaudio_c.h>
35#endif
36
37typedef struct Plugin Plugin;
38typedef struct MidiEvents MidiEvents;
39typedef struct Fader Fader;
40typedef struct ZixRingImpl ZixRing;
41typedef struct WindowsMmeDevice WindowsMmeDevice;
42typedef struct Channel Channel;
43typedef struct AudioEngine AudioEngine;
44typedef struct Track Track;
45typedef struct PortConnection PortConnection;
46typedef struct TrackProcessor TrackProcessor;
48typedef struct RtMidiDevice RtMidiDevice;
49typedef struct RtAudioDevice RtAudioDevice;
50typedef struct AutomationTrack AutomationTrack;
51typedef struct TruePeakDsp TruePeakDsp;
52typedef struct ExtPort ExtPort;
53typedef struct AudioClip AudioClip;
54typedef struct ChannelSend ChannelSend;
55typedef struct Transport Transport;
58typedef enum PanAlgorithm PanAlgorithm;
59typedef enum PanLaw PanLaw;
60
67#define PORT_SCHEMA_VERSION 1
68#define STEREO_PORTS_SCHEMA_VERSION 1
69
70#define PORT_MAGIC 456861194
71#define IS_PORT(_p) (((Port *) (_p))->magic == PORT_MAGIC)
72#define IS_PORT_AND_NONNULL(x) ((x) && IS_PORT (x))
73
74#define TIME_TO_RESET_PEAK 4800000
75
80#define PORT_NOT_OWNED -1
81
82#define port_is_owner_active(self, _owner_type, owner) \
83 ((self->id.owner_type == _owner_type) && (self->owner != NULL) \
84 && owner##_is_in_active_project (self->owner))
85
86#define port_is_in_active_project(self) \
87 (port_is_owner_active (self, PORT_OWNER_TYPE_AUDIO_ENGINE, engine) \
88 || port_is_owner_active (self, PORT_OWNER_TYPE_PLUGIN, plugin) \
89 || port_is_owner_active (self, PORT_OWNER_TYPE_TRACK, track) \
90 || port_is_owner_active (self, PORT_OWNER_TYPE_CHANNEL, track) \
91 || port_is_owner_active (self, PORT_OWNER_TYPE_FADER, fader) \
92 || port_is_owner_active (self, PORT_OWNER_TYPE_CHANNEL_SEND, channel_send) \
93 || port_is_owner_active (self, PORT_OWNER_TYPE_TRACK_PROCESSOR, track) \
94 || port_is_owner_active ( \
95 self, PORT_OWNER_TYPE_MODULATOR_MACRO_PROCESSOR, modulator_macro_processor) \
96 || port_is_owner_active (self, PORT_OWNER_TYPE_HW, ext_port))
97
117
121typedef struct PortScalePoint
122{
123 float val;
124 char * label;
126
127PURE int
128port_scale_point_cmp (const void * _a, const void * _b);
129
130NONNULL PortScalePoint *
131port_scale_point_new (const float val, const char * label);
132
133NONNULL void
134port_scale_point_free (PortScalePoint * self);
135
139typedef struct Port
140{
141 int schema_version;
142
144
150
157 float * buf;
158
163
166 struct Port ** srcs;
167 int num_srcs;
168 size_t srcs_size;
169
172 struct Port ** dests;
173 int num_dests;
174 size_t dests_size;
175
179 int num_src_connections;
180 size_t src_connections_size;
181
185 int num_dest_connections;
186 size_t dest_connections_size;
187
193
201 float minf;
202 float maxf;
203
211 float zerof;
212
214 float deff;
215
219
228 void * data;
229
230#ifdef _WOE32
239 WindowsMmeDevice * mme_connections[40];
240 int num_mme_connections;
241#else
242 void * mme_connections[40];
243 int num_mme_connections;
244#endif
245
249
257
258#ifdef HAVE_RTMIDI
265 RtMidiDevice * rtmidi_ins[128];
266 int num_rtmidi_ins;
267
269 RtMidiDevice * rtmidi_outs[128];
270 int num_rtmidi_outs;
271#else
272 void * rtmidi_ins[128];
273 int num_rtmidi_ins;
274 void * rtmidi_outs[128];
275 int num_rtmidi_outs;
276#endif
277
278#ifdef HAVE_RTAUDIO
284 RtAudioDevice * rtaudio_ins[128];
285 int num_rtaudio_ins;
286#else
287 void * rtaudio_ins[128];
288 int num_rtaudio_ins;
289#endif
290
293 int num_scale_points;
294
306 float control;
307
310
314
322
325
328
331
334
337
345
349
350 /* ====== flags to indicate port owner ====== */
351
358
361
371
380
389
392
402
405 volatile int has_midi_events;
406
410
421 ZixRing * audio_ring;
422
436 ZixRing * midi_ring;
437
440 float peak;
441
444
454
455 /* --- ported from Lv2Port --- */
456
458 const LilvPort * lilv_port;
459
462 LV2_URID value_type;
463
465 LV2_Evbuf * evbuf;
466
473
481
485
496
505
508
511
512 /* --- end Lv2Port --- */
513
520
521 /*
522 * Next 2 objects are MIDI CC info, if MIDI CC in track processor.
523 *
524 * Used as a cache.
525 */
526
529
532
535
537 int magic;
538
542} Port;
543
544static const cyaml_schema_field_t port_fields_schema[] = {
545 YAML_FIELD_INT (Port, schema_version),
546 YAML_FIELD_MAPPING_EMBEDDED (Port, id, port_identifier_fields_schema),
547 YAML_FIELD_INT (Port, exposed_to_backend),
548 YAML_FIELD_FLOAT (Port, control),
549 YAML_FIELD_FLOAT (Port, minf),
550 YAML_FIELD_FLOAT (Port, maxf),
551 YAML_FIELD_FLOAT (Port, zerof),
552 YAML_FIELD_FLOAT (Port, deff),
553 YAML_FIELD_INT (Port, carla_param_id),
554
555 CYAML_FIELD_END
556};
557
558static const cyaml_schema_value_t port_schema = {
559 YAML_VALUE_PTR_NULLABLE (Port, port_fields_schema),
560};
561
567typedef struct StereoPorts
568{
569 int schema_version;
570 Port * l;
571 Port * r;
573
574static const cyaml_schema_field_t stereo_ports_fields_schema[] = {
575 YAML_FIELD_INT (StereoPorts, schema_version),
576 YAML_FIELD_MAPPING_PTR (StereoPorts, l, port_fields_schema),
577 YAML_FIELD_MAPPING_PTR (StereoPorts, r, port_fields_schema),
578
579 CYAML_FIELD_END
580};
581
582static const cyaml_schema_value_t stereo_ports_schema = {
583 YAML_VALUE_PTR (StereoPorts, stereo_ports_fields_schema),
584};
585
593NONNULL void
594port_init_loaded (Port * self, void * owner);
595
596void
597port_set_owner (Port * self, PortOwnerType owner_type, void * owner);
598
599NONNULL Port *
600port_find_from_identifier (const PortIdentifier * const id);
601
602NONNULL static inline void
603stereo_ports_init_loaded (StereoPorts * sp, void * owner)
604{
605 port_init_loaded (sp->l, owner);
606 port_init_loaded (sp->r, owner);
607}
608
609NONNULL_ARGS (1)
610static inline void stereo_ports_set_owner (
611 StereoPorts * sp,
612 PortOwnerType owner_type,
613 void * owner)
614{
615 port_set_owner (sp->l, owner_type, owner);
616 port_set_owner (sp->r, owner_type, owner);
617}
618
622WARN_UNUSED_RESULT NONNULL Port *
623port_new_with_type (PortType type, PortFlow flow, const char * label);
624
625WARN_UNUSED_RESULT NONNULL Port *
626port_new_with_type_and_owner (
627 PortType type,
628 PortFlow flow,
629 const char * label,
630 PortOwnerType owner_type,
631 void * owner);
632
639NONNULL void
641
648NONNULL void
650
654NONNULL StereoPorts *
656
666 int in,
667 const char * name,
668 const char * symbol,
669 PortOwnerType owner_type,
670 void * owner);
671
680NONNULL void
681stereo_ports_connect (StereoPorts * src, StereoPorts * dest, int locked);
682
683NONNULL void
684stereo_ports_disconnect (StereoPorts * self);
685
687stereo_ports_clone (const StereoPorts * src);
688
689NONNULL void
690stereo_ports_free (StereoPorts * self);
691
700const void *
702 const char * port_sym,
703 void * user_data,
704 uint32_t * size,
705 uint32_t * type);
706
707#ifdef HAVE_JACK
712NONNULL void
713port_receive_midi_events_from_jack (
714 Port * self,
715 const nframes_t start_frames,
716 const nframes_t nframes);
717
722NONNULL void
723port_receive_audio_data_from_jack (
724 Port * self,
725 const nframes_t start_frames,
726 const nframes_t nframes);
727#endif
728
734NONNULL bool
736
742NONNULL void
743port_get_full_designation (Port * const self, char * buf);
744
745NONNULL void
746port_print_full_designation (Port * const self);
747
752void
753port_get_all (GPtrArray * ports);
754
755NONNULL Track *
756port_get_track (const Port * const self, int warn_if_fail);
757
758NONNULL Plugin *
759port_get_plugin (Port * const self, const bool warn_if_fail);
760
773void
775 Port * self,
776 const PortIdentifier * prev_id,
777 Track * track,
778 bool update_automation_track);
779
780#ifdef HAVE_RTMIDI
785NONNULL void
786port_prepare_rtmidi_events (Port * self);
787
792NONNULL void
793port_sum_data_from_rtmidi (
794 Port * self,
795 const nframes_t start_frame,
796 const nframes_t nframes);
797#endif
798
799#ifdef HAVE_RTAUDIO
804NONNULL void
805port_prepare_rtaudio_data (Port * self);
806
811NONNULL void
812port_sum_data_from_rtaudio (
813 Port * self,
814 const nframes_t start_frame,
815 const nframes_t nframes);
816#endif
817
821NONNULL void
823
831NONNULL void
832port_set_expose_to_backend (Port * self, int expose);
833
837NONNULL PURE static inline bool
838port_is_exposed_to_backend (const Port * self)
839{
840 return self->internal_type == INTERNAL_JACK_PORT
842 || self->id.owner_type == PORT_OWNER_TYPE_AUDIO_ENGINE
843 || self->exposed_to_backend;
844}
845
849NONNULL void
851
852#ifdef HAVE_ALSA
853
858Port *
859port_find_by_alsa_seq_id (const int id);
860#endif
861
879NONNULL void
881 Port * self,
882 const float val,
883 const bool is_normalized,
884 const bool forward_event);
885
893NONNULL HOT float
894port_get_control_value (Port * self, const bool normalize);
895
902#define port_connect(a, b, locked) \
903 port_connections_manager_ensure_connect ( \
904 PORT_CONNECTIONS_MGR, &((a)->id), &((b)->id), 1.f, locked, true)
905
909#define port_disconnect(a, b) \
910 port_connections_manager_ensure_disconnect ( \
911 PORT_CONNECTIONS_MGR, &((a)->id), &((b)->id))
912
917NONNULL int
919
924NONNULL int
926
934void
935port_update_track_name_hash (Port * self, Track * track, unsigned int new_hash);
936
944NONNULL static inline void
945port_apply_fader (
946 Port * port,
947 float amp,
948 nframes_t start_frame,
949 const nframes_t nframes)
950{
951 nframes_t end = start_frame + nframes;
952 while (start_frame < end)
953 {
954 port->buf[start_frame++] *= amp;
955 }
956}
957
965HOT NONNULL void
967 Port * port,
968 const EngineProcessTimeInfo time_nfo,
969 const bool noroll);
970
971#define ports_connected(a, b) \
972 (port_connections_manager_find_connection ( \
973 PORT_CONNECTIONS_MGR, &(a)->id, &(b)->id) \
974 != NULL)
975
981NONNULL bool
982ports_can_be_connected (const Port * src, const Port * dest);
983
987NONNULL void
988ports_disconnect (Port ** ports, int num_ports, int deleting);
989
997NONNULL void
999
1007NONNULL void
1008port_copy_values (Port * self, const Port * other);
1009
1020NONNULL void
1022
1029#define port_clear_buffer(_port) \
1030 { \
1031 if (_port->id.type == TYPE_AUDIO || _port->id.type == TYPE_CV) \
1032 { \
1033 if (_port->buf) \
1034 { \
1035 dsp_fill ( \
1036 _port->buf, DENORMAL_PREVENTION_VAL, AUDIO_ENGINE->block_length); \
1037 } \
1038 } \
1039 else if (_port->id.type == TYPE_EVENT) \
1040 { \
1041 if (_port->midi_events) \
1042 _port->midi_events->num_events = 0; \
1043 } \
1044 }
1045
1049HOT NONNULL OPTIMIZE_O3 void
1051
1055NONNULL int
1057
1061NONNULL void
1063 Port * l,
1064 Port * r,
1065 float pan,
1066 PanLaw pan_law,
1067 PanAlgorithm pan_algo);
1068
1076NONNULL void
1078 Port * port,
1079 float pan,
1080 PanLaw pan_law,
1081 PanAlgorithm pan_algo,
1082 nframes_t start_frame,
1083 const nframes_t nframes);
1084
1088NONNULL uint32_t
1089port_get_hash (const void * ptr);
1090
1094Port *
1095port_clone (const Port * src);
1096
1100NONNULL void
1102
1107#endif
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
NONNULL void port_init_loaded(Port *self, void *owner)
This function finds the Ports corresponding to the PortIdentifiers for srcs and dests.
NONNULL void port_set_expose_to_backend(Port *self, int expose)
Sets whether to expose the port to the backend and exposes it or removes it.
NONNULL int port_disconnect_all(Port *port)
Disconnects all srcs and dests from port.
NONNULL bool ports_can_be_connected(const Port *src, const Port *dest)
Returns whether the Port's can be connected (if the connection will be valid and won't break the acyc...
HOT NONNULL OPTIMIZE_O3 void port_clear_external_buffer(Port *port)
Clears the backend's port buffer.
NONNULL void port_copy_values(Port *self, const Port *other)
Copies the port values from other to self.
NONNULL void port_apply_pan(Port *port, float pan, PanLaw pan_law, PanAlgorithm pan_algo, nframes_t start_frame, const nframes_t nframes)
Applies the pan to the given port.
NONNULL int port_get_num_unlocked_srcs(const Port *self)
Returns the number of unlocked (user-editable) sources.
HOT NONNULL void port_process(Port *port, const EngineProcessTimeInfo time_nfo, const bool noroll)
First sets port buf to 0, then sums the given port signal from its inputs.
NONNULL StereoPorts * stereo_ports_new_from_existing(Port *l, Port *r)
Creates blank stereo ports.
void port_update_identifier(Port *self, const PortIdentifier *prev_id, Track *track, bool update_automation_track)
To be called when the port's identifier changes to update corresponding identifiers.
Port * port_clone(const Port *src)
To be used during serialization.
PortType
Type of signals the Port handles.
void port_get_all(GPtrArray *ports)
Gathers all ports in the project and appends them in the given array.
NONNULL void port_apply_pan_stereo(Port *l, Port *r, float pan, PanLaw pan_law, PanAlgorithm pan_algo)
Applies the pan to the given L/R ports.
NONNULL void stereo_ports_connect(StereoPorts *src, StereoPorts *dest, int locked)
Connects the internal ports using port_connect().
PortFlow
Direction of the signal.
PortInternalType
What the internal data is.
Definition port.h:102
NONNULL void port_allocate_bufs(Port *self)
Allocates buffers used during DSP.
NONNULL void port_free_bufs(Port *self)
Frees buffers.
void port_update_track_name_hash(Port *self, Track *track, unsigned int new_hash)
Updates the track name hash on a track port and all its source/destination identifiers.
StereoPorts * stereo_ports_new_generic(int in, const char *name, const char *symbol, PortOwnerType owner_type, void *owner)
Creates stereo ports for generic use.
NONNULL void ports_disconnect(Port **ports, int num_ports, int deleting)
Disconnects all the given ports.
NONNULL void port_restore_from_non_project(Port *self, Port *non_project)
Reverts the data on the corresponding project port for the given non-project port.
PortOwnerType
Type of owner.
NONNULL HOT float port_get_control_value(Port *self, const bool normalize)
Gets the given control value from the corresponding underlying structure in the Port.
NONNULL void port_get_full_designation(Port *const self, char *buf)
Copies a full designation of self in the format "Track/Port" or "Track/Plugin/Port" in buf.
NONNULL bool port_has_sound(Port *self)
If MIDI port, returns if there are any events, if audio port, returns if there is sound in the buffer...
NONNULL void port_copy_metadata_from_project(Port *self, Port *project_port)
Copies the metadata from a project port to the given port.
NONNULL void port_rename_backend(Port *self)
Renames the port on the backend side.
NONNULL void port_free(Port *port)
Deletes port, doing required cleanup and updating counters.
NONNULL int port_get_num_unlocked_dests(const Port *self)
Returns the number of unlocked (user-editable) destinations.
const void * port_get_value_from_symbol(const char *port_sym, void *user_data, uint32_t *size, uint32_t *type)
Function to get a port's value from its string symbol.
NONNULL void port_disconnect_hw_inputs(Port *self)
Disconnects all hardware inputs from the port.
NONNULL void port_set_control_value(Port *self, const float val, const bool is_normalized, const bool forward_event)
Sets the given control value to the corresponding underlying structure in the Port.
WARN_UNUSED_RESULT NONNULL Port * port_new_with_type(PortType type, PortFlow flow, const char *label)
Creates port.
NONNULL uint32_t port_get_hash(const void *ptr)
Generates a hash for a given port.
@ INTERNAL_PA_PORT
TODO.
Definition port.h:112
@ INTERNAL_LV2_PORT
Pointer to Lv2Port.
Definition port.h:106
@ INTERNAL_JACK_PORT
Pointer to jack_port_t.
Definition port.h:109
@ INTERNAL_ALSA_SEQ_PORT
Pointer to snd_seq_port_info_t.
Definition port.h:115
#define YAML_FIELD_MAPPING_EMBEDDED(owner, member, schema)
Mapping embedded inside the struct.
Definition yaml.h:31
uint32_t nframes_t
Frame count.
Definition types.h:34
uint8_t midi_byte_t
MIDI byte.
Definition types.h:31
#define YAML_FIELD_MAPPING_PTR(owner, member, schema)
Mapping pointer to a struct.
Definition yaml.h:37
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
Definition yaml.h:202
#define YAML_VALUE_PTR_NULLABLE(cc, fields_schema)
Schema to be used as a pointer that can be NULL.
Definition yaml.h:209
PanAlgorithm
See https://www.harmonycentral.com/articles/the-truth-about-panning-laws.
Definition pan.h:52
PanLaw
These are only useful when changing mono to stereo.
Definition pan.h:29
Port identifier.
Audio clips for the pool.
Definition clip.h:33
The audio engine.
Definition engine.h:363
Channel send.
A Channel is part of a Track (excluding Tracks that don't have Channels) and contains information rel...
Definition channel.h:61
Common struct to pass around during processing to avoid repeating the data in function arguments.
Definition types.h:137
External port.
Definition ext_port.h:77
A Fader is a processor that is used for volume controls and pan.
Definition fader.h:118
Container for passing midi events through ports.
Definition midi_event.h:68
Modulator macro button processor.
Widget for a control.
Definition plugin_gtk.h:27
The base plugin Inheriting plugins must have this as a child.
Definition plugin.h:71
A connection between two ports.
Struct used to identify Ports in the project.
PortOwnerType owner_type
Owner type.
Scale point.
Definition port.h:122
Must ONLY be created via port_new()
Definition port.h:140
int initialized
used when loading projects FIXME needed?
Definition port.h:360
int exposed_to_backend
Flag to indicate that this port is exposed to the backend.
Definition port.h:149
ExtPort * ext_port
Pointer to ExtPort, if hw.
Definition port.h:534
ZixRing * midi_ring
Ring buffer for saving MIDI events to be used in the UI instead of directly accessing the events.
Definition port.h:436
float minf
Minimum, maximum and zero values for this port.
Definition port.h:201
ZixSem mme_connections_sem
Semaphore for changing the connections atomically.
Definition port.h:248
gint64 last_midi_event_time
Used by the UI to detect when unprocessed MIDI events exist.
Definition port.h:409
int magic
Magic number to identify that this is a Port.
Definition port.h:537
midi_byte_t last_midi_status
Last known MIDI status byte received.
Definition port.h:453
AudioEngine * engine
Pointer to owner engine, if any.
Definition port.h:333
gint64 last_change
Last timestamp the control changed.
Definition port.h:321
float * buf
Buffer to be reallocated every time the buffer size changes.
Definition port.h:157
MidiEvents * midi_events
Contains raw MIDI data (MIDI ports only)
Definition port.h:162
midi_byte_t midi_cc_no
MIDI CC number, if not pitchbend/poly key/channel pressure.
Definition port.h:531
PortInternalType internal_type
Indicates whether data or lv2_port should be used.
Definition port.h:192
const PortConnection ** dest_connections
Caches filled when recalculating the graph.
Definition port.h:184
Transport * transport
Pointer to owner transport, if any.
Definition port.h:327
midi_byte_t midi_channel
MIDI channel, starting from 1.
Definition port.h:528
float base_value
For control ports, when a modulator is attached to the port the previous value will be saved here.
Definition port.h:370
bool old_api
True for event, false for atom.
Definition port.h:510
size_t last_buf_sz
Last allocated buffer size (used for audio ports).
Definition port.h:541
ModulatorMacroProcessor * modulator_macro_processor
Pointer to owner modulator macro processor, if any.
Definition port.h:348
LV2_URID value_type
Float for LV2 control ports, declared type for LV2 parameters.
Definition port.h:462
ZixRing * audio_ring
Ring buffer for saving the contents of the audio buffer to be used in the UI instead of directly acce...
Definition port.h:421
float control
The control value if control port, otherwise 0.0f.
Definition port.h:306
AutomationTrack * at
Automation track this port is attached to.
Definition port.h:519
const PortConnection ** src_connections
Caches filled when recalculating the graph.
Definition port.h:178
gint64 last_midi_dequeue
Last time the port finished dequeueing MIDI events.
Definition port.h:256
Fader * fader
Pointer to owner fader, if any.
Definition port.h:336
volatile int has_midi_events
Whether the port has midi events not yet processed by the UI.
Definition port.h:405
ChannelSend * channel_send
Pointer to owner channel send, if any.
Definition port.h:330
size_t min_buf_size
Minimum buffer size that the port wants, or 0.
Definition port.h:480
long playback_latency
Playback latency.
Definition port.h:388
float unsnapped_control
Unsnapped value, used by widgets.
Definition port.h:309
Plugin * plugin
Pointer to owner plugin, if any.
Definition port.h:324
struct Port ** srcs
Caches filled when recalculating the graph.
Definition port.h:166
float zerof
The zero position of the port.
Definition port.h:211
int lilv_port_index
Port index in the lilv plugin, if non-parameter.
Definition port.h:484
struct Port ** dests
Caches filled when recalculating the graph.
Definition port.h:172
PluginGtkController * widget
Control widget, if applicable.
Definition port.h:472
bool received_ui_event
Whether the port received a UI event from the plugin UI in this cycle.
Definition port.h:495
const LilvPort * lilv_port
LV2 port.
Definition port.h:458
int carla_param_id
Index of the control parameter (for Carla plugin ports).
Definition port.h:218
bool write_ring_buffers
Flag to indicate if the ring buffers below should be filled or not.
Definition port.h:401
bool automating
Whether this value was set via automation.
Definition port.h:507
Plugin * tmp_plugin
Temporary plugin pointer (used when the plugin doesn't exist yet in its supposed slot).
Definition port.h:357
long capture_latency
Capture latency.
Definition port.h:379
float last_sent_control
The last known control value sent to the UI (if control).
Definition port.h:504
Track * track
Pointer to owner track, if any.
Definition port.h:344
LV2_Evbuf * evbuf
For MIDI ports, otherwise NULL.
Definition port.h:465
int deleting
Port undergoing deletion.
Definition port.h:391
float deff
Default value, only used for controls.
Definition port.h:214
gint64 peak_timestamp
Last time Port.max_amp was set.
Definition port.h:443
PortScalePoint ** scale_points
Scale points.
Definition port.h:292
bool value_changed_from_reading
Flag that the value of the port changed from reading automation.
Definition port.h:313
float peak
Max amplitude during processing, if audio (fabsf).
Definition port.h:440
void * data
Pointer to arbitrary data.
Definition port.h:228
L & R port, for convenience.
Definition port.h:568
A TrackProcessor is a processor that is used as the first entry point when processing a track.
Track to be inserted into the Project's Tracklist.
Definition track.h:190
The transport.
Definition transport.h:192
Custom types.