DiAna, a software Distortion Analyzer

The conditions in that test:-

Top trace output cannon XLR - D-A convertor (internal). (ID digigram).
Loop back cannon XLR A -D convertor (internal)
As you can see, it's "good enough" to be considered a proper square wave.

Bottom trace output from same sound card, sent over digital SPDIF into Arcam D-A convertor.
Output from that convertor sent back into opposite channel PC card via cannon XLR A-D.(internal).
Levels were all corrected so there's no room for clipping or other nasties.

It's a valid test because the jitter on the PC sound card is clearly visible, but nothing like what comes back from the external convertor.

I have several DAW with different sound cards and OS, ranging from win2k3, win2k with LYNX on an old DEC64, to Linux on DEC64 and NT4 on older PCs with high quality professional ISA cards.
Suprisingly some of the older ISA cards with most discrete components perform well, inc one with ADAT/SPIF optical inputs.
Some of the old sony DAT machines also perform well, -they are 25yrs old.

I have to measure some of the most expensive ones from our opera but need a SPDIF-AES convertor for that.

Why do I consider this important?
Elimination and validation.

I discovered distortion in waveforms in recording at low frequencies in the zone 20-45Hz.
I assumed it was the speakers used to produce this output or the amplifier. (the most likely cause).

I got traces back from the amplifier under load which proved it was not that.

I then assumed it was the speakers producing the distortion - which was far more likely.

I then used 2 different hi quality studio microphones and recorded the outputs.
Much to my suprise the waveforms coming back were both different with clear distortion in totally different frequency zones.
When you FFT and correct levels there is no anomaly caused by frequency response or SPL related reasons.
The distortion is clearly coming by process of elimination from the mics themselves, and in my opinion nothing to do with the mic circuitry (one of them being a very latest generation class A design, and the other a classic expensive German FET design from Neumann).

To me, to discover an amp and speaker + recording system, was more linear than the microphones was one of the biggest suprises I have ever seen.
I did go very far to try to get this kind of linearity in reproduction but it exceeded what I expected by a large margin.

(The vast majority of even highest quality speakers run up THD at these low frequencies typically exceeding 1-2%, in many cases by easily double that.).
 
Last edited:
This is a 1kHz square wave generated at 96kHz samplerate, as good as it can get (no analog processing involved). Which of your digital -> analog -> digital screenshots is closer?
 

Attachments

  • 1kHz-square.png
    1kHz-square.png
    7.7 KB · Views: 197
Which of your digital -> analog -> digital screenshots is closer?

Very clearly the TOP trace on my graph is considerably better than the one you show, with no overshoot, and only some jitter.

Your graph... is it really "as good as it can get" (?) :rolleyes: has massive spikes with overshoot on the leading edge, then another sharp spike on the trailing edge with loads of jitter in between.
I certainly could never use that as an audio source and/or diagnostic tool.

Mine has gone through a D-A then A-D, conversion, which I often use to test amplifiers at full load.
The trace I am sorry to say is far more typical of what I might expect to get back from an amplifier.

Having said that, this is what the amplifier said, which TBH is still cleaner than what you are showing...
eg.
I use such methods to test for waveforms comparing amplifiers with and without NFB to see what effect it has.

As you can see, the waveforms back from these 2 remarkably linear valve amplifiers at within 1dB of maximum power -on full chat are really quite astonishing.
They don't substantially alter the waveforms at all.
This is usually the point I am watching very carefully the HT lines and measuring internal loads.

One of them is making 100W into load, the other about 45-50.

The 50W amp very soon after, melted several screen grids although it didn't die a death.
The 100W amp just carried on regardless with bright red anodes but I burnt my fingers on the dummy load (badly!)

It's exactly what is needed to be known about a much narrower more delicate margins for overload and general abuse.
 

Attachments

  • square_wav_at-1db.jpg
    square_wav_at-1db.jpg
    186.2 KB · Views: 190
  • 100W_square_wave_full_power.jpg
    100W_square_wave_full_power.jpg
    133.7 KB · Views: 189
Last edited:
Your graph... is it really "as good as it can get" (?) :rolleyes: has massive spikes with overshoot on the leading edge, then another sharp spike on the trailing edge.

