Before updating to Windows 10 you may need to return your Pro license. More information here

Synch clips with BPM

Hi everyone,

I've searched the forum and found no appropriate answer for this, and since the documentation does not show any entry on what I am asking, here follows:

I have one base audioclip - a music track for a game - with, let's say, 120 BPM. On a given time I want ot synch, with BPM, another clip, again in 120 BPM and in the same musical scale as the previous one, so that they are seamlessly integrated, just as one track.

Problem: How do I synch two (or more) different audiclips using BPM as reference without using some sort of time-based hack?

more ▼

asked Aug 27, 2010 at 10:30 AM

avatar image

40 16 12 16

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

BPM is time-based, so everything you do to sync will be time-based. If your clips start without any preroll (that is sample 0 is the first downbeat of the song) you can easily calculate the exact beats and bars position from audio.time. If not you will need some meta-data about the audioclip to figure that out. (e.g. time of first downbeat) In some cases you could also find that out doing some audio analysis, but that is out of the scope of unity's audio features.

If you want to sync audioclips to a certain tempo which initially have a different tempo you could try to achieve this using pitch, but that will mess up the tuning and will only work for small differences.

more ▼

answered Aug 27, 2010 at 10:45 AM

avatar image

6.6k 119 110 171

How do you access meta-data on an audioclip?

Aug 27, 2012 at 09:36 PM Lukas_GMC
(comments are locked)
10|3000 characters needed characters left

If the clips are the same tempo and looping, can you simply play them both on Awake and then lerp between volume levels?

more ▼

answered Jun 24 at 03:01 PM

avatar image

51 31 23 24

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Aug 27, 2010 at 10:30 AM

Seen: 2851 times

Last Updated: Jun 24 at 03:01 PM