I Non-sinusoidal sound waves

Are real non-sinusoidal sound waves, such as square sound waves, always composed of sinusoidal waves? I know that non-sinusoidal sound waves can be created with an infinite number of sinusoidal sound waves as described by Fourier series. Of course real non-sinusoidal sound waves cannot be composed of an infinite number of sinusoidal waves. Because they are only composed of a finite number of sinusoidal sound waves, you can see that they have been composed of sinusoidal waves by the imperfect and wavy appearance that they have. Do all non-sinusoidal sound waves exist in this way, or can they be created in forms other than an imperfect combination of sinusoidal waves?

Staff: Mentor

Are real non-sinusoidal sound waves, such as square sound waves, always composed of sinusoidal waves? I know that non-sinusoidal sound waves can be created with an infinite number of sinusoidal sound waves as described by Fourier series. Of course real non-sinusoidal sound waves cannot be composed of an infinite number of sinusoidal waves. Because they are only composed of a finite number of sinusoidal sound waves, you can see that they have been composed of sinusoidal waves by the imperfect and wavy appearance that they have. Do all non-sinusoidal sound waves exist in this way, or can they be created in forms other than an imperfect combination of sinusoidal waves?

Welcome to the PF.

How do you think the longitudinal sound waves would propagate if you used the best "square wave" speaker to launch the sound waves...

How do you think the longitudinal sound waves would propagate if you used the best "square wave" speaker to launch the sound waves...

Thanks!

My intuition tells me that the square waves would come out of the speaker as a combination of sine waves and have the shape of the approximated square wave shown in the GIF that I (hopefully correctly) attached.

I know that it is impossible for a perfect square sound wave to exist because such a thing would require an instantaneous change in pressure.

In this discussion for example, there seems to be a consensus that all sound waves are not composed of sine waves. If all square sound waves do indeed appear as the they do in the approximation shown in the attached GIF, given the fact that you can basically still see the sine wave instilled imperfections, it seems like a peculiar claim to make.

Attached Files:

Staff: Mentor

In this discussion for example, there seems to be a consensus that all sound waves are not composed of sine waves.

I guess I'll need to read through that, but if you are aware of the (linear) wave equation, waves are propagated as sine waes in a medium and also in the vacuum as EM waves. There is a variation of that called solitons, but that doesn't apply to your question IMO.

Sound waves are physical, and as such are physically propagated. They are physically propagated as sine waves in the physical media, and their overall character is the composition of the component sine waves.

I guess I'll need to read through that, but if you are aware of the (linear) wave equation, waves are propagated as sine waes in a medium and also in the vacuum as EM waves. There is a variation of that called solitons, but that doesn't apply to your question IMO.

Sound waves are physical, and as such are physically propagated. They are physically propagated as sine waves in the physical media, and their overall character is the composition of the component sine waves.

Hopefully others will chime in if I'm missing something...

Thanks. I think the lack of distinction between real sound waves and idealized sound waves (in some explanations) was confusing me a bit.

As for the reddit discussion, the main point being made was that an infinite number of square waves could also be used to create a sine wave, so there is nothing special about it, and all sound waves are not composed of sine waves. The OP was also a bit unclear about whether he was wondering about sound waves or just waves in general.

Download Audacity and practice analyzing it with the Analyze -> plot spectrum feature which plots the results of a Fourier transform.

For all practical purposes if you know the spectrum of a constant sound, the sound can be accurately synthesized by adding back together component sine waves of the appropriate frequencies, phases, and amplitudes.

This question about what things 'really are', can never be satisfactory. The sound that's emitted by an object can either be described in the Time Domain, which is the graph of the Pressure over time or in the Frequency Domain, which is the amplitudes and frequencies (and phases) of sinusoids that will add together to produce the sound you hear. Both are equally valid BUT the Frequency Domain description is much much harder for most sound waveforms and we always use short cuts. The classic description of the way a square wave or some other shape can be transformed into a set of harmonics (a Fourier Series) only works for very simple (cyclic) waveforms.

