How we perceive non-linear distortions

TNT

Member
Joined 2003
Paid Member
Not at all. The recording has its uses. That it is processed does not mean it cannot be revealing of added low-level distortion in A/B comparisons (it is 'clean' in the context of the harmonies not being overly masked for that particular use). That is a completely different use than judgement of production quality.
It does as it is impossible to know whats on the recording or is added in the reproduction system. In flurry of distorsion, it will be impossible to do A/B comparisons of distorsion.

//
 
Okay. Does that mean there are no constraints on dac quality at all?

I ask not to pester you, but because IME many things affect the ease or difficulty of detecting audible differences in preamps and or under what conditions one sounds better than another. For example, already mentioned ground loops. A little HD may help mask some of that resulting ugly, smeared, but not necessarily so easy to measure hash.

Measurements need of course high precision devices. For mine, I use a RME ADI2-pro as DAC/ADC.

For listening tests of the preamps I use different medium-high quality chains: mine and those of my audiophile friends, developed over many years of tests and comparisons. The entire chain is therefore well-finished and "balanced", given that in this field, as in many others, it is the weakest element of the chain that determines the final quality. And by "chain" I also include the listening environment, measured and treated by professionals in the field.

That said, the results on the pleasantness of the sound in the environments described certainly do not have the ambition of having an "absolute" character in relation to identifying the preamp with optimal characteristics for distortions. However, they help to direct the study, which has several variables at play, summarized at this link already reported in my first post.
 
Last edited:
Pinox, you stoped posting 1st January at ASR - why?

//
It is not so. The thread indicated in my last post is stopped as I have no substantial news on listening tests and preamp prototypes. It proceeds, but slowly. However, I have opened other treads, the last one is from last month, specifically on the relationship between the physical effects of low-order distortions and perception using mathematical models, already reported in this thread. You missed it! I await comments after careful reading.;)
 
Last edited:
  • Like
Reactions: 1 user
Regarding low time-averaged steady-state measurements as the one and only metric, I refer to a quote by the OP:
"To more easily correlate measurements to the effects on perception a promising path is that of time analysis applied to transients, where our auditory system is much more sensitive than frequency content. This involves comparing the derivatives of the signals, always in relation to the approach of the previous point."
You seem to be fixed on the notion that "taking measurements" is equal and limited to something that AP does. I have never said that those are the one and only metric. But if your DAC does not do well even on low time-averaged steady-state measurements it is an indication that it cannot accurately reproduce very small distortion artifacts.
 
Since this is about "How we perceive non-linear distortions"...

There's something I regret not doing with the output stage test setup: making it play music and record the open loop distortion of various output stage topologies. That's the difference between the input and output. So I'm gonna do it on a few topologies, and upload the files.

Deliverables for this experiment will be the original files and the distortion files. Then you can use a mixer to add some amount of the recorded distortion into the original, to simulate feedback for example, and listen to it.

In order to do so, I will need your participation:

- A bunch of test tracks

I will be stepping both bias current and amplitude. Say 10 runs total, times two because the setup is mono. This is automated, no problem, but it'll still generate huge recorded files. So I'd like the test track to be 6 minutes music plus 1 minute test signals. We have to choose 12x 30 second music pieces. There should be some diversity, high dynamic range, low dynamic range, instrumental, voices, one piano, lots of bass, no bass, etc. At least one track has to be only bass, with nothing to mask the high order harmonics.

The reason I'm posting here is that you guys have been doing listening tests so you must have a choice of tracks that are "discriminating" of distortions. Everything will be upsampled to 192k so, no constraints about sample rate.

- A representative loudspeaker model

The input of that output stage will be set to 0V, and a current will be injected into the output, representing what the output current of the amplifier would be when playing the music sample into a speaker. I might as well apply a simulated loudspeaker load to get a realistic current, it doesn't cost anything extra to tweak the audio file first. So I need a model. This will be linear and it won't include loudspeaker current distortion.

I should be able to do that in September.

In the meantime, you get this python output stage static crossover simulator. It outputs the distortion as .wav, so you can listen to it and mix it back into the signal with the amplitude you want.

https://pastebin.com/BpniDBPs
 
  • Like
Reactions: 1 user
...RME ADI2-pro as DAC/ADC.

Nice measurements. The original version used an AK4493 dac chip. Topping D90, for example, used a better chip, AK4499, but made a few mistakes elsewhere. After the AKM file, the new RMI ADI2-PRO uses an ESS ES9038Q2M, which is one of the problematic ESS chips some of us were recently talking about. The newer Topping version, D90SE, used and ESS ES9038PRO chip. The latter has some features that make it arguably better than the Q2M chip. Of course, its not just about the dac chip but if all else is done as wall as possible then choice of dac chip does set some limit on what is possible in terms of perceived SQ. For myself, I use a custom AK4499 dac operating in DSD256 mode.

