string-port
type: Specification
license: mit
name: LV2 String Ports
maintainer: Krzysztof Foltman
comment: Defines ports which contain string data. UI issues When using port_event / write_port (and possible other communication mechanisms), the format parameter should contain the numeric value of URI LV2_STRING_PORT_URI (mapped with http://lv2plug.in/ns/extensions/ui specified as map URI). It's probably possible to use ports belonging to message context <http://lv2plug.in/ns/ext/contexts#MessageContext> for transfer. However, contexts mechanism does not offer any way to notify the message recipient about which ports have been changed. To remedy that, this extension defines a flag LV2_STRING_DATA_CHANGED_FLAG that carries that information inside a port value structure. Storage The value of string port are assumed to be "persistent": if a host saves and restores a state of a plugin (e.g. control port values), the values of input string ports should also be assumed to belong to that state. This also applies to message context: if a session is being restored, the host MUST resend the last value that was sent to the port before session has been saved. In other words, string port values "stick" to message ports.

String data transfer via LV2_String_Data
type: Feature

String port
type: Port
comment: Indicates that the port data points to a LV2_String_Data structure as defined in accompanying header file. Input Port Semantics If the port does not have a context specified (it runs in the default, realtime audio processing context), the values in the structure and the actual string data MUST remain unchanged for the time a run() function of a plugin is executed. However, if the port belongs to a different context, the same data MUST remain unchanged only for the time a run() or message_process() function of a given context is executed. Output Port Semantics The plugin may only change the string or length in a run() function (if the port belongs to default context) or in context-defined counterparts (if the port belongs to another context). Because of that, using default context output string ports is contraindicated for longer strings.

Default value
type: Property
domain: String port
range: XMLSchemastring
comment: Gives a default value for a string port.

Required storage space in bytes
type: Property
domain: String port
range: XMLSchemanonNegativeInteger
comment: Specifies required buffer space for output string ports and those of input string ports that are meant to be GUI-controlled. The host MUST allocate a buffer of at least required size to accommodate for all values that can be produced by the plugin.