A Couple of Recording Questions

Windows 10 (64 bit)
Rega PLANAR 1 Plus
Creative Sound Blaster Z Sound Card
Audacity 3.0.2

I have the above equipment that I plan to use to digitize some records and I have some questions relating to recording levels and actually listening to the audio I’m recording.

-I made a topic earlier last year on Hydrogen Audio asking how the entire process of recording vinyl records works. The topic in question is here…

https://hydrogenaud.io/index.php?topic=119527.0

One particular suggestion I was given was to record at 24 bit / 96.0 Khz, as this would allow me to record at a much lower volume whilst still being able to use Audacity’s Amplify tool to bring the volume of the highest peaks to 0 db without distortion. More specifically, quoting from the topic…

But if your usb output from the preamp is limited to 16 bits I would personally also see that as a deal breaker, and look to capture in 24 bit.

This is linked to the issue of levels, and I’ll try to explain again. While the goal is get the final version of the file as close to 0 dB as possible to maximize loudness, there are different requirements for the initial capture which basically involve getting the best definition without suffering digital clipping.

There is some legitimate disagreement about this, but for argument sake let’s say @ 16 bits you need to peak at -6 dB to fully capture the resolution (dynamic range) of your vinyl, with the wind behind on a sunny day, etc.

But as mentioned @ 24 bit resolution you can peak at significantly lower levels and still capture all the detail needed to digitally amplify the signal without any loss of quality when post processing “inside the box” say in Audacity.

This distinction is important for real world applications, because if you are aiming to peak at -6 dB @ 16bit resolution you have a relatively small margin of error to avoid clipping at signal levels that exceed 0 dB.

For example you may not have leveled your input perfectly and find that you’re actually peaking closer to -4 to -3 dB when playing main sections of tracks rather than just short sections at the beginning when spot checking levels before capture (otherwise you would have to play the record twice to precisely measure your peak to calibrate off). That could then lead to clipping if there is suddenly a much louder section or say if there is a pop or a scratch, and you would then have compromised audio that should be re-ripped at lower levels.

With input levels set much lower @ 24 bits you have a bullet proof margin of error, and these types of risks are eliminated and you will get reliable results and crucially almost certainly save a lot of time ultimately from avoiding mistakes.

I was wondering if anyone here could vouch for whether or not this is true. Additionally, what level should I be peaking at if I’m capturing at 24 bit and is it better to record at 24 bit in Audacity rather than 32 bit since my sound card is not capable of native 32 bit recording?

Additionally, I want to be able to hear what I am recording whilst recording. I know of the “Software Passthrough” or whatever it is called. However, I seem to recall hearing of a “hardware accelerated” mode in Audacity that doesn’t have Software Passthrough’s lag and are wondering how that works and how I determine if my sound card supports it.

Finally, I was reading the manual and saw this…

Audacity cannot record at greater 16-bit with MME or WASAPI as the host - you need to use Windows Direct Sound if your sound device supports a bit depth of more than 16-bits.

Does this mean if I want my recordings to be native 24 bit, I need to use DirectSound? Reading the manual further, it seems DirectSound is flat out superior to MME and that there is no point in sticking with MME. Am I correct in this assumption?

It is best to record at 32-bit float, regardless of the sound card’s capabilities. If the sound card delivers 16-bit samples, then Audacity will pad the data to 32-bit. If the sound card delivers 24-bit samples, then Audacity will pad the data to 32-bit. Either way you get a perfect copy of the data sent from the sound card as 32-bit float samples.

32-bit float has significant benefits when you start working with the audio. Processing is much more accurate and a bit quicker, and because it is a “floating point” format it has a huge amount of headroom which avoids the possibility of accidental clipping during editing / processing / mixing stages.

To monitor the sound from the computer while recording will always have a lag (latency delay). The delay can be minimised using ASIO instead of the standard Windows sound system, but Audacity can’t currently be shipped with ASIO support due to licensing issues.

To monitor with no delay at all requires that the audio device has “zero latency monitoring” (also known as “direct monitoring”). Most USB audio devices have this, and you use it by plugging your headphones into the USB audio device. The monitoring level may be adjustable on the USB audio device.
Software Playthrough should be disabled in Audacity when using direct monitoring.

I transcribed my LP (and tape) collection with Audacity default settings 32-bit float - and down-sampled on (default) export as 16-bit PCM WAV.

