Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by cry0 · Aug 27, 2010 at 10:30 AM · audiosoundaudioclip

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by StephanK · Aug 27, 2010 at 10:45 AM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Lukas_GMC · Aug 27, 2012 at 09:36 PM 0
Share

How do you access meta-data on an audioclip?

avatar image
0

Answer by Recluse · Jun 24, 2015 at 03:01 PM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Audio Scripting 1 Answer

Question about audio (AudioSource). My ingame sound doesn't sound like the original audio file? 3 Answers

How to stop footstep sound when jumping, but continue when hitting the ground? 1 Answer

Play sound on animation event? 3 Answers

Stop audiosource clip from playing 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges