Skip to content
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

Muse Sounds are not discovered #100

Open
p-mitana opened this issue Dec 17, 2022 · 24 comments
Open

Muse Sounds are not discovered #100

p-mitana opened this issue Dec 17, 2022 · 24 comments

Comments

@p-mitana
Copy link

I currently have the MuseScore 4.0 Flatpak installed. I have downloaded the muse-hub and Muse Sounds, but the sounds are visible only in AppImage version.

I had a look at the PR comments with the 4.0 update – yet I expect it is a highly important feature and it would not be good to give it up easily.

I'll leave this issue here. It would be best if the Flatpak maintainers could reach out to MuseScore developers to find a way to discover the resources from muse-hub.

Currently even if I grant permissions to all files via Flatseal, Muse Sounds are not discovered.

Also: I believe that as we have this (unfortunately closed-source) Muse Hub thing, creating another flatpak of it might be the good idea.

@osvein
Copy link

osvein commented Dec 20, 2022

Try --persist=/srv/muse-hub

@p-mitana
Copy link
Author

Doesn't work unfortunately.

@p-mitana
Copy link
Author

p-mitana commented Dec 20, 2022

I have looked into what app shows in console and it seems like the first problem is inability to load the libMuseSamplerCoreLib.so library from /usr/lib. I didn't manage to find a way to solve this.

It looks like the correct environment variable is MUSESAMPLER_PATH=/usr/lib/libMuseSamplerCoreLib.so – logs show then that the application is looking in the right path for the library, but it still can't load it unfortunately.

@mfreeman72
Copy link

I'm also having this problem. I've tried the above suggestion, and it also doesn't work for me. This is using Linux Mint 21.1. I would love to see this fixed, as AppImages are wonky. It would be even better if Musescore or someone would just offer a simple .deb file repository or PPA, as I've never been a fan of things like Flatpaks, AppImages, Snaps, etc. But this is where things are now, so we're just left to deal with the mess.

@osvein
Copy link

osvein commented Dec 20, 2022

You can get the Muse Hub .deb and probably install MuseScore from there. But I don't recommend it as it's not sandboxed and MuseHub is proprietary

@mfreeman72
Copy link

You can get the Muse Hub .deb and probably install MuseScore from there. But I don't recommend it as it's not sandboxed and MuseHub is proprietary

On Linux, Muse Hub only handles the Muse Sounds packages. It doesn't have any options for downloading Musescore itself. There is an old PPA, but it currently only goes through version 3.2, with some slightly newer code backported to it. It doesn't support version 4 yet, as far as I can see. The only options for version 4 that I can find are the official AppImage or the Flatpak. No .debs or any other native distro package formats from what I can see.

@Batwam
Copy link

Batwam commented Dec 28, 2022

I have also found the appImage of MuseScore 4 to load MuseSounds loaded from the MuseHub .deb without issue. The Flatpak version however doesn't seem to recognise them (shown as inactive). This is on Ubuntu 22.10.

I saw on a separate issue that people have solve the issue of MuseSounds not loading on Fedora by linking the libMuseSamplerCoreLib.so library from /usr/lib to /usr/lib64. musescore/MuseScore#13935

I wonder if a similar thing could be achieved by actually linking this libMuseSamplerCoreLib.so to a folder where the flatpak can find it. Not the cleanest thing do do but perhaps worth a try... Does anyone know where the flatpak libraries for MuseScore are saved?

@osvein
Copy link

osvein commented Dec 28, 2022

What worked for me was moving libMuseSamplerCoreLib.so to my home directory and setting MUSESAMPLER_PATH to point to it.

The reason it can't work out of the box with Flatpak is that /usr/lib doesn't get mounted into the container, even with --filesystem=host. This is because Flatpak ships its own system libraries, unlike AppImage. Packaging Muse Hub as a flatpak would not help as flatpaks are isolated from one another. Also, distributing Muse Hub on Flathub would probably be against the Muse Hub EULA. That said, if you want to run Muse Hub as a Flatpak you can use this flatpak-builder manifest

@Batwam
Copy link

Batwam commented Dec 28, 2022

Thanks. I copied the library file and tried flatpak run --env=MUSESAMPLER_PATH=$HOME/libMuseSamplerCoreLib.so --env=MUSESAMPLER_INSTRUMENT_FOLDER="/srv/muse-hub/downloads/Instruments" org.musescore.MuseScore and, while it no longer generate errors, it's still not working.

I think that I'll have to stick with the appImage until the flatpak is fixed.

@p-mitana
Copy link
Author

@Batwam, how do you know that MuseScore uses the MUSESAMPLER_INSTRUMENT_FOLDER env var? I've searched it in MuseScore's GitHub and didn't find it in code.

@osvein
Copy link

osvein commented Jan 16, 2023

it's in the closed source part. you'll get a warning if you don't set it

@Batwam
Copy link

Batwam commented Jan 16, 2023

correct, you get the following error if you don't define it:
Instrument folder environment variable not defined! Add config file to /var/lib/MuseSampler/.config or Set "MUSESAMPLER_INSTRUMENT_FOLDER" and reinitialize MuseSampler

by the way. I am also getting the following which I ignored as they are usually nice to haves only.

Gtk-Message: 23:09:52.155: Failed to load module "xapp-gtk3-module"
Gtk-Message: 23:09:52.200: Failed to load module "canberra-gtk-module"

@xenoxriar
Copy link

xenoxriar commented Feb 15, 2023

Well, this issue is kinda dead but I do have an update!

I've managed to get MuseScore to recognise both the sampler library as well as the instruments as well (as in they appear in the menu selection in the mixer) but I haven't yet been able to actually use the sounds because MuseScore crashes upon trying to select a MuseSounds instrument

I get this error Fatal (internal) error in ../celt/celt_decoder.c, line 118: assertion failed: st->mode == opus_custom_mode_create(48000, 960, NULL). This seems to be an issue in other programs relating to the opus codec but I don't really feel like combing through logs late at night.

Other notes:

Thanks. I copied the library file and tried flatpak run --env=MUSESAMPLER_PATH=$HOME/libMuseSamplerCoreLib.so --env=MUSESAMPLER_INSTRUMENT_FOLDER="/srv/muse-hub/downloads/Instruments" org.musescore.MuseScore and, while it no longer generate errors, it's still not working.

I think that I'll have to stick with the appImage until the flatpak is fixed.

This might be because flatpak doesn't allow you to access root directory folders but I'm not entirely sure on that. I have both the library and instruments within my home folder and given flatpak access to those folder as well

@osvein
Copy link

osvein commented Feb 15, 2023

@Noxellar it's because libopus in the freedesktop runtime is compiled without custom mode support, whereas libMuseSamplerCoreLib is built against debain which ships libopus with custom mode support. I don't think Muse Sounds even require custom mode, but it's incompatible nevertheless. You can build your own version of libopus and bundle it with the MuseScore flatpak

@p-mitana
Copy link
Author

I believe that this issue needs discussing with MuseScore and MuseHub developers. Probably with where currently MuseHub downloads these files the problem cannot be solved, but also probably these locations are not the optimal ones for storing these files under Linux in general.

Could the flatpak package maintainer reach out to MuseScore developers in order to try to find the solution? The maintainer could suggest them what location would be the best for these files, so that any sandboxed packaging formats could work – maybe they would be willing to change it to help. Or find a way to have flatpaks for both MuseScore and MuseHub on FlatHub with default configurations set in such a way that installing both these tools from flatpak would make it work out of the box.

@p-mitana
Copy link
Author

It looks like MuseScore 4.2 and Muse Sounds Manager (updated and renamed Muse Hub for Linux) may have solved some blockers here.

Firstly, the Muse Sounds default download target is now moved to user's home directory, which makes it accessible for Flatpak. Secondly, the libMuseSamplerCoreLib.so is not where it has been anymore on my system (I deleted all MuseHub's files and installed the new Muse Sounds Manager via the newly-provided RPM). I have no idea if it's moved somewhere where Nautilus doesn't find it or if it has been bundled somewhere, but Muse Sounds work with 4.2 AppImage without the library discoverable for me.

Also, some issues in MuseScore project regarding Flatpak are being assigned and discussed (#17016, #19722, 20459), so things are moving and maybe even they would consider an official Flatpak package.

@rmnscnce
Copy link

rmnscnce commented Apr 10, 2024

image

Managed to scramble a fix (and a Muse Sounds Manager Flatpak package along the way, just for the fun of it!) for this issue. Currently requires musescore/MuseScore@be54d1f (I backported it to v4.2.1 for testing purposes), but once the commit gets included in a future MuseScore release, it's very easy to implement.

@BrunoVernay
Copy link
Contributor

Looks like the commit has been merged on April 9. Now a new Flatpak has been released with 4.3.1, does it contains the fix? The Muse Sampler library is still "not found", but is there some manual tweaking that could make it work? (like copying or lining some files?)

@rmnscnce
Copy link

rmnscnce commented Jun 10, 2024

It appears that the commit didn't make it to 4.3.1 for some reason. It has been on main since a couple of months ago but the tagged release doesn't include it.

@rriemann
Copy link

rriemann commented Jul 3, 2024

Packaging Muse Hub as a flatpak would not help as flatpaks are isolated from one another.

Are you sure?

Consider handbrake (via flatpak list):

HandBrake       fr.handbrake.ghb        1.8.1   stable  flathub system
IntelMediaSDK plugin for HandBrake      fr.handbrake.ghb.Plugin.IntelMediaSDK           1       flathub system

People can optionally install the IntelMediaSDK add-on which adds certain features to Handbrake.

Couldn't Muse Hub be released as a similar add-on?

@IlChitarrista
Copy link

IlChitarrista commented Oct 8, 2024

It appears that the commit didn't make it to 4.3.1 for some reason. It has been on main since a couple of months ago but the tagged release doesn't include it.

AFAICS the commit is present in the latest 4.4.2 branch, so this should now be usable

and a Muse Sounds Manager Flatpak package along the way, just for the fun of it!

Do you have any update on this?
I'd like to test, I see a org.musescore.MuseScore.Plugin.MuseSoundsManager repo but it's currently just the template.
It would be nice if you could provide the source :)

Okay, I found a source, I'll test MuseScore compiled with MUE_COMPILE_USE_SYSTEM_OPUS enabled and also org.musescore.MuseSampler

@DominicMaas
Copy link

Hi all, we now provide a .tar.gz build of Muse Sounds Manager (v2) with the built in auto updater disabled. It can be found here:

http://muse-cdn.com/Muse_Sounds_Manager_x64.tar.gz

Version is 2.0.3.659. The above url will always point towards the latest version, but we're looking into providing stable version links as well.

I'm happy to help out if any support is needed for building a flatpak. I have no experience with this. Hopefully the tar will be useful.

@hfiguiere
Copy link
Collaborator

The above url will always point towards the latest version,

That's a problem because the checksum will change. BTW we support aarch64 too.

@Batwam
Copy link

Batwam commented Dec 12, 2024

flatpak version in flathub for automatic updates would definitely be preferred (as long as the sandboxing doesn't prevent the 2 apps from "talking" to each other...). I'm using the deb as the moment, don't think I have used any app installed using a tar.gz in the last 15 years to be honest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests