Audacity on "older" PCs-some fine-tuning suggestions(SOLVED)

Hi everyone,
I just installed AntiX Linux on a desktop PC that’s a bit older (Pentium 4, single core, 2GHz, 1 GB of RAM). This distro does not include a realtime kernel (I think), but when I installed Jackd I selected realtime priority, and all seems to be set up fine, with latency at about 5 msec.

My concerns for now, are: when recording, I get a significant amount of xruns. And, the external keyboard is connected to the line in jack, but I can’t control the audio-in level in Audacity (mic slider is grey, and it tells me to use the onboard mixer). -But I can’t find the relative line in meter in the mixer. All would be ok, except that there is a significant amount of recording “red” when I’m not recording. That’s why I’d like to turn down this level, to eliminate the red in the mic meter.

Any suggestions?

I thought that Antix was designed to be used as a Live CD?
If you just want to install a lightweight Linux OS, I’d recommend a minimal install of Debian Squeeze (no Desktop), then add XFCE.
XFCE has come a long way over the last couple of years. It is well featured and still light.
LXDE is possibly a little lighter than XFCE, but imo it does feel a bit like a “cut down” system that lacks some useful features.
A minimal install of Debian Squeeze is as fast as anything else you are likely to find, is highly customisable, extremely stable and has the huge Debian repository available.

Setting up a perfect lightweight system can take some effort, experimentation, and reading, but it is well worth the effort to get a system just the way that you want it (and highly educational).

Modern Linux kernels are pretty highly optimised these days, so will generally run well without the need for kernel patching.
Ensure that your user name is enabled for the “audio” group.
If you use PulseAudio, then also ensure that you are also a member of the “pulse” group.

Change your settings so that the latency is a bit higher.
10 ms should be more than adequate even for “real time” use.
It’s more important to avoid xruns (which will cause glitches in the audio) than an “impressive” number for latency.

Try alsamixer if you don’t have any other mixer installed.
Open a Terminal window and type:


Can’t you just turn down the keyboard?

Good luck, and have fun :smiley:

Hi Steve,

let’s see,

Turning the keyboard down doesn’t do anything to the “noise.” I tried connecting it to “mic audio in” rather than line in. I have control over it, but only to a certain point. The red is still there (at about 25 percent), but I don’t really hear any true “disturbance” unless I increase the mic input in Audacity (which works now).

I’ve taken a screenshot and am posting it here, just to show.

I’ve eliminated the “phantom” track by doing as you recommended on the other thread (that is, not using ctl+shift+n).

I’ve upped the latency to 256, but I still get occasional xruns. SO, my question is: which areas of the setting window (in the pic below) should I tweak, in your opinion? What about priority? Or maybe it’s my input selection that is wrong? (sometimes more than one works, although I don’t understand why…)
I also hear xruns by opening other windows… so it must be a processor thing…

What about using the “renice” command to prioritize Audacity?


Another issue I just discovered:

Until now, I ran my external synth through audio in to the PC.
Now I’ve connected it via USB to control a virtual synth.
But when I open Audacity, there is no reading, and when I activate the mic monitor, it won’t deactivate, but crashes instead! :frowning:


What are you trying to record with Audacity?

If you are using Jack then audacity should have Jack Audio System set as the host.

Yes, I’m using Jack, and Audacity indicates it. But the mic input is not selectable, and neither is the mono-stereo selector. And when I try to see audio devices info, that’s when it crashes.

Also, you may notice, in the screenshot I put here above, it reads that I have “7 minutes of recording space left.” But I have an empty hard drive, about 65 GB! Is it reading the wrong partition?


It’s probably reading the correct partition, but not the one that you expect.

Until the project has been Saved, Audacity writes the audio data to its temp directory. After the project has been saved, audio data is written directly to the project _data folder.
To find or change the temp folder, look in “Edit > Preferences > Directories”

You mean in the Audacity Device Toolbar?
No, it won’t be.

Connection to the actual physical inputs and outputs is done by Jack. These are Jackd’s “system source” and “system sink” ports.
Every Jackd aware audio program will have input and output ports visible in QjackCtl “Connect” screen.

There is a bug in Audacity whereby if you try to activate the recording meter before Audacity has been in “record mode”, Audacity will crash.
To workaround this problem:

  1. Start Jackd
  2. Launch Audacity - If Audacity is already running, use “Transport > Rescan Audio Devices” so that Audacity can see that Jackd is now running.
  3. Select “Jack Audio System” as the “host”. Inputs and outputs will default to “system”.
  4. Press the Pause button, then the Record button. A new track will appear and Audacity is now in record mode.
    You can now use “Stop” to abort the recording (Ctrl+Z to undo the track that has been created). It should now be safe to use the Audacity meters.