Yes, that is the best 1kHz square wave generated at 96kHz you can get. That is exactly what you generate in your software - a square wave bandwidth-limited at 48kHz (the Nyquist frequency). If anything else leaves your DAC, it is incorrect. Since no DAC is ideal, you will never see such symmetric and clean waveform.

Since I do not have a software properly resampling the waveform to screen pixels, resampling to 10MHz and viewing in audacity was used to view the analog/continuous-time representation.
 
As you can see, the waveforms back from these 2 remarkably linear valve amplifiers at within 1dB of maximum power -on full chat is really quite astonishing.

Those waveforms are a nonsense - your software interpolates/connects sample values at time points with straight lines. Just like audacity and vast majority of other tools do. If you want to see the proper waveform, resample to >= pixel density or use a proper tool.
 
I think you can see the sample generated in the software at 24bit resolution on the LH. (in the upper LH channel in fact.)

It looks like that going out on LH channel to analogue.
What I get back comes back in on the RH channel, direct from a voltage divider on the dummy load, so we can record the entire output for posterity.
I don't even need to re-run tests, it's all recorded in the DAW.

I think we can see on the previous posts comparing the arcam with a straight loop back, exactly what I should expect to get back.

As you can see, I don't need to do more.
Any distortion in the wave forms are easy to see.
What don't you understand?
 
Last edited:
I think you can see the sample generated in the software at 24bit resolution on the LH. (in the upper LH channel in fact.)

It looks like that going out on LH channel to analogue.

Samples are mere points - screenshot 1. D-A conversion turns these time points into continuous signal.

The 96kHz signal resampled to 96MHz, still showing sample points (the software used (snd) clearly skips some points, probably for performance purposes) - screenshot 2

The transition detail in screenshot 3 (very likely still lots of samples skipped).
 

Attachments

  • samples.png
    samples.png
    8.1 KB · Views: 171
  • samples-96MHz.png
    samples-96MHz.png
    9.5 KB · Views: 152
  • samples-96MHz-detail.png
    samples-96MHz-detail.png
    6.6 KB · Views: 61
Those waveforms are a nonsense - your software interpolates/connects sample values at time points with straight lines. Just like audacity and vast majority of other tools do. If you want to see the proper waveform, resample to >= pixel density or use a proper tool.
Not so with DiAna. Interpolation can be done by means of B-splines (0...3rd degree), natural cubic splines (see pic.) or a low-pass sync filter. :D
Below a square wave loop back test with the RTX at 997Hz, sampling rate = 192kHz and amplitude = 50% full scale. Note that the DAC output also shows some ringing.

Cheers, E.
 

Attachments

  • sqw1kc.png
    sqw1kc.png
    13.2 KB · Views: 100
  • sqw-dac2.JPG
    sqw-dac2.JPG
    155 KB · Views: 90
Last edited:
SAR-ADC

Hello,
Those oscillating symmetric square waves are typical from Delta-sigma ADC
and come from the digital FIR filtering inside ADC/DAC.
(SAR ADC's can produce much more flat square wave).
Yes.
I'm very curious then to try my ADC with Diana...
Frex
Me too! But currently, DiAna supports only the ASIO protocol. So there might be a compatibility issue.

Cheers, E.
 
Hello,

Those oscillating symmetric square waves are typical from Delta-sigma ADC
and come from the digital FIR filtering inside ADC/DAC.
(SAR ADC's can produce much more flat square wave).

The higher the sample rate, the smaller the overshoots, i.e. the closer the sampled signal is to the analog true square wave. The higher harmonics contribute to the "sharp corner" of the square wave.

Have you compared your SAR ADC with a delta-sigma DAC outputting the same samplerate? IMO if both are correct they should produce the same output, otherwise one of them is lying (introducing distortion, i.e. not correct).
 
Phofman,
I already posted a time domain response of my SAR ADC analyzer here.
The response doesn't have the symmetric ripple because there is no FIR filter
(only a SinC one that is a RII filter type).
If i add a FIR filter to remove aliasing frequency above, the result is same as
conventional delta/sigma ADC. The OSVA will differ in way were you can choose
of what filter you want to use (depending on your own need).
But the ripple at output of the FIR is the consequence of the very sharp rolloff
of the filter that remove all frequency above it's cutoff.
(Square wave require infinite number of harmonics to become really square).

Edmond,
No worry, i actually use the SPDIF output of the AA2380v1 board and send
the stream to a RME HDSP9632 that have ASIO drivers.
When OSVA will use the USB-streamer board or even the SDR-widget,
ASIO is supported too.


Frex
 
Member
Joined 2004
Paid Member
This is getting a little weird.

1) Testing an audio link through microphones and speakers looking for waveform fidelity will be really disappointing. There are many valid fundamental reasons why that won't be easy. Starting with a real world room and going on to the impact of a directional microphone. Not an easy issue to resolve.

2) Band limited square waves. Been an audio red herring for years. If you use an analog or a wide band digital scope you can see the leading edge of a real square wave. That square wave won't exist in a band limited audio chain. But audio channels are all band limited starting with the microphone, then the recording medium then the reproducing system and finally human hearing. In the analog days the brick wall was at more like 15-18 KHz and had to do with the nature of a recording head and bias oscillators. Digital had the promise of 'perfect fidelity" but only within the legitimate band and the closer you pushed to the Nyquist limit the more artifacts you have. However a real world audio link with a microphone won't have much content above 12 KHz at level and very little above 20K under the best circumstances. The distorted output from the "premium" dac was an effort for a better subjective experience as the expense of objective fidelity. Look for a measurement of amplitude and phase vs frequency to get a better idea of how faithful the channels is to the input. Acoustic square waves only exist in conditions that are dangerous to human health (and they are not square because air is not perfectly linear).

You could try recording a balloon popping with both a 1/4" measurement microphone and a normal recording chain and see how degraded the impulse is on a playback chain. However that's only really relevant to those who listen to balloons popping for entertainment. Doing the same with spoken word will tell a lot about real intelligibility of the chain which I posit is far more important.
 
Is there anybody who managed Diana working under Linux/Wine?
Or is this definitely impossible?

If I understand it right ASIO is the problem.
Try as you might, you can't get that to interface any of that to Linux audio (a can of worms if there ever was one!)

Other question:-
1) Testing an audio link through microphones and speakers looking for waveform fidelity will be really disappointing.
There are many valid fundamental reasons why that won't be easy.
Starting with a real world room and going on to the impact of a directional microphone. Not an easy issue to resolve.*

However a real world audio link with a microphone won't have much content above 12 KHz at level and very little above 20K under the best circumstances.**

NO WAY.
A simple FFT analysis is very revealing comparing 2 microphones at exactly the same locations*.
Once you start inspecting waveforms and see disparities between the 2 microphones in distortion signature,you are barking up the right tree.

**You are joking?
One of the principal requests I had from the microphone manufacturer, was, can I do testing in the ultrasonic area?
Watching the HF response of my own system, I can see (and hear) clearly 15khz, so when we go off above that, the mic is clearly generating signal.

I asked my young daughter to do a hearing test (this time with headphones).
Ran a 23khz sine through it, she jumped, held her ears and ran off, refusing to do anything like it again!
 
Last edited:
Member
Joined 2004
Paid Member
Sure- you are getting output from the microphone BUT its not a frequency independent parameter. The physical dimensions of the mike have a huge effect when the wavelengths start matching dimensions of the microphone. For example a 1" B&K (.946" to be precise) in free space on axis has a peak at about 8 KHz and a null at around 22 KHz. You can do tuning and electrical compensation to some degree but every angle and every frequency will be different compensation.

A directional microphone will tend to differentiate the waveform and give something that's quite different from a pressure microphone for low frequency pressure waves.

The picture below will illustrate part of the problem. More here if you want to wade through it all: https://www.bksv.com/media/doc/be1447.pdf

I started out expecting to be able to get waveform fidelity through the acoustic links. It was not to be and I have a better understanding now. Its not a simple problem.

