DiAna, a software Distortion Analyzer

ASIO control panel

@Edmond = Nice work. Have you in mind that the control panel of driver doesn't work inside from DiAna. The same was and at the previous version 1.48.1

@Martin = For statistics window seems that you had 20-20K range (20K LPF), Fs_192K, gen_997Hz. Do you keep the rest of the DiAna setup? DAC/ADC calibration for specific knobs settings and the output level?

Hi Manolis,

For the time being, I have deliberately disabled the ASIO control panel. Besides, it's not a very useful feature (only in case of a Xonar Essence sound card to set the number of bits: 16, 24 or 32). Please see also post 39.

Cheers, E.
 
Yes, I know what are you thinking about this.
Usually, the asio drivers have unconfigurable the input-output of the device, but the asio4all is an unique driver that if full configurable for the input-output (i.e different devices at input-output).
I haven't tried this asio driver (asio4all) with the DiAna, perhaps today find the appropriate time about this.
 
[..]
It seems to work OK except for some problem rendering the fonts for the frequency in the plot
[..]]
Indeed, a new bug. Using the Symantec compiler I had to replace the function log2() by logb() . The latter should (also) return a floating point number, but it doesn't, it returns an integer! For example logb(10.0) = 3 instead of 3.321928......
Totally weird. A compiler bug? Hard to believe.

Cheers, E.
 
[...]
Totally weird. A compiler bug? Hard to believe.
Cheers, E.
A compiler bug? Well, let's call it an anomaly.
According IEEE Std 1003.1, 2004 Edition, function logb() should return a signed floating-point value. So far so good. BUT.... the manual of the Symantec compiler says something else: "Extracts the exponent of x, as a signed integral value". That's why it went wrong. In the meantime I've corrected this error and uploaded an updated version on my website. Version number is 1.48.3.

Cheers E.

@David:
>Does the number of significant digits need to be set?
No, see explanation above.

PS: The new version triggers a few more false positives on virustotal.com. I get totally mad at those silly "random generators" Happily, virusscan.jotti.org reports no viruses at all.
 
Edmond, I saw today that the asio4all works with DiAna, but you need to setup the input-output configuration outside from DiAna.
Could you saw us the way with Diana, how to measure a dac for example with asio4all?
Is that the same like loop-back that we tried on RTX?
I mean, first "write to file" with the role of gen the dac and then "read from file"?
 
Edmond, I saw today that the asio4all works with DiAna, but you need to setup the input-output configuration outside from DiAna.
Could you saw us the way with Diana, how to measure a dac for example with asio4all?
Is that the same like loop-back that we tried on RTX?
I mean, first "write to file" with the role of gen the dac and then "read from file"?

Hi Manolis,

If I understand you correctly, you couldn't access the asio4all control panel (from outside) when in "write to file" mode. Right? Well, I have to admit, that is an "unintentional omission", which I've corrected by now (version 1.48.4). The asio4all control panel can be accessed via the asio4all icon in the system tray. Now, this icon (see pic) will appear when switched from "Full duplex" to "Write to file" mode or vice versa.
>Is that the same like loop-back that we tried on RTX?
Yes, I think so, but can't check it, as I don't have an RTX at my disposal.

Cheers, E.

(version 1.48.4 will be uploaded soon)

NB: After the tiny modification of the program, virustotal reported 13 out of 68 PUP's. Again, these are all false positives, of course. Apparently, these AV scanners "infect" themselves with the exchange of erroneous signature data bases. Perhaps I should report these false positives to those AV companies, but then I have to do this again and again after each modification of the program, I'm afraid.
 

Attachments

  • A4A-1.jpg
    A4A-1.jpg
    13.2 KB · Views: 187
  • A4A-2.jpg
    A4A-2.jpg
    13.8 KB · Views: 169
  • A4A-3.jpg
    A4A-3.jpg
    42.1 KB · Views: 171
