Musescore 4.3 and Pipewire
I have kubuntu 24.04 that uses pipewire as audio engine. Musescore 4.2, 4.3 and 4.3.1 were not able to reproduce any audio at all and the playing cursor didn't move. I installed pipewire-alsa and now the sound works. However when I try to play a score the sound stutters terribly. No matter if I put the buffer to 1028 or 4096 each note stutters so much to the point of making the music unrecognizable. Also the playing cursor and the volume bars at the mixer get all at slow motion. (My pc has 32 GB RAM and Ryzen 5 CPU. It should not get slow only with musescore.)
Can anyone help me with this?
Comments
Probably it's a sample rate mismatch. Use pw-metadata to set your audio device to 44100 kHz.
In reply to Probably it's a sample rate… by Marc Sabatella
How can I use pw-metadata to set the audio to 44100?
In reply to How can I use pw-metadata to… by fernandoamartin
I use it this way:
pw-metadata -n settings 0 clock.force-rate 44100
Actually, I made a sheet script that does that but with the 44100 replaced by $1, so I can easily run it to the sample rate however I like.
In reply to I use it this way: pw… by Marc Sabatella
Thank you. It works. But after reboot the issue comes back again.
In reply to Thank you. It works. But… by fernandoamartin
Yes, you’d need to put that line in your .profile or otherwise find a way that works with your specific distribution / window manager or setting the default. I’m not enough of a Linux guru to advise there. Just an in the habit of running my script after rebooting.
In reply to Yes, you’d need to put that… by Marc Sabatella
I keep learning to program (did FORTRAN, BASIC, ABASIC [Apple II c. 1980], Pascal, C+, Visual Basic, Delphi, Qt ) and then forgetting. The forgetting is lasting for longer, now. However, could one write a script to change the PW metadata and then launch MS and link the icon for MS to that script? or, even, associate file types with that script as the launch "application"?
In reply to I keep learning to program … by underquark
I thought of making a script to run the command above and after that launch MU4. But if I could do it all through kde launcher menu it would be much more practical.
In reply to I thought of making a script… by fernandoamartin
You can edit the .desktop file (for distributions that use this) to run a command that does both. Or set an environment variable, which I understand pipewire responds to although I’ve never checked out the documentation for how that works.
In reply to You can edit the .desktop… by Marc Sabatella
My .desktop file has the following content:
[Desktop Entry]
Comment=
Exec=/home/fernando/Applications/MuseScore-Studio.AppImage
Icon=/home/fernando/Documents/icons/MS4_AppIcon_128x128.png
Name=MuseScore Studio
NoDisplay=false
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
Where would I insert the pw-metadata command here?
In reply to My .desktop file has the… by fernandoamartin
The Exec line is the one that controls what program is run. But different distributions may handle it a bit different, so you’d really need to look up the specifics for yours. In theory, you can use something like:
Exec=sh -‘c pw-metadata … ; MuseScore-Studio.AppImage …’
With the “…” replaced by appropriate options.
But, that’s not what your desktop file should look like at all. Is this something you tried mcreating yourself? That may or may not work for starting MuseScore Studio from the icon but is likely to cause problems in other areas. better to install the AppImage normally - by running it from the command line with the “install” option. This will place all appropriate files in ~/.local.
In reply to The Exec line is the one… by Marc Sabatella
Thank you Marc. Following your ideas my .desktop now works with the following content:
[Desktop Entry]
Comment=
Exec=sh -c "pw-metadata -n settings 0 clock.force-rate 44100; /home/fernando/Applications/MuseScore-Studio.AppImage"
Icon=/home/fernando/Documents/icons/MS4_AppIcon_128x128.png
Name=MuseScore Studio
NoDisplay=false
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
In reply to Yes, you’d need to put that… by Marc Sabatella
I thought of finding a way to launch it with MU4 to avoid changing my profile since pipewire is working very well as is for all other audio apps.
In reply to I thought of finding a way… by fernandoamartin
sorry, wrong post