1.. This is part of the Zrythm Manual.
2   Copyright (C) 2019-2020 Alexandros Theodotou <alex at zrythm dot org>
3   See the file index.rst for copying conditions.
4
5.. _ports:
6
7Ports
8=====
9
10Before getting into connections, it is necessary
11to understand some basic information about ports.
12
13Ports are the main building blocks used to
14route signals throughout Zrythm. A port
15does not process anything on its own, and is
16usually part of a `processor`, like a plugin
17or track.
18
19.. figure:: /_static/img/ports-and-processor.png
20   :align: center
21
22   2 input ports connected to a processor, which
23   produces output to 2 output ports
24
25For example, an instrument track has a `MIDI input`
26port it uses to read MIDI data and 2
27`Audio output` ports where it copies the
28stereo signal after being processed.
29
30Port Directions
31---------------
32Input
33  The port receives signals
34Output
35  The port sends signals
36
37Port Types
38----------
39
40Audio
41  Ports of this type receive or send raw
42  audio signals
43Event
44  Event ports are mainly used for routing MIDI
45  signals
46Control
47  Control ports are user-editable parameters that
48  can also be automated in automation lanes
49CV
50  :term:`CV` ports handle continuous signals and
51  can be used to modulate control ports
52
53Port Connections
54----------------
55Ports can be connected with each other, as long
56as they are of the same type and opposite direction,
57with the exception of
58CV ports which may be routed to both CV
59ports and control ports.
60
61When ports are connected, the signal from the
62source port is added to the destination port
63during processing.
64
65.. figure:: /_static/img/audio-track-graph-emphasized.png
66   :align: center
67
68   Port connection graph for an audio track
69
70In the above example, the output audio port
71``TP Stereo out L`` is connected to the input audio
72port ``Ch Pre-Fader in L``. This connection is
73created automatically by Zrythm internally.
74