My Area
Register
Donate
Help
FAQ
About us
Links
Articles
Competitions
Interviews
About HHC.com DJs
T-shirts and merchandise
Profile
Register
Active Topics
Topic Stats
Members
Search
Bookmarks
Add event
Label search
Artist search
Release / Track search

Raver's online
 Total online 1837
 Radio listeners 162+
Email Us!
Username: Password:

  Lost password
 Remember my login 
 
 All forums
 Music production & Gear talk
 

Finding tempo after changing sample rate

 Printer friendly
 

All users can post new topics in this forum. All users can reply to topics in this forum

Author Thread  
The Deviant
Senior Member



United Kingdom
329 posts
Joined: May, 2004
Posted - 2006/10/17 :  12:33:15  Show profile Send a private message
I need some help working out a math problem im having. I want to change the Key and tempo of an acappella. I have tried the easiest way by just Pitch Shifting and then Timestretching, but that degrades the audio quite alot. So instead I want to Resample and then Timestretch, and hopefully end up with a better sound.

My plan is to resample to a new frequency giving me the pitch I want, work out it's tempo and then cut and timestretch the audio to it's new tempo. I know the original tempo and key so it should be easy, but it's not.

I'll write out my workings and hopefully someone can correct any mistakes and help my find the answer.

eg: My sample is at 140bpm 44.100 kHz
Resample to 22.050 kHz = 280bpm (+12 semi-tones or an Octave above)
Resample to 88.200 kHz = 70bpm (-12 semi-tones or an Octave below)

I want my sample to be 2 semi-tones below it's original pitch so..
2 / 12% (2 Divide by 12 percent) = 16.666 (Truncated to decimal 3 as I only need that acuracy)
16.666 / 44.1% (16.666 Divide by 44.1 percent) = 37.791 (Again truncated)
44.1 - 37.791 (44.1 minus 37.791) = 6.309
6.309 + 44.1 (6.309 plus 44.1) = 50.409

50.409 is what I need to resample too so my sample is 2 semi-tones below it's original pitch.

Now here is where I get confused, how the do I find the Tempo,
16.666 / 140% (16.666 Divide by 140 percent) = 11.904 (Truncated)
If I move the decimal point to the right to make 119.04, is that my new tempo?


It's been a while since I did maths, Am I heading in the right direction.


Alert moderator
Woxxy
Junior Member



Sweden
142 posts
Joined: Oct, 2002


36 hardcore releases
Posted - 2006/10/17 :  14:17:57  Show profile  Send a private message  Visit Woxxy's homepage
Actually, if you have a sample and double the frequency, the sample will be half the length, so 22.050 = 70 BPM and 88.200 = 280 BPM.

Which programs do you have? Perhaps you can just resample two semi-tones without having to do any math at all.

Also, the way you were thinking doesn't work. Notes aren't calculated by percentage. You calculate a note like so:
440*2^(n/12)
for more info read the wikipedia article at http://en.wikipedia.org/wiki/Notes#Note_frequency_.28hertz.29


Alert moderator Go to top of page
Edited by - Woxxy on 2006/10/17 14:21:55
The Deviant
Senior Member



United Kingdom
329 posts
Joined: May, 2004
Posted - 2006/10/17 :  14:59:24  Show profile  Send a private message
Im using cubase, and I can resample without doing the math, but I need the percentage diference (2 semi-tones to an octave) so I can work out what the tempo ends up at. Im not actually changing the sample rate as such, but resampling inside a given sample rate, so that when it plays back at 44.100kHz there is a change in the audio's frequency.

Thats why this is like this,
Resample to 22.050 kHz = 280bpm (+12 semi-tones or an Octave above)
Resample to 88.200 kHz = 70bpm (-12 semi-tones or an Octave below)
When I resample in cubase, from 44.100kHz to 22.050 (half) the pitch doubles when played back at 44.100kHz.


Now im really confused.


Alert moderator Go to top of page
Woxxy
Junior Member



Sweden
142 posts
Joined: Oct, 2002


36 hardcore releases
Posted - 2006/10/17 :  15:05:02  Show profile  Send a private message  Visit Woxxy's homepage
Okay, now I can see your problem.
So you know how fast it was going in the beginning and its original sample-rate, right?
you also know how long it is now and how long it was before you resampled it.
simply calculate 140(bpm)*old time/new time to calculate its new bpm.


