Lv2 extension plan
** This is WIP **
Background
Lv2 has many extensions, and some of them contain features. Extensions are things the plugin provides for a host, and features are things the host provides for a plugin. Note: Even if a host does not care about a specific extension, the plugin can require a feature from that extension, which means the plugin won't run without it.
Purpose
This plan helps to identify
- which extensions we should implement
- in what order
Table
| Extension | Things to use | Features to implement | Status | Depends on | Assignee |
|---|---|---|---|---|---|
| Atom | MIDI, UI, TimePosition | No features exist | :heavy_check_mark: (basic atom support done) | ||
| Buf Size | :heavy_check_mark: | ||||
| Data Access | None. Discouraged. | - | |||
| Dynamic Manifest | |||||
| Instance Access | |||||
| Log | |||||
| Lv2 | :heavy_check_mark: (#5795 missing yet) | - | |||
| Midi | :heavy_check_mark: | ||||
| Morph | |||||
| Options | :heavy_check_mark: | ||||
| Parameters | lv2:wetDryRatio (for Effect wet/dry ratio), ...? | - | |||
| Patch | |||||
| Port Groups | |||||
| Port Properties | "causesArtifacs", "nonAutomatic", "trigger", "rangeSteps" | only "logarithmic" done | |||
| Presets | |||||
| Resize Port | |||||
| State | URID :heavy_check_mark: | ||||
| Time | |||||
| UI | |||||
| Units | |||||
| URID | Only features | All | :heavy_check_mark: | - | |
| Worker | @JohannesLorenz |
@JohannesLorenz URID should be marked as done now, shouldn't it?
@Spekular Yes, I forgot that. Thanks, fixed now.
@JohannesLorenz Did https://github.com/LMMS/lmms/pull/5691 implement all ot the Atom extension?
I've played around with LV2 now and it's brilliant. Thank you so much for working on this!
I installed a whole bunch of plugins via the ubuntu repo and of the ones who wouldn't load into lmms on start the most common message was:
required feature not supported : http://lv2plug.in/ns/ext/worker#schedule
Next most are:
too many audio output channels ...
and the 'zyn' stuff calling for:
required feature not supported : http://lv2plug.in/ns/ext/options#options
Thanks @zonkmachine . I updated Atom, we only support MIDI atoms now (all other are discarded). This whole plan may be a bit inexact sometimes.
My next plans are indeed options and buf-size. If worker is easy, we can add that, too. Too many audio output channels: I don't know how this could be fixed best. If you have more than 2, which ones shall be sent to LMMS and which ones shall be ignored?
Btw: Which ubuntu lv2 plugins did you install? Can you please add it on the Lv2 wiki page?
I've added a wiki note.
@JohannesLorenz for the too many outputs case I would route 1 -> left and 2 -> right, ignoring the rest.
for the too many outputs case I would route 1 -> left and 2 -> right, ignoring the rest.
I don't think it's a good solution... For many plugins, the use might not make sense or even be unclear if only 2 of >2 audio outputs are connected. Imagine a "2 -> 4 split" plugin that takes a stereo signal and sends out the left signal to the first stereo output and the right signal to the second stereo output. If you only offer one stereo output for this, this plugin will always ignore the right signal, looking like a bug.
I'll code "worker" next.
I marked Buf Size done in the list above.
I've been checking for lv2-plugins which have features we don't support (this can be seen by starting lmms with LMMS_LV2_DEBUG=1 environment variable: required feature not supported). I could not find any except state#loadDefaultState and worker#schedule (the latter being work in progress). If anyone sees another one, it would be nice if you would write it down here.
Edit: I was wrong...
~~I haven't been able to find any but some plugins show up with a can not be loaded: and no further message specified.~~
~~Example:~~
~~Lv2 plugin "Matrix Mixer 8x8" (URI: http://gareus.org/oss/lv2/matrixmixer#i8o8 ) can not be loaded:~~ ~~Lv2 plugin "MIDI Key-Range Filter" (URI: http://gareus.org/oss/lv2/midifilter#keyrange ) can not be loaded:~~ ~~Lv2 plugin "MIDI Key-Range Filter" (URI: http://gareus.org/oss/lv2/midifilter#keyrange ) can not be loaded:~~ ~~Lv2 plugin "MIDI Key-Range Filter" (URI: http://gareus.org/oss/lv2/midifilter#keyrange ) can not be loaded:~~
some plugins show up with a
can not be loaded:and no further message specified.
Actually, it only prints "can not be loaded" if it has at least one reason, so it's really strange you get these. At least, I get messages for them:
Lv2 plugin "Matrix Mixer 8x8" (URI: http://gareus.org/oss/lv2/matrixmixer#i8o8 ) can not be loaded:
- too many audio input channels : 8
- too many audio output channels : 8
Lv2 plugin "MIDI Key-Range Filter" (URI: http://gareus.org/oss/lv2/midifilter#keyrange ) can not be loaded:
- no audio output channel
Actually, it only prints "can not be loaded" if it has at least one reason,
Yes. I had made some changes to poke a couple of plugins a bit. Reverted that and now I get those messages too. Sorry...
I've been checking for lv2-plugins which have features we don't support
Yes indeed! I'm now running "Super Whammy" from MOD Devices with automation on the knobs. Bliss! All that was needed was to set the buffer to a multiple of 2 and to insert m_supportedFeatureURIs.insert(LV2_BUF_SIZE__powerOf2BlockLength); in Lv2Manager.cpp . Totally worth it!
Issue opened: https://github.com/LMMS/lmms/issues/6492
I guess #5330 and #5795 (CV ports) would come under lv2core?
I guess #526 and #5795 (CV ports) would come under lv2core?
#5795: Good point, added. #526: This looks like a typo? It's not Lv2 related.
Whoops yes, I think I was meaning #5330
#5330 is interesting, but how related to Lv2 core? Is there an Lv2 plugin existing with that functionality?
More that it's a basic use of CV interacting with/bridging other track elements, generating note CV from audio (and MIDI) and issuing that to modulate things.
https://github.com/moddevices/mod-cv-plugins/tree/master/source/mod-audio-to-cv
https://github.com/moddevices/mod-cv-plugins/tree/master/source/mod-midi-to-cv-mono
https://github.com/moddevices/mod-cv-plugins/tree/master/source/mod-midi-to-cv-poly
https://github.com/KottV/LV2Plugins/tree/master/lv2cvport/CV_AudioToCv
Most non-extraordinary extensions seem to be done/in progress.
As I think we should target UI ASAP, this should be the next target. Only state and preset seem to be useful to do before it (not sure yet).
Other interesting stuff seem to be CV ports. Other things seem extraordinary to me.