• 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,724
Likes
10,418
Location
North-East
Here's what clipping looks like in DISTORT with a two-tone test signal (50Hz and 1kHz):

1576472416700.png
 

Arpiben

Member
Joined
Dec 1, 2019
Messages
38
Likes
37
Version 1.0.14 is now available with the following changes:
  • Added custom sine-wave components to the Noise settings window. Supports frequencies into MHz and beyond
  • Improved quality of the close-in (1/f) jitter generator
  • Added 1kHz square wave and 7kHz sine wave to the list of test signals
  • Double-click on the either of the two vertical sliders (alpha and beta) resets them to the initial setting of 1000
  • Quicker reaction to user-initiated changes to settings, even while a computation is already in progress
  • Improved frequency plot resolution from around -180dB to better than -280dB
  • Added clipping indicator when combined noise/jitter/waveforms exceed -1..1 sample range
  • Improved THD+N calculation accuracy
The custom sine-wave noise components table allows the addition of arbitrary sine wave frequency to the signal. Frequencies less than 1Hz and more than 100MHz are possible. This can be used to see the IMD interaction of very high frequencies with the audible range, for example.

For ease of entry, the table supports scientific notation (1e-5 or 1.001e6 for example):

View attachment 42648

Clipping indicator is shown only when the resulting test signal exceeds -1..1 sample size. Simply change the Test Signal dB level to a lower number until clipping is gone:

View attachment 42650

As always, bug reports, ideas and comments are welcome!

Hi Paul,

Sorry but it is not possible anymore to save the distorted file at least with several former 1.013 settings.
It seems to be quite systematic.
Otherwise thanks a lot for the added features & improvements.:)
Rgds.


1576490224927.png


2019-12-16 10:59:37.0383|INFO|Wave.DistortForm|Distort v1.0.14, 2019-12-16T10:59:37.0383767+01:00
2019-12-16 10:59:37.0383|INFO|Wave.DistortForm|Reference: A.wav[L] 524288 samples 64000Hz 64bits, mono, MD5=00
2019-12-16 10:59:37.0383|INFO|Wave.DistortForm|Settings:
Gain:True, Remove DC:True
Non-linear Gain EQ:False Non-linear Phase EQ: False
EQ FFT Size:65536, EQ Frequency Cut: 0Hz - 0Hz, EQ Threshold: -160dB
Correct Drift:True, Precision:30
Non-Linear drift Correction:False
Upsample:False, Window:Hann
Spectrum Window:Kaiser, Spectrum Size:65536
Spectrogram Window:Hann, Spectrogram Size:4096, Spectrogram Steps:2048
Dither:False
Trim Silence:False

2019-12-16 10:59:37.0383|DEBUG|Wave.DistortForm|Settings:
Gain:True, Remove DC:True
Non-linear Gain EQ:False Non-linear Phase EQ: False
EQ FFT Size:65536, EQ Frequency Cut: 0Hz - 0Hz, EQ Threshold: -160dB
Correct Drift:True, Precision:30
Non-Linear drift Correction:False
Upsample:False, Window:Hann
Spectrum Window:Kaiser, Spectrum Size:65536
Spectrogram Window:Hann, Spectrogram Size:4096, Spectrogram Steps:2048
Dither:False
Trim Silence:False