Over all, I would rate the ADI2-PRO as maybe mid-tier professional or higher end prosumer. Certainly not the same SQ class as Bruno Putzey's Mola Mola Tambaqui DAC, for one example. If you ever get out to Northern California, you are very welcome bring the RME dac and listen to it on the Sound Lab electrostatic flat panel speakers. We could also compare it with the other dacs here. Might find its not as accurate from a perceptual perspective as the numbers would seem to suggest.
 
Last edited:
  • Like
Reactions: 1 user
Compression and expansion often are not always results of HD. Sometimes compression and expansion can produce HD transiently depending on attack and decay times. Signal correlated power supply sag on LF transients might produce effects that fall into that category.

Sym-Dis1 - page 3.png

Total Harmonic Distortion or "THD" measurements using a fixed input sinusoid cannot necessarily resolve the non-harmonic spectral component distortions, in particular the fundamental frequency distortion caused by gain error.

IMO THD is only a special case of Total Spectral Distortion or "TSD". From the figure, when using either a compression or expansion transfer function, the extracted distortion component itself is made up of a fundamental frequency distortion component in conjunction with a 3rd harmonic. The difference between an expansion or compression waveform relates the phase of the fundamental frequency distortion component that either increases or decreases the projected amplitude of the fundamental frequency in the output spectrum. The projected undistorted fundamental frequency is referenced to that projected from a straight line gain slope passing through the origin .

If we consider that the input amplitude is changed from one amplitude to another the transition (or transient) between these two states cannot hold the fundamental spectral line as pure. The amplitude, and lack of purity of this fundamental frequency component (in conjunction with harmonics) seem a likely contributor to psycho-acoustic phenomenon being detected, particularly if modified by frequency response conditions subsequent to the point of the non-linearity.

Although the conversion from the time domain to the frequency domain can be concluded lossless there seems a general faulty error in the interpretation of the spectral components, in that the fundamental frequency is distortion free. This as opposed to being made up of more than one fundamental frequency component that ought not to be concluded as singular and a non-contributor to psycho-acoustic phenomenon.
 
  • Like
Reactions: 1 user
View attachment 1078062

Total Harmonic Distortion or "THD" measurements using a fixed input sinusoid cannot necessarily resolve the non-harmonic spectral component distortions, in particular the fundamental frequency distortion caused by gain error.

IMO THD is only a special case of Total Spectral Distortion or "TSD". From the figure, when using either a compression or expansion transfer function, the extracted distortion component itself is made up of a fundamental frequency distortion component in conjunction with a 3rd harmonic. The difference between an expansion or compression waveform relates the phase of the fundamental frequency distortion component that either increases or decreases the projected amplitude of the fundamental frequency in the output spectrum. The projected undistorted fundamental frequency is referenced to that projected from a straight line gain slope passing through the origin .

If we consider that the input amplitude is changed from one amplitude to another the transition (or transient) between these two states cannot hold the fundamental spectral line as pure. The amplitude, and lack of purity of this fundamental frequency component (in conjunction with harmonics) seem a likely contributor to psycho-acoustic phenomenon being detected, particularly if modified by frequency response conditions subsequent to the point of the non-linearity.

Although the conversion from the time domain to the frequency domain can be concluded lossless there seems a general faulty error in the interpretation of the spectral components, in that the fundamental frequency is distortion free. This as opposed to being made up of more than one fundamental frequency component that ought not to be concluded as singular and a non-contributor to psycho-acoustic phenomenon.

I agree. For the reasons that you explain, the same ones I arrived after several tests and simulations, I think that in the study of transients it is appropriate to develop new analysis methods in the time domain. In this regard, I defined the DSA parameter, detailed in the post physical effects of low-order distortions and perception, to represent the level of agreement between the transients of the original signal and those of the distortions. This works well for analyzing memoryless systems. For those with memory it is less effective, as it is not very sensitive to phase rotations and to the different orders that cause distortion. It needs to be integrated with something else. This is why I am currently experimenting with the calculation of a sort of partialized correlation coefficients, to give a numerical indication of how the transients differ. Let's see where this way leads us...
 
Last edited:
Re: the DSA parameter
I think that in the study of transients it is appropriate to develop new analysis methods in the time domain.

Problem with studying transients: the duration is, by definition, short. So the amount of information that can be acquired is small (few samples) and noise is high, because averaging cannot be used.

There's something I wanted to do: make a DAC output short pulses, and measure either the peak amplitude or the energy of the pulses. Varying the digital pulse amplitude, how accurately does the DAC reproduce the pulse? This would apply to 1-bit DACs mostly, because they only have a limited number of output bit slots to actually encode a short pulse.

I never got around to doing it, but since SigmaDelta DACs can be emulated digitally (output stage not included), if you got the SigmaDelta algorithm, you could do it digitally, fast, on a large number of pulses, and plot the probability density of the error. If someone has a software DSD encoder, please share, I'd like to run a file through it, lowpass, and substract from the original.

Back to transients. These signals tend to have a wide spectrum, making FFT useless. So I've used my approach of high amplitude LF sine + low amplitude HF sine to measure self-heating induced bias current drift in an amplifier. As I explained above, the amplitude of the HF sine on the output gives the derivative of the transfer function directly (incremental gain) on the operating point set by the LF sine. It is a time domain measurement. As the output stage heats up, its transfer function changes. So the measured transfer function is different on each cycle of the LF sine. Plotting it as a gm wing diagram, the changes are exactly as expected.

Likewise, consider a Lin/Blameless amplifier. Its open loop gain depends on VAS transistor hFe which depends on its temperature, so it depends on what signal was played in the previous milliseconds. Open loop gain at one frequency can be measured via variations of output impedance, because that depends on the amount of feedback available. So it should be possible to inject an AC HF current into the output and measure its amplitude continuously, giving a real-time measurement of output impedance and therefore open loop gain at that frequency. Then, make the amp output a large voltage transient, and check how open loop gain changes and then settles back to normal.

This could be done with a soundcard (digital AM detection, max frequency 48kHz) or with an AM receiver, which would allow a much higher frequency like 1MHz.

G. Perrot did a similar test a long time ago, using DC. Basically examining the settling of the amplifier back to 0V after a sine burst.
 
Last edited:
...If someone has a software DSD encoder...

Maybe this: https://pcmdsd.com/Software/PCM-DSD_Converter_en.html


Aside: Regarding the study of transients, from an audio reproduction perspective the waveform of a cymbal can be considered an extended transient response event starting with an impulsive attack. It is too complex too understand very well in the frequency domain (and something most dacs aren't very good at reproducing). A sample cymbal hit I recorded for forum use: https://www.dropbox.com/s/6j0di4eo3tqgind/Cymbal 24-192.wav?dl=0 Please note the file contains some ultrasonic content. ...Also, perhaps the sound could be played backwards for use as a settling time measurement impulse? Some DAW programs can perform time reversal of a wave file (an effect sometimes used in pop music).
 
Last edited:
I never got around to doing it, but since SigmaDelta DACs can be emulated digitally (output stage not included), if you got the SigmaDelta algorithm, you could do it digitally, fast, on a large number of pulses, and plot the probability density of the error. If someone has a software DSD encoder, please share, I'd like to run a file through it, lowpass, and substract from the original.
Maybe the programs in this thread could be useful: https://www.diyaudio.com/community/...elta-dac-operation-wanted.311860/post-5180060

Or else any of the other programs referred to in https://www.diyaudio.com/community/...cm-wave-to-dsd-conversion.388888/post-7086849 except the simple first-order example.
 
Alright. Someone made a version of sox with dsd, that's more practical because it can actually read back the dsf files and convert them back into PCM.

So here's a difference file between:

1) 16/44 file -> oversample to 88.2k
1) 16/44 -> DSD -> downsample to 88.2k

The difference file is audible directly, which disqualifies the format immediately. I suggest applying 45dB gain (it will not clip except the spike at the beginning) then listening to how it sounds.
 
Don't assume the sox algorithms are very good. IIUC it was one guy's attempt to add some feature that was later abandoned. If you want to convert back and forth between PCM and DSD well you may need a Pyramix, or equivalent, commercial system.

Also even at best for what's computationally practical now, its probably best to keep such conversions to a minimum.

EDIT: If one has a DSD capable dac, IMHO it would be wise to download a trial version of HQ Player and learn how to use it. In that case it quickly becomes apparent that particular algorithms produce audibly different results. If a particular very high quality algorithm and its best inverse were used to the limits of practical computational accuracy to convert back and forth between formats then maybe one could quibble about differences.

EDIT 2: I auditioned several PCM->DSD converters. Most of them sounded pretty bad to me. OTOH a carefully implemented AK4137 system can do pretty well. So can certain HQ Player algorithms.
 
Last edited:
I've run a file with a bunch of zeros and one nonzero sample through my one of my Pascal sigma-delta modulators with simple CIC decimator 100 times, see the attachments. Please ignore the first five decimated samples of each iteration, as the sigma-delta is settling there ("power-on transient"). The source code should have a .pp extension, but I changed it to .txt to be able to attach it here. The last column of decimout.txt shows the difference between the decimated sigma-delta modulate and a signal that has only been low-pass filtered.
 

Attachments

  • decimout.txt
    931 KB · Views: 34
  • PCMin.txt
    182 bytes · Views: 28
  • SDpbm8metdecimatie_extralus.txt
    8.3 KB · Views: 30