PDA

View Full Version : Ambient Sounds Tips by frobber



Komag
29th Jun 2002, 06:51
by frobber
Let me tell you some things I've learned lately. Consider these tools, rather than answers...
Plain vanilla ambients show a slow fade in volume starting from the middle of its radius, then dropping off fairly quickly at the edges. If the player walks fully outide of this radius, the ambient stops playing entirely. And if the player walks back into the radius, the ambient starts up again from the beginning.

All audio segments get stored in a registry of sorts, and when the player enters an ambient zone, the stored ambient file gets swapped in memory, and then launched. Very large ambients can take up to a quarter second or more to swap, and during this time the game stops dead (I have a lot of very large ambients -- up to two megs -- so I know this to be true). If you have a situation where you are often moving in and out of ambient areas defined with very large sound files, the game can lurch very badly.

Edges can be be smoothed by selecting the 'no-sharp-edge' ambient feature, and this has the effect of blending the sound very nicely. On the the down side, I believe that it does this by recalculating more than with normal ambients -- so the problem of lurching will come up sooner if more than a few ambients in an area are smoothed off like this.

Ambients can be made switchable by adding the scirpt Add>S>ActivateAmbient -- so the ambient can now be controled with a switch.

If you start the ambient as 'turned off' then the ambient is not played until the switch is applied.

If the 'one-shot' option is selected, then the ambient will only play once ever.

The problem you have is trying to keep all the loops playing in-sync so that no matter where the player is, they will line up. But this won't be easy.

One experient I made recently was to play an identical and very distict ambient in four places all close together to see how well they lined up in time -- and it's not very close ... maybe 1/4 second off. So it is wise not to let your loops overlap very much.

Looking Glass often did music loops by breaking the sounds into much smaller pieces -- like six or eight segments that would play somewhat randomly -- this is set up in the schema files, which are fairly simple when it comes to ambients. Sledge has a very good tutorial on schemas on this TUG site.

Here's the bigest problem, though...

Since ambients shut down when you leave the area, and start playing from the beginning when you show up again, it require a cleaver solution to get them synced up. They just are not made to do this.

I'm guessing that the only solution you'll have is to slice the music into small enough pieces so there really is no great sense of beginning, middle, or end -- just one area that seems to have more drum segments, and so forth.

I'd try 'no-sharp-edges' and see if that helps. And after that, I'd try slicing the music into each measure or thematic segment.

Wish I could give you 'the answer' but this is the best I can do for now.

Good luck.