You are here

Weird peaking

For everything after the recording stage: hardware/software and how you use it.

Weird peaking

Postby blinddrew » Sun Sep 09, 2018 1:00 pm

Working on something this morning and ran my usual loudness check on things, but I noticed something a bit weird about the peak meters:
Image
The True Peak readings are lower than the Peak readings - which seems odd?

P.S. ignore the fact the whole thing is running too hot, it's still a work in progress. :P
User avatar
blinddrew
Jedi Poster
Posts: 5358
Joined: Sun Jul 05, 2015 12:00 am
Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Weird peaking

Postby Hugh Robjohns » Sun Sep 09, 2018 1:18 pm

You're right. That's very odd. I can't think of any situation where a sample-peak meter would be higher than an oversampled (true-peak) meter. They could be the same in some specific cases, but usually the true-peak meter would be higher than the sample-peak.

So, there's either some odd maths involved in that plugin, or the meters aren't what we think they are.

There are some free true-peak meter testing files available on the EBU loudness website somewhere which would be worth tracking down and running through that meter.
User avatar
Hugh Robjohns
Moderator
Posts: 21963
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

Re: Weird peaking

Postby blinddrew » Sun Sep 09, 2018 1:57 pm

Aren't you supposed to be on holiday? ;)
Thanks Hugh, I'll have a trawl and see what I can find. I use this meter a lot and it's the first time I've ever seen it.
User avatar
blinddrew
Jedi Poster
Posts: 5358
Joined: Sun Jul 05, 2015 12:00 am
Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Weird peaking

Postby blinddrew » Sun Sep 09, 2018 3:06 pm

Interestingly, for a given definition of interesting, a bouncedown of the track shows the same properties on that meter.
I couldn't find a true-peak testing file on the EBU site but against a number of their other test files the Melda meter shows the expected result.
If anyone has a TP meter they know and trust and would like to play along at home, the file should be downloadable in 24bit wav from here: https://soundcloud.com/blinddrew/300lb- ... 09/s-8MxdG
Jump to around 50 seconds for the first bit of funniness.
User avatar
blinddrew
Jedi Poster
Posts: 5358
Joined: Sun Jul 05, 2015 12:00 am
Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Weird peaking

Postby Hugh Robjohns » Sun Sep 09, 2018 4:13 pm

User avatar
Hugh Robjohns
Moderator
Posts: 21963
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

Re: Weird peaking

Postby blinddrew » Sun Sep 09, 2018 5:00 pm

Ah, those were the files I was playing around with. I ran the pink noise and about half a dozen others and they all gave expected results. Just trying a different TP meter now.
User avatar
blinddrew
Jedi Poster
Posts: 5358
Joined: Sun Jul 05, 2015 12:00 am
Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Weird peaking

Postby blinddrew » Sun Sep 09, 2018 5:05 pm

Different meter on the stereo mixdown shows the same thing, peak higher than true peak.
Image
I shall just mark it up as peculiar and move on.
User avatar
blinddrew
Jedi Poster
Posts: 5358
Joined: Sun Jul 05, 2015 12:00 am
Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Weird peaking

Postby Hugh Robjohns » Sun Sep 09, 2018 8:34 pm

Probably wise... thinking more about it, i think there could be cases where the reconstructed waveform would be lower than the sample peaks, perhaps if an isolated transient lined up with a sampling point... but I'd need to give that more thought. Interesting discovery, though.
User avatar
Hugh Robjohns
Moderator
Posts: 21963
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

Re: Weird peaking

Postby blinddrew » Sun Sep 09, 2018 8:50 pm

I'll be playing around with that track some more over the next couple of weeks (or months) so i'll see if it happens again.
User avatar
blinddrew
Jedi Poster
Posts: 5358
Joined: Sun Jul 05, 2015 12:00 am
Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Weird peaking

Postby Hugh Robjohns » Mon Sep 10, 2018 10:57 am

