[Done for V0.39] Ambient Sound Fade Out when Deactivated
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- 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
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?!
Can this be done for v0.39 plz?!
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
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.
- 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.
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
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: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.
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.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.
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
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:"You campaigned for ambient sound and now you want to turn them OFF?!"
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.Gambit37 wrote:What issues have you come up against?
- L!ghthouse
- Craftsman
- Posts: 106
- Joined: Mon Nov 10, 2003 9:43 pm
- Location: Budapest, Hungary
@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.
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.
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
??? Obviously, a new item for each occurence of a sound is required if you want to manage them independently. How is this a problem?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.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
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: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?
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...L!ghthouse wrote: You could fix the other problem as well by having "Ambient Music" automatically restart each time it is activated.
...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).
- L!ghthouse
- Craftsman
- Posts: 106
- Joined: Mon Nov 10, 2003 9:43 pm
- Location: Budapest, Hungary