0:42

So, lets start by using

Â the possibilities of Audacity for this type of transformation.

Â Lets start from this sound,

Â this is orchestral sound that we have in sms tools directory

Â [MUSIC]

Â And now in the effects menu of Audacity,

Â there is quite a few of transformation possibilities,

Â and even there is the possibility for

Â extending this transformations by external plugins,

Â and you can find many available online.

Â But let's focus on very few of these transformations that relate with

Â changing the duration of a sound.

Â And the simplest one is, for example, this one, it says change speed.

Â This is a very simple algorithm that the only thing it does is

Â change the reproduction speed basically.

Â So, it changed how the samples are read and therefore reproduced.

Â And of course the effect of these is that it modifies not just the time but

Â it modifies the frequencies of the sound.

Â So, let's listen to that same orchestral sound but, changed by, for

Â example, well, if we put it at zero, there would not be any change and

Â for example, it changes by 30% so,

Â this will speed up the reproduction of the sound by 30%.

Â Okay, clearly we see that the sound is now shorter and now we can play,

Â >> [MUSIC]

Â Okay, so this is the standard effect of reading a disk and

Â changing the speed of reproduction of an analog disk or

Â of a tape and that can be done in digital media.

Â 2:48

But clearly this is okay but it's not that interesting in the sense that

Â we are manipulating not just the duration but the whole quality of the sound.

Â So more interestingly,

Â when we talk about time scaling what we normally are referring is to be able to

Â change the duration of the sound without changing the quality

Â of the sound without changing the frequencies that are present in the sound.

Â And within the density there is a few

Â algorithms into that the most sophisticated one that I know of.

Â He's this one that says is sliding time scale pitch shift, okay?

Â And this algorithm performs both tempo change, or time change, and pitch change.

Â And it uses a sinusoidal model.

Â In fact, it uses sinusoidal model very similar to the one that we have

Â been presenting in class.

Â And you can of course look at the code of this algorithm

Â on the Audacity website, you have access to the source code of that,

Â the major difference which is an important one is that this sinusoidal model

Â is based on a sub bond type of processing.

Â So it does sign sort of modeling while it's splitting the whole sound

Â in octaves and modeling every octave with a different analysis, synthesis approach.

Â So, the quality is a little bit better than what we can do in the algorithm that

Â we have been developing in class.

Â So let's listen to that and it easily can be controlled in time,

Â so here for example the control of this algorithm can be done in a way that we

Â have an initial tempo change as a percentage, and a final tempo change.

Â So, for example, what we can do is start slower, so lets say,

Â okay lets start with lets say, 20% or

Â 22% slower and let's finish by speeding up.

Â So let's, for example, end up with 30% speed increase.

Â Okay, but remember these we are not changing the reading of the samples,

Â the time domain samples, this is done.

Â Using the sinusoidal model.

Â So therefore, re-synthesizing the sinusoids but

Â a different speech while maintaining the pitch of the sinusoids.

Â So, let's analyze this, it is quite fast.

Â In fact, it's a very efficient algorithm implementing C.

Â So now, we are done and we have change the duration,

Â well it's a time varying duration so let's listen to that.

Â >> [MUSIC]

Â Okay. So, we have the time duration and

Â clearly, the peak or the frequencies have not changed,

Â the sound has changed in duration, has speed up, the tempo has increased but,

Â not the frequencies and that's a pretty good algorithm.

Â There's some more sophisticated ones, but

Â this is pretty decent one, that can perform good time scaling algorithms.

Â So, now let's go to our the own implementation.

Â So, let's go to the GUI of transformations that we have.

Â And let's go to the sign model.

Â 6:20

Okay.

Â And let's go to the, for example, a sound.

Â Let's use the piano sound.

Â Okay.

Â Of course, now, this algorithm, we have to decide the parameters.

Â So, in the Audacity implementation, everything, kind of, it's a blackbox.

Â And it does pretty good.

Â It chooses the best parameters for this type of a transformation.

Â Here we have to choose the parameters.

Â So, we first have to choose the analysis parameters of the sinusoidal model.

Â It's a piano sound, it's a, well it's a harmonic sound but

Â this in the sinusoidal model, this is not an issue.

Â Let's, we have to make sure that we distinguish the peaks

Â of the spectrum enough, so that we can build sound waves out of that.

Â So, let's start maybe with a humming window, 800, maybe,

Â let's increase this a little bit.

Â Let's put 1,000 samples of the window size.

Â The threshold minus 90 maybe, let's do even more.

Â Minus a 100.

Â The minimum sinusoidal duration,

Â well, let's leave it like that, maximum number of sine, we can put as many, for

Â example, 200, so we, we really do a lot of sinusoids.

Â And well, let's leave maybe this a little bit higher offset, so we allow frequencies

Â to change a little more, and let's first do the analysis resynthesis of the piano.

Â 7:55

Here is the analysis,

Â the sinusoidal analysis that I have performed, and the resynthesis.

Â Let's listen to the resynthesis.

Â Well, let's first listen to the original sound.

Â [SOUND] And then the resynthesized on.

Â [SOUND] Okay, it does a pretty good job.

Â So, that's a good starting point.

Â Now we can apply the transformations and

Â in this interface we can do scaling and of the frequencies and of the time.

Â So, let's not do any frequency scaling.

Â So for not doing any frequency scaling, let's say that at time 0 let's

Â just put the value of 1 and at time 1 we put the value of 1.

Â So, there is no frequency change.

Â And in the time we have we can put the time scaling operation.

Â So for example, we can say a times zero just started zero and for

Â example the end and we can just normalize to say 1.

Â Let's slow down by a factor of 2 for example.

Â So, this was a slow down quite a bit more than we are doing before.

Â So, this will stretch the sound To twice as long.

Â So let's see what it does.

Â 9:08

Okay. So, this is the stretch sound, so

Â this is much longer.

Â The original sound was around four seconds, now it's eight seconds and

Â here we see the sinusoids that of course since they have been stretched

Â We see a little bit more of a mess here because we see twice as long and

Â therefore more compact type of representation.

Â Let's listen to these straight sound.

Â [SOUND] [SOUND] Okay,

Â that's pretty good.

Â And of course we can do, with this interface, we can make changes that vary,

Â not just from beginning to end.

Â But, for example, we can say at the beginning let's start at zero.

Â Let's put that in the middle, let's speed up by 50%.

Â So, it's going to be at 0.25.

Â And at the end let's, for example, leave it,

Â well we can just leave it so that it's really longer, so it's 1.3.

Â Okay, so now we can apply the transformation.

Â 10:19

Okay, so this has done a time varying,

Â time stretching and the beginning has sped up.

Â And the ending has slowed down.

Â So, let's listen to that.

Â [MUSIC]

Â Okay.

Â So, that's pretty good, and that's quite an interesting transformation, and

Â there is quite a lot of opportunities to do interesting things here.

Â Again, this is different from the algorithm that Audacity includes,

Â but the basic concept sinusoidal model is the same.

Â The only thing is there it's a little bit more complicated.

Â And of course, implementation is in C and it's maybe more efficient.

Â 11:03

We have talked about time scaling and use two algorithms,

Â both the Audacity and the one available in the SMS tools.

Â So, hopefully that has given you a view of the potential of the sinusoidal model for

Â time scaling operations.

Â And that's a very interesting transformation that is very much used for

Â many types of applications.

Â So, next class we're going to be talking about changing the pitch of the sound.

Â So, that's a very complimentary operation to changing the time.

Â So, I hope to see you in our next class.

Â Bye-bye.

Â