I had a minor brainwave. There is an error margin with the true peak algorithm which decreases with oversampling rate. It's 0.688dB at 4x oversampling (which is why the R128 spec calls for a max true-peak value of -1dBTP).

So I suspect that's the issue here. Your specific waveform has resulted in the true peak algorithm coming in slightly low.

I would expect that if you can increase the meter's oversampled rate to 8x, or upsample your track to 192 or 384 and run the TP meter again, the figures would make more sense.
User avatar
Hugh Robjohns
Moderator
Posts: 21963
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

Re: Weird peaking

Postby blinddrew » Mon Sep 10, 2018 11:13 am

Cheers Hugh, might have a play later this week if I get breathing space. :)
User avatar
blinddrew
Jedi Poster
Posts: 5358
Joined: Sun Jul 05, 2015 12:00 am
Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Weird peaking

Postby CS70 » Mon Sep 10, 2018 11:14 am

Interesting. Which sampling rate do you use?

The regular peak-sample algorithm is something like

Code: Select all
if (|sample| >= currentValue) currentValue=|sample|;
else currentValue=currentValue*0.999


(where "currentValue "is a integer representation of sufficient size and "0.999" is arbitrary, as any value very near to 1 will do to provide a smooth decay).

So if the digital peak meter shows a value over the conventional ceiling, it means that there is indeed at least one value in the stream which is over that ceiling .

It's odd that regular TP meter algorithm ( which does a two bit shift to create headroom, 4x oversampling of the 48Khz signal and then peak-samples as above) produces a lower peak sample value. Upsamling does not add information, but doesnt remove it either so the original over-ceiling sample should still be there.
User avatar
CS70
Frequent Poster (Level2)
Posts: 2950
Joined: Mon Nov 26, 2012 1:00 am
Location: Oslo, Norway
Silver Spoon - Check out our latest video  and the FB page

Re: Weird peaking

Postby blinddrew » Mon Sep 10, 2018 1:37 pm

Right.

perhaps.
Actually the only bit of that I really understood was the opening question! :)
To which the answer is 44.1
User avatar
blinddrew
Jedi Poster
Posts: 5358
Joined: Sun Jul 05, 2015 12:00 am
Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Weird peaking

Postby Hugh Robjohns » Mon Sep 10, 2018 2:01 pm

:lol:
User avatar
Hugh Robjohns
Moderator
Posts: 21963
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

Re: Weird peaking

Postby Wonks » Mon Sep 10, 2018 2:22 pm

blinddrew wrote:Right.

perhaps.
Actually the only bit of that I really understood was the opening question! :)
To which the answer is 44.1

Maybe you should be working to 42.
User avatar
Wonks
Jedi Poster
Posts: 6469
Joined: Thu May 29, 2003 12:00 am
Location: Reading, UK
Now even grumpier than Ivan in his heyday.

Re: Weird peaking

Postby CS70 » Mon Sep 10, 2018 2:26 pm

blinddrew wrote:Right.

perhaps.
Actually the only bit of that I really understood was the opening question! :)
To which the answer is 44.1

Right. :)

I was just thinking that the BS-1770 algorithm general description says that 4x oversampling is chosen for 48KHz streams. The table in the paper shows that there can still be under-read with a true peak algorithm, and lower sampling rates such as 44.1 would require slightly more oversampling than the 4x to maintain the error published in the paper. For fun, you could try to oversample your track to say 96Khz , which means that the TruePeak would oversample _that_ 4 times, resulting in 8 times oversampling. This is supposed to reduce the max error about a quarter (to 0.169 dbTP in the paper), so you should see a difference.

Thing is, these errors are supposed to be under-values, i.e. case where the TP meter is still getting it wrong, lower than the original real function, for very much the same reasons the simpler sample-peak meter does. That's why, if the sampling frequency is set, more oversampling reduces the error.

