Re: [Audacity-devel] dBFS+ (wasRe: Check-ins today for meters and nyquist.)
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Steve t. F. <ste...@gm...> - 2014-11-03 03:48:58
|
On 3 November 2014 01:58, Martyn Shaw <mar...@gm...> wrote: > Hi! > > On 02/11/2014 03:53, Steve the Fiddle wrote: > > > > > > On 2 November 2014 02:09, Martyn Shaw <mar...@gm... > > <mailto:mar...@gm...>> wrote: > > > > Hi > > > > Here is an interesting (but with errors) explanation of a problem of > > intersample peaks, as discussed in BS.1770-2 > > http://www.indexcom.com/tech/0dBFS+/ > > where the recommendation is to normalise delivered audio to -3dBFS to > > avoid any possible clipping due to up-sampling in the DAC process on > > any device. (I don't know why it mentions dither, that is irrelevant > > here). > > > > A nice bit of theoretical work, considering sinusoids at different > > phases compared to the sample clock. But incomplete. > > > > > > My view (probably contentious and highly opinionated :-) > > Well, why not :-). > > > Personally I find those kind of articles quite irritating, but then I > > don't really care for any type of fanaticism. > > > > Yes it is easy to generate a tone that has +3 dB inter-sample peaks: > > Example using the Nyquist Prompt: > > (mult (db-to-linear 3.0) > > (hzosc (/ *sound-srate* 4) *sine-table* 45)) > > I knew there would be an easy way to do that in Nyquist, I really > should learn that! > > > Yes it's true that many DAC in consumer CD players do not handle over > > 0 dB. In fact, many do not even handle 0 dB peaks! > > So why don't consumers complain about that? > In the case of high quality classical music, the fashion for "as loud as possible" is far less prevalent. Because of the dynamic nature of the music, even if it is normalized to a maximum "sample value" of 0 dB, it is unlikely to be that high for more than a few samples per 20 minutes or more of music. If that happens to be on a loud cymbal crash, *no-one* is going to notice by listening. Where the situation is far more likely to occur is in modern popular music that has been massively compressed, limited and rammed up to the limits of integer audio. In many cases, the sound is so badly "damaged" by the excessive dynamic processing that listeners will (correctly?) assume that it is supposed to sound like that. > > > There is no technical reason why a DAC "cannot" handle over 0 dB. On > > the contrary, a DAC "could" handle *much" higher than 0 dB if designed > > appropriately. However, as CDs always have signed 16 bit data, there > > is no reason for DAC in CD players to be able to handle "much" over 0 > > dB, and frequently a little distortion close to 0 dB is tolerated. > > > > I don't recall ever seeing on the specification of a CD player, what > > the maximum output from the DAC is. That is not a specification that > > sells CD players. There is therefore little incentive for > > manufacturers to go to the expense of building in a lot of "over 0 dB > > headroom". > > And I guess that not many CD players are sold these days. People will > put up with compressed audio on tiny ear-buds. > > > In my opinion, the argument about "inter-sample peaks" is spurious. > > And in my opinion it isn't, for high quality. > > > As we are all aware, audio signals can be thought of in terms of sine > > wave components and phase (FFT analysis). The maximum possible size of > > the inter-sample peak for any sine tone is related to the frequency. > > Only with very high frequencies do we see large inter-sample peaks - > > for low and mid-range frequencies the inter-sample peaks are always > > extremely small. > > True, for many definitions of 'extremely' ;-). > > > The size of the inter-sample peak is, of course, also related to the > > peak amplitude of the waveform. A very low amplitude sine wave will > > have a very small inter-sample peak. > > True. > > > If we consider "real world" audio, very high frequencies are typically > > *much* lower amplitude than low and mid-range frequencies, and not > > surprisingly the inter-sample peaks are rarely more than a fraction of > > a dB. > > Agreed. > > For a well designed audio DAC, that "should" be well within the > > operating range, but in consumer grade equipment it may well not be. > > Whether or not high amplitude waveforms are deformed is down to the > > design of the DAC and subsequent analogue circuitry and the question > > of "inter-sample peaks" really has very little to do with it. > > So you agree that many DACs do not handle high level audio very well, > Yes, > and many/most use oversampling I believe (and so will get these > 'overs'). So why do intersample peaks have little to do with it? > There was a very interesting lab test published a couple of years ago - unfortunately I've not been able to locate it, but I'm sure that you would have found it very interesting. In the test they took a number of CD players, mostly high-end "audiophile" equipment, and tested their ability to reproduce 0 dB. Surprisingly, only about 1/3 of the devices tested were able to do so. The maximum output signal for the other 2/3 stopped a little short of 0 dB (mostly within about 0.1 or 0.2 dB if I recall correctly). Of the test machines I think there was only one (a Sony iirc) that could go an appreciable amount over 0 dB (and that one went to somewhere around +5 dB!). So let's take a hypothetical case of an "audiophile grade" CD player that has a maximum output of -0.2 dB. What happens when it is presented with a 0 dB ("true peak" digital signal)? There are three things that could happen. Either: a) It hard clips the output at -0.2 dB (would that be audible distortion?) b) It "overflows" and inverts the polarity of the peaks (very "nasty" distortion) c) It gracefully limits the peaks. (b) is certainly not "audiophile grade", but what about (c), and would (c) do handle a +0.4 dB "true peak" signal as gracefully? Virtually all commercial recording have some degree of dynamic compression, including high quality classical music. The dynamic range for an orchestra can be up to around 70 dB, Assuming a "whisper quiet" listening environment (around 30 dB SPL), to hear the quietest parts requires a volume level substantially greater than the ambient noise level, which would then put the loudest parts *well over* 100 dB. Generally we would not want 70 dB dynamic range when listening to music in a home environment, and generally we don't get it either. If a CD player "transparently" limits its output to -0,2 dB, I don't think that in itself means that it is a "bad" CD player. What I'm suggesting is that the effect of inter-sample peaks is largely insignificant in comparison to other factors, such as the deliberate application of dynamic compression and non-linearity of power amplifiers and speakers at high output levels. The task of "mastering" is about making the "product" sound as "good" as possible. If a recording has been mastered in such a way that it "sub-standard" on most audio equipment, then the job has not been done right. > > As an experiment, I took 4 "random" tracks (recordings that I had to > > hand), normalized to 0 dB, then upsampled to 384000 Hz. The *maximum* > > peak of all the tracks was +0.1 dB, which is way below the scary > > suggestion of +3 dB. > > I took 4 as well and saw a max of 0.6dB of 'over'. I'm not suggesting > that 3, 6 or 7dB of over is typical of 'normal' audio, just possible. > > I'm just saying that we should be aware of the possible problem, and > normalise to something below the capability of typical DACs. You seem > to be agreeing that, that is, measure it and see. > > From your experience of typical consumer grade kit, how much should > we avoid the FS by? > I normally go for -1 dB peak sample level when mixing down to 16 bit WAV. (Aside: interestingly, audio that is clipped / distorted seems likely to have higher inter-sample peaks than other types of musical material. The highest that I've found so far after further testing is +0.6 dB for "Slayer - Eyes of the Insane"). Steve > > TTFN > Martyn > > > I have no objection to people kicking back against the "loudness war" > > (http://en.wikipedia.org/wiki/Loudness_war), in fact I largely agree, > > but I don't agree with using pseudo technological argument to justify > > the case. > > > > Steve > > > > > > The examples of spectra produced from a 'portable music player, which > > also works as a phone' I managed to reproduce with my (different) > > smartphone, but only with the volume at max. > > > > In Audacity if you generate a few tens of seconds of white noise at > > amplitude 1, and then upsample by a factor of 4 you will probably > find > > that you get 'overs' by up to 6dB (use Amplify to see what it > > recommends). With a little bit of manual construction around a 'bad' > > point I have seem over 7.7dB of 'over'. > > > > Trying the same thing in Audition I only got 'overs' of about 3dB, > > which is a difference that took some tracking down. It turns out > that > > our 'white noise' generators are different, rather than our > > up-sampling routines (and I don't think that either of those > > generators or converters are very wrong). Swapping generated white > > noise files between the apps confirms this. > > > > 'White noise' means that each sample is random and independent of > > every other, but that says nothing about the amplitude distribution, > > it could be that every sample is either +-1, for example, and we > would > > still have spectrally 'white' noise. > > > > Audacity chooses to make white noise samples evenly distributed > > between +-1, Audition has an approximately Normal/Gaussian > > distribution. (I outputted a few thousand samples from Audacity > using > > 'Analyze->Sample Data Export...' to see this, and then a spreadsheet > > to look at them.) The choice in Audition means that it is quite > > unlikely that the 'worst case' will be seen. > > > > But all of this is on 'constructed' signals, not real-world ones. > > > > So, my conclusion on what to normalise a final mix to, to avoid any > > output DAC problems (assuming you are working at 32 bit float)? > > Normaliise to 0dB, resample to 4 or 8 times the sample rate, note > what > > 'Amplify' wants to reduce by, lessen that by about 0.2dB (BS1770, to > > take into account even higher oversampling rates in 'real' hardware) > > and then go with that from the 0dBFS state (at your original sampling > > rate, obviously). > > > > Have I got that right? > > > > Then there is the whole LUFS thing. > > > > TTFN > > Martyn > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > audacity-devel mailing list > > aud...@li... > > <mailto:aud...@li...> > > https://lists.sourceforge.net/lists/listinfo/audacity-devel > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > > > > _______________________________________________ > > audacity-devel mailing list > > aud...@li... > > https://lists.sourceforge.net/lists/listinfo/audacity-devel > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > audacity-devel mailing list > aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel > |