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: Testing the effect of scaling (Read 4435 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Testing the effect of scaling

Today i felt like doing some random testing. I present to you my ABX test of scaling effects in MPC, during encoding and also after encoding.

I used a 20 second sample from the song "Mariah Carey - Dreamlover" (contemporary pop music) from the album "Music Box".

Equipment: PCABX 1.7.5 (http://www.pcabx.com/), soundcard: Hercules GameTheater XP, headphones: AKG K290.


On my first test, i encoded it with the command line "--insane --nmt 16 --tmn 32 --scale 0.xx". I made a non-scaled MPC, an MPC scaled to 0.90, one to 0.95 and one to 0.97. Then i decoded them and compared each of the scaled samples to the non-scaled one.


--scale 0.90: 12/12. Surprisingly easy. Clear difference in volume.

--scale 0.95: 14/16. Hard, but not impossible, if i concentrate. My first run was 10/12, but i did another run with 16 trials to go sure.

--scale 0.97: 7/12: Not reliable.



Next up, to simulate a ReplayGain-like situation, i encoded the sample with "--insane --nmt 16 --tmn 32", (no --scale applied). Then i decoded and scaled in Cool Edit (Amplitude - Amplify): As before, one to 90%, one to 95% and one to 97%. This stands for the ReplayGain-effect: Scaling after encoding.


90%: 16/16. Quite audible decrease in loudness.

95%: 13/16. I had to try harder, but still, it's audibly quieter.

97%: 11/16. I could've sworn there was an audible difference... ABX prove me wrong to some degree, i guess.

Turning the volume up didn't help either: I found a medium, "casual listening" volume to work best.


All in all, the results surprised me, as i always thought that scaling to 95% was quite uncritical. I know, coming to a conclusion about the pros and cons of scaling - or the purpose of this test - would probably require me to ABX the results of clipping first. Also, one has to consider that --scale can't be losslessly reverted, while the ReplayGain adjustment can.

Testing the effect of scaling

Reply #1
Especially your 95% results are interesting, because many people including David Robinson (2Bdecided) have said that you can never hear this kind of reduction of loudness (0.45dB).

Here's 2Bdecided's message:
http://www.hydrogenaudio.org/forums/showth...d=2339#post2339

Interesting.
Juha Laaksonheimo

Testing the effect of scaling

Reply #2
I agree,  quite interesting.  BTW, I hate to ask, but you did make sure that the full-scale setting was not clipping, right?  I wasn't quite clear from your writeup.

ff123

Testing the effect of scaling

Reply #3
Quote
Originally posted by ff123
BTW, I hate to ask, but you did make sure that the full-scale setting was not clipping, right?


Yes, it doesn't clip. It's one of those CD's from the nineties (1993 to be exact) that actually received decent mastering. Cool Edit doesn't show any clipping over the whole song (same for the decoded sample).

Testing the effect of scaling

Reply #4
Hey CiTay, I took the liberty of moving this thread to General-forum since it's really not about MPC..

This question raises again.. can you ABX "original vs original-95%" or can you ABX just "encoded vs encoded-95%".

If you can ABX only "encoded vs encoded-95%", then the ear's changing masking effect (and the audibility of quantization noise) regarding overall perceived loudness, which 2Bdecided said doesn't exist, and I say does, is even bigger than I thought. I've always said that some type of distortion can be more audible with certain (higher or lower) loudness.

Can you ABX original samples (original vs original-95%)?
If you can't, then it's quite obvious you are actually hearing a bit more/less quantization noise with encoded samples.
If you can ABX "originals", then you really can hear 0.45dB reduction in overall loudness, which is obviously pretty amazing.

I haven't tried these tests yet myself, but I sure will when I have time.
Juha Laaksonheimo

Testing the effect of scaling

Reply #5
I am pretty sure i can do the same with non-encoded samples. I'm confident that i only heard volume (not noise) differences.

I will do an ABX test with original WAV files right away.

Testing the effect of scaling

Reply #6
Hang on - rewind - what did I say "doesn't exist"?

Quote
then the ear's changing masking effect (and the audibility of quantization noise) regarding overall perceived loudness, which 2Bdecided said doesn't exist, and I say does, is even bigger than I thought. I've always said that some type of distortion can be more audible with certain (higher or lower) loudness. 



Masking (spectral and temporal) is level dependent. There's no debate about this. I've got the data somewhere... - here you go:

http://privatewww.essex.ac.uk/~djmrob/mp3b...s_amplitude.gif

The louder the signal, the further upwards (in frequency) the masking extends. Not just in a linear sense (as in the whole masking curves rises by x dB), but in a non-linear sense: if the level of the masker is increased by (say) 10dB, then at some (higher) frequency the masking may increase by 15dB.

When you realise this, it's a wonder psychoacoustic based coding works at all because raising or lowering the level (i.e. adjusting the volume control) should change the masking, and unmask things that are supposed to be masked. But in reality, the measured masking data we have is for simple stimuli (like pure tones, or noise signals) - extrapolating it to complex (and time varying) musical passages is an inexact art. So good codecs are forever erring on the side of caution with their limited psychoacoustic knowledge.


Please don't confuse the things which are required to make Replay Gain work "well" (if that's the context in which I said what you're quoting) with things that are absolute hearing limits. You don't need better than 1dB accuracy to make a system like replay Gain work. Even though you may be able to detect a 0.5dB level difference under critical conditions, you'll never think "Oh - that music is playing too loudly - let me turn it down - now it's 0.5dB quieter - that's better!"

The age old idea is that a 1dB level difference is the smallest you can detect. However, this is signal dependent, but also very dependent on how you measure it! For example, you can detect a 0.5dB interaural level difference. But discounting that, if you switch a signal abruptly (be it a sine wave or a piece of music) there are extra cues there to help you detect that something has changed. You might get a click with only 0.1dB level change, or (with a short cross fade) your ear might detect the ramping in level.

BUT if you listen to two different versions of the same thing, first A, then B, with short fade-ins and fade-outs, and a gap in between, the threshold for detecting a level difference seems to be somewhere between 0.5dB and 2dB (depending on the source material). I haven't seen any evidence that you can beat 0.5dB under these conditions - but if anyone can provide some then it'll be an interesting bit of research. I don't say this sarcastically.


When we discussed quantisation noise vs Replay Gain, were you meaning the quantisation noise added into each spectral band by a psychocaoustic codec, or the quantisation noise added as the least significant bit after any digital audio operation? I took it to be the latter. While there are certainly people who will detect any change (there are people who can detect that a signal has been re-dithered without any other change), I still maintain that (for most people) the loss of 6dB or even 12dB of resolution (i.e. 1 or 2 bits) for the kind of music where Replay Gain is likely to reduce the level this much (i.e. highly compressed pop music) is not a problem.


Finally, to CiTay's original question: the Replay Gain standard specifies 0.1dB steps. If you can just detect a 0.26dB change (which ABX suggests you maybe can't) then this isn't a problem. And if there is an extra element introduced by coding, and then unmaking as the level is changed, it will happen whether Replay Gain or your humble volume control are used to make the track quieter!

Cheers,
David.
http://www.David.Robinson.org/

Testing the effect of scaling

Reply #7
Okay, here we go. I took the original sample and scaled two copies of it in Cool Edit (Amplitude - Amplify to ...), one to 95% and one to 97%, then i ABXed vs. the original. I also did a quick test with 90%, but it wasn't worth testing (8/8 again, too obvious). BTW, i started to dislike the first verse of the song, so i took the second one for the rest of the tests. PCABX was set to 0 seconds switching delay, sample length 20 seconds.


95%: 14/16. This is not as easy as the score suggests, but with concentration, it's within my hearing abilities.

97%: 9/16. Nope.

Testing the effect of scaling

Reply #8
Quote
Originally posted by 2Bdecided Hang on - rewind - what did I say "doesn't exist"?
Masking (spectral and temporal) is level dependent. There's no debate about this. I've got the data somewhere... - here you go:

http://privatewww.essex.ac.uk/~djmrob/mp3b...s_amplitude.gif
This was exactly where I was not referring (and tried to make it clear..)  Of course louder signal has higher masking capability, everybody knows that. Of course I didn't say that you said that this doesn't exist (umm this becomes complicated soon).

I was referring to the audibility of quantization noiseof mp3, when changing volume, from which we had a bit of an argument..

I still claim that changing volume (for example turning your stereo volume control) affects to your ability to hear quantization noise added by psycoacoustic encoder, maybe not much but enough.
Quote
When we discussed quantisation noise vs Replay Gain, were you meaning the quantisation noise added into each spectral band by a psychocaoustic codec, or the quantisation noise added as the least significant bit after any digital audio operation? I took it to be the latter.
Umm, I got a bit different impression.. you for example said:
Quote
If you reduce all the global gain values by the same amount, then it's the same as turning down the volume control for the duration of the file.
If you turn the volume down on your stereo, does it destroy the masking calculations within an mp3 file? No! In the same way, reducing the global gain values does not change the masking calculations.
The quantisation noise at the 16th or 24th bits of the decoded signal is theoretically an issue. The quantisation noise stored within the mp3 file is not an issue.
While I agree that it doesn't destroy masking calculations of mp3 by any means, I still claim that changing volume affects your ability to hear quantization noise somewhat..  And I don't only mean when you turn volume up, you will hear quantization noise relatively better, I also mean that sometimes when you turn the volume down, you will hear quantization noise relatively better.
Juha Laaksonheimo

Testing the effect of scaling

Reply #9
the ability to hear differences in levels depends directly on the delay between the samples during the test.

Switching from one sample to another without delay, you can hear very small differences. But if you introduce a 1 second pause between the playback of each sample, your performance should fall down quite a bit. And if you wait 2 hours between the samples, maybe you won't tell apart two samples 5 or 10 db different from each other...

 

Testing the effect of scaling

Reply #10
... and if i wait 2 days between them, i won't even remember which song i was testing.