But I'm still struggling with the idea that interpolating two points, one of which is over the "zero" ceiling, could possibly result in a max peak lower than the ceiling when over-sampled, even considering that the TP meter may used fixed-point representation. The sample is just that - there was originally a signal that was over the ceiling which happened to be sampled... how the heck is it disappearing?

The main thing I can think of is that it could actually be the result of a numerical error, you've tried two TP meters but it would be cool to see if an implementation which we are sure is floating-point gives the same result (no idea which plugin that would be tough). Even different TP implementations using fixed-point representation are very likely to use similar code to calculate, and they would likely use the same compiler and runtime library..
User avatar
CS70
Frequent Poster (Level2)
Posts: 2950
Joined: Mon Nov 26, 2012 1:00 am
Location: Oslo, Norway
Silver Spoon - Check out our latest video  and the FB page

Re: Weird peaking

Postby Argiletonne » Tue Sep 11, 2018 12:41 am

nice one. It's always good to show off and I think you've really done something on this one. Not sure what it is but it's something.
User avatar
Argiletonne
Poster
Posts: 24
Joined: Mon Aug 27, 2018 10:18 pm
Location: UT

Re: Weird peaking

Postby Jumpeyspyder » Tue Sep 11, 2018 1:30 am

Argiletonne wrote:nice one. It's always good to show off and I think you've really done something on this one. Not sure what it is but it's something.

Hi Argiletonne,

A big 'welcome to the forum' but for the avoidance of doubt, CS70 is a very knowledgeable and well regarded member of this forum. sometimes his comments go over my head, but that's inspiration to learn more - He is not showing off - he is sharing knowledge !
User avatar
Jumpeyspyder
Frequent Poster
Posts: 1002
Joined: Fri Jan 20, 2006 1:00 am
Location: Yorkshire

Re: Weird peaking

Postby CS70 » Tue Sep 11, 2018 7:40 am

Laughin'.. not much of a show off - it's nothing more complicated than working with a DAW. Say you have your "good" audio levels going from 0 to 100 - over 100 is overload. The actual signal is reconstructed of the samples by interpolating them (sort of connecting the dots).

A peak meter looks at each sample and may get it wrong (quite often) by registering two consecutive 99s and not detecting that the reconstructed signal will reach 103 in the middle - because it only looks at the samples, not at the reconstructed signal.

A true peak meter improves on it by re-building the sequence of samples so that more closely approximates the reconstructed signal, then sampling it again and doing exactly the same as the regular peak meter, i.e. just look at each sample. The re-building is made so that it can be proven that the new sequence of samples is more accurate than the initial one.

The consequence of this processing is that a true peak meter may still get it wrong, but with a lower error and probability. Say, at most it may miss a 101, and will miss it much more rarely. That's the error described in the paper (and that Hugh also mentioned).

But if there _is_ a sample which is over 100 (and Drew's peak meter shows that there is), I do not understand how the TP should fail to detect it. It's only a number, it is there and the "improving" process of the TP should not remove it. The TP meter does everything that a regular peak meter does, only more precisely, so if the regular meter reads a sample over 100, so should the TP meter.

Drew's finding shows that the "improved" sequence of samples built (and showed) by the TP meter nevertheless discards the sample that was over 100. He's tried with a couple of plugins and both show the same behavior.

So there must be a mistake somewhere else. The paper-and-pencil math is pretty sound, so there shouldn't be problems there. But it uses real numbers. When a computer makes real numbers calculations, say a division, it uses representation of numbers, not actual real numbers. Unless one is careful, may lead to quite big errors in the results compared with paper and pencil calculations.

I was just guessing that the error might be there.

Or maybe I have missed something obvious, and I'd love to know what. A reverse show off if you will ;-)
User avatar
CS70
Frequent Poster (Level2)
Posts: 2950
Joined: Mon Nov 26, 2012 1:00 am
Location: Oslo, Norway
Silver Spoon - Check out our latest video  and the FB page


Who is online

Users browsing this forum: No registered users