Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Resampling Hi-Res Audio (Read 14585 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Resampling Hi-Res Audio

Reply #25
That component (truepeak) seems to have a bug. I generated a test file with 4 inter-sample overs. Only the last one is detected (count=1, first position=last one).
If I attenuate that last peak a bit, then it detects the second to last peak (count still 1).
"I hear it when I see it."

Re: Resampling Hi-Res Audio

Reply #26
The count isn't the number of inter-sample overs. I wanted to count how many times the exact same highest peak value is present in the file.

Re: Resampling Hi-Res Audio

Reply #27
The count isn't the number of inter-sample overs. I wanted to count how many times the exact same highest peak value is present in the file.


I created some files for ABXing related to intersample clipping.

One file has intersample clipping but no ordinary digital clipping.

The other file has neither kind of clipping.

Their contents are the same (usual) natural sound,  sample-aligned, and level matched.

Yes, I've ABXed them and scored 16/16 but the dog ate my homework I crashed FB2K trying to save my ABX log.

Well sorry guys, the conference refused to upload the zip file despite the size was within limits. Again. :-(

Tough for me, tough for you!

Re: Resampling Hi-Res Audio

Reply #28
The count isn't the number of inter-sample overs. I wanted to count how many times the exact same highest peak value is present in the file.


Oh, okay. But I think it would make more sense to count all samples with an amplitude above 0 dBFS.
"I hear it when I see it."

Re: Resampling Hi-Res Audio

Reply #29
The count isn't the number of inter-sample overs. I wanted to count how many times the exact same highest peak value is present in the file.


Oh, okay. But I think it would make more sense to count all samples with an amplitude above 0 dBFS.


I found it very interesting to listen to all of the nastiness in those files I made with a few inter-sample overs, but zero (0.0) samples that were really close to FS, et alone at it.

There is now no doubt in my mind that inter-sample clipping is a potentially audible problem. It is just a matter of degree.

I think we get away with it for the same reason we get away with occasional, brief clipping - masking both temporal and spectral.

Re: Resampling Hi-Res Audio

Reply #30
Well, yeah, "potentially".

A lossy codec may even introduce properly clipped samples (not inter-sample overs) regularly if the source material is compressed enough, but it doesn't appear to be a big problem either.
Different converters will also react differently. Some have additional headroom..

Anyway, I couldn't tell since I'm using ReplayGain which usually attenuates my tracks. I'd still prefer the fb2k RG clipping protection to work on "true" peaks.
"I hear it when I see it."

Re: Resampling Hi-Res Audio

Reply #31
I think it would make more sense to count all samples with an amplitude above 0 dBFS.

Valid point. I altered the scanner to do exactly that. I also added a decibel display for track peak values and advanced preferences setting to optionally write the peak values into standard ReplayGain fields. [attachment=8329:foo_true...truepeak.fb2k-component]

Re: Resampling Hi-Res Audio

Reply #32
You're a god.
"I hear it when I see it."

Re: Resampling Hi-Res Audio

Reply #33
I took a track, upsampled it from 44.1 to 176.4 kHz with fb2k SoX resampler, and measured its peak value with a standard RG plugin:

Original track: peak value = 1.000  (+0 dbFS)
passband = 95% (default): peak = 1.125830  (+1.03 dbFS)
passband = 99%: peak = 1.123885  (+1.01 dbFS)
passband = 95%, min. phase: peak = 1.265038  (+2.04 dbFS)
passband = 99%, min. phase: peak = 1.267221  (+2.06 dbFS)

The exact value of intersample overs depends on the way that we reconstruct a waveform.

Re: Resampling Hi-Res Audio

Reply #34
The count isn't the number of inter-sample overs. I wanted to count how many times the exact same highest peak value is present in the file.


Oh, okay. But I think it would make more sense to count all samples with an amplitude above 0 dBFS.


As the files that the forum software won't let me upload, clearly show it is surely possible to have very many instances of clearly audible intersample clipping without any samples at all that are at or above 0 dB FS.

AFAIK zero of the many instances of intersample clipping that I have seen in the real world, none of which involved resampling or lossy coding, involved samples >= 0 dB FS.

IOW, you can fix all of the resamplers and lossy coders so they don't cause this problem, and it will still be happening.

Re: Resampling Hi-Res Audio

Reply #35
I was talking about all samples >0 dBFS after oversampling/resampling, this includes inter-sample as well as ordinary clipping (as is possible in any floating point format, and is not uncommon in lossy codecs, e.g. mp3).
"I hear it when I see it."

Re: Resampling Hi-Res Audio

Reply #36
I was talking about all samples >0 dBFS after oversampling/resampling, this includes inter-sample as well as ordinary clipping (as is possible in any floating point format, and is not uncommon in lossy codecs, e.g. mp3).


Well, this points out a good use for upsampling. Upsample the apparently unclipped file, look for actual clipped samples, and there  are probably  the locations of your inter-sample clipping.

In general,  inter sample clipping seemingly can be corrected by changing at most two or three samples, and IME the changes don't seem to have to be particularly well thought out to be exceedingly hard to hear.

This can contrast with intersample clipping, which can be very audible and nasty.

Re: Resampling Hi-Res Audio

Reply #37
That's what the true-peak scanner does. It upsamples and interpolates, and now these extra samples will expose peaks (in the worst case >0 dBFS) that were not directly visible using fewer samples.

This is just temporary though to write this info into the file's tags. RG can then prevent clipping by applying the right gain. There is no need to modify anything manually.
"I hear it when I see it."

Re: Resampling Hi-Res Audio

Reply #38
That's what the true-peak scanner does. It upsamples and interpolates, and now these extra samples will expose peaks (in the worst case >0 dBFS) that were not directly visible using fewer samples.

This is just temporary though to write this info into the file's tags. RG can then prevent clipping by applying the right gain. There is no need to modify anything manually.


Right, the manual mods are for people who are in production, or want to get max loudness without clipping or traditional forms of limiting or dynamics compression.

The potential gains are on the order of 3 dB.

 

Re: Resampling Hi-Res Audio

Reply #39
Right, the manual mods are for people who are in production, or want to get max loudness without clipping or traditional forms of limiting or dynamics compression.

The potential gains are on the order of 3 dB.

Please correct my understanding/misunderstanding (as the case may be).  In other words, one can use this process as a highly accurate clipping free (other than inherent and irreversible clipping in the source material) "normalizer"?

For example, I have a primitive DAC/DAP that is not capable of using Replaygain, Advanced Limiting, etc..  As such, I may use foo truepeak along with the SoX resampler to scan my lame V5/V4 mp3 files, write those values to the Replaygain tags (having checked that option in Advanced Settings), and then apply track gain to those files with a pre-selected dB target value of my choosing (92 to 96dB) without adding any additional clipping to the files (given that I have also checked the prevent clipping option in Advanced Settings beforehand).

FWIW- I will be using this device and these files in relatively noisy environments, so "bonking" the dynamic range of certain albums is ok with me under these usage conditions.  My main concern is that additional clipping distortion isn't added to the files.

Thanks for the time.  Best Regards,

LedHed8



Topic locked: New discussion moved to foo_truepeak True Peak Scanner