How does Audacity work?

I’ve changed my mind a few times about which board this post should be on, so apologies in advance if I’ve got it wrong.

Yeah, I know the question is far too vague but at least it’s short and proves that my understanding of Audacity is also vague - very vague. I’m planning to digitise my vinyl collection using a Focusrite 2i2 USB Audio Interface (which I don’t yet possess). My understanding is that Generation 1 of this device supports conversion and sampling up to 96 kHz, up to 24 bits per sample. However the device does not have any external controls for setting sample rate or sample size. Although use of the 2i2 with Linux is not supported there is plenty of evidence to show that it does work and that no drivers are required - under Linux. Am I correct in assuming therefore that Audacity controls the conversion rate through the USB interface to this device? If so how does Audacity 'synchronise itself with the 2i2 to make sure that the value stored in some sort of input register on the computer doesn’t change from 0 to 1 or vice versa while Audacity is trying to read the contents of that register?

The 2i2 doesn’t have a phono preamp. How are you planning to get your turntable into it?

sampling up to 96 kHz, up to 24 bits per sample.

I would find a document that says that in clear English before you wrote a check. I couldn’t do it.

It is recommended that you Export WAV (Microsoft) as the replacement for vinyl archive storage. Doing it at 96k/24 is going to take extraordinary storage. Also processing music for clicks and pops is going to be stressful at those rates.

Scroll down toward Tutorials. Many of the postings toward the right are about transferring vinyl.

http://manual.audacityteam.org/

Koz

Topic moved to Gnu/Linux board.
If in doubt which board to post to, chose the board for your operating system.

No, Audacity does not have any direct control of any audio device.
Audacity request an audio data stream from the computer sound system via API calls to the selected “host” (usually ALSA or Jack Audio System).

On most modern Linux desktop systems, the default sound system is PulseAudio, which works on top of ALSA.
ALSA handles the lower level (hardware) end, and PulseAudio handles the higher (application) end.

If the sound system is not able to provide the requested format, it will either send an error to Audacity, which Audacity will then show to the user as an “unable to open sound device” error message, or it will open a stream in another format. As long as the sound system is able to open a stream for Audacity and correctly report the data format, Audacity will be able to play / record the stream (“play” if an output stream has been requested, or “record” if an input stream was requested), and Audacity will convert the data format on the fly if necessary.

If you wish to bypass PulseAudio, select an appropriate “hw” option in the device toolbar. The “hw” devices represent the ALSA device drivers.

To see what sample rates are supported by a connected device, look in “Help > Audio device info”.

You should normally leave Audacity’s “Quality” preferences as 32-bit float. Audacity works internally in 32-bit float format, which provides best processing quality and efficiency.

Current plan is to use my existing Cambridge Audio Aur 640P phono pre-amp to drive the Focusrite 2i2. The gain on this pre-amp is a little low (about 55 dB I guess) for the very low output MC cartridge I’m using (Dynavector DV20X2; 0.3mV) so I may have to find a more suitable pre-amp.

The Focusrite web-site claims both the 96 kHz sample rate (actually 192 kHz on the second generation 2i2) and the 24 bit sample size - admittedly the specification does not explicitly state that the two can be obtained at the same time (96 kHz @ 24 bit) but the wording is such that Focusrite would be liable for action by the UK Trading Standards authority were this to not be the case. And the company has been around long enough and shipped enough of these devices to have been tested on this in the past. Do you have specific knowledge/experience that would suggest that 24/96 cannot be achieved?

Yes I plan to capture in WAV format and yes I agree there is a lot of work to do in clean up with this amount of raw data. I plan therefore to process this data in something like Soundsoap to automatically apply a degree of clean up, rather than do a manual repair. Is my planned approach going to be effective? If the results I achieve are reasonably good - to my ears - then I will probably archive the digital form of the music in a lossless compressed format, other than WAV.

I do recognise that WAV is the most likely format to be supported over the very long term (analogous to the DNG format in the photo image industry) and I also recognise that storage costs are still dropping: 10 terabyte spinning rust products will soon be justifiable for amateur use in some sort of RAID configuration. In my children’s lifetime the storage medium will be solid state and two orders of magnitude larger. Currently I have about 350 vinyl records which on average have about 1 hour of recorded sound on each - or about 2 GB for a stereo recording @24/96. So my total storage requirement is less than 1 TB. I currently have more than 10TB in redundant storage for my digital image assets, so there’s plenty of room for all the music.

Dear Gladly,

yes this should work - when I converted my vinyl I started out with manual click & pop repair (very tedious and very time consuming). The I got a steer from Koz and landed on an automated package he recommended - Brian Davies’ ClickRepair - see this sticky thread: Click/pop removal - ClickRepair software
This produced excellent results for me, rescuing many previosly unplayable vinyls.

