Sine waves and square waves sound completely different, don't they? Well maybe not always. As the frequency rises, they become more and more similar. This video explores the differences and similarities between sine waves and square waves. And it will test your hearing!
Sine waves and square waves. They sound different don't they? The square wave is bright and maybe a little harsh where the sine wave is rounded and mellow.
So you'd think you could easily tell the difference between a sine wave and a square wave. Well, as I'll show you in this video, that might not always be so. Here's a preview...
Well that was obvious. The sine wave and the square wave sound completely different. I'm going to show you how things can change as the frequency gets higher.
Don't forget to subscribe and click the bell to get notified every time I upload a new video.
First things first... How did I set this up? Well firstly I generated the waveforms digitally so I've got perfect square waves and perfect sine waves inside my digital audio workstation software but then they go through the output of my audio interface to the oscilloscope so the oscilloscope is showing what comes out of the audio interface.
So this accounts for some things you'll see on the screen of the oscilloscope. Firstly the tops and bottoms of the square waves - You'll notice that they're slanted. The reason for this is because of the high-pass filter in the output of the audio interface. That's to get rid of frequencies below the normal human audio range which aren't any use to anybody. And secondly you'll see some ringing just after the transitions from low to high and high to low. This is caused by the filter - The low-pass filter in the digital-to-analog converter which gets rid of frequencies which are above the range of human hearing, which once again aren't of any use to us.
I could have used a function generator to generate a really clean square wave which would look great on the oscilloscope. The problem with this however is that's not what you're going to hear. You're going to hear the signals coming from your audio interface or the audio output of your computer. So therefore you're going to hear these slanted tops and bottoms and the ringing as well. So what you hear corresponds very well to what you see on the screen. If I'd used a function generator that wouldn't be the case. Maybe I'll use a function generator in a future video. We'll see how it goes. Leave a comment if you'd like me to do that.
Okay let's dive into the video...
I am going to demonstrate the difference in sound texture between a square wave and a sine wave and show how they become subjectively increasingly similar at higher frequencies.
I'll play a signal that alternates between square wave and sine wave starting at 100 hertz. You will hear the difference clearly.
As you can hear, the square wave has a very much brighter and harsher tone compared to the sine wave which is very smooth. The levels have been set to the same RMS values so that both waveforms should be subjectively equally loud.
Now I will increase the frequency to 1000 hertz or 1 kilohertz. As I continue to increase the frequency I will adjust the timebase control of the oscilloscope so that you can see the shapes of the waveforms clearly.
At 1 kilohertz the square wave and the sine wave still sound very different to each other. I will increase the frequency in 1 kilohertz steps.
At this point you will probably start to hear both waveforms as being very similar apart from a small difference in level but I will explain in a moment. Let's move more quickly through the frequency range...
At this point both waveforms sound pretty much identical. The reason for this is that the brightness of the square wave is caused by its harmonics. Where a sine wave only has one frequency component - its fundamental - the square wave has the fundamental and harmonics at whole odd-number multiples of the fundamental frequency.
So in a 100 hertz square wave you hear frequency components of 100 hertz, 300 hertz, 500 hertz, 700 hertz and so on all the way up the frequency band. As you can see in this spectrogram.
When we get to a fundamental frequency of 4 kilohertz however the next frequency component, which we call the third harmonic, is at 12 kilohertz. Many people can't hear frequencies as high as this.
At a fundamental frequency of 8 kilohertz the third harmonic is at 24 kilohertz, which hardly anyone is capable of hearing.
It is also worth saying that digital audio sampled at 44.1 kilohertz, which is common, can't reproduce 24 kilohertz either. A sampling rate of 96 kilohertz was used to make the original recordings here to show on the oscilloscope to allow a margin of safety.
So as the frequency increases the harmonics of the square wave become inaudible leaving only the fundamental. So at a high enough frequency it sounds exactly the same as a sine wave.
Finally let me explain the slight differences in level. Well if the harmonic components of the square wave are being lost at very high frequencies, the overall level will therefore be a little lower.
You might also notice some ringing in the square wave signal. This is probably being created by filtering in the digital-to-analog converter. The ringing frequency is around 46 kilohertz so it is well above the audio band.
The oscilloscope, by the way, is specified up to 20 *megahertz* so we can expect it to be completely clean in the audio band.
In summary, at increasing frequencies a square wave begins to sound more and more like a sine wave. So there you have it.
A square wave sounds pretty much like a sine wave at higher frequencies. It's all part of the fun of audio and I love it.
Don't forget to subscribe and click the bell to be notified every time I upload a new video, and of course there are other Audio Masterclass videos to enjoy.
I'm David Mellor, Course Director of Audio Masterclass. Come and visit us at AudioMasterclass.com and take a look at our range of courses in Music Production and Sound Engineering, all online.
Thank you for listening.Come on the FREE COURSE TOUR
Great home recording starts with a great home recording studio. It doesn't need to be expensive if you know how to select the right equipment for your needs.