Query about the LV2 plugin format

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

User avatar
milk
Establlshed Member
Posts: 69
Joined: Tue Jan 05, 2016 9:08 am
Location: Edinburgh
Contact:

Query about the LV2 plugin format

Postby milk » Mon Sep 03, 2018 12:04 pm

Breaking this out from the other thread as TBH it's OT there.

j_e_f_f_g wrote:It's shocking how something as basic/fundamental as data storage/organization is so horrendously ill-conceived and unwieldy. But then, he did make the absurd choice of turtle for a storage format, so there's no limit to how bad it can get. And it's gonna get bad when Wayland takes over. (Not because of Wayland though.)


The use of Turtle in the LV2 plugin format; what are the advantages, what are the disadvantages?

Are objections (seen threads such as the one linked above, or this one), with the use of a semantic/relational format, or with the choice of such a format (Turtle), or with the way that format has been used? Would another variety of semantic (or other) format have been better (i.e., if JSON-LD had been available then)?

Pointers to prehashed discussion points made in mailing lists also welcome.
Last edited by milk on Tue Sep 11, 2018 12:29 pm, edited 2 times in total.
wiki.thingsandstuff.org/Audio etc. - a collection of mostly Linux and free links (OpenID auth for anti-spam, try DW)
Linux Digital Audio and Music Workstation Comparison Matrix - collaborative Google Sheet

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

Re: Query about the LV2 plugin format

Postby falkTX » Mon Sep 03, 2018 1:29 pm

The LV2 author has been researching json-ld for possibly use in LV2. Although it seems simple at first glance, the implementation is not.

Turtle is better than XML for sure.
JSON is too simple of a format to allow more advanced things used in LV2.

Turtle is not something I like either, but after some time you get used to it and see it has its good aspects.
It is verbose enough for describing plugins.
Requiring a data-type for each value is very useful.
It is quite readable after you understand the basics of it.

User avatar
SpotlightKid
Establlshed Member
Posts: 53
Joined: Sun Jul 02, 2017 1:24 pm

Re: Query about the LV2 plugin format

Postby SpotlightKid » Mon Sep 03, 2018 1:40 pm

I don't really have a problem with turtle either. The important thing is that there is a standard for describing parameter values and their storage. The situation with VST, where every plugin and host just basically stores a binary blob in their own proprietary format, hinders exchangeability between different programs (which is probably why it is still prevalent in the commercial world).

Developers do seem to have problems with implementing all the aspects of the LV2 specs correctly, though. I think it comes down to better developer documentation. Not just reference docs but tutorials, which do not stop at implementing very basic plug-ins, but show how to do preset handling in hosts, and for plugins storage of file references, samples and other data and so on.

User avatar
tramp
Establlshed Member
Posts: 1173
Joined: Mon Jul 01, 2013 8:13 am

Re: Query about the LV2 plugin format

Postby tramp » Tue Sep 04, 2018 6:04 pm

falkTX wrote:The LV2 author has been researching json-ld for possibly use in LV2. Although it seems simple at first glance, the implementation is not.


Indeed, JSON is very error-proneand tend to segfault on semantic mismatch. However I personally like it more then turtle, but that is urelevant for a plugin standard.

The advance of a turtle file per plugin is clearly that the host could collect data for the requirements/meaning/metatdata of a plugin without load the binary into the processing space. That is clearly a advance over any other plugin standard out there.
Which format is using for that dosen't matter, as long it is standardized. So why not turtle?

However, I see the problems with the LV2 plugin format more on the GUI side, were no standard is given.
Formally, LV2 starts with the goal to support "any GUI toolkit" out there, which is a to high goal to fill for a host. The gaps become now visible, where popular hosts simply skip support for some GUI tool-kits, even if they could support it.

A standardized LV2 GUI toolkit could prevent a lot of plugin developers to develop there own toolkit just to draw some knobs and background images.

I remember very well the first LV2 plugin, developed by Krzysztof Foltman, yes, it was the CALF suite, comes with a GTK based GUI, were still wasn't a host outside who could load a LV2 plug.

I've followed that, and found myself no this days develop my own Xlib based toolkit, over the last few weeks, just to draw some knobs, have I mention background images?

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

Re: Query about the LV2 plugin format

Postby falkTX » Wed Sep 05, 2018 7:50 am

I find it quite good that LV2 devs are going into this direction (of not allowing every single toolkit out there to be an UI)
It is quite the problem, and finally now perhaps being tackled.

