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

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
L!ghthouse
Craftsman
Posts: 106
Joined: Mon Nov 10, 2003 9:43 pm
Location: Budapest, Hungary

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

Post 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?!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

This would be bad for other sound effects. Perhaps optional
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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.
User avatar
Daecon
Expert
Posts: 329
Joined: Tue May 16, 2006 1:56 pm
Location: Upper Hutt, New Zealand

Post by Daecon »

That would be cool if you could give each level, or each area of a level, it's own "theme tune".
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

You can
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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.
User avatar
L!ghthouse
Craftsman
Posts: 106
Joined: Mon Nov 10, 2003 9:43 pm
Location: Budapest, Hungary

Post 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.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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).
User avatar
L!ghthouse
Craftsman
Posts: 106
Joined: Mon Nov 10, 2003 9:43 pm
Location: Budapest, Hungary

Post by L!ghthouse »

Great! This is an even better idea that what I thought of!

Kudos :D
Post Reply