• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Beta Test: DISTORT - audibility of distortions

OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,206
Location
North-East
Paul, if you take the simplest case, F1+F2 and a pure H2 distortion, and F1 and F2 are close to Fs/2, as in our case (19kHz, 20 kHz and Fs/2=24kHz), then we get only one distortion component, F2-F1 = 1kHz below Fs/2. Everything above Fs/2 is prohibited by Nyquist theorem, which says that input signal can be properly reconstructed from its samples if the signal frequency is <Fs/2. So the components 2F1, 2F2 that all lie above Fs/2 and are H2 product are prohibited and are normally removed by a brickwall filter tuned just below Fs/2. This is for H2.
H3 creates equally spaced skirts around F1 and F2 at 2F1-F2 and 2F2-F1 frequencies, i.e. at 18kHz and 21kHz. These products are OK. So the lines of even harmonic distortion we can see at the left side as multiples of 2 x (F2-F1), 2kHz as a product of H2, 3kHz of H4 etc. Same for skirts that are created by odd harmonic distortion components. But, we have set H2 to -60dB approx and H3 to -80dB approx, all else H4 etc. below -200dB, so we have only H2 and H3 distortion. We may see thus only the F2-F1 (1kHz) at -60dB and 2F1-F2 and 2F2-F1, i.e. 18 and 21kHz skirts at -80dB. There must be no 8-12kHz lines in the 16dB signal which has a noise bottom at about -132dB. Those lines would be somewhere at -200dB, thus invisible in this plot. This is very basic information and we who work with analog circuits know and are able to identify distortion components immediately. Your 8-12kHz lines are a product of calculation only.

Attached is a measured CCIF distortion of a tube amplifier with similar H2 and H3 as described above, plus a small H4. Attached is also a Burr Brown paper on IMD.

View attachment 45146
With ADC sampling 96kHz we may look to 48kHz but not higher.

http://www.ittc.ku.edu/~jstiles/622/handouts/Two-Tone Intermodulation.pdf

That's correct for an ADC. But DISTORT is simulating a DAC with the non-linear distortion being applied after the samples are converted, in effect, in the analog domain, with no post-filter, unless you select one in the settings.

Just searching around, here's a real world example posted here, on ASR, of measured IMD at the output of a DAC:
index.php



Look similar?
1578594869383.png
 
Last edited:

pma

Major Contributor
Joined
Feb 23, 2019
Messages
4,591
Likes
10,728
Location
Prague
Paul, we want for the DISTORT to simulate properly behaviour of amplifiers etc. and to show audibility of non-linear distortion, not to show the DAC mirror images and audibility of NOS DAC errors. BTW, if the DAC uses oversampling and proper brickwall digital reconstruction, the mirror images disappear. Signal components created purely mathematically violate Nyquist and they contain components above Fs/2 which leads to mirrors and aliases.

Below is the proof, with your DISTORT. Increasing Fs and thus more distance of F1, F2 from Fs/2 helps a lot.
1) 19+20 kHz in 48/16 distorted by H2 and H3 as discussed yesterday, error is in red circle
2) 19+20 kHz in 96/16 distorted by H2 and H3, error is in red circle, and the error below 20kHz has completely disappeared, the only smaller error is near 2F1,2.

The plots below also explain why the 48/16 DISTORT product has had big errors for 19+20kHz distorted signal. The answer is simple, if you look at the 96/16 plot, there are distortion components between 36-40kHz (near 2F1, 2F2, H2 products) that are simply mirrored down to 8-12kHz components in the 48/16 plot. 48-40=8, 48-36=12, so 8-12kHz error lines. This is because your program calculates with those higher than 24kHz products in 48kHz sampling, which must necessarily lead to error mirror/alias components below Fs/2 (below 24kHz), that are not produced by the DUT non-linearity, but by the program. Sorry I am not able to explain it better.

Until this aliasing/mirroring error is fixed, the DISTORT will provide wrong results with music, especially for the signal components approaching Fs/2.

ccif-DISTORT.png

ccif-96kHz-DISTORT.png
 

Attachments

  • 19+20kHz_-1dB_96_16.zip
    329.7 KB · Views: 79
  • CCIF1920-DISTORT_96_16.zip
    328.8 KB · Views: 69
Last edited:
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,206
Location
North-East
BTW, if the DAC uses oversampling and proper brickwall digital reconstruction, the mirror images disappear.

You can see the components that you say are incorrect, showing up in real-world captures, so something in the real world is violating theory :) I shared an example previously by someone else. This time, I just used my own DAC/ADC capture, with two filters in the path:

