Dynamic Soundtracks.

Status
Not open for further replies.
Level 14
Joined
Oct 18, 2013
Messages
713
In Jak 2, the soundtrack will vary when you enter combat or enter a vehicle. I find this idea really interesting. I would like to try to do something to the same effect in my map.

Here's an example of the "dynamic" soundtrack in Jak 2. The variation begins playing at 26:08. https://youtu.be/kZAcIN3nlLg?t=25m47s What is playing at 25m47s will basically loop until something causes a change in the soundtrack.

So obviously the events/conditions would be whatever I want to cause this variation in what's playing. What actions should I use for a smooth transition? I'm also wondering how I should make the sound clips. Should they overlap slightly and queue the variation to play at the next overlap?
 
AFAIK you can only have one music playing at a time, so you'll need to use .wav sounds for the transition pieces.

Take the first few seconds of every music piece, cut it out from the .mp3 and save it as a new .wave sound. This will be the transition piece.

When a transition is triggered, use a looping trigger (every 0.1 sec or so) to gradually reduce the volume of the music.

At the same time, play the transition sound with a starting volume of 0, and gradually increase its volume. By the time its volume is full (and music volume is 0) it should end, and you can now play the .mp3 which should follow at the part where the .wav ended.

This might get a bit messy for players that like to adjust sound/music volume, so perhaps you should just do a simple stop current, start next on each transition. It won't sound as smooth, but if your music selection is similar enough no one will be bothered by it.

Regarding events:
A combat event could be triggered whenever you attack/get attacked/cast a spell/become the target of a spell.
End of combat event could be a timer. Every combat event resets this timer to ~5 seconds, and if this timer elapses combat has been over for 5 seconds and the music can change.
 
Level 14
Joined
Oct 18, 2013
Messages
713
Well, atm the "music" that is playing in my map is just sound variables, so I could be playing multiple sounds at a time. I will likely do the stop current, start next. It's a lot simpler. If I do work out the messy method and get it to work well I might adopt that instead. Thanks.
 
Status
Not open for further replies.
Top