[LV2] Major rewrites fix several synths

MusE is a DAW for Linux with both MIDI and Audio editing. https://muse-sequencer.github.io

Moderators: MattKingUSA, khz, spamatica

Post Reply
Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

[LV2] Major rewrites fix several synths

Post by Tim E. Real »

First, a pic to convince you: Here is a song that was saved, then MusE restarted, then the song re-loaded.
LV2_screenshot_2.jpg
LV2_screenshot_2.jpg (144.93 KiB) Viewed 627 times
Notice that the AVL drums (Red Zepp) are working, the animations are working.
Notice that the LSP sampler has successfully reloaded all 8 samples.
Notice that the Drumkv1 has successfully reloaded all 3 samples.
Notice that the QSampler (linuxsampler) has successfully reloaded all 3 instruments.
Sample files were from varied locations including 'relative' (under the song project folder).

I can guarantee that before these fixes, that would not be possible. Things were messed up.
That's at least four synths that are now fixed :!: And it's not even my original code.
Pardon my language, but that took some really seriously intense mind-fucking debugging.
Hope y'all appreciate it. I accept donations :wink:

Portability was a bonus. Any file references under the song project folder are attempted to be kept relative,
while any file references OUTSIDE the song project folder are deemed absolute.
However some plugins insist on storing absolute file paths. Sorry, those stored references can't be portable. YMMV.

Notice: As of these fixes, I cannot support older LV2 plugin configuration data stored in external files as part of an older song.
Storing plugin config data in external folders is now disabled. See the new ENABLE_LV2_MAKE_PATH cmake option. (Not recommended!)
We want that. We want all data stored in one place if possible - the song file. Not spread over several folders.
Hopefully it won't affect many users, since it was really kind of messed up before anyways. It's a new beginning.

[Edit:] Also, the LV2 and LinuxVST base64 binary configuration data stored in song files is now compressed
with qCompress() and qUncompress(), greatly reducing the massive song file sizes with these huge binary blobs.

Some gory details from ChangeLog:

Code: Select all

      * LV2 Major rewrite of state/worker support and more, fixes several synths:
      - Worker message data now uses new LockFreeDataRingBuffer for bidi comm.
        Fixes major problems with synth workers.
      - Fixed problems with how our worker thread is awoken. Fixes several plugins.
      - Fixed problems with how our EvBuf reads port data. Fixes several plugins.
      - Fixed state file storing/reading and locations. State files are stored
         in a unique configuration folder for each plugin, even if the song file
         is not in its own folder.
      - All file references IN or UNDER the song project folder are deemed RELATIVE,
         to the plugin's configuration folder. All file references OUTSIDE the song
         file folder are deemed ABSOLUTE.
      - New cmake option ENABLE_LV2_MAKE_PATH, it is disabled by default !!!
        If enabled (NOT RECOMMENDED), the above mentioned configuration folders are used.
        If disabled, NO external files or folders are created parallel to the song file.
        This is what we want with MusE, all data stored inside the song file if possible.
      - Tested OK saving/reloading several synths that were broken before.
Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

Re: [LV2] Major rewrites fix several synths

Post by Tim E. Real »

And now a caveat:
To get these results, especially with linuxsampler LV2 and some UI like QSampler,
you may need the latest development versions of the LV2 suite, especially lilv.

In reference to this:
viewtopic.php?f=61&t=19677
There were some problems that the LV2 author fixed but are still to be released.

It has been a while, hopefully a new lilv will be released soon... by the end of the decade, he he.
User avatar
oscillator
Established Member
Posts: 1127
Joined: Sat Jan 17, 2015 6:07 pm
Location: SWEDEN
Has thanked: 725 times
Been thanked: 296 times
Contact:

Re: [LV2] Major rewrites fix several synths

Post by oscillator »

Thank you for all your work TIm! Will try out the latest git version.

MusE DAW running on Debian 11 Testing/XFCE4.
https://oscillator.se/musik

Post Reply