ambient_generic fade in

ambient_generic fade in

Re: ambient_generic fade in Posted by Dark Tree on Mon Nov 10th 2008 at 4:00am
Dark Tree
646 posts
Posted 2008-11-10 4:00am
646 posts 264 snarkmarks Registered: Apr 30th 2004 Occupation: DigiPen student Location: USA
I have a looping wav file I made, and refer to it with an ambient_generic. The sound starts off, and is eventually triggered. It turns on, loops just how I want it to. Problem is, it starts a little harshly, and would rather when it first starts, for it to slowly fade in... instead of just abruptly starting.

I have tried with an mp3 AND a wav (with cue points). Both sounds play fine within game, but neither one of them fade in. In the ambient_generic's object properties, in the 'fade in time in seconds' field, I have used the a value of 2, 4, and 10 seconds. But the sounds do not fade in at all.... they start at full volume. I even have the 'Start Volume' field set to zero. I tried it for both the .wav and the .mp3 in case it didn't work for one or the other. Although, if it was an mp3 I was going to use, I could of course manually fade in the mp3 file, but it isn't... it's a looping .wav I am concerned about.

I have also fiddled with different timings on the 'Spin up time' options.... even though I am not sure what they do.

Edit: On the Ambient generic valve software wiki, I found out what 'Spin up time' does... it supposedly affects the pitch while fading in, but, like 'fade in time in seconds,' doesn't do squat. I also read how the fadein/fadeout keyvalues have been depricated. I checked, and I AM using the new fadeinsecs/fadeoutsecs keyvalues. I am also looking into env_soundscapes, even though they sound confusing.... they require a text file? :(
Re: ambient_generic fade in Posted by Riven on Mon Nov 10th 2008 at 4:30am
Riven
1640 posts
Posted 2008-11-10 4:30am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Yes, env_soundscapes require a text file. You can make your own or refer to one already made. They allow quite a bit of freedom in terms of Entities in Hammer. They're easy to use and work pretty well. All you have to do is learn the parameters and format for the textfiles, in which case there are a few tuts on the VDC to help you out with.

As far as fade-ins for your .wav files. I tried the fade-in checkbox and keyvalues and it never worked for me either (this was in the EP1 engine). I don't know if this is fixed in the orange box. I do know that the pitch keyvalue works, but fading a looped sound would be better off if done in the sound itself. Source need only play the sound, no post processing. If you want the sound to start off quietly and loop seamlessly, all you need to do is fade-in the beginning and fade-out the end, The player shouldn't notice at all. I accomplished this for 3 minutes of heavy rain I recorded one night outside my window. I clipped out the train noise, and faded the ends and added my looping cues; it worked beautifully in game; I couldn't be happier.

So, yea, make it a goal to not rely on Source to post-process your content if you can help it.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: ambient_generic fade in Posted by Dark Tree on Mon Nov 10th 2008 at 5:28am
Dark Tree
646 posts
Posted 2008-11-10 5:28am
646 posts 264 snarkmarks Registered: Apr 30th 2004 Occupation: DigiPen student Location: USA
pre-fading sounds in and out just won't cut it. Think... if Valve had faded every one of their machine sounds in and out. It would sound weird. And bad. And very noticeable. It must be seamless, without silence or gaps. If it needs to start harshly, so be it. I will try the orange box engine.... if it works, I will post that here and switch my map to the orange box engine.

Thanks for the ideas, Riven. I will also check out the VDC tutorials :)
Re: ambient_generic fade in Posted by Le Chief on Tue Nov 11th 2008 at 8:20am
Le Chief
2605 posts
Posted 2008-11-11 8:20am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
What I would have done is triggered a "fade in" than make it so you trigger a sound right after the sound is faded in, and this second sound just loops from there.
Aaron's Stuff
Re: ambient_generic fade in Posted by Dark Tree on Tue Nov 11th 2008 at 10:24am
Dark Tree
646 posts
Posted 2008-11-11 10:24am
646 posts 264 snarkmarks Registered: Apr 30th 2004 Occupation: DigiPen student Location: USA
If I am hearing you right... you are saying to make two wav files. One wav file is manually faded in... at the end of the wav file, start the OTHER wav file... and have it looped. If so, I think I will do that... I actually thought about this last night... but.. I am trying to be efficient. But... if that is as efficient as I can get, I'll do it! Thanks for the idea. The VDC states the fade in / fade out stuff as borked. Thats funny. Funny because it makes me a sad panda.
Re: ambient_generic fade in Posted by G4MER on Tue Nov 11th 2008 at 12:47pm
G4MER
2460 posts
Posted 2008-11-11 12:47pm
G4MER
floaty snark rage
member
2460 posts 360 snarkmarks Registered: Sep 6th 2003 Location: USA
Psychosis Was the game company you got your Avatar from right Dark Tree?
User posted image
Sorry Wrong image.. that is Pacman.. here is what I was trying to link..
User posted image
Re: ambient_generic fade in Posted by Dark Tree on Tue Nov 11th 2008 at 1:31pm
Dark Tree
646 posts
Posted 2008-11-11 1:31pm
646 posts 264 snarkmarks Registered: Apr 30th 2004 Occupation: DigiPen student Location: USA
It's Psygnosis, and, yes :).
User posted image
User posted image
User posted image
Re: ambient_generic fade in Posted by G4MER on Tue Nov 11th 2008 at 2:41pm
G4MER
2460 posts
Posted 2008-11-11 2:41pm
G4MER
floaty snark rage
member
2460 posts 360 snarkmarks Registered: Sep 6th 2003 Location: USA
They made some of the very best games.. many of them are my faves!

Sorry for the misspelling Dar Tree of the name.. =(

I wonder if that wipeout game could be made in Source now? hummmm
Re: ambient_generic fade in Posted by Le Chief on Fri Nov 14th 2008 at 4:10am
Le Chief
2605 posts
Posted 2008-11-14 4:10am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Look at you two reminiscing about the dinosaur age :P.
If I am hearing you right... you are saying to make two wav files. One wav file is manually faded in... at the end of the wav file, start the OTHER wav file... and have it looped.
Yes, that's what I mean, its the only way to do it. If you have a look through the Half-Life 2 sounds, there are a few examples of this technique being used.
Aaron's Stuff
Re: ambient_generic fade in Posted by Dark Tree on Thu Nov 20th 2008 at 11:18pm
Dark Tree
646 posts
Posted 2008-11-20 11:18pm
646 posts 264 snarkmarks Registered: Apr 30th 2004 Occupation: DigiPen student Location: USA
Riven said:
I don't know if this is fixed in the orange box
It is.

In another thread, campaignJunkie sugg'd I use the orange box instead of the Source Ep1 version to be able to use an entity not available in Source Ep1. Well, I switched engines to the orange box and the ambient_generic fade in works now. just set the fade in value to whatever you want... supposedly whatever value you want in seconds... I set the value to 20 (seconds) and it fades in in about 10 seconds. I just triggered it from a button to "playsound" and it fades in like it is supposed to. Good news!
Re: ambient_generic fade in Posted by Riven on Fri Nov 21st 2008 at 4:50am
Riven
1640 posts
Posted 2008-11-21 4:50am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Good news indeed! Thanks for digging that bit of info up. :sherlock:
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: ambient_generic fade in Posted by Sehnsucht on Fri Dec 26th 2008 at 7:13pm
Sehnsucht
12 posts
Posted 2008-12-26 7:13pm
12 posts 1 snarkmarks Registered: Dec 26th 2008
Another workaround is to copy the sample and paste it after itself, so you have two instances of the loop within the wave and set the loop start que where the second instance begins. Save the wave with the new metadata and it should pot up and loop in Source.
Re: ambient_generic fade in Posted by Riven on Fri Dec 26th 2008 at 7:28pm
Riven
1640 posts
Posted 2008-12-26 7:28pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
-Well, that's a pretty nifty idea too! -I wouldn't put it past Valve to have a few of their sounds doing that. You think there are any drawbacks to doing that?
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: ambient_generic fade in Posted by Le Chief on Sun Dec 28th 2008 at 3:08am
Le Chief
2605 posts
Posted 2008-12-28 3:08am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
I suppose the only drawback is a larger total filesize for the sound.
Aaron's Stuff