Trying to get Audacity to record on Debian linux

Audacity 2.0.1 installed from Debian repository
Debain wheezy, 3.2.0-4-686-pae kernel

Hi. This forum looks hopeful! Already surfed a bunch of trouble shooting elsewhere. Hope y’all can help!

So, currently I am getting no recording levels. My recording (but not playback) level controls are now inactive within Audacity, which I suspect might be due to my installing Alsamixer, which I saw recommended elsewhere. I think I saw something somewhere that said to install Alsamixer and max out/unmute all the levels, which I did. (Initially, there seemed to be quite a number of these (many of incomprehensible purpose), though now there seem to be only 2, Master and Capture.)

Initially running ‘alsactl init’ as root seemed to get most of my audio (ie. play) for a new sound card (Diamond Extreme Sound 5.1) working.

Thanks for any help!

AlsaMixer is usually installed by default in Debian (and most other distributions).
The default sound system in Wheezy is “PulseAudio”. Typically this will show up in AlsaMixer as having only “Master” playback and one “Capture” option.
To set levels for the actual sound card, you need to change the selected “device” (sound card) to your actual sound card rather than Pulse. In AlsaMixer, press F6 to change the sound card.

Thanks for your reply.

I believe I have identified and selected the correct sound card within alsamixer, and selected the corresponding output and input devices within my user “sound settings” and audacity. I begin to see some levels for one of the corresponding record devices in audacity, but the left channel is static at about 1/3 full level and the right channel shows a little movement at about 1/10 full level, irrespective of any input audio levels.

Line-in in alsamixer (F5) doesn’t show any level bar, only “Line-In”, and under F4, only Mic shows a level bar. Line does not show one, and Line-In is not shown at all.

Let’s start with “what works?”
Can you play audio on your computer?
If you import a file into Audacity, does it play correctly?

I can play audio on rhythm box (flac) and Movie Player (shn).
When I import into Audacity (flac and mp3 tried), play back shows sound levels, but nothing heard.

Go into “Help > Audio Device Info”
Wait a few moments for the information to appear, then copy and paste all of the info into your reply.

==============================
Default capture device number: 11
Default playback device number: 11

Device ID: 0
Device name: C-Media CMI8738: C-Media PCI DAC/ADC (hw:0,0)
Host name: ALSA
Input channels: 2
Output channels: 0
Low Input Latency: 0.011610
Low Output Latency: -1.000000
High Input Latency: 0.046440
High Output Latency: -1.000000
Supported Rates:

Device ID: 1
Device name: C-Media CMI8738: C-Media PCI 2nd DAC (hw:0,1)
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
8000
11025
16000
22050
32000
44100
48000
88200
96000

Device ID: 2
Device name: C-Media CMI8738: C-Media PCI IEC958 (hw:0,2)
Host name: ALSA
Input channels: 2
Output channels: 0
Low Input Latency: 0.011610
Low Output Latency: -1.000000
High Input Latency: 0.046440
High Output Latency: -1.000000
Supported Rates:

Device ID: 3
Device name: HDA NVidia: HDMI 0 (hw:1,3)
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
32000
44100
48000
88200
96000
192000

Device ID: 4
Device name: HDA NVidia: HDMI 0 (hw:1,7)
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
32000
44100
48000
88200
96000
192000

Device ID: 5
Device name: HDA NVidia: HDMI 0 (hw:1,8)
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
32000
44100
48000
88200
96000
192000

Device ID: 6
Device name: HDA NVidia: HDMI 0 (hw:1,9)
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
32000
44100
48000
88200
96000
192000

Device ID: 7
Device name: sysdefault
Host name: ALSA
Input channels: 128
Output channels: 0
Low Input Latency: 0.042653
Low Output Latency: -1.000000
High Input Latency: 0.046440
High Output Latency: -1.000000
Supported Rates:

Device ID: 8
Device name: rear
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
8000
11025
16000
22050
32000
44100
48000
88200
96000