The Fourier Transform is the whole picture. It looks at the time waveform over all time and transforms it into frequency components over all frequencies from Zero upwards. An FT will involve a very long sample ('infinite') and will take ages to compute. You could do it for a complete piece of music, for instance, and the low frequency information would give you the rhythm and bar structure as well as the individual notes. Too Much Information.

More useful is the Discrete Fourier Transform, which takes a short sample of the sound, makes a 'tape loop' and assumes the sound is repeated for ever. The DFT will give a frequency domain signal with the loop repeat rate as the fundamental and a set of harmonics of this, corresponding to the frequencies of the sound. This is a fudge and only 'good enough' for purpose. But it's very useful and it's how we think of the frequency spectrum of a signal. It changes as the sound progresses and it's what we see on a spectrum analyser.

The FFT is a smart / quick way of achieving a DFT and that's what is used mostly. But is only a rough representation of the Frequency Domain version of the sound. You should always bear in mind the approximations that have been made. The period of the signal that the computer is given, the sampling rate and the sample accuracy have to be born in mind when looking at there resulting 'spectrum' picture. You always get 'artefacts' which are easy to misinterpret!!!

My intuition tells me that the square waves would come out of the speaker as a combination of sine waves and have the shape of the approximated square wave shown in the GIF that I (hopefully correctly) attached.

Although a square wave can be constructed as a combination of ALL frequencies less than the pulse frequency of the square wave, and any waveform can be represented by an infinite number of square waves, these are mathematical constructions. A loud speaker does not understand the maths and purely follows the waveform applied in the form of power, as closely as the electromechanical construction of the loud speaker is able.
The waveform applied is the result of combination of all the sounds created by the sound sources and is an extremely complex wave.
Unless the sound sources is a sine wave generator, neither the electronic wave nor the sound wave will be sine waves.
A square wave into speaker will result is a sound that has no resemblance to a square wave, but merely a series of pulses.

What do you mean by that last part? If I go on my computer I can play a square wave out of its speakers.

Oops. Typo. I meant 'has no resemblance to a sine wave'

However, you can play square waves through your speakers. The higher the frequency the more it will sound like a tone (but it will never be one). Go to http://onlinetonegenerator.com and play 50Hz as a sine wave and a square wave, you will see the difference. Move the frequency down to 5 Hz. You will be unable to detect any sound as a sine wave. Try that as a square wave, and you will hear individual pulses. For the square wave, what you are hearing is the rise and fall. Set the square wave frequency to 1 Hz and you will hear a pulse of sound every half second. That is the rise, then the fall of the square wave. There is nothing in between them because sound requires change to be propagated - no change in pressure, no sound.
For a sine wave there is constant change of pressure, but at these frequencies your ears cannot detect the change.

What do you mean by that last part? If I go on my computer I can play a square wave out of its speakers.

But how 'square' are your square waves? A square wave is a mathematical abstraction. What can actually be produced is down to the frequency (and phase) response of every link in the chain. With only a few harmonics of a sinusoid, you can produce a wave that 'looks' square enough on an oscilloscope but the rate at which a loudspeaker cone can be made to move is always the limit. Most speaker systems use two or three drive units, which handle the different bands of sound. That makes it easier to produce a flattish frequency response BUT the phase distortion from the crossovers really mangles the waveform, although our ears are nothing like so fussy as an oscilloscope in some respects. (But much more fussy in others)

However, you can play square waves through your speakers. The higher the frequency the more it will sound like a tone (but it will never be one). Go to http://onlinetonegenerator.com and play 50Hz as a sine wave and a square wave, you will see the difference. Move the frequency down to 5 Hz. You will be unable to detect any sound as a sine wave. Try that as a square wave, and you will hear individual pulses. For the square wave, what you are hearing is the rise and fall. Set the square wave frequency to 1 Hz and you will hear a pulse of sound every half second. That is the rise, then the fall of the square wave. There is nothing in between them because sound requires change to be propagated - no change in pressure, no sound.
For a sine wave there is constant change of pressure, but at these frequencies your ears cannot detect the change.

It might not look like a sine wave, but isn’t it composed of a finite number of sine waves, and have an appearance that shows that? I thought the square wave was saved digitally as a perfect square wave, but came out of the speaker as a sine wave composed square wave. I attached pictures of what I mean by that.

