DSPRelated.com
Forums

Slow Motion Recording

Started by Stacy January 8, 2008
How do you slow down a digital audio recording and keep the same pitch?

For example if the audio sample was recorded at 44.1k you could, by S/W
intervention, tell it to play at 22.05k. That will slow it down by half
speed. However, it will also lower the pitch by half also.

The approach I would take to slow down by 2 is:
1) Find a way to double the frequency of the audio sample. I would try to
accomplish this by 
   i)   taking the FFT,
   ii)  moving the values in the bins to what is double the frequency,
   iii) then taking the iFFT.

2) Tell the recorder to play at 22.05k.

What say you?



Stacy wrote:
> How do you slow down a digital audio recording and keep the same pitch? > > For example if the audio sample was recorded at 44.1k you could, by S/W > intervention, tell it to play at 22.05k. That will slow it down by half > speed. However, it will also lower the pitch by half also. > > The approach I would take to slow down by 2 is: > 1) Find a way to double the frequency of the audio sample. I would try to > accomplish this by > i) taking the FFT, > ii) moving the values in the bins to what is double the frequency, > iii) then taking the iFFT. > > 2) Tell the recorder to play at 22.05k. > > What say you?
There's a whole body of practice in this area, some of it trade secrets. I suggest you start at http://www.dspdimension.com/ and look on the DOWNLOAD page. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
"Stacy" <stacy2003_young@yahoo.com> wrote in message 
news:BuSdnbF_xLFZrBnanZ2dnUVZ_saknZ2d@giganews.com...
> How do you slow down a digital audio recording and keep the same pitch? > > For example if the audio sample was recorded at 44.1k you could, by S/W > intervention, tell it to play at 22.05k. That will slow it down by half > speed. However, it will also lower the pitch by half also. > > The approach I would take to slow down by 2 is: > 1) Find a way to double the frequency of the audio sample. I would try to > accomplish this by > i) taking the FFT, > ii) moving the values in the bins to what is double the frequency, > iii) then taking the iFFT. > > 2) Tell the recorder to play at 22.05k. > > What say you?
One interpretation of your question would be: "how to play it back at half the sample rate?" So why not decimate the samples first? Now, if what you want is to actually play it back slowly - i.e. words come out twice as long in time - then that's another matter. Useful though... Fred
On Jan 9, 6:53 pm, "Fred Marshall" <fmarshallx@remove_the_x.acm.org>
wrote:
> "Stacy" <stacy2003_yo...@yahoo.com> wrote in message > > news:BuSdnbF_xLFZrBnanZ2dnUVZ_saknZ2d@giganews.com... > > > > > How do you slow down a digital audio recording and keep the same pitch? > > > For example if the audio sample was recorded at 44.1k you could, by S/W > > intervention, tell it to play at 22.05k. That will slow it down by half > > speed. However, it will also lower the pitch by half also. > > > The approach I would take to slow down by 2 is: > > 1) Find a way to double the frequency of the audio sample. I would try to > > accomplish this by > > i) taking the FFT, > > ii) moving the values in the bins to what is double the frequency, > > iii) then taking the iFFT. > > > 2) Tell the recorder to play at 22.05k. > > > What say you? > > One interpretation of your question would be: "how to play it back at half > the sample rate?" > > So why not decimate the samples first? > > Now, if what you want is to actually play it back slowly - i.e. words come > out twice as long in time - then that's another matter. Useful though... > > Fred
Google for Phase Emcoder. Hardy
AFAIK there is no ideal solution to this problem.

"HardySpicer" <gyansorova@gmail.com> wrote in message 
news:09ef8e29-a8ed-4e90-8cab-53f1c4f6fc84@s8g2000prg.googlegroups.com...
> On Jan 9, 6:53 pm, "Fred Marshall" <fmarshallx@remove_the_x.acm.org> > wrote: >> "Stacy" <stacy2003_yo...@yahoo.com> wrote in message >> >> news:BuSdnbF_xLFZrBnanZ2dnUVZ_saknZ2d@giganews.com... >> >> >> >> > How do you slow down a digital audio recording and keep the same pitch? >> >> > For example if the audio sample was recorded at 44.1k you could, by S/W >> > intervention, tell it to play at 22.05k. That will slow it down by half >> > speed. However, it will also lower the pitch by half also. >> >> > The approach I would take to slow down by 2 is: >> > 1) Find a way to double the frequency of the audio sample. I would try >> > to >> > accomplish this by >> > i) taking the FFT, >> > ii) moving the values in the bins to what is double the frequency, >> > iii) then taking the iFFT. >> >> > 2) Tell the recorder to play at 22.05k. >> >> > What say you? >> >> One interpretation of your question would be: "how to play it back at >> half >> the sample rate?" >> >> So why not decimate the samples first? >> >> Now, if what you want is to actually play it back slowly - i.e. words >> come >> out twice as long in time - then that's another matter. Useful though... >> >> Fred > > Google for Phase Emcoder.
Never heard of it but I tried: ["Phase Emcoder"] yields nothing at all. [phase emcoder] yields a bunch of stuff that looks not pertinent and I suspect a lot of typos meaning "encoder" I think the most general method that applies is "speech encoding" or "linear predictive speech encoding". Here is one quote: "Bandwidth reduction is achieved by selecting perceptually significant spectral regions and dropping the rest, through a proprietary technique" Most hits are for patents... Better, look for lectures on [LP speech lecture] and [CELP speech lecture] and maybe add .ppt to the search to eliminate course outlines. Fred
Fred Marshall wrote:
..
>>Google for Phase Emcoder. > > > Never heard of it but I tried: > > ["Phase Emcoder"] yields nothing at all. >
Should be "phase vocoder" - both time-scaling and pitch-shifting are canonical tasks for it. Richard Dobson
On Jan 8, 6:30 pm, "Stacy" <stacy2003_yo...@yahoo.com> wrote:
> How do you slow down a digital audio recording and keep the same pitch? > > For example if the audio sample was recorded at 44.1k you could, by S/W > intervention, tell it to play at 22.05k. That will slow it down by half > speed. However, it will also lower the pitch by half also. > > The approach I would take to slow down by 2 is: > 1) Find a way to double the frequency of the audio sample. I would try to > accomplish this by > i) taking the FFT, > ii) moving the values in the bins to what is double the frequency, > iii) then taking the iFFT. > > 2) Tell the recorder to play at 22.05k. > > What say you?
For this 2X case: What do you do with the contents of bins at or above one fourth the sample rate? And what do you put in the odd numbered bins? You might want to look up: low pass filtering by one of the FFT overlap methods and phase vocoder methods for time/pitch modification. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Stacy wrote:
> How do you slow down a digital audio recording and keep the same pitch? > > For example if the audio sample was recorded at 44.1k you could, by S/W > intervention, tell it to play at 22.05k. That will slow it down by half > speed. However, it will also lower the pitch by half also. > > The approach I would take to slow down by 2 is: > 1) Find a way to double the frequency of the audio sample. I would try to > accomplish this by > i) taking the FFT, > ii) moving the values in the bins to what is double the frequency, > iii) then taking the iFFT. > > 2) Tell the recorder to play at 22.05k. > > What say you?
I say it depends on the signal. What works pretty well for speech may suck for music. What you are suggesting sound pretty nasty for speech. If you want to vary the playback speed of speech try Googling for TDHS, PSOLA, PICOLA, and a few related ideas should pop up along the way. If you want to vary the speed of more general signals, like music, try http://www.dspdimension.com/category/tutorial/ Steve
>If you want to vary the speed of more general signals, like music, try >http://www.dspdimension.com/category/tutorial/ > >Steve
Jerry also recommended the above mention site. It seems like the buzz word is "Time streching" rather than slow motion. At least I now know the correct terminology in what I am trying to accomplish. Thanks. The phase vocoder seems to be a candidate for my design. "dspdimension" gives some code for pitch shifting. It is not what I originally asked for. Nevertheless, I am currently working with it. On the other hand, writing Time Streching code is going to be more challenging.