The hardware I used was:

  1. Technics SL-150
  2. SME 3009 (improved) arm
  3. Art-cessories Dj-Pre11 pre-amp
  4. Edirol UA-1EX USB sound card (run at 16-bit)

I listen to the results on QUAD ELS-57 speakers (ancient but still excellent) - and the results are amazingly good - certainly Hi-fi CD-quality good.

Apart from Audacity the only other tool I used was an app called ClickRepair which produces almost magical results removing clicks and scratches. Sadly the app appears to be no longer available, the Australian mathematician, Brian Davies, who developed it is either very sick or has died and his website where it used to be sold is no longer active. There do appear to be some Internet sites where you can still get a copy if you do some searching.

Peter.

I’m not sure what the situation is now. I notice that was written in 2019, and PortAudio (which handles the connection between Audacity and the computer sound system) has been updated since then. It would require someone on Windows testing to see if 24-bit recording testing to see if they can get 24-bit values with WASAPI.

In Windows 10 (since Vista), “DirectSound” is emulated by WASAPI. DirectSound was originally developed for Windows 95, but Windows Vista brought a completely re-written audio stack based on the Universal Audio Architecture. (More detail on Wikipedia: https://en.wikipedia.org/wiki/DirectSound#OS_Support)

MME is still the best supported host and virtually all sound cards will function correctly with MME.
WASAPI is the modern Windows audio host. Modern audio devices “should” support WASAPI, but no guarantee that the sound card drivers actually will support WASAPI.

If you are using a 16-bit sound card, it is unlikely to matter which host you choose in most cases.
If you need to use “loopback” (for recording sounds that are playing on the computer), then you will probably need to use WASAPI.

With a 24-bit sound card, I’d expect that the best chance to get the full 24-bit resolution would be to use WASAPI, but I’m not able to test that as I’m not on Windows and my sound card is 16-bit.

I would test tsi but …

My Edirol UA-1EX used to be able to run at 24-bit, bit that required special Roland/Edirol divers. The device is now EOL obsolete abd no longer manufactured so Roland no longer provide updated drivers that work on later versions of Windows.

So now I am stuck with Microsoft USB class drivers that come with W10 - and thus stuck with running the Edirol at 16-bit

Peter

For anyone that does want to test, Robert J. H. wrote a Nyquist script (that can be run in the Nyquist Prompt effect), that checks the actual bit-depth of the selected audio.

The latest version of the Nyquist snippet:
https://forum.audacityteam.org/t/how-to-determine-a-tracks-bit-depth/26279/8

;version 4
;type analyze

;;; mix to mono if stereo
(defun mono (sig)
  (if (arrayp sig)
      (sim (aref sig 0) (aref sig 1))
      sig))

;;; test against powers of 2
(defun bit-test (sig bits)
  (snd-maxsamp 
    (integrate 
      (diff sig
        (quantize sig (truncate (power 2 bits)))))))

;;; find the bit depth
(defun bit-depth (sig)
  (let ((sig (mono sig))
        (test-values '(10 11 20 23 29 31)))
    (dolist (bits test-values)
            (if (= (bit-test sig bits) 0)
                (return bits)))))

;; run the test
(case (bit-depth *track*)
  (10 "8 bit unsigned")
  (11 "12-bit")
  (20 "16-bit integer")
  (23 "24 bit integer")
  (29 "30 bit compressed (mp3 etc.)")
  (31 "32-bit integer")
  (t "32 bit float"))

An alternative script that provides statistics about the selected audio samples:

;type analyze
;debugflags trace

;control size "Number of samples to test" int "" 1000 1 1000000

(setf size (round (min size len)))

(defun bitcheck (s bits)
  ;;; Return T if "s" format is "bit" bits.
  (when (> (abs s) 1)
    (return-from bitcheck nil)) ;can only be float.
  ;; Round to ensure exact (integer) quantization steps.
  (setf s (* s (round (power 2 bits))))
  (if (= (- s (round s)) 0) t nil))

(defmacro norm (val)
  ;;; Normalize val to range 0 to 1.
  `(setf ,val (/ ,val (float size))))

(defun bitformat (8b 16b 24b)
  ;;; Returns the bit format as a string, based
  ;;; on the number of 8, 16 and 24-bit samples.
  (let ((8bit 8b)
        (16bit (+ 8b 16b))
        (24bit (+ 8b 16b 24b)))
    (norm 8bit)
    (norm 16bit)
    (norm 24bit)
    (cond ((= 8bit 1) "8-bit")
          ((= 16bit 1) "16-bit")
          ((= 24bit 1) "24-bit")
          (t "32-bit float"))))


(let ((8bit 0)
      (16bit 0)
      (24bit 0))
  (dotimes (i size)
    (setf samp (snd-fetch *track*))
    (if (bitcheck samp 8)
        (incf 8bit)
        (if (bitcheck samp 16)
            (incf 16bit)
            (if (bitcheck samp 24)
                (incf 24bit)))))
    (format nil "Results from ~a samples tested:~%~
                 Number of 8-bit samples: ~a~%~
                 Number of 16-bit samples: ~a~%~
                 Number of 24-bit samples: ~a~%~
                 Number of 32-bit float samples: ~a~%~%~
                 The selected audio is ~a format."
            size
            8bit
            16bit
            24bit
            (- size 8bit 16bit 24bit)
            (bitformat 8bit 16bit 24bit)))

32-bit float has significant benefits when you start working with the audio. Processing is much more accurate and a bit quicker, and because it is a “floating point” format it has a huge amount of headroom which avoids the possibility of accidental clipping during editing / processing / mixing stages.

Alright, so I’ll record and save my raw capture at 32 bit/96 Khz. I should be saving it as a “Signed 32 Bit PCM” WAV, rather than “32-Bit Float” WAV, correct?

Apart from Audacity the only other tool I used was an app called ClickRepair which produces almost magical results removing clicks and scratches. Sadly the app appears to be no longer available, the Australian mathematician, Brian Davies, who developed it is either very sick or has died and his website where it used to be sold is no longer active. There do appear to be some Internet sites where you can still get a copy if you do some searching.

Yup, know exactly what you are talking about and was going to purchase it myself. I’m sure I’ll find a copy somewhere on the web. The only other tool I wanted to use was Audacity’s Noise Removal. I tried reading the manual, and was wondering if there was some more nuanced advice on how to properly apply the filter.

For anyone that does want to test, Robert J. H. wrote a Nyquist script (that can be run in the Nyquist Prompt effect), that checks the actual bit-depth of the selected audio.

I was going to use a record for a test run recording so I can check myself if no one else gets around to it.

When you save the project (the AUP3 file), you don’t need to do anything about the format. Audacity retains the full audio fidelity of the project.

When you Export your finished work as an audio file, that’s the time to decide what format you want it in.
For an audio CD, export as 44100 Hz, 16-bit Stereo. That is the format for all standard audio CDs.

If you want a copy for an MP3 player, the sample rate should ideally be 44100. The bit format is irrelevant because MP3 does not use “bits per sample”. The important setting for sound quality is the “bit rate”. 128 kbps is generally considered the minimum for reasonable quality stereo music. 256 kbps gives excellent quality, but the file size is twice as big as 128 kbps.

For use in a DVD or professional quality video, use 48000 Hz sample rate, 16-bit.

For an archive copy, you may want to go up to 24-bit.

32-bit (int or float) is rarely used as the final format. There is no benefit in terms of sound quality, but disadvantages of poor compatibility, and very large file size.

When exporting, the sample rate is set by the “Project Rate” (lower left corner of the main Audacity window). Personally I always set that to 44100 so that all of my work is CD compatible (I rarely work with video).

When you save the project (the AUP3 file), you don’t need to do anything about the format. Audacity retains the full audio fidelity of the project.

Understood. However, for future reference, if I wanted to export to the same format I recorded in, would I use the “signed” or “float” 32 bit format to have a perfect copy of the raw recording?

Also, I forgot to mention this in my previous post, but what should be my target volume level for the highest peaks if recording at 24 bit / 96 Khz upscaled to 32 bit with Audacity, as I plan to use the Amplify filter to go to 0.3-0 db for the loudest peaks after using click repair to removes clicks from the recording?

For click & pop reduction/removal, Audacity also has a Click Removal (automatic) and Repair (manual). There is a (now FREE) competitor to ClickRepair called [u]Wave Corrector[/u] which also works automatically and another $30 USD program called [u]Wave Repair[/u], which is manual.

I used Wave Repair quite a bit in the past and it works “perfectly” on most vinyl defects and it offers a few different repair methods, depending on what works best. The fact that it’s manual means it only “touches” the audio where you identify a defect but it usually takes me most of a weekend to fix-up a digitized LP. Also it doesn’t work on “high resolution” files, only at 16-bits at 44.1 or 48KHz.

if I wanted to export to the same format I recorded in, would I use the “signed” or “float” 32 bit format to have a perfect copy of the raw recording?

That would be float, but the ADC (analog-to-digital converter) in your soundcard is 24-bit integer. And because of the surface noise, vinyl has less resolution than 16-digital.

The main advantage of floating-point is that it can temporarily go over 0dB during “processing”. For all practical purposes there is virtually no upper (or lower limit). If you play a file that goes over 0dB at "full digital volume you’ll clip your DAC (digital-to-analog converter).

Also, I forgot to mention this in my previous post, but what should be my target volume level for the highest peaks.

No matter the bit depth, 0dB is the maximum for your ADC. The most important thing is to leave enough headroom while recording so you NEVER clip (although if you clip when digitizing an LP it’s easy enough to start-over) Shooting for peaks of around -6dB is fairly common but nothing bad happens if you get close to 0dB. Lower levels are generally OK. Pros recording “live” where the levels are less predictable leave a lot more headroom. If you remember analog tape, you needed a hot signal to overcome tape noise but with digital, no tape noise! Also tape tends to soft-clip so it’s more forgiving if you go over 0dB. Full-disclosure - You do loose resolution when you record lower but it’s not a big deal unless the levels are really-really low AND if you’re recording at 16-bits.

if recording at 24 bit / 96 Khz upscaled to 32 bit with Audacity, as I plan to use the Amplify filter to go to 0.3-0 db for the loudest peaks after using click repair to removes clicks from the recording?

There’s nothing wrong with normalizing to 0dB. Some people worry about “inter-sample overs” where the re-constructed analog goes over 0dB, but I’ve never heard of this being audible and there’s technically no reason the analog can’t go over 0dB.

If you’re making an MP3, the lossy MP3 encoding often boosts some peaks so the MP3 often goes over 0dB when the uncompressed original doesn’t. Again, your DAC will clip if you play it at “full digital volume” but I’ve never heard of that being audible either… If you hear a compression artifact it’s probably something else. But for that reason, some people normalize to about -1dB if they are making MP3s, but I don’t worry about it…

BTW - The process of cutting & playing vinyl does a similar thing… Slightly changing the peak levels (without affecting the sound of the dynamics). That’s one reason that digitized (and normalized) LPs sometimes sound quieter than CDs. Older records are also quieter because the “loudness war” wasn’t as advanced in the vinyl days.

P.S,
24-bit (or 16-bit) FLAC makes a good “archive format”. It’s lossless and the files are about half the size of the original WAV. Plus, FLAC supports metadata (embedded artist, title, album info, etc.) better than WAV. (FLAC doesn’t support floating-point or 32-bits.)

Annnnnnd in an attempt to save money, I ordered a Rega turntable from the UK even though I live in the US, completely forgetting that power supply differences are a thing. So, if someone else wants to test if WASAPI supports 24 bit recording, I would really appreciate it (Also originally assumed it was a plugin instead of a snippet of code, which I have no idea what to do with).

WASAPI does support 24-bits but the question is if Audacity supports 24-bits with WASAPI. :wink:

I don’t have a 24-bit soundcard/interface but you do so there is an experiment YOU can do…

Export as 16-bit FLAC and as 24-bit FLAC. FLAC is “smart” and if the original data is 16-bits both files will be about the same size.
If there is non-zero data in all 24-bits the 24-bit FLAC will be about 50% bigger.

For this experiment, turn OFF [u]dither[/u] and don’t do anything to the audio… Don’t run the Amplify effect or anything because that will change the data and “fill-in” the zero-values.

There is an application that checks the true bit depth but I can’t find it at the moment… (That application can also be easily “fooled” by dithering or making any small change to the audio.)

P.S.
I found the true bit-depth tool - [u]Bitter[/u]. It’s a plug-in and it’s a little “odd” but it works! Install the 32-bit VST version (to work as a plug-in "effect’ in 32-bit Audacity).