But do yoursef a favour and do keep at least the 16-bit WAVs (you do a lot of work getting there) - buy yourself a couple of 1TB or 2TB USB disks, they’re quite cheap these days. I have duplicate copies of all my WAV files and duplicate backups of theirt MP3 or AAC compressed equivalents that I use on my iPods. I use the WAVs on my mains powered X30 jukebox device, which I later acquired, plumbed into my hi-fi rig (so I was glad of archiving them as WAV then).

WC

Thanks for the reminder about Brian Davies’ offerings - I was in contact with him a few months ago but didn’t get round to buying his product while I was still pondering what I really wanted to do. (Of course, given our recent ‘shot in foot’ (actually more ‘blown foot off’) - AKA Brexit - Brian’s product now costs considerably more, so I should have made a decision earlier!)

Quite concur with your advice to retain the WAV files and have just discovered an orphan USB 3 1 TB drive hidden at the back of a drawer, which will come in very handy, once it’s got a twin (I will not commit important data to a single spindle only storage strategy).

Do you have specific knowledge/experience that would suggest that 24/96 cannot be achieved?

I do not. But I had as much luck as you did working around the stunning, entertaining, and perfectly produced graphics to get it to tell me actual information. “Yes, dear, it’s gorgeous. Now what’s the maximum sample rate?”

I will probably archive the digital form of the music in a lossless compressed format, other than WAV.

Such as?

Cambridge Audio Aur 640P phono pre-amp to drive the Focusrite 2i2. The gain on this pre-amp is a little low (about 55 dB I guess) for the very low output MC cartridge I’m using (Dynavector DV20X2; 0.3mV) so I may have to find a more suitable pre-amp.

As long as the cartridge and preamp match correctly, slightly low transfer volume is not deadly.

Line and Instrument switching in the front of the 2i2 may do it for you. The instrument setting is basically a high sensitivity line input. As an experiment, I connected one of the editors’ electric guitar to a scope rather than an amp. If I stroked very hard on a major chord, I could achieve sound levels just into normal Stereo Line range. He was using it during idle time connected to one of the regular stereo connections of his edit room sound system. It won’t blow-dry the hair of the first three rows of audience, but it was perfectly audible for noodling.

So that’s worth a shot — or maybe Google.

Cartridge to preamp electrical match is critical. That one you have to get right. I don’t remember the spec change between moving magnet and moving coil other than a volume change.

Most of the options and variations you’re discussing aren’t audible under normal conditions. Nobody can hear the difference between 44100/16 and 96k/24 until you have to do corrections, filtering, effects and processing. 44100/16 was intended as a delivery format.

Audacity uses 32-floating internally (not 16 or 24) in order that effects and processing don’t permanently damage the sound from overload. If you make a correction that accidentally causes a bit of overload, just bring the volume back down and no harm done. This only works as long as you’re in Audacity. Don’t try that before import or after export.

Koz

The teacher of Christian Studies was looking at a cartoon of a furry creature drawn by a little girl. “That is,” she explained, “Gladly, the Cross-Eyed Bear.”

Koz

With current technology, DACs (digital to analog converters) are capable of up to around 22-bit precision. For a “24-bit” DAC, the “format” is 24-bit, but the last couple of bits are random (noise). All electrical components have a certain amount of “self noise” (noise produced by the component itself). Even a resistor has self noise due to the thermal agitation of electrons within the material, and this is enough to cause the last couple of bits (the “least significant bits”) to be random.

The Focusrite 2i2 specification claims:
Frequency Response: 20Hz - 20kHz +/- 0.1 dB
THD+N: -100dB (minimum gain, -1dBFS input with 20Hz-20kHz filter)

The final bit (least significant binary digit) in 16-bit audio represents a change in voltage of around 0.0000152588 V (15 uV), which equates to about -96 dB.
The final bit in 17-bit audio represents a change in voltage of around 0.000008 V (8 uV), which equates to about -102 dB.
So the actual “Analogue Input Performance” is up to 17-bit precision for frequencies in the range 20 to 20000 Hz.

The sample rate (number of samples per second) governs the maximum frequency that can be represented.
According to the Nyquist–Shannon sampling theorem, the upper limit is equal to half the sample rate (called the “Nyquist frequency”). Note that a “theorem” differs from a “theory” in that theorems have been proved to be true. So this means that analog frequencies up to 22050 Hz can be exactly represented with a sample rate of 44100 Hz. However, to convert from analog to digital, it is essential that frequencies above the Nyquist frequencies are removed as these cannot be correctly represented.

Modern “sync filters” are capable of near perfect cut-off at their specified filter frequency, which means that the practical frequency limit for 44100 Hz sample rate is a little over 20000 Hz.

In short, the Focusrite 2i2 is capable of handling audio in the format of 24 bit, 96 kHz, with (according to the published specifications) actual “analogue input performance” equivalent to 17-bit, 44100 Hz.

Some references: