Sign in to follow this  

how to loop .wavs based on tempo?

This topic is 3728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, im working on a project and am desperately trying to find out how id program a music loop engine that will let me layer .wavs together and play them over and over with consistent tempo.. is directx good to use for loading/playing the samples/.wavs? how would i accurately loop the files based on tempo? for instance, if the loop is 120 beats per minute and the sample is 1 measure long (4 beats), how would i make sure the file played exactly every 2 seconds? please help! thanks very much! email me at keptblue@gmail.com if needed. (btw, to know a little more about me, i run a popular podcast to be found at www.canopyradio.tv)

Share this post


Link to post
Share on other sites
Quote:
Original post by keptblue
hello, im working on a project and am desperately trying to find out how id program a music loop engine that will let me layer .wavs together and play them over and over with consistent tempo..

Where do you get tempo metadata for your sound files from, and how is it expressed?
Quote:

Is directx good to use for loading/playing the samples/.wavs?

You mean DirectSound, not to be confused with Direct3D, DirectInput, etc.
It's definitely appropriate, but there are portable, possibly simpler, and somewhat open source alternatives.
Quote:

how would i accurately loop the files based on tempo? for instance, if the loop is 120 beats per minute and the sample is 1 measure long (4 beats), how would i make sure the file played exactly every 2 seconds?

Your file is already 2 seconds long and contains one measure of music, so it fits correctly between other copies of itself: just loop it without gaps (the first frame immediately after the last frame).
I don't see any need for nontrivial algorithms or calculations: are you trying to do something more difficult than what I (mis)understood? Do you have trouble editing the sound files?


Share this post


Link to post
Share on other sites

This topic is 3728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this