Adventures In Audio

Can you hear the difference between a sine wave and a square wave?

LEARN AUDIO ONLINE ► FREE TRIAL ►

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

Browse oscilloscopes on Amazon...

Browse function generators on Amazon...

Transcript

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...

[Audio]

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.

[Audio]

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.

2 kilohertz

3 kilohertz

4 kilohertz

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...

6 kilohertz

8 kilohertz

10 kilohertz

12 kilohertz

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.

Sunday December 22, 2019

The Audio Masterclass Music Production and Sound Engineering Course

FREE TRIAL

Ready to take your recording to the next level? Take a 30-day FREE TRIAL of the Audio Masterclass Music Production and Sound Engineering Course - Our most popular course.

Like, follow, and comment on this article at Facebook, Twitter, Reddit, Instagram or the social network of your choice.

David Mellor

David Mellor

David Mellor is CEO and Course Director of Audio Masterclass. David has designed courses in audio education and training since 1986 and is the publisher and principal writer of Adventures In Audio.

Audio Masterclass gives you all the technical knowledge and skills to bring your musical dreams to life

The Audio Masterclass Music Production and Sound Engineering Course

Get the most from your studio with the Audio Masterclass Music Production and Sound Engineering Course.

Learn more...

Learn Pro Tools with our amazing range of video courses

Pro Tools video course catalog

Browse Pro Tools courses...

Learn Logic Pro with our amazing range of video courses

Logic Pro video course catalog

Browse Logic Pro courses...

Learn Cubase with our amazing range of video courses

Cubase video course catalog

Browse Cubase courses...

Audio Masterclass gives you all the technical knowledge and skills to bring your musical dreams to life

The Audio Masterclass Music Production and Sound Engineering Course

Get the most from your studio with the Audio Masterclass Music Production and Sound Engineering Course.

Learn more...

More from Adventures In Audio...

Making a perfect sine wave and animating it

Graphic equalizer demonstration using the Waves GEQ Classic

Harmonic enhancement: In the master or individual tracks? (Can you hear the difference?)

What will happen if your snare drum clips?

EQ demonstration HF bell boost

How much bass can a Bluetooth speaker produce?

One weird trick for monitoring your mix on a Bluetooth speaker

Can a preamp's pad work as a pop filter

Get the sound you want from the tools you have

What is the phase button for on a microphone preamplifier?

Choosing studio monitors - Is it your most important buying decision?

What is a channel strip? Why should you use one?

Audio effects explained - A quick guide for beginners

How to choose the best key for your song

The amazing stereo effect that no-one can hear

What is the best studio microphone?

Bad Audio Diary BAD 9: What's wrong with this picture?

Weird and wonderful sounds using the Air Music Tech Chorus plug-in

The end of latency?

An investigation of the pre-delay parameter of the Lexicon 480L reverb plug-in

Add reverb to your recordings using the natural echo chamber technique

Why you should ventilate your home recording studio

Q: What is your main concern if your interest is voice over?

Why do microphones sound different?