This week, we're talking about quite a few spectrum modeling approaches.

We're combining the sinusoidal and harmonic analysis,

that we talked in the last few week, with the idea of residual and

statistic approximation of this residual.

So, in this demonstration class, I want to talk about one particular model,

the Harmonic plus residual model.

So, the idea of analyzing the harmonics of a sound,

subtracting them from the original signal.

And obtaining the residual, which then can be combined, of course,

with the harmonics that we have identified.

So let's use the SMS tools that we have been talking about and

developing in the course.

And let's start with the DFT and let's start with a sound,

with this organ sound that we have in the SMS Tools directory.

Let's listen to that and we listen with headphones,

so that we can listen more carefully.

[MUSIC]

Okay, so this is quite a very stable tone, and

it's a very traditional standard sound of an organ.

So in order to analyze,

we want to be able to distinguish the harmonics of this sound.

So this is a C3, which is around 264 Hertz, so

in order to find what is a good window size let's use the Blackman window.

This is a very stable note so we can take advantage of a longer window, and

really try to isolate the harmonics as much as possible.

So that's six beats for the Blackman window and

then something where it is 44100, and

then we divide by the frequency of this note, 264.

So that gives me 1,002 samples that make sense to analyze,

okay, so let's put 1,003 to make it an odd window.

And, okay, let's use 2,048 F50 size.

So, it's quite a bit of zero pattern, and that's good.

And so let's compute it.

Okay, so this is the samples that we are analyzing.

We analyzing six periods of the sound, it clearly looks very sinusoidal.

And from the manual spectrum we see that there's not that many clear harmonics,

even though there is quite a bit of energy in the high frequency range.