- Home /
How To Sync Animation To Music or Bpm ?
I am trying to make a game where most of the action are based on music. I already can trigger the start of an animation on the beat correctly, but i want to sync what is happening in the animation itself to music, I wonder if there is way to put the key-frames on beats for ex: by using a grid in the animation curve window that is spaced by beats and snaps.
you could use AudioSource.timeSamples to trigger an animation at set intervals
thanks i know this, i want to sync the key frames inside the animation
Answer by Artorias2718 · Oct 24, 2017 at 08:49 PM
@TeraHertz, Have you looked into getting the Koreographer plugin?:
$$anonymous$$oreographer is paid, i wish there was a free alternative, espicially if it can be made natively in unity. From what I read on $$anonymous$$oreographer page, I think it is used to trrigger stuff only, idk if there is a way to sync keyframes to the beat by $$anonymous$$oreographer.
Answer by lokihornsby · Mar 16, 2021 at 06:33 PM
Although this is pretty vague i found this to be usefull:
if (animator.speed != SongBPM){
animator.speed = SongBPM/(60*2);
}
i'll update this post when i manage to get something better or discover new things - for any future users :)
Your answer
![](https://koobas.hobune.stream/wayback/20220612133700im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Gizmo won't stop snapping to grid. 1 Answer
Can I make animations snap to a frame? 1 Answer
RTS building snap to grid 2 Answers
Change individual material element offset in animation 0 Answers
Can't get .fbx to animate in Unity! 1 Answer