Questions about passing strings and other data from UI to LV2 plugin

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

f00bar
Establlshed Member
Posts: 83
Joined: Sun May 12, 2013 7:40 pm

Questions about passing strings and other data from UI to LV2 plugin

Postby f00bar » Sat Nov 26, 2016 6:56 pm

I need to pass a string from the UI to the plugin. From the eg-sample, it appears that an LV2 atom should be written to a atom port.

If I understand it correctly

  1. Allocate a LV2_Atom_Forge. May that object be on the stack or does it have to survive after the UI event callback has returned?
  2. Call lv2_atom_forge_set_buffer. How do I know the required size of the buffer? Is it the size of the payload (the string), or does it include any headers. The example sets it to 1024 bytes for no reason. May the buffer be allocated on the stack or does it have to survive the UI after the UI event callback has returned?
  3. Add some objects
  4. Write the data to an atom input port

Is that correct?

User avatar
falkTX
Establlshed Member
Posts: 6496
Joined: Sat Jan 09, 2010 3:04 pm

Re: Questions about passing strings and other data from UI to LV2 plugin

Postby falkTX » Sat Nov 26, 2016 10:07 pm

you should write to the lv2 mailing list.

only a very few lv2 developers go here on this forum.


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 2 guests