NEW! Safe Plugin Scanner version 2 with cache

MusE is a MIDI/Audio sequencer with recording and editing capabilities, aiming to be a complete multitrack virtual studio for Linux. http://muse-sequencer.org/

Moderators: khz, MattKingUSA, spamatica

Tim E. Real
Established Member
Posts: 82
Joined: Sat Sep 15, 2012 12:36 am

NEW! Safe Plugin Scanner version 2 with cache

Postby Tim E. Real » Wed Nov 07, 2018 9:56 am

OK I think this is about as far as I can go with a plugin scanner for now.
There is some more stuff I can do with it, maybe in a wee bit.
Like replacing the redundant SimplePlugin library with this instead...

Please give it a whirl.
Remember you can always force a rescan as described below.

Available in git master now. From the ChangeLog:

* NEW! Safe Plugin Scanner version 2: (Tim)
- The plugin scans are cached now, in ~/.config/MusE/scanner.
This means faster startup time since it no longer has to
rescan each time.
- Deicsonze and SimpleDrums MESS synths load muuuch faster
now since each instance no longer has to scan plugins.
- New command line option -R forces rescan.
Also new 'Force rescan' checkbox under plugin paths tab
in Global Settings dialog.
- Automatically detects changes in any of the plugin paths
given in Global Settings dialog, and rescans.
- Added Ladspa RDF (lrdf) support. Initial support for now.
- More major rearrangements: Moved several module libraries
out of the muse tree into the libs tree, since they stand
on their own.
Created new libs folder 'plugin' containing all of the
plugin scanning and caching code.
Awl and AL libraries are now fully separated and isolated
from the main app. Awl is NO LONGER linked in with the
main app, only with the Deicsonze MESS synth. Yay.

[Edit:] Oh yeah, I forgot: I reworked the MusE splash screen a wee bit
to display some informative text about what's happening during startup,
you know like lots of other apps. Helps during those long plugin scans. Try 'er out.

alex stone
Established Member
Posts: 125
Joined: Fri Jun 06, 2008 7:39 am

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby alex stone » Wed Nov 07, 2018 7:15 pm

Tim, pulled from github, removed build DIR, and started compiling.

It failed with the following error:


[ 11%] Building CXX object libs/plugin/CMakeFiles/plugin_cache_reader_module.dir/plugin_cache_reader.o
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp: In function ‘QStringList MusEPlugin::pluginGetLadspaDirectories(const QString&)’:
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:422:24: error: ‘qEnvironmentVariable’ was not declared in this scope
QString ladspaPath = qEnvironmentVariable("LADSPA_PATH");
^~~~~~~~~~~~~~~~~~~~
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:422:24: note: suggested alternative: ‘qEnvironmentVariableIsSet’
QString ladspaPath = qEnvironmentVariable("LADSPA_PATH");
^~~~~~~~~~~~~~~~~~~~
qEnvironmentVariableIsSet
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp: In function ‘QStringList MusEPlugin::pluginGetMessDirectories(const QString&)’:
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:445:22: error: ‘qEnvironmentVariable’ was not declared in this scope
QString messPath = qEnvironmentVariable("MESS_PATH");
^~~~~~~~~~~~~~~~~~~~
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:445:22: note: suggested alternative: ‘qEnvironmentVariableIsSet’
QString messPath = qEnvironmentVariable("MESS_PATH");
^~~~~~~~~~~~~~~~~~~~
qEnvironmentVariableIsSet
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp: In function ‘QStringList MusEPlugin::pluginGetDssiDirectories()’:
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:465:22: error: ‘qEnvironmentVariable’ was not declared in this scope
QString dssiPath = qEnvironmentVariable("DSSI_PATH");
^~~~~~~~~~~~~~~~~~~~
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:465:22: note: suggested alternative: ‘qEnvironmentVariableIsSet’
QString dssiPath = qEnvironmentVariable("DSSI_PATH");
^~~~~~~~~~~~~~~~~~~~
qEnvironmentVariableIsSet
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp: In function ‘QStringList MusEPlugin::pluginGetLinuxVstDirectories()’:
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:485:21: error: ‘qEnvironmentVariable’ was not declared in this scope
QString vstPath = qEnvironmentVariable("LINUX_VST_PATH");
^~~~~~~~~~~~~~~~~~~~
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:485:21: note: suggested alternative: ‘qEnvironmentVariableIsSet’
QString vstPath = qEnvironmentVariable("LINUX_VST_PATH");
^~~~~~~~~~~~~~~~~~~~
qEnvironmentVariableIsSet
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp: In function ‘QStringList MusEPlugin::pluginGetVstDirectories()’:
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:511:21: error: ‘qEnvironmentVariable’ was not declared in this scope
QString vstPath = qEnvironmentVariable("VST_PATH");
^~~~~~~~~~~~~~~~~~~~
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:511:21: note: suggested alternative: ‘qEnvironmentVariableIsSet’
QString vstPath = qEnvironmentVariable("VST_PATH");
^~~~~~~~~~~~~~~~~~~~
qEnvironmentVariableIsSet
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp: In function ‘QStringList MusEPlugin::pluginGetLv2Directories()’:
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:531:21: error: ‘qEnvironmentVariable’ was not declared in this scope
QString lv2Path = qEnvironmentVariable("LV2_PATH");
^~~~~~~~~~~~~~~~~~~~
/home/alex/github/muse/muse3/libs/plugin/plugin_cache_reader.cpp:531:21: note: suggested alternative: ‘qEnvironmentVariableIsSet’
QString lv2Path = qEnvironmentVariable("LV2_PATH");
^~~~~~~~~~~~~~~~~~~~
qEnvironmentVariableIsSet
libs/plugin/CMakeFiles/plugin_cache_reader_module.dir/build.make:61: recipe for target 'libs/plugin/CMakeFiles/plugin_cache_reader_module.dir/plugin_cache_reader.o' failed
make[2]: *** [libs/plugin/CMakeFiles/plugin_cache_reader_module.dir/plugin_cache_reader.o] Error 1
CMakeFiles/Makefile2:1282: recipe for target 'libs/plugin/CMakeFiles/plugin_cache_reader_module.dir/all' failed
make[1]: *** [libs/plugin/CMakeFiles/plugin_cache_reader_module.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
alex@alextone:~/github/muse/muse3$



Any clues?


Alex.

Tim E. Real
Established Member
Posts: 82
Joined: Sat Sep 15, 2012 12:36 am

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby Tim E. Real » Wed Nov 07, 2018 9:17 pm

Hi can you tell me what running the command 'qtdiag' says what version
of Qt you have?

The qEnvironment function in question was added in Qt 5.10
So if you have an earlier version I'll have to fix this. Checking for options...

Thanks.
Tim.

Tim E. Real
Established Member
Posts: 82
Joined: Sat Sep 15, 2012 12:36 am

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby Tim E. Real » Wed Nov 07, 2018 10:09 pm

Hi. I changed it to use std::getenv instead of qEnvironmentVariable

That should work.
In git master now. Please try it again.

Lemme know if any more trouble!

Thanks.
Tim.

alex stone
Established Member
Posts: 125
Joined: Fri Jun 06, 2008 7:39 am

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby alex stone » Thu Nov 08, 2018 9:25 am

Yep, that worked, thanks.

qtdiag shows 5.9.5.

I keep this box off the interlink, but i may have to do an upgrade at some point. And it's running so well.........

Cheers,

Alex.

spamatica
Established Member
Posts: 131
Joined: Mon Feb 08, 2010 10:38 am

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby spamatica » Thu Nov 08, 2018 3:00 pm

Awesome Tim, building now.

I've had some time to work with MusE since the first version, very stable.
There were some new issues with native UIs no longer showing up though, anything you've seen?

It pains me that I can't seem to find the time to try and root out a few bugs myself.. soon hopefully.

spamatica
Established Member
Posts: 131
Joined: Mon Feb 08, 2010 10:38 am

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby spamatica » Thu Nov 08, 2018 3:02 pm

Oh, a build error.
muse/muse3/libs/plugin/plugin_cache_writer.cpp:126:8: error: unused parameter ‘do_rdf’ [-Werror=unused-parameter]
bool do_rdf)

I'm guessing I'm missing some rdf library so I can probably get past it but might need some #ifdefs there somewhere.

Tim E. Real
Established Member
Posts: 82
Joined: Sat Sep 15, 2012 12:36 am

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby Tim E. Real » Thu Nov 08, 2018 6:11 pm

Ah, gets me every time. Fixed in git master.
Thanks so much guys for testing!

It's been a blast making this scanner. We could make an actual run-time sandbox out of it.

Slightly off-topic but...

While I was in there, I had a look at the latest situation with...
VST3 !

Y'know, it's open source and Linux-friendly now.
I've been playing with the SDK, After some head-scratching and fixing, I'm able to run the examples.

Here's the really weird thing: Until just weeks ago, the ability to read 2.x plugins was included in the VST3 SDK.
UUIC Now that is gone, completely from the git SDK. IIUC it will be gone for good.

So I guess I'll keep a copy of this slightly older VST3 SDK with the 2.x support ???
Can you see how that statement makes the removal of 2.x support seem so illogical?

But at least this is balanced out - heavily - by the fact that anyone can use the SDK now
so there would be no excuse for not porting plugins to it... Unless you are unfortunate
to have plugins which CAN'T be ported, say because the plugin author no longer exists.
It's GPL3. Hm... Is that compatible with our GPL2?

Cheers.
Tim.

spamatica
Established Member
Posts: 131
Joined: Mon Feb 08, 2010 10:38 am

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby spamatica » Fri Nov 09, 2018 8:26 pm

MusE license says "...as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version."

Which as I understand it (after some reading) means that if we add the VST3 sources the combination would automatically be under GPLv3.
Don't know if that poses any issue, don't think so.

folderol
Established Member
Posts: 724
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Contact:

Re: NEW! Safe Plugin Scanner version 2 with cache

Postby folderol » Sat Nov 10, 2018 6:05 pm

It's only a problem if any parts of the code are GPL V2 strict.


Return to “MusE Sequencer”

Who is online

Users browsing this forum: No registered users and 1 guest