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: The effect of thresholds and masking on the audibility of audio produc (Read 17993 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

The effect of thresholds and masking on the audibility of audio produc

Some visiting conference participants seem confused about the audibility of  audio product performance deficiencies.

Here is an actual test of a high quality audio interface:



We can see that the test tone is at FS -12 db, and that the largest spurious response is about -128 dB.  If we normalize this to 0 dBFS, the largest artifact is about 116 dB down.

Here is information about the threshold of hearing and masking:



We can see that if we imagined the plot of spurious responses from the test above being plotted on these curves, they would all be way off oof the bottoms of the charts - which end at -100 dB below the top of the charts.  -116 dB is 16 dB below 0 dB on these charts.

Furthermore the curves for audibility on the masking chart for the second harmonic is at least 10 dB higher than the chart for the threshold of hearing.

The masking chart helps explain the commonly given advice that high order distortion is more audible, because it is less likely to be masked.

The effect of thresholds and masking on the audibility of audio produc

Reply #1
To further discuss masking;

Again, the threshold/masking chart:



And this chart detailing masking @ 1 KHz:



Larger version here: Larger Graphic

For a 90 dB signal (loud)  the threshold for hearing the second harmonic is

* due to the threshold of hearing for pure tones (Fletcher & Munson) the threshold is about -10 db SPL which is 100 dB down or about 0.001%

* due to masking by concurrent tones the threshold for the actual situation  is 63 dB SPL which is 27 dB down or about 3% THD.

Actual listening tests of music with only second order distortion added confirm the dramatically higher number based on masking.

ABX Test files for THD

Obviously masking makes a big difference!

BTW the threshold of hearing the 4th harmonic is 40 dB SPL or -50 dB or 0.3%

The effect of thresholds and masking on the audibility of audio produc

Reply #2
.  The masking chart helps explain the commonly given advice that high order distortion is more audible, because it is less likely to be masked.
Although I would think the reverse is true when the master tone signal is above 4k. The asymmetry we see in the green dotted line, to the left and right of its peak, must become flipped, a mirror image that is, when the master tone is above 4 kHz [where the ear is most sensitive]. In such cases, with young listeners that is, their greatest sensitivity to faint sounds is lower in frequency to this, not above it, right?

The effect of thresholds and masking on the audibility of audio produc

Reply #3
.  The masking chart helps explain the commonly given advice that high order distortion is more audible, because it is less likely to be masked.


Although I would think the reverse is true when the master tone signal is above 4k


Yes, life changes when the spurious responses start falling on the rolled-off portion of the threshold curve which starts for fundamentals well below 2 KHz.

It is possible for high frequency desensitization to increase more rapidly than masking is relieved.

Quote
The asymmetry we see in the green dotted line must become flipped, a mirror image that is, when the master tone is above 4 kHz. In such cases, with young listeners, their greatest sensitivity to faint sounds is lower in frequency to this, not above it, right?


I don't know. I lack anything like a complete set of masking curves over a useful segment of the audible range.

The effect of thresholds and masking on the audibility of audio produc

Reply #4
This is the only graph I can find for frequencies above our most sensitive 3.5-4kHz range. Hard to say if it shows the mirror image I expected:

Although on the 4 kHz chart the masking seems stronger in the higher frequency direction side:


source: http://www.zainea.com/masking2.htm


The effect of thresholds and masking on the audibility of audio produc

Reply #5
This is the only graph I can find for frequencies above our most sensitive 3.5-4kHz range. Hard to say if it shows the mirror image I expected:

Although on the 4 kHz chart the masking seems stronger in the higher frequency direction side:


source: http://www.zainea.com/masking2.htm


I have some concerns about the data at that site because it seems to be very old (1958) and the data that overlaps more recent studies does not agree with it very well.

The effect of thresholds and masking on the audibility of audio produc

Reply #6
Do you have a link to these more recent studies you speak of? Thanks.

The effect of thresholds and masking on the audibility of audio produc

Reply #7
Do you have a link to these more recent studies you speak of? Thanks.


I chased the references for the sources I used in the OP and ended up here:

Basic auditory processes involved in the analysis of speech sounds

I haven't studied the paper at this point, but will.

It points out that among other things different methods have been used over the years to estimate masking, and surprise! surprise! they give somewhat different results.

The effect of thresholds and masking on the audibility of audio produc

Reply #8
To further discuss masking;

Again, the threshold/masking chart:



And this chart detailing masking @ 1 KHz:



Larger version here: Larger Graphic

For a 90 dB signal (loud)  the threshold for hearing the second harmonic is

* due to the threshold of hearing for pure tones (Fletcher & Munson) the threshold is about -10 db SPL which is 100 dB down or about 0.001%

* due to masking by concurrent tones the threshold for the actual situation  is 63 dB SPL which is 27 dB down or about 3% THD.

Actual listening tests of music with only second order distortion added confirm the dramatically higher number based on masking.

ABX Test files for THD

Obviously masking makes a big difference!

BTW the threshold of hearing the 4th harmonic is 40 dB SPL or -50 dB or 0.3%


I found that the wayback machine archive linked above has errors and omissions. Corrected versions here: 

Corrected FLAC files for Nonlinear Piano ABX tests

The usual advice - start with the high order, high percentage distortion and work down.

Bold prediction: Everybody will hear one or more differences and in the end, some will be frustrated and others enlightened. ;-)

