Project

General

Profile

Bug #1701

[lmms] Sound is crackling when LMMS is started

ani - about 6 years ago - . Updated about 6 years ago.

Status:
not-a-bug
Priority:
bug
Assignee:
-
% Done:

0%


Description

I get a crackling sound from music in the background in other programs when I start LMMS. It vanishes after a while but if I want it totally gone I have to close all other programs that occupy sound.

History

#1

Updated by bill-auger about 6 years ago

there is probably no bug to fix - broken audio usually means that you are doing too many things with your computer - when doing audio work it is highly advisable to not run any programs that are non-essential - it does not matter if the programs are making sound or not - if they are running, then they are using precious CPU and memory - this goes as far as preferring a light-weight desktop instead of gnome or KDE - additionally, on a pro-audio workstation the goal is to for very low latenncy; which among other things, means using JACK rather than pulseaudio - ideally, pulseaudio should not even be running

the ideal setup is where all programs running are only the ones necessary for the audio work; and all of them are running through JACK - for this reason it is best to have a separate OS install that is optimized for audio work - this could be another parabola but one that for example runs only an ultra light WM/DE and does not have pulseaudio or any unnecessary services installed (like screensaver, or internet) - if you must have other programs running like screen capture, streaming, web browser, or chats; it still recommended to have those running on a separate computer and connect their sound cards with wires or netjack if that is necessary

im not saying it is impossible to do whatever you are trying to do but there are no simple generic solutions other than excessive buffering and re-sampling - pro-audio tools almost always need fine-tuning to get decent performance - that is even more true when using them on a system that is optimized for casual desktop use - for example, your crackles may go away if you enlarged your buffers in LMMS or in the pulse back-end; but that can lead to intolerable latencies

again, the most important thing you can do is to shut down every program that is not necessary (screensaver, chats, web browser, everything) - if youd like to go for a more "pro" system there is a 'parabola-proaudio-settings' package that can make some useful tweaks and the 'linux-libre-rt' kernel may also help; but if pulseaudio is the main sound server, i doubt if these would help much - if you are not familiar with JACK, the cadence and catia/claudia programs from kxstudio are very helpful to get started

#2

Updated by bill-auger about 6 years ago

out of curiosity, i tried LMMS myself and it behaves much as i assumed - the sound was noticeably broken using pulseaudio and the LMMS GUI itself was using an excessive amount of CPU - the programs' CPU meter did not relect this - it was probably only accounting for the audio thread; when it's GUI thread was using 4-5x more CPU than the audio (making this meter a quite ironically useless CPU consumer itself) - when LMMS was minimized to the taskbar ("un-mapped" in WM-speak), the CPU ussge went immediately down to a reasonable level (approximately what the programs' CPU meter was showing) and the sound cleared up - after switching to JACK, the sound was perfect and the CPU usage was noticeably less even with the program maximized

so as for my earlier recommendation about reducing the number of programs using the CPU; in this case, this program would be itself the biggest CPU hog running with the overwhelming majority of it's CPU use being completely unrelated to the audio it was producing

my guess is that the developers of this program only use computers that are about 10 times more powerful than yours and mine and they do not notice that the GUI is excessively heavy (and they probably only run it through JACK)

#3

Updated by ani about 6 years ago

Can I run this program in a way to get it optimized? I have never tried JACK and I do not know what it means or does.

#4

Updated by bill-auger about 6 years ago

i said already that it may be possible but there are no simple generic solutions
did you try shutting off every other program and using ONLY that one program ?

if you are going to do pro-audio work, you absolutely must learn how digital audio works and how to use the tools - people go to college for this - it is not expected to be simple and there are no simple answers that i could give in this context

i would highly suggest using the 'cadence' and 'claudia' programs to manage JACK - if you need help learning about it there are tutorials online or you could get to know the folks in the #kxstudio and #opensourcemusicians channels on freenode

if you are super lazy, you could contact the developers of LMMS and ask them if they could optimize the GUI to use less CPU

#5

Updated by ani about 6 years ago

Thank you for the response. I will ask the fellow musicians for tips but this might still be a bug to leave open.

#6

Updated by bill-auger about 6 years ago

  • Status changed from open to not-a-bug

it is really not a bug - the program behave as expected when the program is minimized and when using JACK - it's GUI is simply using too much CPU to be used on every computer with a sound server like pulseaudio that itself uses too much CPU

pro-audio programs need to be as CPU efficient as possible - this one is not - and pulseaudio is not - pulseaudio is simply not designed for pro-audio use - that is what JACK is for

Also available in: Atom PDF