2019-12-16 10:59:37.0539|ERROR|Wave.DistortForm|Stopped!
at Wave.DistortForm.ProcessAll(Double[] L, Double[] L1, Int32 freq, Int32 freq1, Int32 freq2, Int32 bits1, Int32 bits2, Boolean bMatch, Boolean bLoadOnly, Boolean bApplyManual, Boolean bUpdateCharts) in C:\Users\ypa\Documents\Visual Studio 2015\Projects\Distort\Wave\DistortForm.cs:line 847
2019-12-16 10:59:37.0539|INFO|Wave.DistortForm|Stopped! Files loaded
2019-12-16 10:59:37.0539|DEBUG|Wave.DistortForm|Progress Stopped!, , 100%
2019-12-16 10:59:37.0539|INFO|Wave.DistortForm|Signature: b825d4d5c93ee8f4b0c3e4c5e0c577a2
2019-12-16 10:59:42.2353|INFO|Wave.DistortForm|Writing Distorted file to: C:\ProgramData\Distort\C.wav
2019-12-16 10:59:42.2473|ERROR|Wave.DistortForm|Unable to write file C:\ProgramData\Distort\C.wav
at Wave.DistortForm.<>c__DisplayClass210_0.<SetTransferFunction>b__0(Double x, Int32 pos) in C:\Users\ypa\Documents\Visual Studio 2015\Projects\Distort\Wave\DistortForm.cs:line 3002
at Wave.DistortForm.<>c__DisplayClass287_0.<saveCompareWaveToolStripMenuItem_Click>b__0(Double x, Int32 i) in C:\Users\ypa\Documents\Visual Studio 2015\Projects\Distort\Wave\DistortForm.cs:line 4508
at System.Linq.Enumerable.<SelectIterator>d__5`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Wave.DistortForm.saveCompareWaveToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Users\ypa\Documents\Visual Studio 2015\Projects\Distort\Wave\DistortForm.cs:line 4508
2019-12-16 10:59:42.2473|INFO|Wave.DistortForm|Unable to write file C:\ProgramData\Distort\C.wav
Index was outside the bounds of the array.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
Hi Paul,

Sorry but it is not possible anymore to save the distorted file at least with several former 1.013 settings.
It seems to be quite systematic.
Otherwise thanks a lot for the added features & improvements.:)
Rgds.


View attachment 42664

2019-12-16 10:59:37.0383|INFO|Wave.DistortForm|Distort v1.0.14, 2019-12-16T10:59:37.0383767+01:00
2019-12-16 10:59:37.0383|INFO|Wave.DistortForm|Reference: A.wav[L] 524288 samples 64000Hz 64bits, mono, MD5=00
2019-12-16 10:59:37.0383|INFO|Wave.DistortForm|Settings:
Gain:True, Remove DC:True
Non-linear Gain EQ:False Non-linear Phase EQ: False
EQ FFT Size:65536, EQ Frequency Cut: 0Hz - 0Hz, EQ Threshold: -160dB
Correct Drift:True, Precision:30
Non-Linear drift Correction:False
Upsample:False, Window:Hann
Spectrum Window:Kaiser, Spectrum Size:65536
Spectrogram Window:Hann, Spectrogram Size:4096, Spectrogram Steps:2048
Dither:False
Trim Silence:False


2019-12-16 10:59:37.0383|DEBUG|Wave.DistortForm|Settings:
Gain:True, Remove DC:True
Non-linear Gain EQ:False Non-linear Phase EQ: False
EQ FFT Size:65536, EQ Frequency Cut: 0Hz - 0Hz, EQ Threshold: -160dB
Correct Drift:True, Precision:30
Non-Linear drift Correction:False
Upsample:False, Window:Hann
Spectrum Window:Kaiser, Spectrum Size:65536
Spectrogram Window:Hann, Spectrogram Size:4096, Spectrogram Steps:2048
Dither:False
Trim Silence:False


2019-12-16 10:59:37.0539|ERROR|Wave.DistortForm|Stopped!
at Wave.DistortForm.ProcessAll(Double[] L, Double[] L1, Int32 freq, Int32 freq1, Int32 freq2, Int32 bits1, Int32 bits2, Boolean bMatch, Boolean bLoadOnly, Boolean bApplyManual, Boolean bUpdateCharts) in C:\Users\ypa\Documents\Visual Studio 2015\Projects\Distort\Wave\DistortForm.cs:line 847
2019-12-16 10:59:37.0539|INFO|Wave.DistortForm|Stopped! Files loaded
2019-12-16 10:59:37.0539|DEBUG|Wave.DistortForm|Progress Stopped!, , 100%
2019-12-16 10:59:37.0539|INFO|Wave.DistortForm|Signature: b825d4d5c93ee8f4b0c3e4c5e0c577a2
2019-12-16 10:59:42.2353|INFO|Wave.DistortForm|Writing Distorted file to: C:\ProgramData\Distort\C.wav
2019-12-16 10:59:42.2473|ERROR|Wave.DistortForm|Unable to write file C:\ProgramData\Distort\C.wav
at Wave.DistortForm.<>c__DisplayClass210_0.<SetTransferFunction>b__0(Double x, Int32 pos) in C:\Users\ypa\Documents\Visual Studio 2015\Projects\Distort\Wave\DistortForm.cs:line 3002
at Wave.DistortForm.<>c__DisplayClass287_0.<saveCompareWaveToolStripMenuItem_Click>b__0(Double x, Int32 i) in C:\Users\ypa\Documents\Visual Studio 2015\Projects\Distort\Wave\DistortForm.cs:line 4508
at System.Linq.Enumerable.<SelectIterator>d__5`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Wave.DistortForm.saveCompareWaveToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Users\ypa\Documents\Visual Studio 2015\Projects\Distort\Wave\DistortForm.cs:line 4508
2019-12-16 10:59:42.2473|INFO|Wave.DistortForm|Unable to write file C:\ProgramData\Distort\C.wav
Index was outside the bounds of the array.