1578663409567.png

I'll dig in a little more to see why this is happening, but this happens even with large oversampling and brick-wall filter (above signal is generated at 384kHz and then sampled with a 48kHz ADC). Here's the same signal @384k sampled at 192k:
1578664476878.png

Generated @48k and sampled @48k:

1578665570913.png
 
Last edited:
Joined
Jan 27, 2020
Messages
4
Likes
1
Location
Orange County, Ca (originally UK)
New user with basic problem.

Hi all, I am very excited to get to play with this software. On my first attempt I get a problem that it will not play/process my source file. Is this my set-up or a problem with the file? (files play fine in WMP)

TiA
13DoW
 

Attachments

  • Distort screen grab.png
    Distort screen grab.png
    206.5 KB · Views: 82
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,206
Location
North-East
New user with basic problem.

Hi all, I am very excited to get to play with this software. On my first attempt I get a problem that it will not play/process my source file. Is this my set-up or a problem with the file? (files play fine in WMP)

TiA
13DoW

Hi 13DoW,

It looks like you may just need a newer version of Microsoft's .NET runtime, 4.6.1. Here's the download link:

https://www.microsoft.com/en-us/download/details.aspx?id=49981

Download and install it, then try again. Hopefully this will resolve the error.

Regards,

-Paul
 
Last edited:
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,206
Location
North-East
Hi Paul, how can I save the post distorted file in the same resolution as the original file? The output files are 32 bit but my DAC will only handle 24bits. And I prefer the output sampling frequency to be the same, I am asked to resample.

TiA
13DoW

Hi 13DoW,

There's currently no way to prevent resizing to 32-bits floating point when saving as a WAV file. But the sampling rate should remain unchanged: DISTORT doesn't resample when saving. You can add dither, at say, 24 bits, which will compute the samples for 24-bit precision, but they will still be saved as 32-bit floating point numbers.

You may get a warning about resampling when playing back with an audio driver. Check the message, it is likely not changing sampling frequency but, instead, increasing bit size. If the frequency is being changed, that's because the driver told DISTORT that it doesn't support the rate of the original file, and prefers another sampling rate.
 
Joined
Jan 27, 2020
Messages
4
Likes
1
Location
Orange County, Ca (originally UK)
So I tried some simple experiments adding second and third harmonic to some music files. I heard no difference with 1% 2HD and no difference with 0.5% 3HD. I did not got higher, instead I am going to try different levels of 7HD as higher harmonics are supposed to be more objectionable.
What I am curious about is whether 2HD can mask audible higher harmonics. I was intrigued by this article by Bob Katz (matering engineer) where he built an adjustable second harmonic distortion box and by dialing in a little 2HD he could make lesser sounding heddphone amps match his reference.
https://www.innerfidelity.com/content/katzs-corner-episode-25-adventures-distortion

Until then, I agree with pma that Distort should brickwall filter out harmonics and intermodd that are more than Fs/2. I did a simple test adding 2HD to an 18kHz tone and the alias falls on 8kHz (for CD).

Question to pma - what spectrum analyzer software are you using? I use the one in audacity but your plots look much better.

Regards
13DoW
 

A800

Addicted to Fun and Learning
Joined
Dec 22, 2019
Messages
734
Likes
615
Honestly I think there is enough distortion on any audio already present.
Not to mention the whole signal chain until you hear something.
The ear drum also might add quite a bit of distortion also.
No need to add even more of it.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,206
Location
North-East
So I tried some simple experiments adding second and third harmonic to some music files. I heard no difference with 1% 2HD and no difference with 0.5% 3HD. I did not got higher, instead I am going to try different levels of 7HD as higher harmonics are supposed to be more objectionable.
What I am curious about is whether 2HD can mask audible higher harmonics. I was intrigued by this article by Bob Katz (matering engineer) where he built an adjustable second harmonic distortion box and by dialing in a little 2HD he could make lesser sounding heddphone amps match his reference.
https://www.innerfidelity.com/content/katzs-corner-episode-25-adventures-distortion

Until then, I agree with pma that Distort should brickwall filter out harmonics and intermodd that are more than Fs/2. I did a simple test adding 2HD to an 18kHz tone and the alias falls on 8kHz (for CD).

Question to pma - what spectrum analyzer software are you using? I use the one in audacity but your plots look much better.

Regards
13DoW

I've already implemented configurable oversampling as part of DISTORT app, including a brick-wall filter. This will need more work and testing before I release it, as I want this to be as fast as possible to allow for real-time comparisons. You should try the blind test @Archimago posted with various degrees of THD added into the mix to see how much you can or cannot hear. On casual listening, I found 1% THD to be just about the cutoff for me, where I could just start to identify the distortion signature. On more careful listening, I could do a lot better, but I'll withhold my results until Archimago's blind test is completed and the results published :)

Regards,

-Paul
 

maty

Major Contributor
Joined
Dec 12, 2017
Messages
4,596
Likes
3,161
Location
Tarragona (Spain)
BLIND TEST RESULTS Part I: "Is high Harmonic Distortion in music audible?" Procedures & Settings
http://archimago.blogspot.com/2020/05/blind-test-results-part-i-is-high.html

Audibility Test with CCIF Signals.png


[ Also, massive appreciation to Paul K for all the work put into creating Distort for audiophiles to explore the audibility of distortions - not just THD but also adding noise, effect from jitter, and bit-depth reduction. (Let's also not forget his work on DeltaWave.)

Next week, I'll take the lid off the survey results and review what the 67 respondents heard!

A side note... With all the activity around us the last few months, this is the first time in all these years of running a blind test that I did not even peek at the cumulative results throughout the 3-month data collection period. As such, at this time, as I'm about to click the "publish" button on this post, I still have no idea what the final results look like! Let's see if there are surprises in store... :) ]
 
Last edited:
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,206
Location
North-East
BLIND TEST RESULTS Part I: "Is high Harmonic Distortion in music audible?" Procedures & Settings
http://archimago.blogspot.com/2020/05/blind-test-results-part-i-is-high.html

View attachment 66261

[ Also, massive appreciation to Paul K for all the work put into creating Distort for audiophiles to explore the audibility of distortions - not just THD but also adding noise, effect from jitter, and bit-depth reduction. (Let's also not forget his work on DeltaWave.)

Next week, I'll take the lid off the survey results and review what the 67 respondents heard!

A side note... With all the activity around us the last few months, this is the first time in all these years of running a blind test that I did not even peek at the cumulative results throughout the 3-month data collection period. As such, at this time, as I'm about to click the "publish" button on this post, I still have no idea what the final results look like! Let's see if there are surprises in store... :) ]

After taking the blind test myself, I'm really looking forward to the results from others! ;)
 

maty

Major Contributor
Joined
Dec 12, 2017
Messages
4,596
Likes
3,161
Location
Tarragona (Spain)
The test would have to be in the same room and equipment, with great sound. All in all, I suppose that between -50 dB THD and -75 dB THD the difference should be quite audible for most, I say.

Since I did my tests I have been able to improve the sound (loudspeakers and Windows optimization).
 

trl

Major Contributor
King of Mods
Joined
Feb 28, 2018
Messages
1,967
Likes
2,523
Location
Iasi, RO
Not sure about you guys, but for me it was very hard to find the differences on Archimago's songs, probably with some heavy bass and more compressed songs it would be easier.

However, I got 5 out of 8 on my ABX tests between the original and the -30dB THD (3.16% THD) on my Audeze LCD2-F, so either I was tired and unable to focus right, either things are getting really difficult when comparing tracks of same song, but with different THD ratios.

When comparing pure sines I was able to ABX in 100% of cases the original vs. -60dB THD (0.1% THD) modified track (Distort and Adobe Audition had the same results to me). I found that 440Hz and 3KHz sines work fine, but 40...60Hz too, depending on the listening gear (headphones or speakers).

L.E.: On Mackie studio monitors the differences were a bit more obvious than when using headphones.
 
Last edited:
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,206
Location
North-East
Not sure about you guys, but for me it was very hard to find the differences on Archimago's songs, probably some heavy bass and more compressed songs it would be easier.

However, I got 5 out of 8 on my ABX tests between the original and the -30dB THD (3.16% THD) on my Audeze LCD2-F, so either I was tired and unable to focus right, either things are getting really difficult when comparing tracks of same song, but with different THD ratios.

When comparing pure sines I was able to ABX in 100% of cases the original vs. -60dB THD (0.1% THD) modified track (Distort and Adobe Audition had the same results to me). I found that 440Hz and 3KHz sines work fine, but 40...60Hz too, depending on the listening gear (headphones or speakers).

L.E.: On Mackie studio monitors the differences were a bit more obvious than when using speakers.

