Setting up RhythmTool
To begin using RhythmTool, import the Unity Package. After that, you can start using the RhythmTool Component to analyze songs.
See the included examples for a quick overview of the package.
RhythmTool chops up a song in small pieces of roughly 0.03 seconds. In other words, there are 30 pieces of data for every second of the song. With RhythmTool, these pieces are referred to as Frames.
When playing and analyzing a song, RhythmTool keeps track of the total number of frames, the last analyzed frame and the frame that corresponds to the current time in the song. Every detected beat or onset and every datapoint of the song has a frame index. This lets you synchronize the analysis results to the music and gameplay in different ways.
The RhythmTool Component has some basic settings.
The Track Beat option lets you toggle beat tracking. Beat tracking looks at large parts of a song to find the most likely BPM and then synchronizes the BPM as a series of beats. Beat tracking is very useful, but it can increase the time it takes to analyze a song and it might not be needed for some projects.
The Lead slider lets you configure how much data will be analyzed ahead of the current time in the song.
When you enable Pre Analyze, RhythmTool will analyze the entire song as fast as possible before enabling playback. This also exposes the option Cache Analysis. Instead of re-analyzing a song every time it is loaded, it can store and reuse analysis results.