• 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!

Square Wave Testing of Audio Products (Video Tutorial)

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,747
Likes
37,568
ON that topic . What would a starter library for the Audio nerd be :)

Build a bookshelf for me with 10 books .

Dr Tooles book on speakers i know off but have not ordered yet . 9 to go ..
Brian CJ Moore
Psychology of hearing.

William Yost
Psychoacoustics

Electronic Principals
By Albert Malvino
 
Last edited:

thats_it

Member
Joined
Oct 25, 2020
Messages
11
Likes
4
Stereophile used to publish square-wave metrics in their laboratory MEASUREMENTS section, notably for their digital reviews. John Atkinson revealed ... "The squarewave response doesn't give much clue to sound quality," but "[...] it does reveal what aspects of overall performance the designer thought most important. "
I do miss square tests from MEASUREMENTS section because they help characterize digital filters (and other things) .

Refs: March 1995, Stereophile magazine:
https://www.stereophile.com/content/quality-lies-details-page-3
 

Lambda

Major Contributor
Joined
Mar 22, 2020
Messages
1,791
Likes
1,525
Screenshot_2021-03-05_12-31-30.png


Screenshot_2021-03-05_12-30-50.png


Don't pay to close attention to the absolute numbers or the exact wave shape!

The question is can the DAC properly filter a square wave at 0dBFS and band limit it properly like in the fist picture
or would the DACs internal filter Clip and add out of band energy like in the second picture.
 

PeteL

Major Contributor
Joined
Jun 1, 2020
Messages
3,303
Likes
3,846
I's a good video and I agree that for people to digest them and be interested in them they should stay concise. That said, I think it brings maybe more questions that it brings answers. It explain quite well why we shouldn't expect an audio "system" to reproduce a square wave, many didn't know that and it's good teaching. It shortly states how it can be a good test signal but not a good measurement signal. I don't necessarily disagree with that, but the first premisses don't explain the second one.

The bigger question would be to know if the issues that are found by reading a problematic square wave response, would be quantified or assessed with the suite of tests that are actually done. If not it's a relevant measurement.

Yes, we care about what we can hear, but the fact that a square on input shouldn't look square on output, doesn't mean that the other oddities we see are not audible, it is just not so useful to look at in the frequency domain, but in time domain, maybe?
The thing is, ffts and sines, is also what gives us specs, numbers, but measurments in general should get us to learn more about a product than to confirm the specifications the manufacturer tells us. And it does, but the question remains, if the rise time is sloppy, there is excessive ringing, etc those are not only about functionality, they are about fidelity, so my question would be where in the measurments we have it would tell me these specific problems.
 

Xulonn

Major Contributor
Forum Donor
Joined
Jun 27, 2018
Messages
1,828
Likes
6,312
Location
Boquete, Chiriqui, Panama
Too bad that the YouTube commenter with the handle "lex Tr3" limited his responses to the snarky, whiny, complaining variety, and was unable to engage in a productive and educational dialog. The discussions on YouTube and here at ASR taught me that square waves can be useful for the design and repair of audio electronics, as well as creating and playing synthesizer music, but they did not convince me that Amir was wrong about the usefulness of square waves in evaluating the fidelity and accuracy of music reproduction systems.

I listen to a lot of electronic music, and although I am not a musician, I have seen the square, triangle and other waveform shapes as icons on controls on synthesizer consoles. Since lex Tr3 was talking about creating sound, and Amir is focused on reproducing music, I would like to know the actual relationship of those console waveform icons, and what comes out of speakers as music.

Here is a LINK to an article with very, very fundamental information on the four primary synthesizer waveform shapes - sine, square, triangle and saw waves - and their basic applications in electronic music. The short article has a few sound samples (which did not play on my configuration of Firefox on Windows 10, but did work with my installation Google Chrome browser).

Music Waveform Shapes.jpg
 

Xulonn

Major Contributor
Forum Donor
Joined
Jun 27, 2018
Messages
1,828
Likes
6,312
Location
Boquete, Chiriqui, Panama
but the question remains, if the rise time is sloppy, there is excessive ringing, etc those are not only about functionality, they are about fidelity, so my question would be where in the measurments we have it would tell me these specific problems.

Well said - this is what I am curious about as well. What is the correlation or relationship between these "oscilloscope" image issues and FFT analysis in analyzing audio electronics performance.

------------------
Edit: Well, that was dumb - Amir explained it in his video, and Lambda talked about it a couple of comments up. I plead senioritis (age-related brain fog)!
 

Attachments

  • Squarewave.jpg
    Squarewave.jpg
    48.9 KB · Views: 267
Last edited:

paulraphael

Active Member
Joined
Dec 18, 2020
Messages
262
Likes
367
Location
Brooklyn, NY
This is why they stopped using square waves to test optical systems. The old US Air Force test charts with black and white bar patterns are essentially square wave tests. The way the patterns would degrade in the optical system was difficult to interpret. So they moved to sine waves, and a measurement system that looks exactly like measuring frequency response in audio. When you see modulation transfer function charts, this is what they are.
 

Lambda

Major Contributor
Joined
Mar 22, 2020
Messages
1,791
Likes
1,525
What is the correlation or relationship between these "oscilloscope" image issues and FFT analysis in analyzing audio electronics performance.
I guess from looking at the phase and filter response one can get the same information as from looking at the overshoot/ringing?

But i wold love to see both to! especially to see if the overshoot and ringing from the digital filter is clipping or at what input level it starts clipping
 

PeteL

Major Contributor
Joined
Jun 1, 2020
Messages
3,303
Likes
3,846
I guess from looking at the phase and filter response one can get the same information as from looking at the overshoot/ringing?

But i wold love to see both to! especially to see if the overshoot and ringing from the digital filter is clipping or at what input level it starts clipping
Well for one thing, Slew rate used to be a measurment and a spec. We don't ever talk about this now, maybe rightfully so, maybe not. Just curious.
 

roskodan

Member
Joined
Feb 16, 2021
Messages
78
Likes
114
Location
EU
So when measuring headphones, how do you check that the seal to the coupler is optimal (and consistent with every different position measured) before taking the frequency response measurement? Or is that irrelevant, and if so, why?
 
Joined
Apr 5, 2020
Messages
90
Likes
89

Plcamp

Addicted to Fun and Learning
Joined
Jul 6, 2020
Messages
860
Likes
1,318
Location
Ottawa
Well said - this is what I am curious about as well. What is the correlation or relationship between these "oscilloscope" image issues and FFT analysis in analyzing audio electronics performance.

View attachment 116407
You can represent any waveform either as what you see when you look at it with a scope, or as a frequency domain (FFT) representation...but they are the same thing.

A true square wave equals a series of sine waves starting with the fundamental and including an infinite series of odd harmonic sinewaves added to it. So, if you limit the bandwidth in the device processing that squarewave, cutting off the highest order odd harmonics, the waveform becomes less square, and shows ringing artifacts in the time domain view.

but remember the time domain and fft are views of the same thing.
 
OP
amirm

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,654
Likes
240,798
Location
Seattle Area
So when measuring headphones, how do you check that the seal to the coupler is optimal (and consistent with every different position measured) before taking the frequency response measurement? Or is that irrelevant, and if so, why?
I use sine waves and look at both timing of each channel and amplitude and try to match them. I do this at two frequencies: 80 Hz and reference 425 Hz. The former is good to test for seal. I iterate enough until I get matching response and best bass reproduction (or determine it is so random that no sense in trying).
 
OP
amirm

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,654
Likes
240,798
Location
Seattle Area
[rant]I think the mass production of videos here is getting out of hand. I don't ever watch technical videos, nor does anybody I know. It just doesn't work. Writing good articles is much better for understanding, both for understanding basics as well as details, for a lot of well-known reasons.[/rant]
Thousands of people ware watching these videos on youtube, learning, enjoying and appreciating them. That you don't means you should change, not me and the rest of the world. This video was produced from start to finish in 20 minutes. No way I can write all that in text in 20 minutes. It would literally take days to write, proof-read, prep graphics, annotate, etc. And it still would not have the real-time feel and accuracy of watching it in action on my analyzer. I have written such long articles and people say, "I read the first paragraph and then gave up."

I have had articles in mind to write that have not gotten started for 3+ years. It takes huge amount of time to do them comparing to explaining things on video.

The other great thing about video is that it is more than information: it also includes intent and emotion. How I explain things will add a lot to clarify the context and topic.

Importantly, there are people like me who get vast amount of their information about products by watching videos. For those people, there is hardly any authoritative videos to watch. In a sea of those, we need to put in proper explanation of science and engineering.

Net, net, get used to this new approach. You are going to see me do videos on a lot of stuff for which I don't have the time to do in text, or find video a better format. If you are not watching videos of this type, it is time to change.
 

JIW

Senior Member
Joined
Nov 11, 2019
Messages
383
Likes
556
Location
Germany
There are some elemental technical errors in the video. So elemental that someone of @amirm's stature should not be making any of them - particularly in a publication. Playing around with the AP is nice but seemingly not knowing what one in talking about fails to serve the purpose of education and calls into question not only your competence but also your sincerity, @amirm.

Square waves having infinite energy (3:23, 8:48) (how is that even relevant?) would require that there be some other corresponding infinite energy somewhere in the universe to ensure energy conservation, which is binding at the time scale used here. That would be quite amazing and constitute its own new theory contrary to the current predominant theories.

While the sum of the coefficients in the Fourier transform indeed approaches infinity as the number of harmonics does, the sum itself does not at any point of the cycle. This is due to the periods of the harmonics being different from that of the square.

Further, since power is the time rate of energy, i.e. for constant energy, power is energy divided by time, infinite energy would require either infinite power or zero time. The latter is certainly not the case, while the former is not either since the power of an electrical signal is the product of voltage and current - either of which are finite due to charge conservation and there being a finite number of charged particles in the universe (unless new theory as above). Also, infinite power out of an outlet under normal operation should not pass any sanity check.

Also, the slope here is change in voltage relative to change in time. For a vertical curve (4:50), the slope is not zero but infinite. The slope of a sine wave at a zero crossing is proportional to frequency. Thus the greater the slope, the greater the frequency. Zero slope corresponds to a constant, i.e. a horizontal curve.
 

Gorgonzola

Major Contributor
Forum Donor
Joined
Jan 27, 2021
Messages
1,034
Likes
1,416
Location
Southern Ontario
Thanks to Amir for what was a very enlightening exposition of the sq. wave topic for me, a very non-tech type.

What I found interesting was that "fuzzy" but otherwise rectilinear sq. waves are generally caused by bandwidth limitation. I have heard audiophiles denigrate class D amps, (in particular), when they show this type of sq. wave. Those subjectivists say this proves their claim that class D has faulty, irritating, non-transparent treble. Can we say that they've got it wrong?

(For my part, I can say my Puriri amp is anything but non-transparent in the highs (or anywhere in the range), but, hey, that's a subjective judgement too.)

As I understand class D amps must filter out the switching frequencies used to modulate transistor switching; this they must do not because these frequencies are audible but to prevent osculation and/or other bad effects on their circuits. (Please correct me where I'm wrong). This filtering necessarily limits bandwidth at some point albeit at a high frequency. Is this the reason for "fuzzy" class D sq. waves? Or do particular amps show this "fuzz" due to bandwidth limitation at a lower point for some other reason?

I would be happy to tell subjectivist audiophiles that they may hate class D if they like, but their dislike is not justified by "fuzzy" square waves.
 
Last edited:
OP
amirm

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,654
Likes
240,798
Location
Seattle Area
Further, since power is the time rate of energy, i.e. for constant energy, power is energy divided by time, infinite energy would require either infinite power or zero time. The latter is certainly not the case
Come again? What is the shoulder of a square wave if it is not zero time? You can see the same conclusion regarding energy of square wave being infinite here:

 
Top Bottom