So, you ask, why would you want to record your sound card's output? There are many reasons. The main reason I use this technique is to record the output of music programs like ReBirth and SimSynth, where the demo version doesn't allow one to save any files. Another use is to get around copy protection on downloaded music or sound files.

This is the method for recording your sound card's output under Windows. Unfortunately, I don't run either Linux, MacOS or any other operating systems - perhaps someone who does can add to this node.

The first thing to do is to open up the Windows Mixer. Look for a little speaker icon in the system tray. If it's not there, go into Control Panel, and depending on your version of Windows, open the Multimedia or Sounds and Audio Devices control panel. Check the "Place volume icon in the taskbar" checkbox, and hit OK.

Once you have your volume icon, double-click on it. This brings up the Playback Control mixer. From here, you can adjust the volume for each individual sound source on the system - wave or DirectSound output, MIDI, CD Audio, Microphone, Line In and so on. However, the option we're looking for isn't here.

Click on the Options menu, and select Properties. Click the Recording radio button. Now, look further down the dialog box, and you should see a list of items with checkboxes next to each one. Make sure the "What U Hear" or "Mixer Output" (or, if you can't find either of those, anything with the words 'soundcard', 'mixer', 'loopback' or 'output' in it) checkbox is checked.

Click OK. You should now see a similar-looking but subtly different Record Control mixer. From here you can adjust the gain of each recording input*, and select which input you want to record from. You want to record what's coming out of your sound card, so select the "What U Hear" or "Mixer Output" (or whatever) checkbox.

Now, start up your favourite audio software and hit Record. Press Play on whatever source you want to record from. Wait until it's finished, then stop recording. Edit the resulting sound file as required and save it.


There are a couple of interesting things one can do with this. For instance, if you don't have any multitrack software, you can use this technique to overdub several audio tracks on top of each other. Plug in a mic or guitar or whatever you're recording, hit record, play your backing track and play over the top of it. Et voila - an overdub. The problem with this is once you've overdubbed something, you can't edit it without recording everything again.

You can also use this in conjunction with, for instance, MSN Messenger's voice messenging. Set up a voice conference and start playing some music or sound files, and the person on the other end will hear what you're playing.


*Note that the gain of the input that you set in the Recording Control mixer is not the same as the volume that you set in the Play Control mixer. Gain controls the loudness of the signal going to any programs recording that input, while volume just controls how loud the signal appears in your headphones or speakers.

In Linux, there are various ways of recording the soundcard output raw.

Sound daemon

There are many "sound daemons" available for Linux. These are often used to support network audio; You can start application on one machine, and the sound magically travels over the network and can be heard on another. Also, they are used to provide mixing of multiple audio streams on software; a real lifesaver in case the soundcard doesn't support hardware mixing. They also allow "monitoring" of data, which is, of course, what we are about to do here.

EsounD (aka esd and Enlightened Sound Daemon) is one such daemon; it's widely supported in GNOME applications and elsewhere.

After setting the thing up (esd running, and the software reportedly plays sound through it), all you need to do is to try esdmon. Like this:

$ esdmon > recording.raw

Interrupt with Ctrl+C, as usual. You can also pipe that directly to sox to convert to desired format or to process it. Or, take the heavy weaponry and pipe it to ecasound or such...

Reportedly, there's a tool called esddsp that also allows plain ordinary OSS (/dev/dsp) using applications to be routed through esd and further through esdmon to file.

ALSA

ALSA drivers rock, and offer much more flexibility than OSS audio drivers.</plug>

ALSA also has feature that "secure" audio format makers probably hate with passion: the fact that audio can be copied right back from the sound card...

In theory, this thing can be done using ALSA's PCM device "copy"; like this spell put to ~/.asoundrc:

pcm.copy {
  type plug
  slave {
    pcm hw
  }
  route_policy copy
}

And then recording things from the card like this:

$ arecord -t wav -D copy target.wav

...but personally, I haven't got this to work; either my skills are lacking, or maybe this won't work properly with the OSS emulation layer that I keep loaded...

Log in or registerto write something here or to contact authors.