LV2 Parameters as Strings

On another topic I found this by @falkTX (but my emphasis in the quote below)

I’d really like to use strings in an input parameter. Is there any example I could see? Are there any limits in size of string, also how is it read in the connect_port function?

Don’t know, but I would go for plugins like ir loader or mp3 player which can select files

there are no real limits on the size of the string on the latest release.

to deal with lv2:Parameter types (often called lv2 patch parameters) we need to use lv2 atom ports and set the buffer type type to patch message.
then each parameter needs to be marked either writable or readable.

the “notes” plugin is a good example for how this works in terms of the UI behaviour, but its code is not the most readable.

There is lv2/plugins/eg-params.lv2 at master · lv2/lv2 · GitHub which is slightly simpler and shows how to use different types.

And also GitHub - x42/property_example.lv2: LV2 Property/Parameter Example Plugin which is even simpler but does not deal with strings.

3 Likes