# Listening Question: Would a high frequency square wave sound the same as a sine wave?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.

#### jlny

It's a simple question, and probably easy to test, but I thought I would get a few other folk's thoughts on this. Mathematically, a square wave can be described as a weighted sum of sinusoidal tones at its fundamental frequency and its harmonics. In practice, a perfect square wave is limited by the rise time of the system, so the edges become more rounded as the higher frequency harmonics are attenuated.

That said, if one were to listen to a square wave signal near the edge of the human hearing range (say 16KHz or whatever highest frequency you are able to hear), wouldn't the harmonic components be outside of your hearing range and thus not sound appreciably different to a sinusoidal signal of the same amplitude?

This is, of course, assuming that one is using an amplifier and speaker able to produce sounds past 20KHz.

The reason that I ask is because of how the question relates to the notion of frequency cutoffs when designing amplifiers. Prior to joining this forum, when I had set about to design amplifiers on my own, I assumed that the simplest approach would be to design everything to a cutoff of 20KHz. When I joined this site, however, I was surprised to learn that many hi-fi designers design to a higher frequency cutoff than 20KHz, sometimes 200KHz or more.

What are other people's thoughts on this? what frequency cutoffs do you typically design to and are there any benefits to designing to a higher cutoff than 20KHz?

#### myhrrhleine

Hello, in theory they would sound the same. I have actually tested this and found that I could hear a difference. I used 15KHz as a test. That means that the test tone included for 45KHz and higher. I measured to be sure I was not hearing some other tone. I was not. So, my conclusion was that it is possible to hear beyond 20KHz.
The next question is whether there is anything worth listening to at that frequency?
I listen to musical recordings which do not have any sounds beyond 20KHz.

As far as electronics, it is debatable whether it is useful or not to build electronics that can go past 20KHz.
Since this is Do-it-yourself, why not do it?
Most of us like the challenge.

#### jlny

Interesting! I'm impressed that it is possible to tell a difference in such a simple test. While investigating this I read an article (Here) describing how it may be possible to perceive the higher harmonic components above 20KHz, so that makes some amount of sense.

I guess the question of whether or not it is worth hearing these harmonics is an important part of the question. The article would suggest that even if the listener is not necessarily able to hear the tones of the upper harmonics, it may affect their subjective perception of it. By that logic, it may make sense to design for higher cutoffs if the harmonics affect how we perceive the sound, and may make the playback seem closer to that of the live instruments.

#### jcx

an easy mistake to make is to use equal amplitude sien vs sq - when a sq wave's fundamental sine component is actually higher, by 4/pi than the amplitude

I would also recommend a little basic logic, respect for lifework of highly educated researchers committed to the Scientific Method

if you trivially get a "different" result then maybe you need to understand a lot more about why Psychoacoustics textbook authors say what they do

#### Mooly

Paid Member
This is something I have actually tried in the past. My hearing is I think pretty decent and extends to around 15+kHz without the level having to be to high. That's on a pure sine.

A problem with all these subjective tests is that you don't know what level folk are using... and what the purity of the original tone... however

So... I used Sony MDRV-7 headphones and a lab function generator. Listening levels were 'low', with low being the sort of level you would use to listen to say a news program in a quiet room. So Low !

Using the square output of the generator which has fast risetimes and 50 ohm output impedance I found that as you slowly increase the frequency you pass a point that is absolutely definite in that the timbre of the tone suddenly alters and it loses that harsh edge. It is very repeatable, you can nudge the frequency down a few hz (as little as that) and the harsh edge to the tone re-appears. Nudge it back up again and it disappears. This point coincides of course with the frequency at which sine and square sound 'the same' and that is proved by flicking the generator to sine. And the frequency that occurs for me is around 4.8kHz

#### jlny

Hmm. This seems like a more controlled test and a more believable result. Intuitively, this makes more sense to me. This is also why I did not trust myself to attempt this test on my own somewhat junky equipment.

But this then brings us back to the follow-up question: is there any advantage to be gained from increasing the frequency cutoff of an amplifier above 20KHz? why is this done in practice if the audio that is heard will be the same?

#### Mooly

Paid Member
...... is there any advantage to be gained from increasing the frequency cut-off of an amplifier above 20KHz? why is this done in practice if the audio that is heard will be the same?

Everyone will have their own ideas on this. It certainly makes sense to have an amplifier that can handle up to 20kHz reasonably faithfully... and doing that by implication means that its bandwidth goes considerably beyond that point.

You also have to consider the source material. If you use CD then you have an absolute upper limit of one half of the sampling rate (so 22050Hz) and in practice a bit lower than that.

#### Enzo

A couple random thoughts. We may detect a "difference", but do we know what that difference is? We may not hear 45kHz, but me might hear artifacts, like sum/difference effects between the 45kHz and audio range signals.

Always good to keep in mind that in the world of audiophiles, marketing is king. So even if there is no real advantage to a bandwidth to 200kHz, it may serve them to be able to crow that THEIR system goes to 200kHz unlike "inferior" systems that only find a mere 100kHz bandwidth at their outputs.

#### AndrewT

I can hear 12kHz clearly using a signal generator feeding headphones or a small speaker.
I think I can hear 13kHz and maybe 13.5kHz but my testing method is not rigorous, so I have no idea how my method and hearing would compare to a "hearing test".

I can very clearly hear the difference between a 10kHz sinewave and a 10kHz sawtooth/triangle wave
I can very clearly hear the difference between a 10kHz sinewave and a 10kHz squarewave
I can hear the difference between a 10kHz squarewave and a 10kHz sawtooth/triangle wave.
Some of this "hearing difference detection" may be due to the different SPL from the three signal types.
The fundamental of the three signal types is the same both in frequency and in level.
The added signal in the squarewave and the triangle wave STARTS at 30kHz and increases above that.

I am not hearing the 30kHz signal, but I am hearing a contribution from the high frequency.

I can't explain any of that.

#### jlny

Hmmm. As expected with a subjective listening test like this, reported results seem to be all over the map.

Unfortunately, unlike a piece of electrical equipment which can be measured and characterized quantitatively, the only simple method for determining questions about the capabilities of human hearing and perception (short of scanning their brains as they listen to things, I suppose) is to ask real people, who are inevitably unreliable no matter how good their intentions, to report what they heard.

I am fully aware of the marketing and "psychoacoustic" aspects of things like this. I am trying to approach this question in as neutral a way as I can manage so that I can use this information to improve the way I design my own amplifiers. I often find myself frustrated by how much of the hi-fi world and sometimes even its design discussions have been polluted by the misinformation of quack engineers and snake-oil salesmen trying to promote this or that component type or circuit topology as the "secret sauce" to creating the perfect amplifier, so I can absolutely see why folks are wary of topics like this.

That said, the article I linked to earlier was written by a professor at CalTech, a generally well respected engineering institution, so I do not think that asking this question is necessarily ignorant or unscientific in of itself, I just think this experiment may just be too simple and uncontrolled to produce good data. My question was mainly concerned with whether the timbre of a sound would be affected by its harmonic components even if the harmonics themselves are above 20KHz.

Clearly this experiment would need to be better controlled if these reported results are going to have any consistency. Correctly controlling for amplitude and level seems to be first and foremost on this. Reporting sounds as being "different" simply based on changes in level are well documented. Mooly's suggestion of keeping the level extremely low for testing seems valid. There is also the question of intermodulation products in different individuals' equipment. Controlling for frequency might be a good idea as well, as everyone seems to be testing at different frequencies.

I don't know. Maybe this discussion isn't going to get us anywhere . If I'm wasting folk's time or spreading misinformation by doing this, let me know and I'll stop.

Last edited:

#### milkshake

-It could be possible that the ultrasonic frequencies create signals in the audio band

-It could be possible that the level of the fundamental frequencies is not equal in the tests with positive results

-It could be possible that more than 150 years of psychoacoustic research is wrong

#### myhrrhleine

For my test, I used a 1/4in B&K microphone and a HP FFT analyzer to make sure I was not getting IM tones and that the amplitudes were correct.

#### myhrrhleine

I listen mostly to very old movies. The sound at the time they were made was about 6KHz. So I really do not need anything beyond this.
i regularly listen to CDs. They are limited technologically to 22KHz but realistically they are limited by the microphone used which means around 5KHz.
So, although I can hear better, I do not bother with trying to get past 20KHz. And even that is pushing it.

#### Tubelab_com

OK, dumb blonde experiment time.

Disclaimer:
I am 63 years old, have Meniere's disease, constant tinnitus, and have been to far too many LOUD rock concerts, so my hearing sucks. My results may not be typical of the average listener. This is definitely an uncontrolled, unscientific experiment since I know what I am hearing in advance. I have always believed that response out beyond 20 KHz made a small, but audible difference, and have some empirical evidence to support this from when I was younger and could hear very well, but this may impart some bias to the results.

an easy mistake to make is to use equal amplitude sien vs sq - when a sq wave's fundamental sine component is actually higher, by 4/pi than the amplitude

Today's experiment #1:

I wired a pair of cheap (\$10 at Walmart 20 years ago) Sony headphones up to the output of a HP3311A function generator, with a scope across the output. I used the frequency readout on the scope since it is more accurate than the tiny dial on the generator.

Understanding the quote above, I set the generator to 1KHz sine and dialed in a comfortable level. I switched to square and attempted to find a level that sounded about the same level. The P-P level had to be reduced about 25%. There was an obvious difference in timbre as there should be.

I increased the frequency and noted the point where the timbres became very similar. The apparent level of the HF tones were lower than at 1KHz. The "raspy edge" begin to vanish at about 6.5 KHz and the tones became indistinguishable at 7.8 KHz. I repeated the experiment at a 10 db higher level. The results were different. The indistinguishable point moved out to 8.9 KHz.

Today's experiment #2:

Same as experiment #1 except that Sennheiser HD239's (about \$85) were used. These headphones were louder than the old Sonys so there was an attempt made to reproduce the same levels as before, but this involved swapping headphones, so it wasn't exact.

At the "comfortable level" the indistinguishable point moved to somewhere in the region of 11 to 12 KHz. The results were within this range every time, but the exact point varied. I repeated the experiment at a 10 db higher level. The indistinguishable point again moved out, this time to somewhere around 13 to 14 kHz.

If nothing else, this shows that absolute level can make a difference.

#### milkshake

For my test, I used a 1/4in B&K microphone and a HP FFT analyzer to make sure I was not getting IM tones and that the amplitudes were correct.

Then why don't you publish your results in the AES or any other relevant publishing company. If your results hold up to scrutiny, everyone will be thrilled to read them.

#### mvs0

an easy mistake to make is to use equal amplitude sien vs sq - when a sq wave's fundamental sine component is actually higher, by 4/pi than the amplitude

I would also recommend a little basic logic, respect for lifework of highly educated researchers committed to the Scientific Method

if you trivially get a "different" result then maybe you need to understand a lot more about why Psychoacoustics textbook authors say what they do

Indeed! that's the error most make when comparing a sine wave with a square wave of the same frequency. The square-wave needs to be multiplied by pi/4 or 0.7854 or -2.098 dB. I have tried this and even with 6400Hz I could not hear the difference between sine and square.

#### mvs0

For all who want to test themselves: I have attached the FLAC file with my test tones.
It contains a 1 second sine-wave followed by a 1 second square-wave.
The fundamental frequency is 6400 Hz, so harmonics should be at 19200Hz, 32000Hz, 44800Hz and so on.

The fundamental of the square-wave is level matched (pi/4) with the amplitude of the sine wave.
Sampling rate is 192Khz, make sure you can play this without any extra conversion steps..

Marinus

#### Attachments

• level_matched_6400Hz_sine_square_2_sec.zip
325.9 KB · Views: 70
Last edited:

#### Speedskater

The two points to watch when doing these listening tests:
1] making sure that the amplitude of the sine & square in the audible band is the same.
2] making sure that there is no high frequency IM distortion in the play-back system mixing down into the audible band.

#### Pano

Paid Member
I know how to do #1 on the list. How do you achieve #2?

#### mvs0

Luckily you can skip #2 if you cant hear the difference

But #2 can be done as myhrrhleine {answer #12}did: measure at the headphone with a microphone, and verify the spectrum is clean. It would require a very quite room and microphone to make sure no other frequency components are above the hearing threshold.

Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.