public void Tick(float time)
{
for (int i = 0; i < SoundEffects.Count; i++) //dispose and remove sound effect instances that are finished
{
if (SoundEffects[i].State != SoundState.Playing)
{
SoundEffects[i].Dispose();
SoundEffects.RemoveAt(i--);
}
}
TimeDiff += time;
while (TimeDiff > BeatLength)
{
TimeDiff -= BeatLength;
NextNote();
}
}