Loop music specified amount of times then change
gooner
Lancaster, PAMember Posts: 135
Hello,
I am using an attribute musicTrack, based on it's value I choose a different file to play.
I was wondering if anyone has played a music track, say 2 times, then change the track. I'm good changing the track, I guess my question is more specifically is there a way to determine when the song is over (which would be time to select a new track).
Thanks!
Comments
Play Song
While X < number of plays
--Timer - Every length of song
----Play song
----Change X to X+1
I had been trying timer using (length of song * number of plays) and it was always a fraction of a second off. I will try this combination.
PS - would you specify the length of song or is there a property I can find (like screen.width, or self.time, etc.)
Thanks! Much appreciated.
You need to specify it, in an ideal world you'd edit your song length to the nearest 1/30th/sec value (the Timer behaviour can only resolve to the nearest 1/30th/sec), you could, if needed, throw together your own timer to get that down to 1/60th/sec.
Understood ... that was probably my original problem. I was only using the nearest whole second, which I see now is not nearly accurate enough.
Thanks again!
Yeah, 1 second is half a bar at 120bpm !