Welcome back to the course on audio signal process for music applications. Last week, we introduced the discreet Fourier Transform. But that's not enough if we really want to understand it deeper and if we really want to understand how it behaves when we deal with sounds. This is what we'll be doing this week. In these theory lectures, we'll be introducing the properties of the discrete Fourier Transform. In this first one, we will talk about four properties, linearity, shift, symmetry, and convolution. So let's start. Linearity is a very convenient property of many mathematical operations. In this case, of the DFT. It basically means that is a well behaved operation. It would start with a linear combination of two signals X1, X2. Then in the spectral domain, in the frequency domain, it also corresponds to the linear combination of the spectrum of the individual signals that we put in. And it's very easy to prove. If we start with the DFT of this sum of these two signals x1, x2. We could see easily that we can group, we can separate these summatory into two sums. One for ax1. And another for bx2. So basically we are computing two DFT's. And since the scalar values do not depend on n, we can can put them outside the sum. And therefore, we will get the small a multiplied by the DFT of x sub 1 + b multiplied by the DFT of x of 2. And we can exemplify this with two real signals. If we start with a signal x1 that has a given amplitude and frequency, and another signal, x2, which is also a sinusoid with a given amplitude and frequency, we can compute the DFT of these two signals separate. So, we can see the magnitude spectrum, the absolute value of signal x1. And the magnetic spectrum of the signal x2. And we can sum the two. So, on the left plot, we could see the sum of the two magnetic spectrum. But if we had computed the DFT of the sum of these two sinusoids, the result would be the same. So the DFT of summing the x1 and x2 is the same than having sum the two DFTs. And this is basically a result of the linearity property of the DFT. Let's go to another property, the shift one. Shifting means displacing samples of a signal. And in the DFT case, it means that if we shift the samples in the time domain signal, we shift Xn by n0 samples. In the spectral domain, it corresponds to having the spectrum of the signal Xk and then multiplied by a complex exponential. And again, it is easy to approve if we start with the DFT of this shifted signal. Then we can change variables, and if we change n- n subzero, and give it the name m, we will see that then we can split this complex exponential into two complex exponentials, one that is m, and the other which is minus n sub 0. And therefore then we can see that we have a DFT of the signal xm and it become a complete DFT of just the signal x. And then we have this complex exponential that has the n sub 0 value. That does not depend on m, so it becomes separate. And therefore, the result is that we have this complex exponential multiplying the spectrum of the signal x. And we can see an example of that, too. So here, we see two signals. x1x2 and 1 is the shifted version of the other one. x2 has two samples shifting applied to x1. By the way, this is a one period of a wave form. And then if we take the DFT of these two signals, we see that their magnitude of spectra, the absolute value of the magnitude spectra, is exactly the same. There is no difference. This is because the complex exponential that multiplies this spectrum does not affect the magnitude spectra, the magnitude. But the phase spectrum is definitely different. This, we have two lines that have different slope. And this is because the multiplication by the complex exponential in the spectrum affects the phase value, but not the magnitude value. So this is an examplication of this shifting property of the DFT. Now let's talk about symmetry. In the DFT we have a whole bunch of symmetries. That's good. They are going to be very useful for many operations that we will be doing. So for example if we start with a real signal which is the type of signals that we will be dealing with. Then if we take the DFT of that real signal, the real part of the complex spectrum is going to have an even symmetry. And the imaginary part of the spectrum will have an odd symmetry. And then if we look at it from the polar representation of the spectrum, we will see that the magnitude spectrum has an even symmetry and the phase spectrum has an odd symmetry. And then if we look at another type of signal, a signal that is also real but at the same time is even, has a even symmetry itself, the domain signal. Then if we compute the DFT of that, then we will see that the real part of the spectrum has an even symmetry and the imaginary part is all 0's. And then again, if we look it from the polar representation, then we see that that the magnitude spectrum has the same even symmetry, and the phase spectrum is all 0's. And we can see it from this example and we’d start from a triangle. A triangle is a an even function and of course its real function in this case. And we see these symmetries, we that the real value of the spectrum is even. And the imaginary part is all 0's and the absolute value is even and the angle is all 0's. And we can show these symmetries also in real signals. This is the sound of a soprano, of a vocal sound that we can hear. Say, if we take a fragment of these voice sound, we see that the spectrum in polocordinates looking at the magnitude and the phase can displace the symmetries. The magnitude spectrum displays this even symmetry, the right part is exactly the same than the left part around 0. And so that's a perfect mirror. And the phase has this odd symmetry which might not be as easy to visualize but clearly we see that the right part is a kind of inverted with respect to that left part. So this is this odd symmetry. And to finish, I want to talk about the property that relate with convolution. So we basically says that if we convolve two signals in the time domain, two time domain signals. Then, in the spectrum domain it corresponds to the product of the two corresponding spectrum of the two signals. And again, it's quite easy to prove if you start from the DFT of this convolution of these two signals. And then we put the equation for the convolution, and we can separate the variable x sub 1 that just relates with M and then x2 which has n and m. But this second part is basically the DFT of a shifted signal of x2 being shifted. So as we just explained the shifted operation in the spectral domain corresponds to the product of a complex exponential by the spectrum of the signal. So here we see x2, the spectrum, and the complex exponential corresponding to that. And then this complex exponential becomes part of the DFT of this x1. Therefore we have the DFT of x1 and we get this product of the DFT of x1 signal with the DFT of x2 signal. And like most properties, this is a reversible property. So that means that if we multiply two signals in the time domain, it also corresponds to convoluting the two spectrum in the frequency domain. Let's show these two views of this property. So for example, if we multiply two signals, and this is an example of this multiplication and the corresponding convolution in the frequency domain. So here, we start with two signals, x1, x2. We have the DFT of these two only you are showing the magnitude spectrum and we see clearly the magnitude spectrum of these two signals, these are even and real functions, so we see these even symmetries. And then this spectrum can be convolved, so if we convolve these two spectra. We see this on the right hand. This is the convolution of these two spectra which results to this shape. But the same shape can be obtained by multiplying the two signals, multiplying x1 by x2 and then taking the DFT. The result is exactly the same. And we can show another example which is very common in filtering. And this an example of filtering a sound in this case, the sound of the ocean by an impulse response. First, let's hear the two signals. [NOISE] Okay, so this a sound of a very, of an ocean sound, so it's a very noisy type of signal. And then we can hear the impulse, this [NOISE] okay. So it's a tiny sound, it's an impulse response of a space. And we can then convolve the two to get the filtering operation. This is a standard thing. But in the context of the DFT, we can see the DFT of the ocean sound, capital X1, and the DFT of the second sound, X2. And then, this idea of convolution can be done by multiplying these two spectra. So, on the right hand bottom, we can see the product of these two spectra, and on the left hand, we see the DFT of the convolution of the two input signals. Okay, so basically that means that filtering can be accomplished both in the time domain by convolving two signals or in the frequency domain by multiplying the two spectra. And that's quite a very convenient property that we can take advantage of on the DFT. Okay, so you can find quite a bit of information about these things in Wikipedia, and especially on Julius's website there is a very detailed explanation of all these properties and the proofs. The sounds I played come from freesound.org. And of course, all this is available under all these open licenses. So these are all for today, in order to understand the DFT in more real situations we have gone though some of its properties. In the second part of this lecture, we'll continue with some more properties. So I hope to see you then, thank you for your attention.