[...]
NB: After the tiny modification of the program, virustotal reported 13 out of 68 PUP's. Again, these are all false positives, of course. Apparently, these AV scanners "infect" themselves with the exchange of erroneous signature data bases. Perhaps I should report these false positives to those AV companies, but then I have to do this again and again after each modification of the program, I'm afraid.

A new version is available (1.48.5), which -according to jotti- is totally clean.
It appears that certain bit patterns, created by the optimizer for speed (during compilation) was responsible for triggering false positives. By disabling optimization for one of the files (out of 13), false alarms are all gone. As only a small and not time critical part of the program lacks this speed optimization, I don't think it has any impact on the performance.

Cheers, E.
 
Last edited:
ASIO contrl panel

@Edmond = Nice work. Have you in mind that the control panel of driver doesn't work inside from DiAna. The same was and at the previous version 1.48.1
[...]

Hi Manolis,

You could re-enable the ASIO control panel by setting the parameter AcpEnable in the ini file to a nonzero value, but beware of possible issues, see post 39.

Cheers, E.
 
Hi Manolis,

You could re-enable the ASIO control panel by setting the parameter AcpEnable in the ini file to a nonzero value, but beware of possible issues, see post 39.

Cheers, E.

Yes, I had forgotten this. Thnx!

Today, I had time and tried the 1.48.5 version that upload from your server.
I changed the AcpEnable to 1 and I make some loop-back tests with RTX_asio and asio4all drivers.
Everything was OK with "Full Duplex"/"Write to file"->"Read from file" modes.
Then I setup the asio4all with Amanero Usb Output and RTX input and make an AK4490 Dac test that I have.

Edmond, everything was OK and with this testing.

One point that must to be note, is the buffer value of the driver, if the buffer value is smaller than required, then you will have glitches and more errors from DiAna.

Also, the font issue on X-axis has gone. I think this the best version that you had until now, Edmond.

At the last, I would like to give an example with real DUT like dac that today tested and DiAna calibration procedure.

If I set the ADC input of RTX at 10dBV or 3.16Vrms (FS) then I must set in the Diana Preferences ADC area 3.16*1.414= 4.468 (Vp)
If the FS output of DAC in 200K input impedance (RTX input Impedance) is 2.74Vrms or 3.87Vp, then the the right value on Diana DAC output will be 1/3.87 = 0.258

preferences.jpg

Am I right?
With 250m gen output I had the above results

with cal.jpg

But if I reset all the values to the initial default, then the results will be much better.

initial preferences.jpg

no cal.jpg
 
DAC calibration

Hi Manolis,

Yes, I had forgotten this. Thnx!
Me too, well, almost. ;)
Today, I had time and tried the 1.48.5 version that upload from your server.
I changed the AcpEnable to 1 and I make some loop-back tests with RTX_asio and asio4all drivers.
Everything was OK with "Full Duplex"/"Write to file"->"Read from file" modes.
Then I setup the asio4all with Amanero Usb Output and RTX input and make an AK4490 Dac test that I have.

Edmond, everything was OK and with this testing.
I'm glad to hear this.
One point that must to be note, is the buffer value of the driver, if the buffer value is smaller than required, then you will have glitches and more errors from DiAna.
Yes, I've noticed that too. See also below.
Also, the font issue on X-axis has gone. I think this the best version that you had until now, Edmond.
It was easy to repair. The culprit was an ill implementation of the logb() function (it returns an integral number instead of a floating point number, a compiler bug)
At the last, I would like to give an example with real DUT like dac that today tested and DiAna calibration procedure.

If I set the ADC input of RTX at 10dBV or 3.16Vrms (FS) then I must set in the Diana Preferences ADC area 3.16*1.414= 4.468 (Vp)
That's correct.
If the FS output of DAC in 200K input impedance (RTX input Impedance) is 2.74Vrms or 3.87Vp, then the the right value on Diana DAC output will be 1/3.87 = 0.258. Am I right?
In the past that would be correct (see post 55), but not any longer. Entering the reciprocal value of amplitude was a source of much confusion, so I've changed that. Now you can enter just the full scale peak voltage of the DAC (and diana takes care of the inversion), see post 116. I should have more clear on this point, my apologies for this.
But if I reset all the values to the initial default, then the results will be much better.
Most likely because of wrong calibration factors for the DAC. I hope you will get better results with the correct factors.

BTW, instead of using ASIO4ALL to select different sound cards for ADC respectively DAC, you also could load DiAna twice (and click on Proceed) and select in the preference menu of the 1st instance the Amanero directly and select in the preference menu of the 2nd instance the RTX. To switch on the DAC just click on the Monitor button. One more thing: remember to enable the External sync option in case the sounds cards don't share the same clock (i.e. are not exactly synchronized). As for buffer size issues, maybe they are also gone when using this scheme.

Cheers, E.
 
Nice information.

With the right calibration now I am almost 118.5dB.

with cal.jpg

With twice load DiAna, I select at the 1st with Amanero driver the monitor button but at the 2nd DiAna with RTX driver which button I must to select? I tried first to "write to the file" and then the "read from this file".
Is that the right?
 
Hi Manolis,
Nice information.

With the right calibration now I am almost 118.5dB.
That "sounds" much better.
With twice load DiAna, I select at the 1st with Amanero driver the monitor button but at the 2nd DiAna with RTX driver which button I must to select? I tried first to "write to the file" and then the "read from this file".
Is that the right?
Maybe you can do it by swapping the data via disk, but it can be done much simpler. Use DiAna-1 for output, select Full duplex and start the DAC by clicking on the Monitor button.

Optionally, in order to observe the signal in the lower pane, make not only a loop-back connection form this DAC to the ADC used by DiAna-2, but also to the ADC of DiAna-1.

Use Diana-2 for input, also select Full duplex and start the ADC by clicking on the Distortion button. Now, the signal(s) should be visible in the lower pane(s), see pic 3.
When all done, either done by clicking the Abort button of DiAna-2, or when all number of records are processed, you can stop the DAC by clicking the Abort button of DiAna-1, see pic 4.

A few more hints:
Make sure using the same signal frequency for both instances, see pic 2.
In case of a Xonar Essence STX sound card (definitely not my first choice!), make sure this one is selected and activated by the 1st instance of DiAna. When done, load 2nd instance and select the other sound card, see pic 1. Doing it the other way around might give unpredictable results or even a system hang (courtesy of asus :rolleyes:).

Cheers, E.
 

Attachments

  • dual-1.png
    dual-1.png
    24.9 KB · Views: 215
  • dual-2.png
    dual-2.png
    21.7 KB · Views: 201
  • dual-3.png
    dual-3.png
    20.2 KB · Views: 206
  • dual-4.png
    dual-4.png
    28.2 KB · Views: 202
Edmond, you are very kind and I appreciate your time to available to us.

I follow your steps and I have done some measurements with that method (double DiAna).

This is what I have done with the setup in Preferences.

2nd capture.jpg

The small DiAna wnd have the Combo384 Asio, this is the asio for the Amanero Usb to i2s card (DAC).
The bigger DiAna2 wnd have the RTX Asio driver, this is the ADC.

1st capture.jpg

Here the same like before but this is Distortion Setup.

- It is strange, I have select the 997Hz as gen_freq as you see, but the left lower corner at Diana1 shows 37612. This is a bug?

- I pressed the monitor button of the left DiAna and left it to run all the time. In the meanwhile I took measurements (Full Duplex) with the right Diana2, here the results:
infdB
-116.7
-117.3
-116.1
-120.4
-120.3
infdB
-120.3
infdB
-115.7
infdB
-118.5

Is that normal or this is related with the following.
At the right down corner there is indicator with red color.
The values on it are: Dropout error, DAC underrun, Outlier error
What is the meaning of these and how correlated with the THD measurement.
 
Hi Manolis,

