Square Wave Tests - what's audible
May 31, 2013 at 5:48 PM Thread Starter Post #1 of 59

jaddie

Account deactivated by request.
Joined
Mar 28, 2011
Posts
1,253
Likes
90
I'm posting this because square wave testing has come up in a couple of threads recently, and I thought it might be handy to have a couple of examples to play with and audition.  The idea is to look at the images files and listen to the audio.  The zip file has 4 image files and a 20 second audio file.  The audio file is digitally generated, 96KHz, 32bit float .wav, and has 4 different 100Hz wave forms in sequence, 5 seconds each, and with a 50ms gap between them for identification.  The first one is a "perfect" 100 Hz square wave, and the following 3 all started out as the first file, then had something done to them that changes their appearance.  The .jpg files are named sequentially and match in sequence the signals in the audio file. 
 
The purpose of this group of files is to show that using square waves as test signals may be useful, but is also difficult to correlate to audible results.  In particular, look at the 4th example. There are many things you can do to the appearance of a square wave that do not result in an audible change, just as there are things you can do that do result in an audible change.  
 
When we talk about square waves and how "messed up" they look, the real concern is not how they look, but how the cause also changed some audible property.  The visual evaluation of a distorted square wave is only useful when knowledge of the cause and it's audible effect is considered.
 
The examples are playable in any software capable of playing a 96KHz file, and worked fine in Audacity, which also gives you the ability to zoom in and look around for yourself.
 
Get the zip file here.  The file was created with Audition.  
 
If there's interest, I could post more examples.
 
May 31, 2013 at 6:52 PM Post #2 of 59

duncan1