Thank you, Arpiben. Does this happen only with old settings file or with new settings as well?
 

Arpiben

Member
Joined
Dec 1, 2019
Messages
38
Likes
37
Thank you, Arpiben. Does this happen only with old settings file or with new settings as well?

With new settings as well, in fact with whatever I am trying. Rolling back to Distort release 1.013 is solving my encountered issues.
Rgds
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
With new settings as well, in fact with whatever I am trying. Rolling back to Distort release 1.013 is solving my encountered issues.
Rgds

Strange, but I can't reproduce this with any of the settings I try. Can you please share your settings file (you can attach it to a message here)?
 
Last edited:

Arpiben

Member
Joined
Dec 1, 2019
Messages
38
Likes
37
Paul it is probably due to my non conventional sampling rate 64 kHz. I have just checked now with 96 kHz and the save functionality is working properly.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
Paul it is probably due to my non conventional sampling rate 64 kHz. I have just checked now with 96 kHz and the save functionality is working properly.

Ok, let me try that. Non-standard sampling rate should not be a problem, but perhaps it uncovers some condition which otherwise remains hidden.
 

Arpiben

Member
Joined
Dec 1, 2019
Messages
38
Likes
37
Ok, let me try that. Non-standard sampling rate should not be a problem, but perhaps it uncovers some condition which otherwise remains hidden.

Well, It seems that v1.0.14 doesn't like 64 bit files. To be confirmed.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
Paul it is probably due to my non conventional sampling rate 64 kHz. I have just checked now with 96 kHz and the save functionality is working properly.

Didn't reproduce the problem, but found one possible case where this error might occur. Please re-download the installer for v.14 and give it a try. If you already have previous .14 installed, please uninstall it first.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
Well, It seems that v1.0.14 doesn't like 64 bit files. To be confirmed.

Also tested with 64 bit files, and seems to be working. Please try the updated version. I think the issue might occur with any files where samples (after distortion) can get just into the clipping region of 1.0 or above when saving.
 

Arpiben

Member
Joined
Dec 1, 2019
Messages
38
Likes
37
Also tested with 64 bit files, and seems to be working. Please try the updated version. I think the issue might occur with any files where samples (after distortion) can get just into the clipping region of 1.0 or above when saving.

Just tried reducing my file amplitude and your assumptions are correct. Need to go now but will try it later more in detail.
Thanks Paul.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
Posted this on the other forum:

Here is some evidence that wide-bandwidth measurements may be interesting in the audible range, especially since some devices exhibit high amplitude noise/signal in those frequencies, according to @Miska who recommends measuring into 200MHz range.

Here's a simple 2-tone (SMTPE 60Hz/7kHz) IMD test with two RF-frequency tones in the presence of some non-linear distortion. The two spurious tones are at 1Mhz @ -50dB and 10Mhz @ -60dB. Red components are caused by the RF signal:

1576505018236.png
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
Posted this on the other forum:

Here is some evidence that wide-bandwidth measurements may be interesting in the audible range, especially since some devices exhibit high amplitude noise/signal in those frequencies, according to @Miska who recommends measuring into 200MHz range.

Here's a simple 2-tone (SMTPE 60Hz/7kHz) IMD test with two RF-frequency tones in the presence of some non-linear distortion. The two spurious tones are at 1Mhz @ -50dB and 10Mhz @ -60dB. Red components are caused by the RF signal:

View attachment 42683

Same distortion but applied to 1kHz test signal, red is intermodulation from RF frequencies:
1576507278034.png
 

Alex-D

Member
Joined
Mar 4, 2019
Messages
69
Likes
48
Thanks for the tool!

Noticed a couple of bugs in a latest version:
1) Even and Odd harmonics settings are not adding harmonics, have to use custom settings window
 

Attachments

  • 2019-12-16 19_10_13-Distort v1.0.14.png
    2019-12-16 19_10_13-Distort v1.0.14.png
    119.4 KB · Views: 106

Alex-D

Member
Joined
Mar 4, 2019
Messages
69
Likes
48
2) In custom harmonics window H2 is ignored, H3 becomes H2, H4 becomes H3 etc.
 

Attachments

  • 2019-12-16 19_14_28-Distort v1.0.14.png
    2019-12-16 19_14_28-Distort v1.0.14.png
    158.8 KB · Views: 106
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
Thanks for the tool!

Noticed a couple of bugs:
1) Even and Odd harmonics settings are not adding harmonics, have to use custom settings window

Thanks for the feedback. The odd/even harmonics feature is meant to subtract, not to add. In other words, pick the desired level of distortion with both, odd and even harmonics, then remove just even or just odd.

2) In custom harmonics window H2 is ignored, H3 becomes H2, H4 becomes H3 etc.

This one is a bug!
 

Alex-D

Member
Joined
Mar 4, 2019
Messages
69
Likes
48
3) Bluetooth headphones don't work at all
WASAPI has is super-laggy
DS has some weird very loud sound that sounds like heavy compressor DSP applied
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,724
Likes
10,418
Location
North-East
3) Bluetooth headphones don't work at all
WASAPI has is super-laggy
DS has some weird very loud sound that sounds like heavy compressor DSP applied

What sampling rate and bit setting? DS is actually using Windows basic audio for output, so any audio settings you have in Windows for this audio device should match the sampling rate and bits being output. Also, a slow computer could have an impact on playback since the distortions are applied in real time, as the sound is playing.

What happens when you try to export the WAV file and then play it in another audio player?
 

Alex-D

Member
Joined
Mar 4, 2019
Messages
69
Likes
48
What sampling rate and bit setting? DS is actually using Windows basic audio for output, so any audio settings you have in Windows for this audio device should match the sampling rate and bits being output. Also, a slow computer could have an impact on playback since the distortions are applied in real time, as the sound is playing.

What happens when you try to export the WAV file and then play it in another audio player?

Sample rate and bit setting for file are 44100/16, for audio device the same.

Computer is a modern 4-core laptop and plays back fine via USB.
WASAPI sounds like its processing until buffer fills, outputting buffer, processing again, outputting.
But these half-second pieces sound normal unlike DS. Is there a way to increase wasapi buffer?

Exported WAV is fine with Bluetooth
 
Top Bottom