-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lv2 UI - Testing #7201
base: master
Are you sure you want to change the base?
Lv2 UI - Testing #7201
Conversation
This now runs successfully in the CI, and it supports UI there for Linux and Macos, but not Windows yet. @DomClark , as discussed, I would appreciate if you would submit a vcpkg PR (and then add suil to our vcpkg.json in this PR or tell me to). In the end, the CI for Windows should not show
but
|
Dexed.
|
I assume it's related to this PR: #7247 |
The LV2 implementation in LMMS uses linked models, so mono plugins are actually 2 linked plugin instances (L and R) behind the scenes. Linked models need to be kept in sync for parameter updates which is already a complicated task, but adding a UI where updates can come not just from LMMS but also the plugin itself makes the linked model design untenable in my opinion. The issue with dexed sounds like exactly the type of synchronization problem I feared. I would strongly recommend to @JohannesLorenz to replace the linked model design with the L/R routing design from #7247 once it's merged. I've been using it successfully for both CLAP and VST plugins and it works great. Making the switch will almost certainly be less work than trying to fix the bugs with linked models. Not only is the L/R routing approach dramatically simpler and less buggy than trying to use linked models, it is also very flexible and intuitive from a user standpoint and uses roughly half the resources in the common situation where you only want a mono-to-stereo mix from your mono plugin. |
Has this already been fixed? It sound like a waste of resources, a source for tons of bugs and a complete misunderstanding of how these things work. Sorry, if I am a bit blunt here but keeping it like this would take the implementation in a completely wrong direction. I am pretty sure that no other DAW implements it like this. If a plugin reports as mono then simply copy the resulting mono output buffer of the single instance into the left and right channel buffers of the stereo track.
100% agree! |
I pushed a few commits to help with AppImage findings over on Discord's For now, I copy the (Until #7252 is merged, I can't test this on ARM64, so I'm just hoping this fixes the AppImages) Initial testing on MacOS is OK but we don't use a launcher script for MacOS, Perhaps ![]() |
When I reload a project the lv2 gui doesn't update. The settings seem to stick, just the gui is showing it's init setting. |
@zonkmachine Can you please elaborate? I did:
=> All params are as before. Did I understand "reload" wrong? |
@zonkmachine Thanks. I fixed it. |
This took care of the instruments but the effects see the same issue and this is not fixed by 3bcf80b. |
Actually, this commit should have fixed it for both... Which effect do you mean? Sometimes, producing input for an effect (i.e. pressing a key) might force a lazy UI to update. Not sure if this helps here. |
Ping Pong Pan There were more. Actually, the only Lv2 effect with gui that I've come across that works in this regard is Calf Analyzer (not an effect per se but the stored parameters are displayed correctly when reloading a project).
Nope. |
Oh, I get it. For instruments, first, the instrument is loaded, which includes loading the savefile. Only after that, the UI is initiated - at which time the mentioned fix sends all port values (knobs, sliders etc) to the UI. Thinking about a fix... Confirming: Ardour sends port updates of all ports to UI after loading a preset ( |
New issue. The setBfree organ plugin doesn't save the settings at all. |
Does this work in Ardour or another DAW |
Yes. Works fine in Ardour. |
setbfree gui explained here: https://setbfree.org/lv2/lv2_setbfree_up.html |
I think some use "Preset" and some use "State". Multiple of them contain "organ" in the description. Do you mean any specific one? |
No. I'm very unspecific here. |
I cannot reproduce your Dexed issues: I turned all 8 "EG" level in "1" to 0, and when loading, they were still 0 and I think it sounded correct. How do I reproduce? With X42 whirl (from the b_free plugins), I can reproduce the issue. |
Don't you think it would be better if lv2 plugins had their own separate window like vst plugins? Don't you think it would be better to have a "vestige" type instrument but for lv2 plugins? I think we would have two advantages over the current way of displaying lv2 instruments and that is that it would be better visually and more consistent with the size of the other instruments, and that each plugin has a different size, they cannot be resized and this can be very annoying on small screens. The other advantage would be better performance since on low-resource computers the graphical interfaces of the plugins being open can consume more resources; however, from a "vestige" type instrument window but with the option (a "Show/Hide GUI" button) to show the graphical interface to make some precise changes, you can control some parameters of the plugin without opening its graphical interface. (Google Translate) |
This is a know issue (still open in my checkbox list at the OP): "Sometimes, plugins UIs do not have optimal size.". This waits for L/R routing because after that, the way we put the plugin into the window changes.
Dexed does not allow resizing. However, as soon as we have fixed the size, resizing should not be required anymore. |
@Gabrielxd195 Thanks for your input.
I don't find it necessary to be exactly like VST.
This could be a point, but most Lv2 instruments already have a larger than the default size (before lv2-ui). We did this to use the space better, especially on large monitors. E.g. try Helm, putting all these knobs into the small default-sized window with only 1 vertical scrollbar would be insane to navigate.
We had a discussion in Discord lately, and the result was that I wanted to try out a TabWidget, like we currently have it for the Instrument Track Window already (where you can switch between Plugin, Envelopes, MIDI etc.). If the UI is hidden at the start, it can be loaded at the moment where the user switches the TAB. Ultimatively, it is up to the users what they prefer. But whatever we do, it is a UI thing, so we can still change it easily... |
In any case there must not be another step to open the ui just because it's external. The way vestige works is horribly unintuitive and lv2 needs to move away from that approach. Plugin handling must be transparent and the user should get the same experience regardless of the plugin format. |
It might not be the scope of this pull request but in general I agree with what @zynskeywolf wrote. Ideally all external plugins should feel like entities of their own and the parameter handling should be transparent to the users (also with regards to plugin type, i.e. VST, LV2, CLAP, etc.). Many other DAWs just present you with a list of the available plugin parameters. If you select a parameter from that list you can then define the automation curve for it, etc. I once did some investigation with regards to some problems with plugin parameters and if I remember correctly, what I found was that LMMS seems to automate the movement and changes of the GUI elements and not of the parameters themselves. If that is really the case then this would need to be changed first before better and more uniform parameter handling could be implemented. If I understand correctly then this is also the reason why some extra parameter widgets need to be shown for the parameters in the first place. If the automations worked directly on the plugin parameters then the would not be needed. |
I agree here, though it is indeed a bit overhead to load the plugin UI. My idea is to have a tab widget to switch between both UIs. If the user previously selected the plugin UI, the next plugin will also let the TabWidget show the plugin UI. If they previously used the LMMS UI (the parameters), they get this when they open a plugin the next time. |
07682f1
to
adc1422
Compare
* CPack: Refactor AppImage and Apple DMG Generation * Switch from linuxdeployqt to linuxdelpoy * Add ARM64 AppImage support * Add support for `.run` installers using `makeself`, an alternative to AppImage * Refactor BashCompletion.cmake * Enable CPack debugging via `WANT_DEBUG_CPACK` * Add `download_binary`, `create_symlink` macros * Qt6: Fix @rpath bug on macOS * Detect and bundle LV2 UI Suil modules (Related #7201) * Allow remote plugins to honor `LMMS_PLUGIN_DIR` * Add .github/workflows/deps-ubuntu-24.04-gcc.txt * Fix waveforms FileDialog Co-authored-by: Dalton Messmer <[email protected]>
@JohannesLorenz, I've merged #7252 which moves the
|
http://lv2plug.in/ns/extensions/ui Size issues also fixed (but SlicerT is not happy as we removed `InstrumentTrackWindow::resizeEvent`... Co-authored-by: Tres Finocchiaro <[email protected]>
adc1422
to
19a8109
Compare
@tresf Thanks for the hint, that was really valuable when doing the rebase! Also, I saw your CPack review request for the bash completion - sorry, this week was too busy, I only took a quick glance and it looked good. |
This PR discovers a major bug in the Lv2 implementation. Short version: Many UIs will not save properly (yet). Some plugins do not save their state via ports, but via "states". This is often the case for large, UI based plugins, like Zyn, which have so many ports that it gets easier to save them as one big blob of data (in case of Zyn, one XML file), which is being saved as one "state" rather than many ports. Now, our Lv2 implementation does not yet support "state", which means even if you save a file, it will all be lost. I'm not yet sure if LMMS should reject plugins even that mark "state:interface" as an optional feature, or if we instead should implement "state" prior to Lv2. |
@JohannesLorenz This is what saving/loading looks like with the CLAP's state extension implemented: lmms/src/core/clap/ClapInstance.cpp Lines 189 to 231 in 1b3b091
The plugin handles most of the work, and I just needed to make sure that automations were saved/loaded: lmms/src/core/clap/ClapParams.cpp Lines 280 to 310 in 1b3b091
Since users have been using LV2 in its current form without state support, you could use an XML "version" attribute to detect whether you're loading an old project file where LMMS stored all the parameters manually or a new project file that uses the plugin's state, then pick the loading routine based on that. Saving could always use the plugin's state if that's possible and the recommended practice. That would effectively be an upgrade routine. |
@JohannesLorenz, the issues #5738 and #4027 are good examples of why it would be a great feature to support the saving of state by the plugins themselves. If the host saves the state of a plugin instance by persisting the individual ports using its own format then it might have to closely follow the development of the plugins, especially if a plugin undergoes huge internal redesigns where port change in a drastic way. On the other hand, if a plugin supports saving its own state then the upgrade routine will only have to be implemented once by the plugin authors instead of by every host that wants to support it. Projects with an older saved state of a plugin will still work because the plugin knows how to upgrade this state to the current implementation. The host does not need to know anything. So ideally LMMS should welcome plugins that implement the state feature instead of rejecting them and it should be wary of plugins which do not implement this feature as they might be prone to breaking in the future. |
There seem to be many different ways how to save such a state:
I wonder why LMMS-zyn patched zyn's XML routines to use Qt rather than relying on upstream-zyn's mini-xml approach and embedding the result. Maybe for such reasons? |
If the plugin can somehow save its own version into a port (or just infer the version, because the port has weird values), it could still assume an old format and convert the port value to the new format. However, if ports even start to rename or vanish, this gets impossible. So what you say makes sense. I'll probably first submit a PR for state saving, independent of UI. |
It converts the plugin state to to base64 first before storing it to XML, then decodes the base64 when loading. |
This PR by definition solves #6707 (mentioning it to add the reference). |
I think I would like to do the Lv2 state implementation close to the CLAP implementation.
|
It's up to you I guess. It's probably best to focus on getting it working first before trying to optimize for space. If you have a
It sounds like it's worth doing. It makes sense that attributes aren't meant for storing a lot of data. If that's the case, I'll probably switch to CDATA or something in the CLAP PR. |
* CPack: Refactor AppImage and Apple DMG Generation * Switch from linuxdeployqt to linuxdelpoy * Add ARM64 AppImage support * Add support for `.run` installers using `makeself`, an alternative to AppImage * Refactor BashCompletion.cmake * Enable CPack debugging via `WANT_DEBUG_CPACK` * Add `download_binary`, `create_symlink` macros * Qt6: Fix @rpath bug on macOS * Detect and bundle LV2 UI Suil modules (Related LMMS#7201) * Allow remote plugins to honor `LMMS_PLUGIN_DIR` * Add .github/workflows/deps-ubuntu-24.04-gcc.txt * Fix waveforms FileDialog Co-authored-by: Dalton Messmer <[email protected]>
This is solely for early testing yet. From the code review perspective, there are still a few things to be done.
When reporting an issue, please try to answer the following questions:
Open issues: