Clipping without maximum audio level?

Help for Audacity on GNU/Linux.
Forum rules
ImageThis forum is for Audacity on GNU/Linux.
Please state:
  • which version of Linux you are using,
  • the exact three-section version number of Audacity from Help menu > About Audacity,
  • whether you installed your distribution's release, PPA version, or compiled Audacity from source code.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade (see https://www.audacityteam.org/download/).
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
HendrikBoom3
Posts: 14
Joined: Thu Jun 06, 2013 4:50 pm
Operating System: Please select

Re: Clipping without maximum audio level?

Post by HendrikBoom3 » Thu Jun 13, 2013 7:41 pm

steve wrote:
HendrikBoom3 wrote:When I opened a stereo WAV file in Audacity, to the left of the intensity graphs it said "stereo, 44100Hz 32-bit float"
Does that mean that the samples in the file are recorded as 32-bit floating-point numbers?
By default Audacity converts WAV files to 32 bit float on import. It does not mean that the file was 32 bit before it was imported.
That's good design.
Yes 32 bit float can go beyond 0 dB.
And that's why. You don't get clipping in the intermediate stages of audio processing within Audacity.

Can I coax Audacity to tell me what format the actual file is recorded in? Or do I have to look through the bits with a file format spec in hand?

Can I get Audacity to save in floating-point?
The red "Clipping" lines indicate that the waveform reaches 0 dB or more. If the waveform "just touches" 0 dB it may show a red line which indicates that it is at the absolute maximum for "valid" audio signals.
Which indicates whether clipping might occur on export. Useful.

-- hendrik

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

Re: Clipping without maximum audio level?

Post by steve » Fri Jun 14, 2013 1:34 am

HendrikBoom3 wrote:And that's why. You don't get clipping in the intermediate stages of audio processing within Audacity.
Yes, though there are a couple of effects that don't take advantage of this. The Wha-wha effect and the Phaser effect both clip at 0 dB, but hopefully this will be fixed before the next Audacity release.
HendrikBoom3 wrote:Can I coax Audacity to tell me what format the actual file is recorded in?
No, Audacity does not do that, but there are several applications that can. On Linux you can probably get that information by right clicking on the file and selecting "properties", then open the "Audio" tab. (should work with Nautilus file browser). For more information about the file, try "MediaInfo" - it will probably be in the repositories for most Linux distributions (all Debian based distributions should have mediainfo and mediainfo-gui).
HendrikBoom3 wrote:Can I get Audacity to save in floating-point?
We've been discussing this recently on the forum - Audacity "Saves" Audacity projects (a .AUP file and a _data folder). By default Audacity projects use 32 bit float. A "Saved" Audacity project contains all of the information to exactly reproduce the Audacity project -but there are some "gotcha's".
1) The "Undo History" is not saved.
2) If the project contains imported files, there may be "dependencies": See here for a full explanation: http://manual.audacityteam.org/o/man/au ... jects.html

I presume that you are asking about "rendering a project to create a standard audio file"? We call this "Exporting" (File menu > Export).
Not all audio formats support 32 bit float, but .WAV format certainly does and is a good choice for exporting in 32 bit float. In the Export dialogue screen, select "Other uncompressed files" as the file type, then click on the "Options" button. You can then select "WAV (Microsoft)" as the header and "32 bit float" as the encoding.
More info here: http://manual.audacityteam.org/o/man/fi ... ialog.html
HendrikBoom3 wrote:Which indicates whether clipping might occur on export. Useful.
Yes, "Might" is an important word - the red lines don't mean that the audio "IS" clipped, but it is warning that it "might" be clipped - if they occur when you are recording then the audio probably is clipped. Commercial recordings are frequently compressed and normalised as loud as possible, so will often show clip indicators even though they are not actually clipped (just dangerously close to clipping). See here for why this is a common occurrence: https://en.wikipedia.org/wiki/Loudness_war
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

HendrikBoom3
Posts: 14
Joined: Thu Jun 06, 2013 4:50 pm
Operating System: Please select

Re: Clipping without maximum audio level SOLVED.

Post by HendrikBoom3 » Fri Jun 14, 2013 3:14 am

Thanks. I think that answers all my questions for now, and I'm successfully transcribing my ancient tapes.

-- hendrik

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Clipping without maximum audio level?

Post by Robert J. H. » Fri Jun 14, 2013 6:34 am

Some time ago I've written a snippet to determine the bit depth of a fresh imported file. I'll give you Steve's re-formatted version

Code: Select all

;;; 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)
  (peak 
    (integrate 
      (diff sig
        (quantize sig (truncate (power 2 bits))))) 200000))

;;; 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 s)
  (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"))
If you use it often, we can put a plug-in header before the code and it can then be used as an analyse plug-in (instead of copying it to the Nyquist prompt).

kozikowski
Forum Staff
Posts: 69374
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Clipping without maximum audio level?

Post by kozikowski » Fri Jun 14, 2013 7:06 am

The Mic-In / Line-In thing is not just that one is bigger than the other. Mic-In has a very special Microphone Preamplifier that boosts the microphone signal before the volume control can get to it. That little amplifier is what's actually overloading and why you can't stop it.

Why on earth would you want that? Because volume controls add noise and you want to make the microphone performance as loud as possible with the least amount of noise. Normally, this is pretty safe because microphone signals have all the robust, rock-crushing power of a butterfly. So boosting is OK. Not so if you're working with a much stronger signal from a mixer or other serious audio equipment. That's not butterflies any more and you are probably smashing the little microphone preamplifier black and blue.

It's also possible the amplifier is expecting a balanced audio connection typical of grown-up microphones.

http://kozco.com/tech/audacity/pix/XLR-Cable.jpg

Three wires, not two (some mixers use a 1/4" plug for this.) The show signal, the show protection signal and ground or shield. If you wire that wrong, the show protection signal is missing and that's what prevents the hum and buzz you have.

I think the Mic/Line label is a little optimistic. People have been trying to make one connection do both for years. Hasn't worked yet. It can work if there is provision for changing the electronics via a switch -- or in some cases via a software change.

Koz

kozikowski
Forum Staff
Posts: 69374
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Clipping without maximum audio level?

Post by kozikowski » Fri Jun 14, 2013 7:16 am

The instructions have nothing to say about the level you apply to the connection or type of connection expected which does surprise me. It's like the design of the audio input was left up to the Zoom weekend night guy. There are ways to precondition a high level signal to make it appear like a microphone, but those tend to be noisy and not very well behaved.

Koz

kozikowski
Forum Staff
Posts: 69374
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Clipping without maximum audio level?

Post by kozikowski » Fri Jun 14, 2013 7:18 am

This may be a grand place to push our traditional UCA-202.

One good quality stereo input (and output).

http://www.kozco.com/tech/audacity/pix/ ... Lenovo.jpg

Koz

Post Reply