ALSA Question

Feedback and Reviews for Audacity 2.x
Forum rules
This board is ONLY for general feedback and discussion about Audacity 2.X.

If you require help, or think you have found a "bug", please post on the forum board relevant to your operating system.
Windows
Mac OS X
GNU/Linux and Unix-like
chris319
Posts: 137
Joined: Sun Aug 05, 2007 4:53 pm
Operating System: Windows 10

ALSA Question

Post by chris319 » Sat Aug 10, 2013 11:01 pm

Two questions about the ALSA version of Audacity:

1. Does it record full 24-bit samples? It is my understanding that some Windows API's do not record all 24-bits but rather record 16 bits and the samples are padded with 8 bits of zeroes, and that this is a limitation of Windows' DirectSound and MME.

2. If the answer to the above question is yes, are the recorded samples "bit perfect", i.e. what comes out of the A to D converter, rather than, say, the jumble that Winows' K-Mixer outputs.

Has anyone actually tested these two things?

Thank you.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: ALSA Question

Post by steve » Sun Aug 11, 2013 12:03 pm

I've not tested as I don't have a 24 bit sound card, but my understanding is that Audacity will correctly record 24 bit Audio on Linux (assuming of course that the sound card and drivers are 24 bit capable).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: ALSA Question

Post by steve » Sun Aug 11, 2013 1:09 pm

I had an idea of how I could partly test 24 bit recording. Using Jack audio system I played a 24 bit track and set Audacity to record the output. The recording was identical 24 bit data, so although I can't test with a 24 bit sound card I can confirm that Audacity can correctly record 24 bit data. Jack audio system is built on top of ALSA, so I think that the only remaining question is whether the sound card and driver support 24 bit recording.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: ALSA Question

Post by steve » Sun Aug 11, 2013 1:14 pm

Robert J.H. wrote a code snippet for testing the bit format of audio in a track: http://forum.audacityteam.org/viewtopic ... 90#p191390
The code can be run in the Nyquist Prompt effect http://manual.audacityteam.org/o/man/ny ... rompt.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

chris319
Posts: 137
Joined: Sun Aug 05, 2007 4:53 pm
Operating System: Windows 10

Re: ALSA Question

Post by chris319 » Mon Aug 12, 2013 12:47 am

I've done this in Windows before but not Linux. Actually you don't want to use a sound card; you want to stay entirely out of the analog domain. We're testing the capability of the software independent of the hardware.

I created a wav file with known bit patterns and wrote a program to compare the source file to the recorded file. I'll have to dust off that software; it's written in PureBasic.

I'm trying to remember how I did it in Windows. I must have had something with bit-perfect playback like foobar 2000 using WASAPI and a bit-perfect recorder going. I'm trying to remember if I used Virtual Audio Cable as my "device".

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: ALSA Question

Post by steve » Mon Aug 12, 2013 1:08 am

chris319 wrote:I've done this in Windows before but not Linux. Actually you don't want to use a sound card; you want to stay entirely out of the analog domain. We're testing the capability of the software independent of the hardware.
As I wrote a couple of post back, you can do that on Linux with Jack and the result is that Audacity is capable of bit accurate 24 bit recording.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

chris319
Posts: 137
Joined: Sun Aug 05, 2007 4:53 pm
Operating System: Windows 10

Re: ALSA Question

Post by chris319 » Mon Aug 12, 2013 1:41 am

If you want to test a sound card and its driver you could use the optical in/out, if any.

chris319
Posts: 137
Joined: Sun Aug 05, 2007 4:53 pm
Operating System: Windows 10

Re: ALSA Question

Post by chris319 » Tue Aug 13, 2013 9:45 am

I am unable to perform any 24-bit experiments owing to the inability to get Audacity/Jack/ALSA to record its own output.

Jack does seem a bit of a train wreck: weird user interface, plenty of error messages, the server seems to stop itself, etc.

This would be a snap in Windows with Virtual Audio Cable.

chris319
Posts: 137
Joined: Sun Aug 05, 2007 4:53 pm
Operating System: Windows 10

Re: ALSA Question

Post by chris319 » Tue Aug 13, 2013 10:45 am

After watching a Jack configuration tutorial on YouTube, I now have to ask how Audacity can be made to record its own output.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: ALSA Question

Post by steve » Tue Aug 13, 2013 4:17 pm

The only way that I know of to enable Audacity to make a bit perfect recording of its own output is with Jack.

Jack is terrific for serious audio work, but I agree that it can be difficult to set it up initially. How easy it is to set it up all depends on what your sound system is like before you start. With a simple ALSA set-up that is fully functional it should be fairly straightforward. The more complex (or broken) the sound system is when you start, the more difficult it is likely to be. The "big" Linux distributions (Ubuntu / KUbbuntu / Open Suse ... ) can be particularly tricky. Probably the easiest Jack set-up that I've done was starting from a bare-bones ALSA only Debian (stable) installation. There are also distributions that are specifically for multi-media work that have Jack installed by default. They should work with minimum effort as most of the configuration should be done for you.

So, where are you starting from, and how much time and effort are you prepared to put into setting up your dream system?

(By the way, set up correctly, "ALSA + PulseAudio + Jack" is a killer combination that blows the socks off what can be done on Windows or Mac OS X. There's a nice example of a Linux music set-up here: http://www.youtube.com/watch?v=t91xJUos ... 6VMtzDb_lr)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply