This directory contains all of the scripts in this library.
##Subdirectories
- rhythmObject: Contains scripts that sync GameObjects to the beat of the music.
##Scripts
- MusicWrapper.cs: Used to hold information about audio clips.
##Script Documentation
###MusicWrapper.cs
This script holds user-specified information about audio clips.
####Usage
To use this script, attach it as a component to a GameObject that has an AudioSource component. Then set the tag of that GameObject to "Rhythmify_Music".
######For looping audio tracks:
- If the entire audio track is meant to loop, then set
loopLengthandloopThresholdto 0. - If the audio track consists of an introduction section followed by a looping portion
- Using an external audio editing program, create an audio track of the following form:
[intro][loop][1st few seconds of loop]
That is, concatenate the looping portion to the intro portion, then concatenate another small portion of the looping portion to that. - Set
loopLengthto the length of the looping portion in seconds. - Set the
loopThresholdto some time greater than the length of the intro + one loop, but less than the length of the entire track you created in step 1.
####Field Summary
| Type and Modifiers | Field Name |
|---|---|
public int |
BPM |
public float |
loopLength |
public float |
loopThreshold |
public int BPM
Tempo of the audio clip in beats per minute.
public float loopLength
The length of the looping portion of the audio clip in seconds. Only used for audio clips that have a non-looping intro and a looping part. Set to 0 if there is no non-looping intro.
public float loopThreshold
Amount of seconds to wait before looping back partially. Only used for audio clips that have a non-looping intro and a looping part. Set to 0 if there is no non-looping intro.