The effect of thresholds and masking on the audibility of audio produc

Reply #9
I found that the wayback machine archive linked above has errors and omissions. Corrected versions here: 

Corrected FLAC files for Nonlinear Piano ABX tests

The usual advice - start with the high order, high percentage distortion and work down.

Bold prediction: Everybody will hear one or more differences and in the end, some will be frustrated and others enlightened. ;-)


There is another zip file of additionally corrected files including a new set of files for 3% nonlinear distortion just down the thread from the set above. The file name mentions that there are 21 files in the zip file.

The effect of thresholds and masking on the audibility of audio produc

Reply #10
I found that the wayback machine archive linked above has errors and omissions. Corrected versions here: 

Corrected FLAC files for Nonlinear Piano ABX tests

The usual advice - start with the high order, high percentage distortion and work down.

Bold prediction: Everybody will hear one or more differences and in the end, some will be frustrated and others enlightened. ;-)


There is another zip file of additionally corrected files including a new set of files for 3% nonlinear distortion just down the thread from the set above. The file name mentions that there are 21 files in the zip file.


BTW some may be displeased with the large amounts of nonlinear distortion that they may be struggling to hear. It's a well known problem. Here is what a well-known placebophile has to say:

Comment on nonlinear distortion by Jon Risch

"It can be confusing to try and correlate harmonic distortion measurements with what is heard.  Once harmonic distortion levels are below several percent in the midband, it is a tossup as to which device will sound better or clearer.  Up to a certain point, a given level of even order harmonics are more benign sonically than a given level of odd order harmonics, while higher orders are generally more irritating than the lower order harmonics.  A significant amount of second harmonic distortion may actually sound preferable to much lower amounts of third or fifth harmonics.  A certain amount of second harmonic distortion may even be preferred to a system that has little or no second harmonic distortion."

Jon is not well-informed about nonlinear distortion and goes on to blame THD measurements. In reality the problem is spectral masking.


The effect of thresholds and masking on the audibility of audio produc

Reply #11
Random remark: Nonlinearities lead only to harmonics if the input is a pure tone. If you have lots of harmonic distortion in your audio reproduction system then you will additionally get tons of even nastier intermodulation distortion.

Btw, how did you create the files? My guess is by using some simple polynomials.
The odd harmonics files do not sound right. Keep in mind that x^2 for a sine will not include the original frequency, but x^3 will. Subtracting x from that will only work for a pure sine input.

You'd have to use transfer curves that already output the input plus the harmonics at the right level.
"I hear it when I see it."

The effect of thresholds and masking on the audibility of audio produc

Reply #12
Random remark: Nonlinearities lead only to harmonics if the input is a pure tone. If you have lots of harmonic distortion in your audio reproduction system then you will additionally get tons of even nastier intermodulation distortion.


Agreed, and so dies the audiophile myth of euphonic nonlinear distortion. The same nonlinearity that creates harmonic distortion also creates IM as you say, and the IM is aharmonic and no way euphonic.

Quote
Btw, how did you create the files?


CEP 2.1 AKA Audition

Quote
My guess is by using some simple polynomials.


There is a facility in CEP called paste/modulate that multiplies the work file with the file on the clipboard. If they are the same file, then the file is multiplied by itself.

The first multiplication produces a file that has been squared on a sample by sample basis.

The second multiplication produces a file that has been cubed on a sample by sample basis.

etc.

Quote
The odd harmonics files do not sound right.


