Skip to content

Instantly share code, notes, and snippets.

@identity2
Created June 8, 2019 12:51
Show Gist options
  • Save identity2/dd6df0fa240d4545cfc874824c2744a6 to your computer and use it in GitHub Desktop.
Save identity2/dd6df0fa240d4545cfc874824c2744a6 to your computer and use it in GitHub Desktop.
void Update()
{
//calculate the position in seconds
songPosition = (float) (AudioSettings.dspTime - dsptimesong);
//calculate the position in beats
songPosInBeats = songPosition / secPerBeat;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment