|
| constexpr int | audio_in_begin () const noexcept |
| constexpr int | audio_out_begin () const noexcept |
| constexpr int | control_begin () const noexcept |
| constexpr int | atom_in_begin () const noexcept |
| constexpr int | atom_out_begin () const noexcept |
| constexpr int | latency_index () const noexcept |
| constexpr int | port_count () const noexcept |
| | Total ports this plugin declares, latency port included.
|
| constexpr Lv2PortKind | kind_of (int port) const noexcept |
| | Classify a port number.
|
| constexpr int | slot_of (int port) const noexcept |
| | Offset of port within its own kind — the array index for the multi-slot kinds, and 0 for the single-slot ones.
|
The single definition of a Pulp LV2 plugin's port ordering.
LV2 names a port by a bare integer and nothing else: the manifest writes it as lv2:index N and the host hands the same integer back to connect_port(). generate_plugin_ttl() and connect_port() both derive their indices from this type, so the manifest a host reads and the slot the adapter wires cannot disagree — a disagreement delivers a float* where an LV2_Atom_Sequence is read, which compiles, links and loads.
The order is: every audio input channel, every audio output channel, one control port per parameter, the atom input port when the plugin accepts MIDI, the atom output port when it produces MIDI, then the latency output control port, always last. A host saves a session's port connections by index, so inserting a port renumbers every port after it and reconnects an existing session's ports to the wrong slots. Changing this order is a compatibility event.