View attachment 207802View attachment 207803
It might not look like a sine wave, but isn’t it composed of a finite number of sine waves, and have an appearance that shows that? I thought the square wave was saved digitally as a perfect square wave, but came out of the speaker as a sine wave composed square wave. I attached pictures of what I mean by that.

There are two ways to make a square wave. One is to generate an infinite number of sine waves of different frequencies and superimpose them. The other is to turn a switch on and off. Turning the switch on and off does not generate any sine waves.
Although you can construct a square wave from sine waves, the process is not commutable. If you pass a square wave through a filter and sine wave modifier, the only sine wave you will get will be at the frequency of the square wave.
If the sine wave is not pure (as in the case of your above example) you will be able to extract the 'ripple' frequencies.
In the case that the square wave is saved digitally as a pure square wave, it will come out of the speaker as a pure square wave subject to the constraints of electro mechanical response times (and , as FSscheuer said, loud speaker system distortions etc). Basically, the rise and fall times will become slower. As the frequency of the square wave increases, this distortion is a larger part of the waveform, resulting in the waveform moving towards a typical sine wave like form although it will not become a pure tone. That is why Digital audio devices use a digital to analogue converter at the output.

Just as an aside, we said before that you can construct a sine wave from an infinite number of square waves (integration) but think of the implications - if you can construct a square wave from an infinite number of sine waves (of different frequencies) and you can construct a sine wave from an infinite number of square waves......

You really cannot dismiss the phase characteristics of an audio channel. Phase response is well down the list of design criteria because we do not listen to square waves. I can guarantee that the square wave that was input to your hi fi front end will not look like a square wave when you look at the resulting sound wave form (Loudspeaker output) on a high quality microphone. despite the possible correctness of the harmonic levels.
In a discussion of Time Domain / Frequency Domain matters, it would be better to discuss an analogue TV signal which is actually pretty fussy about phase.

There are two ways to make a square wave. One is to generate an infinite number of sine waves of different frequencies and superimpose them. The other is to turn a switch on and off. Turning the switch on and off does not generate any sine waves.
Although you can construct a square wave from sine waves, the process is not commutable. If you pass a square wave through a filter and sine wave modifier, the only sine wave you will get will be at the frequency of the square wave.
If the sine wave is not pure (as in the case of your above example) you will be able to extract the 'ripple' frequencies.
In the case that the square wave is saved digitally as a pure square wave, it will come out of the speaker as a pure square wave subject to the constraints of electro mechanical response times (and , as FSscheuer said, loud speaker system distortions etc). Basically, the rise and fall times will become slower. As the frequency of the square wave increases, this distortion is a larger part of the waveform, resulting in the waveform moving towards a typical sine wave like form although it will not become a pure tone. That is why Digital audio devices use a digital to analogue converter at the output.

Just as an aside, we said before that you can construct a sine wave from an infinite number of square waves (integration) but think of the implications - if you can construct a square wave from an infinite number of sine waves (of different frequencies) and you can construct a sine wave from an infinite number of square waves......

What exactly does the square wave look like that is created by turning the switch on and off? Does it look like the sine composed square wave? Or is the only difference between a perfect square wave and a real square wave created in this fashion the rise and fall times? In other words, would the top and bottoms of the wave be perfectly flat, or would they have the “waviness” from the finite number of sine waves?

Also when we speak of frequency, square waves or any other non sinusoidal wave can’t be said to have individual frequency can they? Would it be correct to say that all sound waves must be split into their component sine waves to determine the frequencies involved?

What exactly does the square wave look like that is created by turning the switch on and off? Does it look like the sine composed square wave? Or is the only difference between a perfect square wave and a real square wave created in this fashion the rise and fall times? In other words, would the top and bottoms of the wave be perfectly flat, or would they have the “waviness” from the finite number of sine waves?

Also when we speak of frequency, square waves or any other non sinusoidal wave can’t be said to have individual frequency can they? Would it be correct to say that all sound waves must be split into their component sine waves to determine the frequencies involved?

A square wave generated by turning the switch on and off (whether it be an electronic or physical switch) is a vertical rise, a flat top and a vertical drop. It will have no waviness.
Linear frequency is the number of repeating events over a period of time, linear wavelength is the distance travelled by the wavefront during one event. The shape of the waveform has no relevance in this context. Linear frequency is what we are normally discussing in relation to sound waves. So a waveform's wavelength is determined by the repetitive cycle, i.e the part of the wave that repeats. This does not occur in complex sounds so they cannot be said to have an inherent frequency.
In your post #12 the seven component square wave, the portion between 0 and 1 on the time axis is the wavelength and contains one cycle, which is repeated. If new assume that the time axis is in seconds, the frequency of the wave is 1Hz.

What exactly does the square wave look like that is created by turning the switch on and off? Does it look like the sine composed square wave? Or is the only difference between a perfect square wave and a real square wave created in this fashion the rise and fall times? In other words, would the top and bottoms of the wave be perfectly flat, or would they have the “waviness” from the finite number of sine waves?
Also when we speak of frequency, square waves or any other non sinusoidal wave can’t be said to have individual frequency can they? Would it be correct to say that all sound waves must be split into their component sine waves to determine the frequencies involved?

I think you are going in an unfortunate direction here. You seem to be confusing methods of producing a wanted wave shape with how that wave can be analysed and you are confusing the practicalities with the Maths. It's good to use arm waving to help understand something like this but you can only take it so far and there's a limit to how reliable any predictions you make will be.
Trying to synthesise a particular waveform that's described as a Time Function is (nowadays) best done by actually generating that time function. A square wave can be generated crudely with a mechanical switch or to high accuracy with electronic circuitry with a precise timing reference. Same in principle but different 'quality' of result. It would be foolish to try to do it by adding a series of sine waves together. As I keep pointing out, the phases of the sine waves are as important as the amplitudes and it would be a waste of time - except as a demonstration that it can be done to a limited extent. Your "sine composed square wave' will be imperfect due to this.
If you generate a square wave directly as a voltage, varying in time, it sill still not be perfect. The slope of the transitions will never be vertical (instantaneous) and the 'corners' will always show some rounding off (due to the available bandwidth / slew rate of the devices) or waviness. (@Quandry: your method implies a perfect switch which doesn't exist)

Although you can construct a square wave from sine waves, the process is not commutable.

This is not strictly true and you are making assumptions about the two methods you would use. It is equally possible to generate a sine wave from operations on a square wave as it is to generate a square wave by operations on a sine wave. Clearly the methods are different so you would have to define what you mean by 'commutable operations'. Both operations require non linear functions and I think you are implying that they don't. (Generating and locking together a set of harmonics can't be achieved with only linear operations)

It is equally possible to generate a sine wave from operations on a square wave as it is to generate a square wave by operations on a sine wave.

Yes it is, but that is not what is meant by non-commutable. If you generate a square wave from a composite of sign waves you cannot extract the same composition of sign waves from the square waves.
I don't know what you mean by 'arm waving', but it is not positive contribution. Read the OP's questions and decide whether or not you have contributed to his/her understanding of wave theory.

Am I, or are you? And which one concerns you? Given that the OP is concerned about output from loud speakers do you think s/he is speaking about practicalities or maths?
No need to answer, the question is rhetoric and I don't think we are now contributing to the OP's problem.

The original question was surely hinting in an arm waving way that the Fourier Transform is often described. It brought up the idea (not explicitly) of time domain and frequency domain and alternate synthesis.
It is always risky to take naive questions at face value and the question needs translating into proper terms for a proper answer.
Is it your opinion that the question does not boil down to Fourier? My replies have tried to make the point that it does.
The square wave synthesis of sine waves was a red herring really.
We know that Fourier is a commutable process.

Download Audacity and practice analyzing it with the Analyze -> plot spectrum feature which plots the results of a Fourier transform.

For all practical purposes if you know the spectrum of a constant sound, the sound can be accurately synthesized by adding back together component sine waves of the appropriate frequencies, phases, and amplitudes.

Practicing visualizing spectra is a very good suggestion for building intuition.

Minor but potentially meaningful nitpick — if you know the frequencies, phases, and amplitudes, then you know more information than is traditionally captured by the spectrum.