Device ID: 9
Device name: spdif
Host name: ALSA
Input channels: 2
Output channels: 0
Low Input Latency: 0.011610
Low Output Latency: -1.000000
High Input Latency: 0.046440
High Output Latency: -1.000000
Supported Rates:

Device ID: 10
Device name: pulse
Host name: ALSA
Input channels: 32
Output channels: 32
Low Input Latency: 0.011610
Low Output Latency: 0.011610
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
8000
9600
11025
12000
15000
16000
22050
24000
32000
44100
48000
88200
96000
192000

Device ID: 11
Device name: default
Host name: ALSA
Input channels: 32
Output channels: 32
Low Input Latency: 0.011610
Low Output Latency: 0.011610
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
8000
9600
11025
12000
15000
16000
22050
24000
32000
44100
48000
88200
96000
192000

Selected capture device: 0 - C-Media CMI8738: C-Media PCI DAC/ADC (hw:0,0)
Selected playback device: 1 - C-Media CMI8738: C-Media PCI 2nd DAC (hw:0,1)
Supported Rates:
8000
11025
16000
22050
32000
44100
48000
88200
96000

Available mixers:

Available capture sources:

Available playback volumes:

Capture volume is emulated
Playback volume is emulated

Is the Diamond Extreme Sound 5.1 sound card the only sound card in your computer or do you also have “on board” sound?

Enter the following into a terminal window and copy/paste the output to your reply:

arecord -l

(the final character is a lower case “L”)

Thanks, Steve.

I do have onboard sound, but I have inactivated it in the bios, following my PC’s procedure.

root@drewshost:/home/drew# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: CMI8738 [C-Media CMI8738], device 0: CMI8738-MC6 [C-Media PCI DAC/ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CMI8738 [C-Media CMI8738], device 2: CMI8738-MC6 [C-Media PCI IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@drewshost:/home/drew#

These both appear to be my Diamond Extreme Sound 5.1, which I verified by uninstalling it and reinstalling it to see what was lost/returned from my “drew@drewshost:~$ sudo lspci -v” output

If you do not already have it installed, install “pavucontrol” (PulseAudio Volume Control).
Ensure that no other audio programs are running - particularly ensure that you have no web pages open that contain sound.
Open Audacity and set both the recording and playback devices to “Pulse”.
Import a long audio file and start playing.
If sound is not heard, open pavucontrol while Audacity is playing and look in the “Playback” tab. Audacity should be listed and there should be an option to select which output to use and playback level.

Changed play/rec devices in Audacity to pulse as you suggested, and started playing long file. Sound was heard. I opened pavucontol anyway and the Audacity controls were shown, as described (in addition to “ALSA plug-in [plugin-container]…” controls). When I closed Audacity, the Audacity controlers disappeared. pavucontrol had working playback level and the option to mute Audacity and other outputs. Didn’t seem you could select one or the other. Seemed like both could be unmuted (play?).

Good, that all seems normal.
Does the playback sound OK?
If it does then we can move onto recording.

What are you trying to record? (describe in detail please, I can’t see your computer :wink:)

Thanks, Steve. Feeling encouraged! Yes, playback sounds great as ever. (Note: this is pretty much the FFFIIIINNNNAAAALLLLLL stage of my move over from Windows to linux as my personal machine (prompted by XPs demise) which I’m VVVEEERRRRYYYYY psyched about!!! :mrgreen: )

I will be recording two things of which I’m presently aware:

  1. streaming (via browser)
  2. line in (“aux”?) from a cassette recorder

I was previously deeply enamored of using Audacity to do these things from my old XP! :stuck_out_tongue:

Thanks…

Good.

Open Audacity,
Check that “Transport menu > Software Playthrough” is NOT selected (off).
With the Record (and Playback) devices set to “Pulse”, press the Record button in Audacity.

Does the cursor progress to the right?
If it does, you should see either a horizontal blue line, or a wiggly blue waveform being drawn as the cursor progresses. What do you see?