Note that if you ever do any sort of plugin version outside of LV2 (and DSSI), you always need to have your own (mini) toolkit.
VST2, VST3, AU, RTAS, AAX, and whatever else is there, they all use the native window system of the OS.
LV2 was the exception allowing Gtk, which was a wrong decision from the start.

Robin has been complaining about this since years, now they are sick of having to deal with plugin UI issues in Ardour and are doing what they should have done years ago.

User avatar
tramp
Establlshed Member
Posts: 1173
Joined: Mon Jul 01, 2013 8:13 am

Re: Query about the LV2 plugin format

Postby tramp » Wed Sep 05, 2018 8:36 am

Unfortunately, in the LV2 book the only GUI examples been GTK based.
I guess it's time to change that, and provide instead a Xlib based example (I'm willing to do so) to avoid further complications.

User avatar
sadko4u
Establlshed Member
Posts: 594
Joined: Mon Sep 28, 2015 9:03 pm

Re: Query about the LV2 plugin format

Postby sadko4u » Wed Sep 05, 2018 5:58 pm

tramp wrote:Unfortunately, in the LV2 book the only GUI examples been GTK based.
I guess it's time to change that, and provide instead a Xlib based example (I'm willing to do so) to avoid further complications.

Yes, we need to kill it with fire!
No one should use GTK as toolkit for plugin development!

About turtle: I don't like it, I don't think that was a good design choice.
For non-trivial plugins it can take megabytes of text data.
That's why I just wrote turtle generator for LSP that generates proper configuration, that solved my problem of writing turtle files forever.
Similarily I don't like LV2 design because it requires too sharp learning curve. Many things could be done easier I think.
LSP (Linux Studio Plugins) Developer and Maintainer.

User avatar
Lyberta
Establlshed Member
Posts: 635
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Contact:

Re: Query about the LV2 plugin format

Postby Lyberta » Wed Sep 05, 2018 7:28 pm

What's wrong with GTK? Haven't coded for it so I have no idea.

ssj71
Establlshed Member
Posts: 1240
Joined: Tue Sep 25, 2012 6:36 pm

Re: Query about the LV2 plugin format

Postby ssj71 » Wed Sep 05, 2018 8:48 pm

Lyberta wrote:What's wrong with GTK? Haven't coded for it so I have no idea.

Nothing wrong with GTK, lots wrong with using GTK for a plugin.
See: http://lists.lv2plug.in/pipermail/devel ... 01593.html for some explanation
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!

rghvdberg
Establlshed Member
Posts: 714
Joined: Mon May 12, 2014 7:11 am

Re: Query about the LV2 plugin format

Postby rghvdberg » Thu Sep 06, 2018 5:28 am

sadko4u wrote:Yes, we need to kill it with fire!

:lol:

User avatar
Lyberta
Establlshed Member
Posts: 635
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Contact:

Re: Query about the LV2 plugin format

Postby Lyberta » Thu Sep 06, 2018 7:18 am

ssj71 wrote:Nothing wrong with GTK, lots wrong with using GTK for a plugin.
See: http://lists.lv2plug.in/pipermail/devel ... 01593.html for some explanation


Ugh, and I just wanted to add Qt GUI to my plugins. I'm so discouraged right now.

User avatar
tramp
Establlshed Member
Posts: 1173
Joined: Mon Jul 01, 2013 8:13 am

Re: Query about the LV2 plugin format

Postby tramp » Sat Oct 06, 2018 7:58 am

Lyberta wrote:
ssj71 wrote:Nothing wrong with GTK, lots wrong with using GTK for a plugin.
See: http://lists.lv2plug.in/pipermail/devel ... 01593.html for some explanation


Ugh, and I just wanted to add Qt GUI to my plugins. I'm so discouraged right now.


Here is one of my xlib based LV2 GUI implementation, you may use it as skeleton (or as it is) to develop your own xlib based implementation.
It handle mouse and keyboard events, and do proper window resizing.
All drawing is done in cairo.
https://github.com/brummer10/GxVintageF ... fm_x11ui.c

regards
hermann

User avatar
khz
Establlshed Member
Posts: 755
Joined: Thu Apr 17, 2008 6:29 am
Location: German

Re: Query about the LV2 plugin format

Postby khz » Sat Oct 06, 2018 4:00 pm

[X] Yes
FZ - Does humor belongs in Music?
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
    I don't care about the freedom of speech because I have nothing to say.


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 5 guests