500+ Head-Fier
Joined
Mar 3, 2012
Posts
724
Likes
32
A square wave test is just one test of many that are performed on a newly built power amp either self designed or to a commercial design. The standard is a 1 KHZ square wave and is a  test of the ability of an amp to reproduce a "perfect reproduction" of the signal coming out a high quality  signal generator given a high speed/ high quality input to the amp.It tests the range of harmonics and the speed of an amp.There are many other tests[two tone/ harmonic THD including noise.-the initial signal frequency nulled out to leave distortion products and noise. and so on. Many people now will not rely on those and other tests. And there is a body of opinion that -quote-Its down to how the amp sounds subjectively[without instruments and just your ears] >some say you cant hear the difference between any amp with a THD of 0.001%.
  That being the cases [if true] why do people prefer different low distortion amps- GIVEN the SAME -pre amp loudspeakers etc. Shouldn't one amp only be needed  then for the whole World. ??   An English ADE  was praised by the "golden ears" in the UK for his beautiful sounding amp design . One day the mag that the GE wrote for tested  that amp along with others he was taken aback that this amp tested BADLY! and couldn't understand how it sounded so good. ??  Maybe its because we listen subjectively[name me another way humans listen] I know another argument.  
 
May 31, 2013 at 7:15 PM Post #3 of 59

jaddie

Account deactivated by request.
Joined
Mar 28, 2011
Posts
1,253
Likes
90
Quote:
A square wave test is just one test of many that are performed on a newly built power amp either self designed or to a commercial design. The standard is a 1 KHZ square wave and is a  test of the ability of an amp to reproduce a "perfect reproduction" of the signal coming out a high quality  signal generator given a high speed/ high quality input to the amp.It tests the range of harmonics and the speed of an amp.There are many other tests[two tone/ harmonic THD including noise.-the initial signal frequency nulled out to leave distortion products and noise. and so on. Many people now will not rely on those and other tests. And there is a body of opinion that -quote-Its down to how the amp sounds subjectively[without instruments and just your ears] >some say you cant hear the difference between any amp with a THD of 0.001%.
  That being the cases [if true] why do people prefer different low distortion amps- GIVEN the SAME -pre amp loudspeakers etc. Shouldn't one amp only be needed  then for the whole World. ??   An English ADE  was praised by the "golden ears" in the UK for his beautiful sounding amp design . One day the mag that the GE wrote for tested  that amp along with others he was taken aback that this amp tested BADLY! and couldn't understand how it sounded so good. ??  Maybe its because we listen subjectively[name me another way humans listen] I know another argument.  

Perhaps the answer to all of that is more of a question.  Can we say with certainty that the differences heard are actually there and not the result of bias?   Until expectation/perception bias is eliminated, we don't really have data, we have opinion.
 
May 31, 2013 at 11:13 PM Post #4 of 59

KamijoIsMyHero

Headphoneus Supremus
Joined
Oct 6, 2012
Posts
1,528
Likes
108
played it through windows media(don't know why foobar2000 cant play it) and I heard no difference between any of them although if I really listen hard, which is in now way how I regularly listen to music, then my mind was telling me there is a slight difference in resonance particularly between 3 and 4
 
I don't really get what you did to 3 and 4 though, wouldn't the rising end be clean enough to not hear a big difference?. Also for sample 4, it looks like the edges has a quick inversion, of polarity maybe? but then again I think the overall edges is clean enough to not hear much differences to sample 1
 
Jun 1, 2013 at 3:58 AM Post #5 of 59

jaddie

Account deactivated by request.
Joined
Mar 28, 2011
Posts
1,253
Likes
90
Quote:
 
I don't really get what you did to 3 and 4 though, wouldn't the rising end be clean enough to not hear a big difference?. Also for sample 4, it looks like the edges has a quick inversion, of polarity maybe? but then again I think the overall edges is clean enough to not hear much differences to sample 1

I think you got it just fine. You can't really tell what was done by just looking at the wave forms, and by looking at the wave forms, cant really tell if there would be a difference or not.  That was my point exactly.  
 
Jun 3, 2013 at 6:47 PM Post #7 of 59

jaddie

Account deactivated by request.
Joined
Mar 28, 2011
Posts
1,253
Likes
90
Jun 3, 2013 at 10:31 PM Post #8 of 59

xnor

Headphoneus Supremus
Joined
May 28, 2009
Posts
4,092
Likes
221
Looks can be deceiving.
tongue.gif

 
Jun 4, 2013 at 5:49 AM Post #9 of 59

duncan1

500+ Head-Fier
Joined
Mar 3, 2012
Posts
724
Likes
32
Textronic/HP and all the big name high end electronic manufacturers who employ people  with a string of degrees after their names will be surprised to be told their top end equipment costing $ 10000s  is faulty and that what they see on the output of their costly equipment -viewed on even more costly equipment has been ridiculed by Head-Fi posters.Maybe they should employ Head-Firers instead of those high power intellectuals and save some money!  No subjectivism here!-only fact.
 
Jun 4, 2013 at 7:42 AM Post #10 of 59

xnor

Headphoneus Supremus
Joined
May 28, 2009
Posts
4,092
Likes
221
Huh???
 
Jun 5, 2013 at 12:58 AM Post #11 of 59

jaddie

Account deactivated by request.
Joined
Mar 28, 2011
Posts
1,253
Likes
90
Textronic/HP and all the big name high end electronic manufacturers who employ people  with a string of degrees after their names will be surprised to be told their top end equipment costing $ 10000s  is faulty and that what they see on the output of their costly equipment -viewed on even more costly equipment has been ridiculed by Head-Fi posters.Maybe they should employ Head-Firers instead of those high power intellectuals and save some money!  No subjectivism here!-only fact.


Nobody has said square wave testing is useless, or that anybody's test equipment is faulty, and we certainly aren't ridiculing Tek or HP.

In fact, I have no idea what you are getting at, so I'll just stop right here.
 
Jun 5, 2013 at 2:07 AM Post #12 of 59

julian67

500+ Head-Fier
Joined
Apr 26, 2013
Posts
658
Likes
178
I played this file with no sample rate conversion or change to bit depth. I use unremarkable playback software and hardware:

MPlayer2 -> Realtek ALC888 analog out -> Yamaha receiver line in -> Headphone out

MPlayer2 was set to bypass any application or system rate converter or mixer and take exclusive use of the hardware, which I verified by simultaneously running
Code:
watch -n 1 "cat /proc/asound/card*/pcm*p/sub0/hw_params"

During playback of this file this reports

Code:
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 512
buffer_size: 8192

There are clearly audible changes between the different 5 second samples.

I tried again with different headphones in case there was some issue with casket reverberations or some such. Same result

I'm not sure I understand correctly the premise of the example. Is it expected that these should all sound identical? Or is the point that it is hard to associate a particular type of difference with a particular type of deviation?
 
Jun 5, 2013 at 2:26 AM Post #13 of 59

jaddie

Account deactivated by request.
Joined
Mar 28, 2011
Posts
1,253
Likes
90
Well, I didn't think it would be this complex.  
 
This was not a "test" to see if you could hear differences between examples.  The examples are completely "sighted", so theoretically, everyone might be able to hear differences.  We might try a DBT somehow at another time.
 
The entire point of these examples is to illustrate that there can be radical differences between the visual representation of a square wave, yet the audible differences are not only slight, but difficult to match to the images.  I posted the file because there is a persistent an over-emphasis on square wave images as a qualitative evaluation.  It's not that a distorted square wave doesn't indicate that something has changed, but rather that we should take the square wave images not alone, but in context of the complete battery of tests that they usually accompany.   
 
While I'm sure you felt there were clearly audible changes between all samples, if they were re-ordered, and you didn't have the original to reference, do you think it would be possible to match their sound to their images?  
 
The correlation of an distorted square wave with the resulting audible effect is a difficult one at best, yet comments on the distorted waveforms often cluster at the extreme.  For example, the last example might be described as a horribly mangled square wave.  Does it sound horribly mangled, or just a little different? By looking at the wave forms, you might guess what was done to #2, and #3, at least in general, but what about #4?  For example, what would you say about the frequency response of the device that created #4?  
 
It would probably be even more interesting to present 3KHz square waves this way, but it's pretty much impossible to actually present anything resembling a square wave at 3KHz even when sampled at 96KHz.  
 
By the way, if you could see the actual wave form with an oscilloscope at your earphones when playing these files, none of them would look much like the attached images anyway.  
 
Jun 5, 2013 at 3:21 AM Post #14 of 59

julian67

500+ Head-Fier
Joined
Apr 26, 2013
Posts
658
Likes
178
While I'm sure you felt there were clearly audible changes between all samples, if they were re-ordered, and you didn't have the original to reference, do you think it would be possible to match their sound to their images?  

The correlation of an distorted square wave with the resulting audible effect is a difficult one at best, yet comments on the distorted waveforms often cluster at the extreme.  


You seem mildly exasperated as though there is something self-evident that shouldn't require explanation. This could be resolved by being explicit and direct. My question was not a loaded one or made in a spirit of confrontation or challenge. It was simple enough, being "Is it expected that these should all sound identical?" I had hoped for an explicit answer. Your answer is not quite that but the implication appears to be that you expect all the samples should sound identical so that if they are not perceived to be identical it follows that this perception arises from bias, not from audible difference. If I have misunderstood this please feel free to spell it out.

I know with absolute certainty that I can't match the different sounds to one image or another. But I don't have any professional involvement with audio and have almost no experience with these kinds of analytical tools so I don't see that this is in any way meaningful. It's the kind of question better posed to someone who does have experience and expertise in the field and who might reasonably be expected to be able to reliably associate seeing waveforms with hearing audio.

I think the issue of bias vs audible difference could be discovered easily enough (assuming good faith by all parties) with a similar file which doesn't contain the gaps or uniform length samples or any indication of where the changes occur. The listener could be asked to identify at what point a change occurs. That 50ms step change is pretty much an invitation to the brain to perceive difference because there are two sudden changes (on>off>on) which scream DIFFERENCE!!!
 
Jun 5, 2013 at 4:10 AM Post #15 of 59

jaddie

Account deactivated by request.
Joined
Mar 28, 2011
Posts
1,253
Likes
90
Quote:
You seem mildly exasperated as though there is something self-evident that shouldn't require explanation. This could be resolved by being explicit and direct. My question was not a loaded one or made in a spirit of confrontation or challenge. It was simple enough, being "Is it expected that these should all sound identical?" I had hoped for an explicit answer. Your answer is not quite that but the implication appears to be that you expect all the samples should sound identical so that if they are not perceived to be identical it follows that this perception arises from bias, not from audible difference. If I have misunderstood this please feel free to spell it out.

I know with absolute certainty that I can't match the different sounds to one image or another. But I don't have any professional involvement with audio and have almost no experience with these kinds of analytical tools so I don't see that this is in any way meaningful. It's the kind of question better posed to someone who does have experience and expertise in the field and who might reasonably be expected to be able to reliably associate seeing waveforms with hearing audio.

I think the issue of bias vs audible difference could be discovered easily enough (assuming good faith by all parties) with a similar file which doesn't contain the gaps or uniform length samples or any indication of where the changes occur. The listener could be asked to identify at what point a change occurs. That 50ms step change is pretty much an invitation to the brain to perceive difference because there are two sudden changes (on>off>on) which scream DIFFERENCE!!!

Sorry if I seem exasperated, that wasn't my intention.  Yes, I did expect this to be more self-evident, and apologize to all if that was presumptuous.  
 
I agree that the 50ms gap screams "difference", but in this particular case, its not that there is a difference that matters as much as the degree.  I could go and build some sort of double-blind test to tease-out what's audible and what's not, bias free, but that's a project for another day.  I only was seeking to show that distorted square wave images exaggerate the differences, actual listening, much less so.  There are probably better ways to show that too, so perhaps we can continue.  
 
I really don't expect everyone to match sound and image, even those who do have experience with the tools.  That's kind of the point, even with experience, it's hard to do.  And by extension, when we see a review that shows a square wave test where the square wave is no longer perfect, I just would suggest we look at other aspects with far more weight.  
 
When I get time I'll bust them up into individual files and folks can load them into ABXTester or the like, see what we get.
 
Thanks for your suggestions.
 

Users who are viewing this thread

Top