But can you imagine hearing the same short loop over and over and over and over again?
This is why Ren'Py supports lists of segments, rather then single segments. Right now, one can write:
Code: Select all
$ renpy.music.play([ 'a.ogg', 'b.ogg', 'c.ogg'])
"Hit me!"
$ renpy.music.queue('abc_to_def.ogg')
$ renpy.music.queue(['d.ogg', 'e.ogg', 'f.ogg'], clear_queue=False)
"Ouch!"
This starts off by looping a, b, c, a, b, c, ... while showing "Hit Me". When the user clicks, the currently playing file will finish, and then abc_to_def will play, followed by a loop of d, e, f, d, e, f, ...
The loops should be sample-accurate, so there won't be a pause when playing tracks, unless the pause is in the sound files themselves.
The only thing that's missing is we don't allow for separate transitions from a, b, or c to d... since right now there's no way to know what music is playing. I might add that in...