I control the process by appending some test tones to the file and monitoring their harmonic content and amplitude.  I edit these out just before posting them.

Quote
Keep in mind that x^2 for a sine will not include the original frequency,


The rule is more general than that. All even order files do not contain any unprocessed residuals of the previous odd order file or the origional file. In essence, they are all distortion.  This is obvious during the process because these files, as the math predicts, contain only positive values.

However, none of the files I provide have 100% distortion, so I create  carefully proportioned mixtures of the distortion file and the origional source file.

The test tones are used to monitor the results of the process and ensure that the harmonics are present as desired.

Quote
You'd have to use transfer curves that already output the input plus the harmonics at the right level.


No, you just have to adjust the proportions of the original and distorted files differently for each order of distortion, and you have to take into account that the odd order distortion files have so much more of the original file in them.

Thinking that math doesn't work but graphics does violates the idea that you can decompose an audio signal into a collection of sine waves.

  I've worked with transfer function curves and the results are the same, but the procedure is very different for the reason we've discussed - the distortion files for the even orders of distortion have no original content, but the odd order files have quite a bit of it.

The original files were created over 15 years ago, so I'm recreating some of them to be sure that they are right. I don't have the intermediate files from 15 years ago, just the final ones so the test tones are long gone.

The effect of thresholds and masking on the audibility of audio produc

Reply #13
Yes, x^2, x^4 ... will not contain the original sine, but the odd ones x^3, x^5 ... will.

In the last part I was talking about odd order. The files sound wrong (as if the fundamental partly cancels), and I do not see how you would come up with just the original plus one odd harmonic the way you described.
Also, when you work with the waveform there is no decomposition into sine waves. If you did that, there would be no intermodulation, but that would be unrealistic anyway. The math works fine on sines, but the result looks very different on anything but a sine as input.

Just try a 100 + 1000 Hz sine wave...
"I hear it when I see it."

The effect of thresholds and masking on the audibility of audio produc

Reply #14
Yes, x^2, x^4 ... will not contain the original sine, but the odd ones x^3, x^5 ... will.

In the last part I was talking about odd order. The files sound wrong (as if the fundamental partly cancels), and I do not see how you would come up with just the original plus one odd harmonic the way you described.




Also, when you work with the waveform there is no decomposition into sine waves. If you did that, there would be no intermodulation, but that would be unrealistic anyway. The math works fine on sines, but the result looks very different on anything but a sine as input.

Just try a 100 + 1000 Hz sine wave...


Well my standard test uses 20 and 21 KHz sine waves for the twin tone, and 1 KHz sine wave for the single tone. Good enough?

Uploads page with large graphics




The effect of thresholds and masking on the audibility of audio produc

Reply #15
No.
"I hear it when I see it."

The effect of thresholds and masking on the audibility of audio produc

Reply #16
No.


I'm not into pigs in pokes. If you will predict the results and indicate what the problem will be, then I'll test your theories.

Right now you are  moving the goal posts. You said that what I said couldn't be for a single tone, and the single tone file I provided is consistent with what I said.

As far as the some of the files not sounding right to you, that was a sighted evaluation, right?  No, I'm not going to play John Keny's games.

The effect of thresholds and masking on the audibility of audio produc

Reply #17
No, I said it doesn't work the way you imagine for music just because it works for a single sine.

Just show how you push the 3rd harmonic down to 30%, 1%, 0.1% ... relative to the fundamental.

The math:
Code: [Select]
sin(x)^3
=>
-(sin(3*x) - 3*sin(x))/4

Here you'd need to subtract 3/4*input.

Code: [Select]
(sin(x)/2)^3
=>
-(sin(3*x) - 3*sin(x))/32

Here it's 3/16*input, so you should already see the problem.

Code: [Select]
(sin(x)/2+sin(y)/3)^3
=>
sin(2*x - y)/16 - sin(x + 2*y)/24 - sin(2*x + y)/16 - sin(3*x)/32 - sin(3*y)/108 - sin(x - 2*y)/24 + (17*sin(x))/96 + (11*sin(y))/72

Here you can decide what you want to cancel, sin(x) or sin(y)?

This is just with two pure tones that never change frequency or amplitude...


This has nothing to do with blind testing. How would I prove to you that e.g. the 3rd harmonic 30% file does not sound right if you insist it does?

"I hear it when I see it."

The effect of thresholds and masking on the audibility of audio produc