THD/IMD on pure sine waves really is easier to detect. I did pretty well on the Archi's blind test with music tracks, but it was hard, with differences that I couldn't clearly identify on a conscious level. I used headphones with a quality DAC and headamp. At the same time, I completely failed on Mark Waldrep's HD/Hires-Challenge, so any rumors about my golden ears have been greatly exaggerated ;)
 

maty

Major Contributor
Joined
Dec 12, 2017
Messages
4,596
Likes
3,161
Location
Tarragona (Spain)
BLIND TEST RESULTS Part II: "Is high Harmonic Distortion in music audible?" Respondent Results
http://archimago.blogspot.com/2020/06/blind-test-results-part-ii-is-high.html

Part I: Respondent Demographics

Part II: Systems Used for Evaluation

Part III: The Results... Are harmonic distortions audible?
  • 1. Looking at all 67 respondents, how did they rate the samples from "best" to "worst" sounding?
  • 2. How audible were the differences between the tracks?
  • 3. If we exclude those that were unable to hear a difference between tracks, what was the ranking between "best" to "worst" sounding samples?
  • 4. Was there a difference depending on the age of the listener?
  • 5. Did headphone vs. speaker listening make a difference?
  • 6. Of those who did not feel their preference necessarily correlated with THD, how did they rank the samples?
  • 7. Which song/music passage differentiated the samples the most?
  • 8. Did the subgroup of audio engineers, musicians, and audio hardware reviewers perform differently?
  • 9. For those who felt the difference was "huge" or "big" (30%, n=20), how did they rank the "best" to "worst" sounding samples?
  • 10. How many "Golden Ears" were there in this blind test?
Part IV: In Summary...

[ 5. Based on the observations, it would not be unreasonable to suggest that the threshold for audibility is somewhere in that "Hi" and "Lo" THD divide between -75dB/0.02% and -50dB/0.3%. Somewhere in there is the "shift" where the THD is high enough that the bias turns negative against the perceived sound quality as a group...

For now, I think that for music listening, if the THD of the reproduction system from source to speaker/headphone is <0.1% (-60dB) across the audible spectrum, the vast majority of listeners would not find this to be objectionable. One might even hear some preferred "euphonic distortion" with low order harmonics around the 0.01-0.1% THD range in my estimation (needs to be tested of course!). ]


I have not done the proposed tests but I did mine months ago and I could discern better. I think one of the keys has to be the speakers used. These weeks we are seeing that many have greater distortions at > 500 Hz than would be expected a priori. But of course, everyone is obsessed only with the flatness of the frequency response on the axis and little else.

With quality recordings it matters whether the speaker distortion is small or very small. But of course, how many people listen to these types of recordings today? They spend a lot of money on the equipment and usually do not take it into account, in addition to the effect of the room.
 
Last edited:
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,206
Location
North-East
I was in the small group that identified all the samples correctly. I think I'm the only one from that group that used headphones, so there's something interesting in how the results break down between speakers and headphones. Meanwhile, all the headphone users could identify the 3% distortion, while not all speaker users could.

The curious result to me was that the -75dB THD distortion seemed to be preferred by a statistically significant number of listeners, even those who correctly identified it as being at a higher distortion level. I didn't have such a preference, but the difference between -75dB and -175dB THD to me was nearly impossible to tell.

I'd certainly be interested in doing more tests, for example comparing odd to even harmonics, or low-order harmonics to high-order harmonics, etc. Thank you to @Archimago for such an excellent test and detailed analysis!
 

maty

Major Contributor
Joined
Dec 12, 2017
Messages
4,596
Likes
3,161
Location
Tarragona (Spain)
Months ago, at the beginning of this thread, I did some tests. For recordings with acoustic instrumentation the sound was more pleasant with H2 at -72 dB. With orchestral mass recordings I preferred no harmonics. I agreed with Nelson Pass's comments about it.

Now my system sounds even better than then, maybe I will repeat my tests and do Archimago's.

Right now I have fantastic sound coming from an old analog master from 1958 (tubes). With just three instruments my modified KEF Q100 r.25" coaxials bring out the best in themselves.

Impressive sound. Yes, 1958 recording!!!

The Three Sounds - Introducing The Three Sounds (1958), Vinyl x2, Analogue Productions 2010, 45rpm, US
https://www.diyaudio.com/forums/music/6958-playing-listening-post6233790.html
 

Attachments

  • The Three Sounds - Introducing The Three Sounds, AP 2010.jpg
    The Three Sounds - Introducing The Three Sounds, AP 2010.jpg
    467.7 KB · Views: 86
Last edited:
Top Bottom