Post by futurecrayon on Feb 7, 2015 2:15:22 GMT
I'm new to Master Audio and would like to figure out the "correct" setup for my game's interactive music.
Here's how it's meant to work:
I have N different "songs," each comprised of 3 different "layers." The 3 layers of a song are meant to always play in synch with one another. (To be clear, a layer of one song will never be played with a layer of a different song). During gameplay, the layers of a song are meant to fade in/out, depending on the gameplay state. So, if a song is playing, at any given point it might have only one layer audible, or two, or all three. And typically I change the song (all layers) on each new game level.
It seems like there are at least a couple ways to set this up:
1) Use 3 playlist controllers, one for each layer. Use N*3 playlists, each containing 1 clip (a single layer of a single song). Write code to play the 3 associated playlists of a given song via the 3 playlist controllers (using MasterAudio.ChangePlaylistByName).
2) Use 3 playlist controllers, one for each layer. Use 3 playlists, each containing N clips (the same layer from all N songs). Sequence these N clips the same way in all 3 playlists. Write code to advance through the 3 playlists simultaneously (e.g. MasterAudio.TriggerNextClipAllPlaylists).
The downside I perceive with #1 is that I have to somehow keep track of the 3 associated playlists of a given song--by naming convention, or some such. Whereas, in #2, the 3 layers of a song are associated by virtue of the fact that they have the same index in different playlists.
I've tried both of these methods and they both seem to work, more or less. But I'm sure there are considerations I'm missing, which is why I'm asking if there is a preferred method, or some other way of structuring things that I haven't discovered yet.
Also: about the playlist setting "Song Transition Type: Synchronize Clips" and the playlist controller setting "Sync Group." I set them up, as suggested by documentation/tutorials, but they don't seem to really be necessary here, since I am always changing all 3 playlist controllers at once. Do I need these?
Thanks!
Here's how it's meant to work:
I have N different "songs," each comprised of 3 different "layers." The 3 layers of a song are meant to always play in synch with one another. (To be clear, a layer of one song will never be played with a layer of a different song). During gameplay, the layers of a song are meant to fade in/out, depending on the gameplay state. So, if a song is playing, at any given point it might have only one layer audible, or two, or all three. And typically I change the song (all layers) on each new game level.
It seems like there are at least a couple ways to set this up:
1) Use 3 playlist controllers, one for each layer. Use N*3 playlists, each containing 1 clip (a single layer of a single song). Write code to play the 3 associated playlists of a given song via the 3 playlist controllers (using MasterAudio.ChangePlaylistByName).
2) Use 3 playlist controllers, one for each layer. Use 3 playlists, each containing N clips (the same layer from all N songs). Sequence these N clips the same way in all 3 playlists. Write code to advance through the 3 playlists simultaneously (e.g. MasterAudio.TriggerNextClipAllPlaylists).
The downside I perceive with #1 is that I have to somehow keep track of the 3 associated playlists of a given song--by naming convention, or some such. Whereas, in #2, the 3 layers of a song are associated by virtue of the fact that they have the same index in different playlists.
I've tried both of these methods and they both seem to work, more or less. But I'm sure there are considerations I'm missing, which is why I'm asking if there is a preferred method, or some other way of structuring things that I haven't discovered yet.
Also: about the playlist setting "Song Transition Type: Synchronize Clips" and the playlist controller setting "Sync Group." I set them up, as suggested by documentation/tutorials, but they don't seem to really be necessary here, since I am always changing all 3 playlist controllers at once. Do I need these?
Thanks!