How to fix monitoring performance (it is too low) in ardour?

“Monitoring” function in ardour works excessively slowly (in my probably wrong configuration). It sounds like something chopped (alternating: sound, silence, sound, silence, etc.). It seems that a lot of samples from ones generated by the soundcard (from microphone in) are simply lost (even if recording is switched off).

How to fix this?

My card is Intel HDA, the sound system is ALSA (from 2.6.19 Linux Kernel), the distribution is Slackware 11. In my system the simple programs (like rec, KRec, and KWave) are able to record sound well.

I’m novice in sound recording and edition. Today I have installed ardour with all the packages required (scons, jack, libsndfile, librdf + raptor, LADSPA SDK, liblrdf, libsamplerate, fftw 3, swh-plugins). ardour works now but it is evident that my configuration is not optimal. My knowledges in sound recording/processing/edition are quite poor. For instance, I do not know how does the libraries and programs like jack, lrdf or sndfile interact with ardour and with each other. Actually, it is difficult to me to find the fault in the configuration. I can only hope that somebody will help…

Thanks advance,
Serge

Thank you for your help.

Should I start jackd manually or should it be started by ardour?

I can not find jackd configuration file in my system to post it here for the correction. Where is jackd configuration stored?

How can I know correct settings for jackd?
It is to be able to interact with ardour, alsa (from a 2.6.19 linux kernel) and souncard discovered by lshw as “Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller” at my laptop.

I have installed a GUI program named as “qjackctl”. After setup a “.jackdrc” file has appeared in the home directory. It contains only one line:
jackd -R -dalsa -dhw:0 -r22050 -p1024 -n2 -i2 -o2

However, when this file is put ardour does not start at all. It shows a message of “Ardour could not connect to JACK…” When I am trying to start jackd manually from GUI program it falls with following messages in its GUI messages window:


18:18:24.324 Patchbay deactivated.
18:18:24.341 Statistics reset.
18:18:24.353 MIDI connection graph change.
18:18:24.545 MIDI connection change.
18:18:31.766 Startup script…
18:18:31.766 artsshell -q terminate
18:18:32.009 Startup script terminated with exit status=256.
18:18:32.009 JACK is starting…
18:18:32.009 jackd -R -dalsa -dhw:0 -r22050 -p1024 -n2 -i2 -o2
18:18:32.011 JACK was started with PID=6250 (0x186a).
jackd 0.102.20
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK compiled with System V SHM support.
loading driver …
apparent rate = 22050
creating alsa driver … hw:0|hw:0|1024|2|22050|2|2|nomon|swmeter|-|32bit
control device hw:0
configuring for 22050Hz, period = 1024 frames, buffer = 2 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback
18:18:34.077 Server configuration saved to “/root/.jackdrc”.
18:18:34.078 Statistics reset.
18:18:34.085 Client activated.
18:18:34.086 Audio connection change.
18:18:34.089 Audio connection graph change.
18:18:34.117 XRUN callback (1).
18:18:36.125 XRUN callback (32 skipped).
jackd watchdog: timeout - killing jackd
zombified - calling shutdown handler
18:18:37.087 Shutdown notification.
18:18:37.101 Client deactivated.
18:18:37.102 JACK was stopped successfully.
18:18:37.102 Post-shutdown script…
18:18:37.103 killall jackd
cannot read result for request type 7 from server (Connection reset by peer)
cannot send request type 7 to server
cannot read result for request type 7 from server (Broken pipe)
jackd: no process killed
18:18:37.315 Post-shutdown script terminated with exit status=256.

Eventually, I have understood how to control the latency. But it does not work with jackd GUI interface. I do not know what configuration file does it edit. It does not affect ~/.jackdrc. As a result I edit ~/.jackdrc directly. The string in this file to load jackd by ardour (in my case) looks like:

/usr/bin/jackd -T -ndefault -d alsa -dhw:0 -D -M -H -r22050 -n24 -p256

Ardour works reliably now. Thanks for the help again.

BTW, isn’t it better to have jackd running on a machine permanently? What way is conventional?

Don’t worry about ~/.jackdrc.

Ardour only starts jackd if jackd is not already started. Using qjackctl to start and stop jackd is recommended since it gives you a quick means to change the settings. You don’t want to have jackd running unless you are using jack based apps such as ardour for two reasons. First, only the user who launched jackd can use it. Second, it locks down the access to your sound card so that nothing else can use it.

The settings you listed can all be set from within qjackctl’s settings.

Also, change your sampling rate to at least 44100 or your audio is going to sound like crap.

Are you geting a lot of xruns with jack?

You might be running jackd at settings which don’t work well with your soundcard. Experiment with different buffer sizes and the number of periods you use.

Sorry for my illiteracy but I do not know what xrun is. It seems that there is no such a program at my system (it is Linux with 2.6.19 kernel installed from Slackware 11 distributive).

How can I know how many xruns am I getting?
How can I configure jackd for ardour?

It seems that jakd in my configuration is started by ardour, but I can not find any control in ardour for jackd.

I do not imagine how does the functions of ardour and of jackd interact with each other. I can only state that when ardour is running following lines are appeared in the processes list:

#ps -ef

root 5199 2681 0 14:23 ? 00:00:00 ardour
root 5201 5199 0 14:23 ? 00:00:00 [ardour] <defunct>
root 5202 1 0 14:23 ? 00:00:00 /usr/bin/jackd -T -ndefault -T -d alsa

There is even one defunct process spawned by ardour… BTW, is such a situation correct?

HI
When You start jackd (I Use the GUI) go to Setup and change the Frames/Period
I use 256 and buffers 2 to get 10 ms latency on my rme card.

The Frames/Period can have a big affect on your hardware.

Try Alsaconf to make sure your soundcard has the drivers installed.

Cheers
Bob
Wavesound

Serge, I cannot show you how to use an linux audio workstation, but as a newcommer, you have to look for Dave’s tutorial at http://www.agnula.info/ in the documentation section. You will find many answers to your questions.

One more comment: the complexity on linux is not the same as with windows. On linux, you have no huge programs doing every thing as with windows, but many programs, each one doing one thing, but very well.

As exemple, for professional audio, qjackctl is the interconnection center where you will connect all the other sound related programs with the mouse exactly as you will do the same job with cables on stage or in a studio.

Your soundcard might not work at all at 22050hz. You should try running at samplerate 44100 or 48000.