lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Regression: Carla instruments do not save/load properly; sound completely different after reload

Open enp2s0 opened this issue 1 year ago • 5 comments

Bug Summary

When loading a project file with Carla instruments on Linux, they sound completely different and have many of their parameters scrambled/changed resulting in an entirely different sound.

Steps to reproduce

  1. Make a new project file
  2. Add a Carla track.
  3. Open carla and load Vital (I've been using the linux VST2 version, vital.so)
  4. Pick a preset of your choice and play some notes.
  5. Save the project file and close LMMS.
  6. Reload the project file.
  7. The Vital instrument will now sound completely different. Opening the plugin interface will show that effects have been toggled on/off, parameters are wrong, etc.

Expected behavior

Plugins sound the same before and after saving.

Actual behavior

Plugins sound very different and have drastically changed settings.

Screenshot

  • Vital just after loading a preset (looking at the Effects tab where the issue is most noticeable): Screenshot from 2024-02-14 21-13-51

  • Vital after reloading the project file (looking at the Effects tab where the issue is most noticeable): Screenshot from 2024-02-14 21-15-31

Affected LMMS versions

Currently using version 1.3.0-alpha.1.512+g8e8f68552. I don't have specific versions that I know worked pre-bug but I get the sense that #5846 may be related -- I know my previous version that worked was prior to this commit, and I've had no luck with versions post-commit.

enp2s0 avatar Feb 15 '24 02:02 enp2s0

The issue definitely seems related to #5846 and specifically the support for Carla params. By changing the CARLA_MIN_PARAM_VERSION in Carla.h to such a large number that it never enables param support, instruments load and save normally, i.e:

// TEST: make Carla never support params (should be 0x020090)
#define CARLA_MIN_PARAM_VERSION 0x99020090

Of course, this makes the "Params" button in Carla's LMMS UI completely unresponsive, but it does serve as a temporary workaround to at least make Carla instruments usable. Perhaps this could be implemented as a toggle in settings (something like "Allow parameter automation for Carla instruments")?

I notice that #5846 mentions that the params window state isn't saved -- is it possible that when loading a project, the knobs in the window get initialized to some default value which then gets pushed over to Carla after the instrument has loaded, overwriting the "correct" values?

enp2s0 avatar Feb 16 '24 17:02 enp2s0

Issue #6414 may also be a specific instance of this. In that issue it is only occurring with "old" project files, but here it is occurring with all files including ones created with the current version. It seems like git bisect back there identified PR #5846 as the problem commit.

enp2s0 avatar Feb 16 '24 18:02 enp2s0

bump any update on this? I'm not too familiar with Carla or that side of the codebase at all; I tried to take a look at it but was completely lost.

enp2s0 avatar Apr 14 '24 04:04 enp2s0

Bumping this. I also see this issue happening. It applies to SurgeXT and LABS as well. I have to assume that the UI controls aren't updating, and those are what save. Only workaround I can think of would be separately saving the Carla state and reloading it until the UI controls are able to update to what Carla has.

Syntaxxor avatar Aug 04 '24 07:08 Syntaxxor

Update: This issue is fixed by using the git version of Carla. If you have Arch, simply use carla-git from AUR and you should be good. I'm not sure why the normal binary version has issues but it is what it is I guess.

Syntaxxor avatar Aug 04 '24 08:08 Syntaxxor