LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sound Problems after installing MuseScore (https://www.linuxquestions.org/questions/linux-newbie-8/sound-problems-after-installing-musescore-4175673892/)

Phil_J 04-24-2020 11:55 AM

Sound Problems after installing MuseScore
 
Hi all
I've been using a music producing app for about 6 years. I used it successfully before I binned Windows and, most of the time, it has worked on Ubuntu (19.10). However, I've just updated the software to it's latest version and I'm having sound problems. The sound is very crackly. I put the line "aplay -L" into the terminal, expecting to get a list of sound devices, and got 4 pages. There is a total of 47 entries if I've counted them correctly. I've only got 2 soundcards. There is an onboard NVidia card and a PCI Soundblaster Audigy card. The NVidia has about 16 entries, then there is my ASB webcam, and then the rest of the entries are the SB Audigy. My question is, should there be that many? If the NVidia onboard sound card is disabled why is it there and why does it keep appearing as a choice of sound cards?
Is there any way I can 'clean' and, maybe, 'streamline' my system, or is it OK, and, if it is OK, why the awful crackling noises. I'm pretty sure I'm using the correct driver for the SB sound card.
Be gentle with me, though, I'm not too Jargon friendly.
Many thanks in anticipation.
Phil J.

Shadow_7 04-24-2020 02:02 PM

Each of your video outputs likely has an HDMI audio channel/device. There should only be one driver??? not sure on that.

$ cat /proc/asound/cards

Also don't forget that webcams, modems, and other things also contain DSP units, aka soundcards. Even if they're output OR input ONLY.

If you're running pulseaudio, and you likely are, then pavucontrol should let you adjust levels. You might be at > 100% volume which is why it sounds bad. Could also be that you're running pulseaudio more than once and it's stepping on it's own toes. Could be a resampling issue or bug. Could be bad speaker wires depending on your sound setup.

Phil_J 04-25-2020 05:07 AM

Thanks for your reply.
I've got two sound cards because I had the SB Audigy installed. The onboard card is not high enough spec for the music work I do. However, the onboard one should be disabled. I've been into BIOS and made sure of that.
I'm sorry but I didn't understand your '$ cat /proc/asound/cards' line.
Is there a better way to look at the details of the SB Audigy, and check if it is working properly?
The app I'm using, MuseScore, is using Pulseaudio at the moment, but when it is successfully using the correct sound card it uses Portaudio. If I try to use that now the app immediately crashes and closes.
There is a choice of 'Pulseaudio', 'Portaudio', 'ALSA Audio' and 'Jack Audio Server'. The last two don't give me any output and the 'Play' controls in the App are greyed out. Pulseaudio is the only one working at the moment, but the sound quality is poor. I suspect that it is using the onboard card. Can this be possible?
I'm sorry about my lack of computer technical knowledge. I'm a (mainly classical) musician (and a Maths teacher). I use the music app to compose orchestral music which, when it's working is great.
Thanks for your input.
Phil J.

Rickkkk 04-27-2020 07:37 PM

Hi Phil J,

I'm going to suggest something that doesn't specifically address the fact that your setup worked fine before the MuseScore update, but doesn't now. However, you may find it useful. Most of what follows is opinion and is meant as food for thought.

I'll get right to the crux and propose that you completely remove PulseAudio from your system, or alternatively, either set up a simpler music production system yourself or opt for one of the music-production designed versions of linux.

If your reaction to this suggestion is one of absolute discomfort, you can safely ignore the rest of my post.

For several years now, I've been running a music studio on my own linux distro of choice (Arch), and I've found everything works much better without PulseAudio. PulseAudio comes preinstalled on many distros nowadays, and is a handy tool for customizing sound output (and input, to a certain degree), especially when the audio/video on the computer is used as most people will (listening to music, watching video ..). PulseAudio is a layer that sits on top of alsa (basically) and offers the customization capability I mention above. In some cases, especially in the case of certain bluetooth sound applications, PulseAudio is actually required, so if you use something like that (bluetooth headset, speakers ..), this is your second chance to ignore the rest of my post.

However, if the primary use of the system is music production, I find that PulseAudio is not only superfluous, but an added complexity with little added value. Most sound production setups are built around Jack, which, admittedly, can be a bit complicated for the uninitiated. Jack (Jack Audio Connection Kit) is not a sound driver, but a utility that manages the relationships between sound sources and destinations (inputs and outputs), sound cards, and applications (for recording or playing or both). It is obviously present on your system (given the information from your posts), and although there are ways to configure Jack and PulseAudio to play nicely with each other, as mentioned earlier, it's an added complication for little or no added value. Since the system is being used primarily for music production, it is likely to have much more sophisticated tools and plugins to shape and customize sound - PulseAudio will just get in the way.

Music production systems require a bit of work to set you properly in Linux, unless you go with one of the pre-configured purpose-built distros like Ubuntu Studio or AVLinux. My preference (and this goes for my linux philosophy in general), is to install and configure everything I need, nothing less but nothing more either (one of the reasons I prefer Arch).

If I were you, and if I were particularly partial to Ubuntu, I would take a look at Ubuntu Studio. The previously mentioned AV Linux is a also a popular alternative. I personally prefer a minimalist, "install only what I need myself" approach and am not fond of Ubuntu for that reason.

Cheers - hope you find this useful. Don't hesitate should you have any questions.

Phil_J 04-28-2020 10:52 AM

Hi Rickkkk Thanks for your answer. The most relevant one yet!
I'll start with a bit of background so you can more accurately gauge my level of technical knowledge/ability. I was a professional musician (brass and piano) but now I'm retired. I've had very little to do with electronic music production. I suppose you could call me a acoustic musician. However, I am still working as a school teacher, teaching, wait for it - Mathematics (yes, I know!). I still play with an orchestra and I compose and arrange quite a bit of mainly orchestral music. So, now you can see where my lack of technical computing knowledge/ability doesn't come from. I use 'MuseScore' because it suits my level of computing ability (it doesn't get in the way of the real musical stuff). I'm not totally void of any technical knowledge and knowhow, but my problem with Linux is that I don't know 'how' to do anything. How do I get rid of PulseAudio, and how do I change distributions without losing all my date? I'm getting better at it, but quite often the advice I read on these forums just goes over my head.
OK, that's that out of the way. Your reply has really got me thinking. Before that last upgrade of 'MuseScore' I had never used Pulseaudio, relying instead on the PortAudio settings which came up with my soundcard features. The reason why I switched to using PulseAudio was simply because it was the only option that worked after the upgrade. In fact PulseAudio mostly just gave a very distorted noise. If I try to use the other two options, 'ALSA Audio' and 'JACK Audio Server', the play controls in the 'MuseScore' are grayed out.
Two questions occur to me after reading your reply. The first is, can I just purge my system of PulseAudio and will my soundcard still work/communicate with MuseScore, and if so, how do I do that? The second question is, can I do it as a dual boot setup, one for music, one for everything else? Would one get in the way of the other, if that even means anything?
Once again thanks for your help. Obviously any more would be gratefully received.
All the best,
Phil J.

Rickkkk 04-28-2020 01:33 PM

Hey Phil,

OK thanks for the more detailed account of your level of comfort with linux.

Before looking at uninstalling PulseAudio, maybe we can just try to stop using it. It sounds like MuseScore is now configured to use PulseAudio as its sound "provider".

I installed MuseScore on my Arch system just to see how it is configured. It set itself up by default to used PulseAudio, which isn't installed on my system, so no sound playback possible (Play button greyed-out, as you put it). I was able to get it to play back without any tweaking, by choosing any of the other alternatives (PortAudio, Alsa, Jack).

I was unfamiliar with PortAudio - it turns out it was installed on my system as a dependancy for another piece of software I installed. I read up on it a bit and it turns out it's similar to Jack - a low-latency sound server that works cross-platform on linux, Mac or Windows. I don't use it, I'm more familiar with Jack.

You should be able to do as I have done, and choose one of the other options in MuseScore to play back sound. If nothing besides PulseAudio is producing any sound, it is because the daemon/service is hoarding alsa to itself, so to speak, as it (quite rudely) is wont to do ... another reason I really don't like PulseAudio. It would be interesting to try stopping the service and restarting MuseScore to see if the other choices work then. Try this (assuming PulseAudio is running as a systemd service) :

Code:

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service

.. and then start up MuseScore again and try the other I/O options ...

Let us know how it goes !

Cheers.

*** EDIT *** Don't bother trying Jack as an option unless you've installed and confifgured it. Try PortAudio (MuseScore installs this as a dependancy) or just plain alsa.

Phil_J 04-29-2020 03:38 AM

Hi Rickkkk
Thanks for your reply. I tried stopping the PulseAudio service using the two lines you gave me and when I started MuseScore no sound playback was possible. I tried selecting PortAudio and the app immediately crashed and closed. It has been doing that with PortAudio since I updated the app. Prior to the update I was using PortAudio successfully with MuseScore 2. Neither ALSA or JACK restore playback. The playback controls were permanently greyed out. Restarting the system has restored PulseAudio. How easy is JACK to configure, and what do I need to do to install it?
Thanks again,
Phil J.

Rickkkk 04-29-2020 01:53 PM

Hi Phil.


This is odd. I am going to install MuseScore on another system I have that has PulseAudio installed (for Bluetooth audio support). I'll troubleshoot a bit on there and get back to you.

Cheers.

Phil_J 04-29-2020 03:08 PM

Many thanks!

Phil_J 05-11-2020 07:31 AM

Hi.
Slight new development. If I leave the playback running with the very poor sound quality, after about 2 minutes it starts to improve itself and then comes right. I can work on it as long as I like after that and the sound quality is good. After a reboot or a period on standby, however, I'm back to square one.
I don't know if that helps but there you go.
Phil J.

Shadow_7 05-13-2020 07:25 PM

Sounds like a hardware issue. I've had a few of those recently. I got some magnapan minnie maggies. Only to find my old stereo had been failing. And the speaker wires I was using failing. And the TRS cables from usb soundcard to HP preamp failing. And and and and... It's okay now though, after replacing / redoing many parts of the signal chain. Including a different USB soundcard. But it works on that original card after all the parts got replaced. The speakers still don't like clipping though. What a headache $1.5K speakers turned into. But the end result is pretty nice.

What I had:
M-Audio mobile pre
presonus HP-4
panasonic rx480
Magnapan 4' stereo pair

What I have:
Focusrite 2i2
Presonus HP-4
NAD C-316BEE
Magnapan Minnie Maggies

And all new cabling. Mogami TRS cables from soundcard to headphone preamp (formerly radio shack). Monster RCA cables with TS adapters (formerly generic RCA cable). 14 guage (should be 16 gauge) stereo wires with adapters (best buy). Formerly some 20yo OMG thin cables probably got from a military PX store. OFC the biggest offender was replaced last, the radio shack TRS cables.

Phil_J 05-14-2020 09:00 AM

Hi Shadow 7
I'm inclined to think that, if it was a hardware problem, it would be there all the time. It seems like some kind of conflict to me, but I'm not tech-savvy enough to sort it out. Thanks anyway for your reply.
Phil J.

Shadow_7 05-14-2020 11:03 PM

If you have multiple machines you can use the audio devices on the other machines and if it has the same issues, it's likely the audio devices / hardware. Software tends to be a little more consistent. Either works or does not. Although I've had some quirky drivers that required parms to function well. nperiods=3 (default 2), and such. Things that get fixed and newer kernels don't have that issue and such.

Phil_J 05-17-2020 11:17 AM

Many thanks for your reply, Shadow 7. Any ideas are welcome.

Rickkkk 05-20-2020 12:05 PM

Quote:

Originally Posted by Phil_J (Post 6124247)
Many thanks for your reply, Shadow 7. Any ideas are welcome.

Hi again Phil,

Sorry I disappeared for a while ... Work got intense and the other computer I wanted to use to troubleshoot this issue developed hard drive errors and needed some TLC. It is back up and purring again (I am using it to write this to you), so I'll install MuseScore on it and see how it behaves. As mentioned earlier, this particular computer has PulseAudio installed, so I'll be able to get a better idea whether that has any bearing on your problem before suggesting you attempt its removal.

Cheers.


All times are GMT -5. The time now is 08:27 AM.