This week we are going to continue talking about AC Signals and AC Circuit analysis. But we are also going to take a bit of a detour to talk about tone and frequency spectra and in particular I want to talk about how to build complex sounds out of simple combinations of sine and cosine waves. And this introduces the idea of Fourier series. Now that is how one can synthesize sounds from simpler sine [INAUDIBLE] components. But you can also go the other way and analyze complex sounds to infer what sine and cosine waves that are present in a complex sound. And that is the topic of Fourier spectral analysis, that we'll spend a little bit of time on. Now this is just so we were we're not going to really dig deeply into the how to compute a Fourier transforms and the a Fourier series coefficients and all that, but we'll touch on that a little bit. Just enough so you have a little bit of an appreciation for what's what's under the hood there. Now with that and our AC circuit analysis techniques, we can then go back and look at how we can filter complex signals with our simple circuits. And we're going to look at some examples of the RC and RL low pass and high pass filters, and what their effect on a sound is. Then after that, we're going to go on and talk about a, the next more complicated set of, of circuits that one can use for filters and those are circuits with resistors, inductors, and capacitors. And rather than just doing a kind of a a generic treatment of RLC circuits. What we're going to do is look in detail at the way a guitar pick-up is built and how that is an RLC circuit. And then what the performance and the output of characteristics of the guitar pick-up look like and that's a nice way to be introduced of the idea of RLC band-pass circuits. Let's start by talking about what we mean by tone. Well, if you and internet search to look up the definition of the word tone, you may find something like this, the quality or character of sound. Which doesn't really say an awful lot. another defininition that you'll see is the characteristic quality or timbre of a particular instrument or voice. so that's a little more descriptive, but they've used a new word timbre to describe tone. Now tone and timbre are often used interchangeably. So they're really, they mean the same thing. Now, if you then go do a search on what timbre means, this is probably the most useful definition. It's that the character or quality of a musical sound or voice as distinct from its pitch and intensity. So it's basically everything else about a musical sound or voice that is not related to its loudness or the pitch that you hear. And just to make sure that we're all in agreement on this, the frequency of a signal determines its pitch. And the sound pressure level of a sound determines the intensity or the perceived loudness of that sound. And so the other quantities that are left are things like the, the spectrum of the tone. What are all of the different frequencies present in a spectrum. How that spectrum may evolve over time. And things, especially how the attack and release of a particular note may sound. And so all of these qualities go into defining the tone or timbre of a sound. So tone really is a much more complex quality of a sound, than it's pitch or it's intensity. Okay, now probably instead of trying to just give a number of kind of abstract definitions of what we mean by tone and timbre. We're going to explore that by looking at a few different waveforms. Now, what were going to do, is we're going to a show how you can build a square wave from sine waves. Now, this is a so called Fourier series, but I'm going to keep it relatively simple. And I'm going to construct a more complex sound or signal s of t. And I'm going to construct it by putting together harmonics of some fundamental frequency. So I pick a fundamental frequency, f0, and then this is just an oscillating waveform, and f0, so it has frequency f0 and it's just a sine wave. Then I'm going to add to that pure sine wave, a sign wave at three times the fundamental frequency, and then another one at five times the fundamental frequency. And I'm going to multiply the component at 3f0 by one third and the component at 5f0 by one fifth. And we're going to assume that this series goes on and on. So the next one would be one seventh. Sin two pie 7f0. Then there would be one ninth. one eleventh, so on, up to infinity. So the following MATLAB demonstration shows how this signal looks and how it sounds. In this demonstration we're going to show how to build a complex waveform out a fundamental and its harmonics. This is a so-called Fourier series of the waveform. So in this particular demonstration we're going to build a square wave [SOUND] out of this components. And so we start off with the fundamental frequency of the waveform and we chose 220 hertz and and this panel is the time domain represenation of that wave form. So, this shows a little more than two cycles at 220 Hertz and this is the amplitude versus time. In the lower panel, we show you the frequency content of that waveform. So the horizontal axis is the frequency axis. And we see here at 220 hertz we have a component with an amplitude of one. So this is one and the amplitude zero to peak here is one and so this is the frequency domain representation of this sign wave segment. So this is just amplitude verses frequency. So now we're going to add harmonics to this. Now, to make a square wave, one has to add the odd harmonics of the fundamental. So, the next one at the if, the, fundamental is 220, the next harmonic that is called for in the square wave recipe is three times that 220 or 660 hertz. Now what you're going to see is when I add 660 to 220 you'll see the new composite waveform and you'll see the frequency content. Now what you'll hear is, you'll hear just the 660 for a short interval, maybe about a second. And then you hear the composite waveform. [SOUND] Okay. So, you see we've added 660 hertz, and the amplitude of the harmonics to build a square wave have to go as one over N, the harmonic number. So if the fundamental is one, then this one is 0.33, one over three, and so here's what the waveform looks like with the first and third harmonics added together with these amplitudes. Now we can continue adding the fifth harmonic. [SOUND] So here is the fifth harmonic with amplitude one over five. And this thing is starting to look a little more like a square wave. And let's just continue on and see what the waveform looks like and what it sounds like. And we go up to about the 23rd harmonic that fits within our ten kilohertz frequency span that we're plotting. [SOUND]. [SOUND]. [SOUND]. [SOUND]. [SOUND]. [SOUND]. [SOUND]. [SOUND]. [SOUND]. [SOUND]. [SOUND]. Okay now at the end we'll just play the final resulting waveform. One thing I want to just point out, you see as we add more harmonics, you see the ripple here at the the last harmonic we added. And there's this little bit of overshoot here at the edge, here at the transition point, and this is called the gibbs phenomenon. Now, if you add sine waves out to infinity than the ripple gets smaller and this overshoot here becomes less and less. But we've only, we've limited ourselves only to the first 23 harmonics, so this is a fairly good representation of a square wave, but to make a perfect square wave mathematically you have to continue the Fourier series out to infinity. So here's the final wave, listening to the final waveform. [SOUND]. Okay, Fourier series.