Reply #18
If you don't see it from the waveform, then here's another clue:
piano_nlref RMS = -19...
piano_2nd_30pct RMS = -19...
piano_3rd_30pct RMS = -31...
"I hear it when I see it."

The effect of thresholds and masking on the audibility of audio produc

Reply #19
No, I said it doesn't work the way you imagine for music just because it works for a single sine.

Just show how you push the 3rd harmonic down to 30%, 1%, 0.1% ... relative to the fundamental.

The math:
Code: [Select]
sin(x)^3
=>
-(sin(3*x) - 3*sin(x))/4

Here you'd need to subtract 3/4*input.

Code: [Select]
(sin(x)/2)^3
=>
-(sin(3*x) - 3*sin(x))/32

Here it's 3/16*input, so you should already see the problem.

Code: [Select]
(sin(x)/2+sin(y)/3)^3
=>
sin(2*x - y)/16 - sin(x + 2*y)/24 - sin(2*x + y)/16 - sin(3*x)/32 - sin(3*y)/108 - sin(x - 2*y)/24 + (17*sin(x))/96 + (11*sin(y))/72

Here you can decide what you want to cancel, sin(x) or sin(y)?

This is just with two pure tones that never change frequency or amplitude...


This has nothing to do with blind testing. How would I prove to you that e.g. the 3rd harmonic 30% file does not sound right if you insist it does?


I think that the above points out some outcomes of the laws of physics that have been known to me for decades. It falls right out of the math as the above equations show: Nonlinear distortion is signal level dependent. The higher the order, the more so. In or about 1985 I spent several weeks working out the polynomal and geometric equations that generate the spurious results of 1, 2 and 3 tone testing through the 10th order.

True if you add nonlinear distortion via a nonlinear function generator. True if by means of real world equipment which I still measure on the bench. True if done using analog calculations as I do it for test signals.

BTW there are some asymmetries if one  use my methods for the more esoteric and more highly nonlinear forms of nonlinear distortion. An example of this is FM modulation (jitter) where the spectral contents of the distortion changes dramatically as modulation index changes. But that can be managed as well, and even used to an advantage in the interest of realism.

I think that a key issue has been overlooked in these comments is that if we are going to extrapolate our results to the performance of audio gear then we have to ensure that our tests are reasonable simulations of audio gear. Since I've spent over 50 years bench testing audio gear I've had lots of opportunities to observe how it works pretty closely.  The last 30 years of my testing were informed by the results of DBTs which looked pretty weird to me until the last 20 years or so when what we know now about masking became well known enough and well defined enough.

So, I generate my test signals while doing the same kind of tests on them that I use on the bench, trying as closely as possible to duplicate the bench results.

The test signals I generate are biased towards making the distortion as sonically obvious as is reasonably possible. I'm basically simulating a power amp or DAC that is operating right up to peak undistorted output, and specifically not an amp that is way overpowered for the application.

BTW that is one difference between DACs and amps. The world is full of amps that never come within a mile of being pushed to peak output, but just about every DAC gets pushed up to FS or very close to it very frequently in normal use.

Link to graphics of analysis of file under development

 

The effect of thresholds and masking on the audibility of audio produc

Reply #20
That's all fine and nice but doesn't change the fact that something went wrong at least with the 3rd harmonic (and I guess other odd harmonics, haven't checked them all) file.

The polynomials have been developed hundreds of years ago and are based on a simple recursion. T0=1, T1=x, Tn+1=2xTn-Tn-1.
That's not a problem.

The problem is also not signal-level dependence, but the fact that ^3, ^5 ... will also include the fundamental. Now I don't know how exactly you mixed those files, but even the simple RMS figure shows that it's not working as intended.

Doing bench tests doesn't help if you are using just a sine, or two at the same level. It's not gonna show the nonlinear effects of the math.
"I hear it when I see it."

The effect of thresholds and masking on the audibility of audio produc

Reply #21
The problem is also not signal-level dependence, but the fact that ^3, ^5 ... will also include the fundamental.


That happens no matter how the distortion is created - in software or by real world gear.

Quote
Now I don't know how exactly you mixed those files, but even the simple RMS figure shows that it's not working as intended.


Please explain where you are getting those RMS numbers from and how they are unrealistic.

Quote
Doing bench tests doesn't help if you are using just a sine, or two at the same level. It's not gonna show the nonlinear effects of the math.


Are you sure about that?


The effect of thresholds and masking on the audibility of audio produc

Reply #22
1) Sure. But for even order you can just calculate the harmonic, attenuate, add the input and you'll get what you want.
The same does not work for odd order harmonics ... as I have explained and shown.

