Horrible xrun sound

Unofficial support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: khz, MattKingUSA

Post Reply
User avatar
Qualitymix
Established Member
Posts: 274
Joined: Tue Apr 02, 2013 6:45 pm

Horrible xrun sound

Post by Qualitymix »

Hey guys. I run on a low-grade system and can't avoid xruns, especially given what I do. Is there at least any way to avoid the accompanying high pitch "buzz" sound?

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Horrible xrun sound

Post by danboid »

You're being a bit vague but I think I know what the problem you're having may be and it inspired a new xrun reduction tip for my KX manual.

See 'Avoid realtime resampling' here:

http://www.wiki.linuxmusicians.com/doku.php?id=latency
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

ToddMWorth
Established Member
Posts: 225
Joined: Tue Oct 23, 2012 3:59 am

Re: Horrible xrun sound

Post by ToddMWorth »

Qualitymix wrote:Hey guys. I run on a low-grade system and can't avoid xruns, especially given what I do. Is there at least any way to avoid the accompanying high pitch "buzz" sound?
xruns shouldn't cause a buzz.

Do you get the buzz if you don't use JACK (use speaker-test app talking directly to your alsa card eg HW:0) ?

User avatar
Qualitymix
Established Member
Posts: 274
Joined: Tue Apr 02, 2013 6:45 pm

Re: Horrible xrun sound

Post by Qualitymix »

It happens when my computer is doing too much. For instance...two tracks of linux sampler, lots of bin effects, then try to switch over to another program,, like Carla. Then hello, its a weird high(er) pitch sound that fills gaps in audio because my CPU can't keep up

Thad E Ginathom
Established Member
Posts: 369
Joined: Fri Sep 23, 2011 1:03 pm

Re: Horrible xrun sound

Post by Thad E Ginathom »

When you say "gaps in audio," do you mean silences in the material during which you can hear the buzz, or do you mean dropouts, breaks in the audio material, which, instead of being silent, are buzz-filled? Do you see the xrun indicator counting up rapidly during these periods?

User avatar
Qualitymix
Established Member
Posts: 274
Joined: Tue Apr 02, 2013 6:45 pm

Re: Horrible xrun sound

Post by Qualitymix »

I'm talking dropouts, and the xrun count skyrockets

ToddMWorth
Established Member
Posts: 225
Joined: Tue Oct 23, 2012 3:59 am

Re: Horrible xrun sound

Post by ToddMWorth »

Can you record it or something? It would help to know what sound you're hearing :)

User avatar
Qualitymix
Established Member
Posts: 274
Joined: Tue Apr 02, 2013 6:45 pm

Re: Horrible xrun sound

Post by Qualitymix »

Indeed, there is a crackle sound as well. However I'd prefer not to increase buffer size because I actually play most (I rarely program) of my instruments, so I need to have low latency. At the moment I run at 2.9ms and it has been great. I know that sampling takes alot of resources, and I know I'm not resampling at a different sample rate as danboid suggested. At the moment, since Ardour can't freeze midi tracks like Sonor can, I'm forced to mix down my midi "performance" track to an audio track while composing. I haven't actually had to do this yet, but I have suffered from some pretty terrible sounds when listening to my song, and trying to switch to Carla or something. My computer just locks up and makes a horrendous electronic noise at me.

Thad E Ginathom
Established Member
Posts: 369
Joined: Fri Sep 23, 2011 1:03 pm

Re: Horrible xrun sound

Post by Thad E Ginathom »

My previous computer was replaced due to audio problems. Except using the on-board interface, it would not even play music without dropouts, and using my firewire interface was impossible. The DPC Latency test gave horrendous results and "upgrading" to Linux did not fix any of the problems.

Thing is... some PCs are just not good at audio and when that is the case, there is no software solution.

User avatar
Qualitymix
Established Member
Posts: 274
Joined: Tue Apr 02, 2013 6:45 pm

Re: Horrible xrun sound

Post by Qualitymix »

Does that test run on wine? I have windows 7 dual boot, but definately can't do what I CAN do in Linux. Producing music on my Linux side has proven more resource effecient. Its just quirks like these that I hesitate to convert my actual studio over to Linux.
I will say that I know I can't expect much from a low grade computer. This sound tends to almost always generate when I'm trigging a sample of some sort, and I suddenly close out the sampling program. For example, maybe someone here can test, loading a sample into carla....write a short midi track and trigger the sample.....then while the sample is being triggered, close out carla. This is close to a real world example for me, because sometimes ardour locks up but doesn't stop playing, and the only thing I can do is close out everything else to free up resources.

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Horrible xrun sound

Post by Pablo »

Trouble shooting xruns might be cumbersome, but there are some tweaks that usually help. Things like avoiding cpu freq scaling, using a low-latency kernel, looking into IRQ's and configuring rtirq, disabling wifi, using a light DE, ... and increase latency (see below). As Thad said, it depends a lot on your hardware configuration but at least you will be able, hopefully, to narrow down the causes of the problem and, maybe, improve the situation.

On the other hand, I think you are pushing too far. You should increase the latency as long as you don't notice it, or it is bearable, when you do software monitoring (listen to what you record, while recording). In fact, monitoring or playing live through the computer is the only time when you need low latency. Ardour will compensate for latency in the tracks. What you should do is telling jack to compensate for the extra latency that your hardware causes. You can use jack_iodelay for this, as the kxstudio wiki explains.

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Horrible xrun sound

Post by Pablo »

Does that test run on wine?
Use jack_iodelay. It will tell you the total round trip latency and the extra latency that you should compensate for in the jack settings

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Horrible xrun sound

Post by Pablo »


Thad E Ginathom
Established Member
Posts: 369
Joined: Fri Sep 23, 2011 1:03 pm

Re: Horrible xrun sound

Post by Thad E Ginathom »

Qualitymix wrote:Does that test run on wine?
I just got an error message and that was all. If it did run, I don't know if the information gathered in Linux would be meaningful. If you have a Windows partition...

Post Reply