Alert moderator Go to top of page
The Deviant
Senior Member



United Kingdom
329 posts
Joined: May, 2004
Posted - 2006/10/17 :  16:03:15  Show profile  Send a private message
You say simply calculate like it's nothing .

Forgive me but im not getting it, how do I do the math.

Audio was 33.838s and it's now 39.477s so how do I use those numbers if the tempo was 140bpm.

It's probably really obvious to you but I just can't get my head around it.


Thanks alot.


Alert moderator Go to top of page
Phobz
Advanced Member



United Kingdom
893 posts
Joined: Jan, 2006


13 hardcore releases
Posted - 2006/10/17 :  16:10:31  Show profile  Send a private message  Visit Phobz's homepage
quote:
Originally posted by Woxxy:
simply calculate 140(bpm)*old time/new time to calculate its new bpm.



Would it not be

140 * 33.838 = X
then X / 39.477

* = Times
/ = Divide
^ Im sure you know that but just incase

I got 120 bpm from that ^

Always wondered how you do this, is that correct woxxy?


__________________________________
http://www.soundcloud.com/phobz


Alert moderator Go to top of page
Edited by - Phobz on 2006/10/17 16:19:04
The Deviant
Senior Member



United Kingdom
329 posts
Joined: May, 2004
Posted - 2006/10/17 :  17:22:32  Show profile  Send a private message
It seems right phobz, your answer is about where I'd guess it should be. I'll try your working out on a something simple I allready know the answer to.

It's days like this when all the fun just goes out the window.


Alert moderator Go to top of page
Woxxy
Junior Member



Sweden
142 posts
Joined: Oct, 2002


36 hardcore releases
Posted - 2006/10/17 :  18:33:42  Show profile  Send a private message  Visit Woxxy's homepage
quote:
Originally posted by Phobz:
quote:
Originally posted by Woxxy:
simply calculate 140(bpm)*old time/new time to calculate its new bpm.


140 * 33.838 = X
then X / 39.477



140(bpm)*old time/new time means the exact same thing as what you posted
And yes, 120BPM is about right.

Yes, this is the correct way. It works because you're only calculating proportions. You can do this with more than just BPM and time.
that is
A/B=C/D

in this case, a is the BPM in the beginning, C is the BPM in the end
B is the old time and D is the new time.
All I did was to multiply both sides with D, so I got A/B*D=C*D/D which in the end is A/B*D=C.
was that a better explanation?

An example
A man is 22 years old and has 500£, how old will he be until he has 1000£ given that he earns the same amount every year.
22years=500£
XXyears=1000£

you see that 1000/500 = 2, so he will have to be 2 times as old as he is now to have 2 times as much money.
solution:
22/500*1000 which is the same as 1000/500*22
=44years.


Alert moderator Go to top of page
Edited by - Woxxy on 2006/10/17 18:34:39
The Deviant
Senior Member



United Kingdom
329 posts
Joined: May, 2004
Posted - 2006/10/17 :  19:58:27  Show profile  Send a private message
Cheers Woxxy. After reading your previous post again I can see you told me how to do it.

quote:
Originally posted by Woxxy:
simply calculate 140(bpm)*old time/new time to calculate its new bpm.



It just didn't sink in, probably because im not used to seeing * as times.

I have got it all now,

Thanks mate, I appreciate your help.


Alert moderator Go to top of page
Woxxy
Junior Member



Sweden
142 posts
Joined: Oct, 2002


36 hardcore releases
Posted - 2006/10/17 :  21:38:54  Show profile  Send a private message  Visit Woxxy's homepage
quote:
Originally posted by The Deviant:
Cheers Woxxy. After reading your previous post again I can see you told me how to do it.

quote:
Originally posted by Woxxy:
simply calculate 140(bpm)*old time/new time to calculate its new bpm.



It just didn't sink in, probably because im not used to seeing * as times.

I have got it all now,

Thanks mate, I appreciate your help.



NP :)
Glad to help!


Alert moderator Go to top of page



New PostPost Reply
 Printer friendly
  Verified artist
   Donating member How to donate

It took 1.34 ninja's to process this page!

HappyHardcore.com

    

1999 - 2025 HappyHardcore.com
audio: PRS for music. Build: 3.1.73.1

Go to top of page