Edmond, you are very kind and I appreciate your time to available to us.
I follow your steps and I have done some measurements with that method (double DiAna).
This is what I have done with the setup in Preferences.
The small DiAna wnd have the Combo384 Asio, this is the asio for the Amanero Usb to i2s card (DAC).
The bigger DiAna2 wnd have the RTX Asio driver, this is the ADC.
Here the same like before but this is Distortion Setup.
- It is strange, I have select the 997Hz as gen_freq as you see, but the left lower corner at Diana1 shows 37612. This is a bug?
No, it is not a bug. The frequency you see here is based on what the ADC (of DiAna-1) is receiving. As the amplitude is only 0.156mV, this indicates that the ADC is disconnected. As a result, the program is unable to calculate the frequency and you will get a readout based on noise. To remedy this "bug", simply make a loop-back connecting from the DAC to the ADC (of DiAna-1, of course).

- I pressed the monitor button of the left DiAna and left it to run all the time. In the meanwhile I took measurements (Full Duplex) with the right Diana2, here the results:
infdB
-116.7
-117.3
-116.1
-120.4
-120.3
infdB
-120.3
infdB
-115.7
infdB
-118.5

Is that normal or this is related with the following.
This is certainly not normal, especially "infdB". I've never seen this before.
At the right down corner there is indicator with red color.
The values on it are: Dropout error, DAC underrun, Outlier error
What is the meaning of these and how correlated with the THD measurement.
Now I'm a bit confused, because DiAna-1 is "red", which is normal, as the ADC is apparently disconnected, while DiAna-2 is "orange", which means your PC was also busy with other things (that might be DiAna-1 or something else as well). But if you got these error msg. from DiAna-2, these are serious errors.
Dropout error: One or more records were not captured or processed in time.
DAC underrun: The sine wave synthesizer was too late to deliver the next record of samples.
Outlier error: The amplitude, offset voltage or frequency deviates too much from the average values. Normally, you will get this error msg. too, as a result of the other two errors.
and how correlated with the THD measurement.
Above errors have no large impact on THD figures, as faulty records are simply discarded. But "infdB" indicates that more is wrong, just a bug? On the other hand, the THD spectrum looks quite normal. Perhaps you could put the cursor on the successive spectrum lines to readout the values and compare them with the values of the table in "Statistics 4".

Cheers, E.

edit: Is you PC fast enough to handle two instances of DiAna? Have a look at " CPU utilization in "Statistics-1" and/or Performance figures of the "Windows Task Manager". Above 50% means troubles, as Windows is not a real time OS.
 
Last edited:
The DiAna runs on Win'10 64 bit with Intel Core2Duo T7400 and 2Gb RAM (probably I upgrade to 4Gb RAM, if the RAM module that I will receive these days plays well).

In reality, some errors like these, there are and with only one DiAna.
The infdB is happening often!
If you see my previous captures with alone DiAna wnd, all of them almost, have a red indicator at the corner!

Edmond, I will prepare a demo about these and upload it.
 
Last edited:
The DiAna runs on Win'10 64 bit with Intel Core2Duo T7400
Hmm.. Not the fastest CPU out there, but it will do, provided that no other task are running (in the background).

and 2Gb RAM (probably I upgrade to 4Gb RAM, if the RAM module that I will receive these days plays well).
DiAna doesn't need that much of memory.
In reality, some errors like these, there are and with only one DiAna.
The infdB is happening often!
Till now, I've don't have an explanation for this weird error.
Could you compare the infdB harmonics with the height of the corresponding spectral lines in the THD plot? As far as I can see, they are okay, so the error must occur in the "statistics-4" routines.
If you see my previous captures with alone DiAna wnd, all of them almost, have a red indicator at the corner!
Edmond, I will prepare a demo about these and upload it.
I'm not sure how your version of W10 behaves on your PC, but on my PC it is busy with a lot of rubbish during the first 5 minutes or so after startup. During this time DiAna experiences a lot of dropouts. So I have to wait when W10 stops with "Windows Modules Installer Worker" or "Antimalware Services Executable" etc. Please, also google "Optimising your PC for audio on Windows 10" in order to stop these useless and disrupting background tasks. Also disable (or even better remove) Telemetry and Data Collection by removing CompatTelRunner.exe
I hope this will help. Good luck.

Cheers, E.
NB: I'm away for one day.