LMMS
Loading...
Searching...
No Matches

Functions

LILV_API const LilvNodelilv_port_get_node (const LilvPlugin *plugin, const LilvPort *port)
LILV_API LilvNodeslilv_port_get_value (const LilvPlugin *plugin, const LilvPort *port, const LilvNode *predicate)
LILV_API LilvNodelilv_port_get (const LilvPlugin *plugin, const LilvPort *port, const LilvNode *predicate)
LILV_API LilvNodeslilv_port_get_properties (const LilvPlugin *plugin, const LilvPort *port)
LILV_API bool lilv_port_has_property (const LilvPlugin *plugin, const LilvPort *port, const LilvNode *property)
LILV_API bool lilv_port_supports_event (const LilvPlugin *plugin, const LilvPort *port, const LilvNode *event_type)
LILV_API uint32_t lilv_port_get_index (const LilvPlugin *plugin, const LilvPort *port)
LILV_API const LilvNodelilv_port_get_symbol (const LilvPlugin *plugin, const LilvPort *port)
LILV_API LilvNodelilv_port_get_name (const LilvPlugin *plugin, const LilvPort *port)
LILV_API const LilvNodeslilv_port_get_classes (const LilvPlugin *plugin, const LilvPort *port)
LILV_API bool lilv_port_is_a (const LilvPlugin *plugin, const LilvPort *port, const LilvNode *port_class)
LILV_API void lilv_port_get_range (const LilvPlugin *plugin, const LilvPort *port, LilvNode **def, LilvNode **min, LilvNode **max)
LILV_API LilvScalePointslilv_port_get_scale_points (const LilvPlugin *plugin, const LilvPort *port)

Detailed Description

Function Documentation

◆ lilv_port_get()

LILV_API LilvNode * lilv_port_get ( const LilvPlugin * plugin,
const LilvPort * port,
const LilvNode * predicate )

Get a single property value of a port.

This is equivalent to lilv_nodes_get_first(lilv_port_get_value(...)) but is simpler to use in the common case of only caring about one value. The caller is responsible for freeing the returned node.

◆ lilv_port_get_classes()

LILV_API const LilvNodes * lilv_port_get_classes ( const LilvPlugin * plugin,
const LilvPort * port )

Get all the classes of a port.

This can be used to determine if a port is an input, output, audio, control, midi, etc, etc, though it's simpler to use lilv_port_is_a(). The returned list does not include lv2:Port, which is implied. Returned value is shared and must not be destroyed by caller.

◆ lilv_port_get_index()

LILV_API uint32_t lilv_port_get_index ( const LilvPlugin * plugin,
const LilvPort * port )

Get the index of a port.

The index is only valid for the life of the plugin and may change between versions. For a stable identifier, use the symbol.

◆ lilv_port_get_name()

LILV_API LilvNode * lilv_port_get_name ( const LilvPlugin * plugin,
const LilvPort * port )

Get the name of a port.

This is guaranteed to return the untranslated name (the doap:name in the data file without a language tag). Returned value must be freed by the caller.

◆ lilv_port_get_node()

LILV_API const LilvNode * lilv_port_get_node ( const LilvPlugin * plugin,
const LilvPort * port )

Get the RDF node of port.

Ports nodes may be may be URIs or blank nodes.

Returns
A shared node which must not be modified or freed.

◆ lilv_port_get_properties()

LILV_API LilvNodes * lilv_port_get_properties ( const LilvPlugin * plugin,
const LilvPort * port )

Return the LV2 port properties of a port.

◆ lilv_port_get_range()

LILV_API void lilv_port_get_range ( const LilvPlugin * plugin,
const LilvPort * port,
LilvNode ** def,
LilvNode ** min,
LilvNode ** max )

Get the default, minimum, and maximum values of a port.

def, min, and max are outputs, pass pointers to uninitialized LilvNode* variables. These will be set to point at new values (which must be freed by the caller using lilv_node_free()), or NULL if the value does not exist.

◆ lilv_port_get_scale_points()

LILV_API LilvScalePoints * lilv_port_get_scale_points ( const LilvPlugin * plugin,
const LilvPort * port )

Get the scale points (enumeration values) of a port.

This returns a collection of 'interesting' named values of a port, which for example might be appropriate entries for a value selector in a UI.

Returned value may be NULL if port has no scale points, otherwise it must be freed by caller with lilv_scale_points_free().

◆ lilv_port_get_symbol()

LILV_API const LilvNode * lilv_port_get_symbol ( const LilvPlugin * plugin,
const LilvPort * port )

Get the symbol of a port.

The 'symbol' is a short string, a valid C identifier. Returned value is owned by port and must not be freed.

◆ lilv_port_get_value()

LILV_API LilvNodes * lilv_port_get_value ( const LilvPlugin * plugin,
const LilvPort * port,
const LilvNode * predicate )

◆ lilv_port_has_property()

LILV_API bool lilv_port_has_property ( const LilvPlugin * plugin,
const LilvPort * port,
const LilvNode * property )

Return whether a port has a certain property.

◆ lilv_port_is_a()

LILV_API bool lilv_port_is_a ( const LilvPlugin * plugin,
const LilvPort * port,
const LilvNode * port_class )

Determine if a port is of a given class (input, output, audio, etc).

For convenience/performance/extensibility reasons, hosts are expected to create a LilvNode for each port class they "care about". Well-known type URI strings like LILV_URI_INPUT_PORT are defined for convenience, but this function is designed so that Lilv is usable with any port types without requiring explicit support in Lilv.

◆ lilv_port_supports_event()

LILV_API bool lilv_port_supports_event ( const LilvPlugin * plugin,
const LilvPort * port,
const LilvNode * event_type )

Return whether a port supports a certain event type.

More precisely, this returns true iff the port has an atom:supports or an ev:supportsEvent property with event_type as the value.