If the cursor is moving, open pavucontrol. It should open on the “Recording” tab, but if not, switch to the Recording tab.
Audacity should be listed as a program that is recording and there should be a menu showing the device that is being used fro the recording. Similar to this:
pavucontrol.png

Hi Steve,

All that was as you described it,except pavucontrol came up with stereo as opposed to mono for Audacity. The moving blue line was flat as opposed to the wave form, whether without or with something streaming. The device shown is my Diamond card (C-Media CMI8738 Analog Stereo) where yours is showing Built In…

OK.
To record something that is playing on your computer (such as Internet radio), you need to change that to the “Monitor” setting.
On mine there is the choice of “Built in Audio Analog Stereo” or “Monitor of Built in Audio Analog Stereo”. The “Monitor” option will record what is playing out of the “Built in Audio Analog Stereo”. You want the record what is playing out of your “C-Media CMI8738 Analog Stereo”, which may be called “Monitor of C-Media CMI8738 Analog Stereo” or something like that.

“BOOM!” That was it. I’ve got levels now and have recorded successfully! Thanks much!

So, those are the permanent settings I want in Audacity, “pulse” for both play and record, and “Monitor of (my sound card)” in “ALSA Capture from…” in pavucontrol, and I can just forget about that alsamixer thingy?

So glad I finally came to the Audacity source for my info! Btw, is there good basic user-level document you are aware of for linux audio?

And to make a contribution, I presume the Donate tag/link from the main page? Should I earmark it in anyway!

Thanks again! YAAAAYYYYYY!!! :sunglasses:

Andrew

PS saw something interesting in my first recording. Used to notice these gaps (in pulse waveform) I would get when recording streaming on Windows at times. Got into the habit of editinig them out. Though, thought I was just seeing them here and they seemed to be healing! Though, maybe it was something else?!

Yes, to record what is playing on your computer, set Audacity to record from “pulse” (“default” is usually the same as the “pulse” option, so that may work too), and the Recording tab in pavucontrol set to “Monitor”.

Note that Audacity only shows up in the Recording tab while Audacity is recording, recording / paused, or the recording meter is active.

If at any time you want to record from a real input (an external device plugged into your sound card), then put Audacity into record mode, open pavucontrol and change the “Monitor” setting back to the “C-Media CMI8738 Analog Stereo” setting.

Pulse (“PulseAudio”) lies between software (such as Audacity) and the sound card drivers (ALSA). One of the main purposes of PulseAudio is to handle routing signals between software and the underlying sound system. It is a powerful system that allows you to switch between multiple sound cards (if you have more than one sound card), automatically handle sample rate conversion if required, and even allows playing audio to sound cards on networked computers. (A lot more than you need to know, but I thought you might be interested :slight_smile:)


Here: http://audacityteam.org/donate/
Donations are appreciated and go towards the costs of providing Audacity free,

Gaps can occur in a recording for many reasons. It is usually a sign that some part of the system cannot keep up. When recording from the Internet it could just be that the Internet connection is not running fast enough. It’s a tough one to fix because there are so many possible causes. If this is a problem, start a new topic. If it’s not a problem, have fun recording :wink:

While I’ve got you - one more little glitch I noticed.

I am getting what seems to be premature clipping. My recording level meter appears to hit a maximum at approx. -11 Db, behaving the way I have normally seen it do at the end of the range (i.e. 0). Also, I have getting what I believe are the clipping indicators (blue bars?) consistently at that point. And the dark red portion of the bars becomes compressed. When I record the wave trace does not fill the whole window vertically, but clips (is flat, though not filling the vertical space). Any thoughts?

Now I notice that the level stopping point in the Audacity meter is determined by the set point of the recording level in pavucontrol. If I push it all the way to the right, it will then go to the max in Audacity. (However, the pavucontrol level meter stops prematurely (at a consistent point about 5/6 of the total) (and clips) even when the pavucontrol level is above 5/6 max.) It seems to clip at whatever is the limit in Audacity (as controled as describd in pavucontrol), whether all of the range is consumed in Audacity or not.