Page 1 of 1

[Done for V0.39] Ambient Sound Fade Out when Deactivated

Posted: Mon May 29, 2006 5:00 am
by L!ghthouse
I would like to add multiple music files on the same level. Currently, when you deactivate or toggle the music, the sound turns off immediately. The music should fade out when you deactivate or toggle it.

Can this be done for v0.39 plz?!

Posted: Mon May 29, 2006 7:58 am
by beowuuf
This would be bad for other sound effects. Perhaps optional

Posted: Mon May 29, 2006 8:13 am
by Sophia
In the past, I've raised the idea of a separate "Music" type, different from ambient sounds. There are a few advantages that could be gained from this:

- The volume could be set by the player, so players who don't want music don't have to listen to it, and if the music is too loud, it can be turned down.

- The engine could be set up to only play one music track at a time, and fade between them, thus solving your issue, but not messing things up for other sound effects. This would also solve weird issues with scope that I have encountered whilst using ambient sound as music.

Posted: Mon May 29, 2006 9:17 am
by Daecon
That would be cool if you could give each level, or each area of a level, it's own "theme tune".

Posted: Mon May 29, 2006 9:36 am
by beowuuf
You can

Posted: Mon May 29, 2006 11:40 am
by Gambit37
Sophia wrote:In the past, I've raised the idea of a separate "Music" type, different from ambient sounds. There are a few advantages that could be gained from this:

- The volume could be set by the player, so players who don't want music don't have to listen to it, and if the music is too loud, it can be turned down.
Heh he, I have been meaning to recommend this suggestion too, but as the main advocate of getting ambient sounds in the game, I was fearful of doing so! I could imagine GG saying "You campaigned for ambient sound and now you want to turn them OFF?!" ;)
Sophia wrote:The engine could be set up to only play one music track at a time, and fade between them, thus solving your issue, but not messing things up for other sound effects. This would also solve weird issues with scope that I have encountered whilst using ambient sound as music.
I haven't done much with these yet other than one per level and triggers on stairs, so it works pretty well. What issues have you come up against? I noticed weirdness in the two musics starting and stopping on the DM2 alpha when you quickly go up and down the ladder.

Posted: Mon May 29, 2006 3:13 pm
by Sophia
Gambit37 wrote:"You campaigned for ambient sound and now you want to turn them OFF?!"
You just didn't spin it right! You've been pushing for ambient sound, but maybe someone else out there hates your idea, so they get to just turn it off. ;)
Gambit37 wrote:What issues have you come up against?
Trying to use the same piece of music on more than one level doesn't really work very well. You have to put more than one reference to it into the dungeon.

Posted: Mon May 29, 2006 4:22 pm
by L!ghthouse
@Gambit37
DM2 Alpha is kind of wierd in how it has to handle music. In DM2, the music would start over whenever you change levels back and forth. RTC does not start the track over, it picks up right where it left off when you come back to the level. To counter this effect, there is a relay that disables the previous level's ambient sound after a certain delay (after it is finished fading out). Also there is another delay when starting the sound, since DM2 also seemed to wait a while before starting the music on a new level. This is why the sound messes up when you change levels quickly.

Beowuff is right... changing the current "Ambient Sounds" could mess up other features. How about adding a new object called "Ambient Music" that fades in and out whenever you activate, deavtivate, or toggle it? You could fix the other problem as well by having "Ambient Music" automatically restart each time it is activated.

Posted: Mon May 29, 2006 6:24 pm
by Gambit37
Sophia wrote:Trying to use the same piece of music on more than one level doesn't really work very well. You have to put more than one reference to it into the dungeon.
??? Obviously, a new item for each occurence of a sound is required if you want to manage them independently. How is this a problem?

Posted: Sun Jun 04, 2006 6:18 pm
by George Gilbert
L!ghthouse wrote:Beowuff is right... changing the current "Ambient Sounds" could mess up other features. How about adding a new object called "Ambient Music" that fades in and out whenever you activate, deavtivate, or toggle it?
OK - done for V0.39 (WALLITEM_MUSIC_AMBIENT - with all the same properties as WALLITEM_SOUND_AMBIENT, but with the fade function as above).
L!ghthouse wrote: You could fix the other problem as well by having "Ambient Music" automatically restart each time it is activated.
Started off doing this, but it sounds really ugly if you activate it mid-way through playing and/or if you have it with level scope and quickly go up and back down a level...

...so the actual function is to restart after it has faded (i.e. if you quickly swap between areas then it will keep playing, but if you leave and come back after a few seconds then it will start from the begining again).

Posted: Mon Jun 05, 2006 2:39 am
by L!ghthouse
Great! This is an even better idea that what I thought of!

Kudos :D