You can get to 35 KHz with a 1/4" primo electret (less than $2) if that what you want to explore. Some work was done to see how much HF comes from real instruments: There's life above 20 kilohertz! A survey of musical instrument spectra to 102.4 kHz Processing it faithfully needs higher sample rates and wideband microphones. However the noise floor comes up significantly with the smaller microphones making them less suitable for some recordings.
 

Attachments

  • Pressure field.PNG
    Pressure field.PNG
    41.6 KB · Views: 139
Thanks.
Most interesting subject.
I am familiar with the high voltage B & K (130V), and the theory behind their metal capsules, carried over I believe to DPA.

What was interesting to us, is testing a Russian copy of the DPA very recently, which gives in our tests gives something really quite different...an ongoing dialogue with the manufacturer is taking place.
"A directional microphone will tend to differentiate the waveform and give something that's quite different from a pressure microphone for low frequency pressure waves."
Yes and our "semi directional" microphones are the area of interest, wide oval omni and figure 8.
Add to that, less than optimal acoustic conditions, and a using convolution to compensate..by default

(hey it's what Sony music did, flew in a lousy foreign engineer even cheekily borrowed our own mic inventory, then some idiot tells them to make a vinyl version of a Mozart opera they did, claiming it's better! I kid you not!)
Looking at the docs you linked, of course, the instruments which cause greatest concern are percussions, especially cymbal which I see has:-[FONT=Goudy Old Style, Goudy, GoudyOlSt BT]
the proportion of energy above 20 kHz is,... cymbals, 40 percent
, and the bass drum, which has huge energy, tends to modulate the entire audio spectra on non optimised reproduction systems..

[/FONT]In the resulting lifeless "mush"...

None of this comes as a suprise.
Listening to a BBC live broadcast from the Ulster orch yesterday showed how bad things can really get. The sound being close to what I call "nightmare", harsh, blairy, over compressed and constantly varying.

My area of activity is teaching at the hard end.
This take a lot of time.

Without lots of (hard won) experience engineers tending to rely on ready made algorithms for compression getting some fairly horrible artefacts.
They are more and more failing to spot the tell tale clues being generated by pumping & over compression on transients. Honestly. Things are sounding worse and worse, and I don't know when it will end.

This question of HF energy content to me is something I suspected for many years.

It's becoming more and more like Sherlock Holmes, sleuthing around recordings then the 2 major software programs used to generate recordings, putting it through a reliable reproduction system (reliable being the vital word!) then pointing fingers..

The debrief ends up:-
Why? What? How? Where? Who? did that....[FONT=Goudy Old Style, Goudy, GoudyOlSt BT]

Reading more of this thread, means Sherlock gets another pocket magnifying glass, then he has to check, is this the right tool I am looking for?
[/FONT]
 
Last edited:
This is getting a little weird.

1) Testing an audio link through microphones and speakers looking for waveform fidelity will be really disappointing. There are many valid fundamental reasons why that won't be easy. Starting with a real world room and going on to the impact of a directional microphone. Not an easy issue to resolve.

2) Band limited square waves. Been an audio red herring for years. If you use an analog or a wide band digital scope you can see the leading edge of a real square wave. That square wave won't exist in a band limited audio chain. But audio channels are all band limited starting with the microphone, then the recording medium then the reproducing system and finally human hearing. In the analog days the brick wall was at more like 15-18 KHz and had to do with the nature of a recording head and bias oscillators. Digital had the promise of 'perfect fidelity" but only within the legitimate band and the closer you pushed to the Nyquist limit the more artifacts you have. However a real world audio link with a microphone won't have much content above 12 KHz at level and very little above 20K under the best circumstances. The distorted output from the "premium" dac was an effort for a better subjective experience as the expense of objective fidelity. Look for a measurement of amplitude and phase vs frequency to get a better idea of how faithful the channels is to the input. Acoustic square waves only exist in conditions that are dangerous to human health (and they are not square because air is not perfectly linear).

You could try recording a balloon popping with both a 1/4" measurement microphone and a normal recording chain and see how degraded the impulse is on a playback chain. However that's only really relevant to those who listen to balloons popping for entertainment. Doing the same with spoken word will tell a lot about real intelligibility of the chain which I posit is far more important.

Well said, the rest above this post belongs in another thread.