ambient_generic fade in
Post Reply
Quote
Re: ambient_generic fade in
Posted by Dark Tree on Mon Nov 10th at 4:00am 2008


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? smiley




Quote
Re: ambient_generic fade in
Posted by Riven on Mon Nov 10th at 4:30am 2008


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.






Quote
Re: ambient_generic fade in
Posted by Dark Tree on Mon Nov 10th at 5:28am 2008


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 smiley




Quote
Re: ambient_generic fade in
Posted by Le Chief on Tue Nov 11th at 8:20am 2008


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.





Quote
Re: ambient_generic fade in
Posted by Dark Tree on Tue Nov 11th at 10:24am 2008


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.



Quote
Re: ambient_generic fade in
Posted by G4MER on Tue Nov 11th at 12:47pm 2008


Psychosis Was the game company you got your Avatar from right Dark Tree?



Sorry Wrong image.. that is Pacman.. here is what I was trying to link..





Quote
Re: ambient_generic fade in
Posted by Dark Tree on Tue Nov 11th at 1:31pm 2008


It's Psygnosis, and, yes smiley.









Quote
Re: ambient_generic fade in
Posted by G4MER on Tue Nov 11th at 2:41pm 2008


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




Quote
Re: ambient_generic fade in
Posted by Le Chief on Fri Nov 14th at 4:10am 2008


Look at you two reminiscing about the dinosaur age :P.

[code=Dark Tree]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.[/code]

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.






Quote
Re: ambient_generic fade in
Posted by Dark Tree on Thu Nov 20th at 11:18pm 2008


Accepted Answer
Quoting Riven
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!




Quote
Re: ambient_generic fade in
Posted by Riven on Fri Nov 21st at 4:50am 2008


Good news indeed! Thanks for digging that bit of info up. smiley





Quote
Re: ambient_generic fade in
Posted by Sehnsucht on Fri Dec 26th at 7:13pm 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.



Quote
Re: ambient_generic fade in
Posted by Riven on Fri Dec 26th at 7:28pm 2008


-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?





Quote
Re: ambient_generic fade in
Posted by Le Chief on Sun Dec 28th at 3:08am 2008


I suppose the only drawback is a larger total filesize for the sound.






Post Reply