Since most people in this forum don’t seem to too familiar with LV2, I will first write some words about
LV2 itself. This is only a rough summary of how LV2 is built; If you want to have more information,
you should check out the official LV2 book or my effort to translate
it to Rust.
First of all, to get things straight: LV2 is platform-agnostic. There is almost nothing in the specification that limits the platforms it can run on; The “almost” will be covered later.
Next, what is LV2? Technically speaking, LV2 is a set of RDF vocabularies together with some C-Headers. These vocabularies can be used to express information about plugins and the headers standardize the way hosts can interact with plugins.
The core specification is relatively thin: It handles plugin detection, names, translations, Audio with
f32 frames, parameters of type
f32 and hooks to pass optional features into the plugin and function pointers out for extensions. LV2’s genral theme of expressing information is to put as much information in the configuration files and as little information in the shared object.
The next specification of note is Atom, basically LV2’s own type system. All types of data can be expressed with it, like integers, floats, vectors (comparable to Rust slices), tuples (different atoms stuck together), even objects! MIDI messages are just a different atom type, but due to historical reasons, it has its own specification. Implementing these specifications was quite hard since I had to take a deep dive into unsafe Rust and it’s type system, but it was definitely worth it! This is where I pick up that “almost”: My implementation relies on the fact that all types can be aligned to 64-bit without the need for padding. That’s it!
I haven’t looked too much into the UI specification, but from what I’ve seen from it and what I’ve heard about VST’s GUI system, it must be heaven: First of all, UIs are separate objects from plugins and the specification suggests to keep them in different shared objects. Then, a UI has to specify which UI framework it supports, the core specification gives you a choice of multiple versions of GTK and QT, as well as X11, Cocoa and Windows (+1 for platform support!) When the host opens a UI, it creates a window for the supported framework and hands it to the UI. From there, it’s framework-specific and not something LV2 cares about.