When using Jackd, Audacity does not connect directly to the hardware input/output, it connects to “Jack ports”.
It is the job of Jack Audio System to connect to the hardware input/output (using the ALSA device drivers).
It is the job of ALSA to handle the hardware connections, so changing to Mic/Line or whatever is done through ALSA.

Does that make sense so far? Does that work so far? Are you able to record something?

Yes, I think it makes sense, and seems to be in line with what I’ve been experiencing.
Thanks for the pointer about disk space. Since this distro has just been installed, I haven’t used Audacity to record yet. (And the problems this time around have prevented me from recording.)

It is when I go to Help > Audio device info, that it crashes. I’ll try the Transport > Rescan Audio Devices to see if that helps…

At the moment, I opened Audacity while I have Jack and Yoshimi running. In order for Yoshimi to be able to connect to my external keyboard, I also have a2jmidid activated.
So, in the mic in selector in Audacity, it was on a2j but no sound monitored. So I changed it to yoshimi, and Audacity locked up!


After killing the last process, I reopened Audacity using the terminal, and this is what showed at startup:

ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.VIA8237.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4541
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4541
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4541
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4541
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4541

Oh, btw, I’m using Audacity version 2.0.0 unicode.

Don’t know if this is useful info…


Also, when I open the ALSA mixer, I get an error message (it opens anyway) that tells me:

An error occurred while loading or saving configuration information for GNOME ALSA Mixer. Some of your configuration settings may not work properly.

and this indication:

Bad key or directory name: "/apps/gnome-alsamixer/display_mixers/": Key/directory may not end with a slash '/'
Bad key or directory name: "/apps/gnome-alsamixer/display_names/": Key/directory may not end with a slash '/'


It looks like the problem is with the ALSA drivers.
Is this problem only with Antix? Have you used any other Linux distro successfully on that computer (with that sound card)?
You may need to Google for information about how to get that sound card working properly with Antix/Linux.

Btw, I’ve previously tried using Yoshimi but I had stability problems with it. I’ve had much better results with ZynAddSubFX. (ymmv)

Now that you mention it, I think it might be Yoshimi that’s giving the problems. I’ll try Zyn and see how it behaves.
I really want to resolve this, since I really like using Audacity to record tracks. It’s faster than Ardour, especially for making audio files. Audacity is really my recording tool of choice. (Too bad that VST instruments aren’t yet usable!)

Also, I need to know if opening one virtual synth to record a track, then closing that synth and opening another synth to record an additional track, etc, is possible, without any hitches. (ie one track with Zyn, one track with Hydrogen, one track with Hexter, etc, and then save the finished product.


Assuming that you are using Jackd, if you launch another application that uses Jack, rescan audio devices in Audacity (Transport > Rescan Audio Devices) and the input/output ports of that device will appear in the Audacity Device Toolbar so that you can then record the audio directly.

When I do this ^^^ Audacity crashes. :frowning:


Does that still happen or have you fixed it?
How much of the sound system is working?

Hi Steve,

No, it’s not working yet. Although Audacity is set to Jack when Jack is activated, when I hit record, Audacity crashes. Same if I rescan audio devices. I’d really like to have this fixed, and be able to open and close various virtual synths and have Audacity see them, without a hitch.


PS. If I send an Audacity file made on Linux, to a friend who uses Audacity on Mac, will he be able to open the file and use/modify it? And vice versa?

You will need to get ALSA working correctly before you can proceed. Audacity will not run on a machine with a faulty sound system.

What do you get if you enter this in a terminal window?

aplay -l

Yes you should be able to, but see here about moving projects:

It’s working now. Someone pointed out to check the sample rates to see if they were the same as Jack’s, and they were different.

I still see though that the disk space left (I’ve saved a couple short works to see if it increased) is still at about 10 minutes. Is there something else I should check? I’m afraid I’ll run out, even though I have 60GB remaining…


Check the location of the Audacity temp folder.
“Edit > Preferences > Directories”

Done! :slight_smile: I just needed to save a project file, not just an audio file…

It might be good in later distros to have a notification window pop-up when the sample rate isn’t in line with Jack. That one really stumped me! :slight_smile:

Thanks for you help, Steve.