lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Lv2 extension plan

Open JohannesLorenz opened this issue 6 years ago • 19 comments

** 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 avatar Apr 20 '19 18:04 JohannesLorenz

@JohannesLorenz URID should be marked as done now, shouldn't it?

Spekular avatar Aug 16 '20 08:08 Spekular

@Spekular Yes, I forgot that. Thanks, fixed now.

JohannesLorenz avatar Aug 16 '20 10:08 JohannesLorenz

@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

zonkmachine avatar Oct 22 '20 18:10 zonkmachine

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?

JohannesLorenz avatar Oct 23 '20 19:10 JohannesLorenz

I've added a wiki note.

mxmilkiib avatar Oct 23 '20 20:10 mxmilkiib

@JohannesLorenz for the too many outputs case I would route 1 -> left and 2 -> right, ignoring the rest.

enp2s0 avatar Oct 24 '20 01:10 enp2s0

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.

JohannesLorenz avatar Oct 24 '20 10:10 JohannesLorenz

I'll code "worker" next.

JohannesLorenz avatar Jun 25 '22 18:06 JohannesLorenz

I marked Buf Size done in the list above.

zonkmachine avatar Jun 27 '22 21:06 zonkmachine

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.

JohannesLorenz avatar Aug 12 '22 19:08 JohannesLorenz

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:~~

zonkmachine avatar Aug 13 '22 11:08 zonkmachine

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

JohannesLorenz avatar Aug 13 '22 11:08 JohannesLorenz

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...

zonkmachine avatar Aug 13 '22 12:08 zonkmachine

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

zonkmachine avatar Aug 20 '22 13:08 zonkmachine

I guess #5330 and #5795 (CV ports) would come under lv2core?

mxmilkiib avatar Aug 20 '22 19:08 mxmilkiib

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.

JohannesLorenz avatar Aug 21 '22 05:08 JohannesLorenz

Whoops yes, I think I was meaning #5330

mxmilkiib avatar Aug 21 '22 08:08 mxmilkiib

#5330 is interesting, but how related to Lv2 core? Is there an Lv2 plugin existing with that functionality?

JohannesLorenz avatar Aug 21 '22 20:08 JohannesLorenz

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

mxmilkiib avatar Aug 22 '22 01:08 mxmilkiib

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.

JohannesLorenz avatar Sep 25 '22 22:09 JohannesLorenz