2) Your CEP or Audition should have a window called amplitude statistics. Scan the file. The 3rd harmonic file has 12 dB lower RMS amplitude. The waveform looks nothing like even order distorted files, let alone the original. It sounds wrong. Dunno how else to get that through to you.

3) Yes, but not the way you think. If you just have 1 or 2 sines at equal amplitude then the math will work out fine and you can subtract the correctly scaled* input, attenuate the distortion products, add the input back. Introduce an amplitude difference between these sines and this will break down.

*) sure, if you compare this gain across different input levels you'd see the nonlinearity ... but that doesn't demonstrate the problem directly
"I hear it when I see it."

The effect of thresholds and masking on the audibility of audio produc

Reply #23
1) Sure. But for even order you can just calculate the harmonic, attenuate, add the input and you'll get what you want.
The same does not work for odd order harmonics ... as I have explained and shown.


I don't think you showed anything but some equations whose interpretation can be right or wrong.

Quote
2) Your CEP or Audition should have a window called amplitude statistics. Scan the file. The 3rd harmonic file has 12 dB lower RMS amplitude. The waveform looks nothing like even order distorted files, let alone the original.


Actually the odd order files look far more like the original undistorted file. The even order files contain no negative values while the odd order files do. The even order files contain no traces of the input waves, and the odd order files do.

Here's the evidence: Squared versus cubed files

Quote
It sounds wrong. Dunno how else to get that through to you.


I've posted 21 files and you can't even say which ones sound wrong. How about a little specificity here? You  can't tell me they all sound wrong because one is an original wave file and people are on record as saying that they can't hear the difference between it and some of the distorted files.  Many of the files contain so little of the distorted sounds that there's no way there is a reliable audible difference.

Relevant evidence can help!

Quote
3) Yes, but not the way you think. If you just have 1 or 2 sines at equal amplitude then the math will work out fine and you can subtract the correctly scaled* input, attenuate the distortion products, add the input back. Introduce an amplitude difference between these sines and this will break down.


Specifics, please.

I think you are confusing the obvious and predictable effects of the math with "breaking down".  The nonlinear distortion in typical analog audio electronics is due to the curvature of input/output curves which are just the graphs of the relevant polynomials. So you can calculate with the polynomials or you can calculate with the input/output curves (which is what the real audio gear does) and the results are the same because the two are analogous and have common origins.

The effect of thresholds and masking on the audibility of audio produc

Reply #24
I don't think you showed anything but some equations whose interpretation can be right or wrong.

There is nothing to interpret.


Actually the odd order files look far more like the original undistorted file. The even order files contain no negative values while the odd order files do. The even order files contain no traces of the input waves, and the odd order files do.

Here's the evidence: Squared versus cubed files

Sigh. I told you the file names: piano_nlref, piano_2nd_30pct, piano_3rd_30pct. Compare those waveforms. The 3rd harmonic file is not only audibly way off, but even visibly.

I don't care how squaring looks like. Obviously it will introduce DC ...


I've posted 21 files and you can't even say which ones sound wrong. How about a little specificity here? You  can't tell me they all sound wrong because one is an original wave file and people are on record as saying that they can't hear the difference between it and some of the distorted files.  Many of the files contain so little of the distorted sounds that there's no way there is a reliable audible difference.

Relevant evidence can help!

I already told you that the most obvious one is 3rd_30pct. Of course your error in creating these files gets smaller with lower distortion... that doesn't fix the problem though, it just obscures/hides it.


Specifics, please.

I think you are confusing the obvious and predictable effects of the math with "breaking down".  The nonlinear distortion in typical analog audio electronics is due to the curvature of input/output curves which are just the graphs of the relevant polynomials. So you can calculate with the polynomials or you can calculate with the input/output curves (which is what the real audio gear does) and the results are the same because the two are analogous and have common origins.

How can you ask me for specifics when you haven't even answered or can't remember how specifically you created that odd order file? How much did you attenuate, what did you mix? I gave one example based on assumptions that would fail and produce something similar to the file that can be found in your zip.

No, I'm not confusing things. x^3 gives you a third harmonic at a fixed level relative to the fundamental. You seem to have tried to fix that with applying some gain and mixing stuff, but that obviously didn't work.

Just look at the damn file.
"I hear it when I see it."