3

I'm trying to generate a 48 kHz, 16-bit 0 dBFS WAV file of a 997 Hz sine wave, where the level is set to the maximum value of 7FFF, but SoX warns me the output was clipped when it finishes. I don't think I hear any clipping, but Audacity's "show clipping" command shows clipping at the peak, and the frequency analysis also shows the level reaches 6.5 dB!

What am I doing wrong, and how can I get exactly the desired 7FFF value?

Here's my command line:

sox -c 2 -D -S -b 16 -r 48k -e signed-integer -n 997Hz_0dBFS.wav synth 30 sine 997 gain 0

2 Answers 2

1

Check out the hexdump of the file you created.

When you do, you will realise that there are 7FFF values in the file that correspond to your sample peaks.

But, I'm going to say that you also have clipping here.

Why? Because I can see two values of 7FFF directly next to each other. This indicates that there are two identical peak sample values adjacent to each other meaning that the intervening analogue waveform will be above 0dBFS.

Check out True Peak Metering and you will see what I mean.

This will explain why audacity feels that there is clipping and that the peak value is +6.5dBFS.

You might need to tune the gain value iteratively so that you can determine exactly when the true peak hits 7FFF. You should remember that the true peak value will always exceed the sample peak value.

enter image description here

2
  • On the other hand, I've concluded that many "professional" (commercial) recordings have bit clippings, when run through a true peak meter. Combine this with many DAWs actually allowing for some bit clipping. The clipping intensity will be related to type of sound material. High transient material might break through a lot of "built-in" safeguards. Some other material might be OK. In research of why do folks remaster their own recordings, I've come to realize that digital clipping is not so black and white. Commented Aug 1, 2023 at 23:51
  • What evidence do you have for this? "many daws allowing for some bit clipping". Most DAWs have internal bus running at 64 bits!! Also True Peak Meters don't measure clipping they measure true peaks using upsampling and interpolation. I'm starting to think that there's possible a deficit in understanding of how this all works.
    – Mark
    Commented Nov 10, 2023 at 15:36
0

Maybe it's related to the double standards of 0 dbfs

Predictable waveforms (eg. sine wave) are used to create a reference of "full-scale", where some interpret the RMS mathematically, where "full-scale" sine wave equals -3 dB, and some argue that "full-scale" sine wave should measure 0 dBFS, and calibrate the measurement by +3dB.

Checkout the Wikipedia references 8,9,10,11,12 in the article http://en.wikipedia.org/wiki/DBFS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.