Where Do I Put Custom Files?

Ambient sounds, game effects and music creation.

Where Do I Put Custom Files?

Postby Epifire on Mon May 16, 2011 6:34 am

Hey guys simple question that I cannot seem to answer myself, but as the thread title states I cannot find the place to put custom sound files.

Taking it from the top, I have never used custom sounds before.. And I have no idea where to put them. So here's what I want to do.. Use a mp3 sound file with some static on a ambient_sound entity.

I also don't know how it is I could find my sound when browsing the sound files in a ambient_sound's search system. So if any one could help me it would be much appreciated.
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: Where Do I Put Custom Files?

Postby srredfire on Mon May 16, 2011 3:21 pm

Sounds files can be in any directory as long as it subsides inside the "sound" folder in the root folder of the game. So for instance you could have hl2/sound/buttdick.wav, or you could have hl2/sound/epifire/hugehardon.mp3.

Once you have a custom file in there, it will show up in Hammer. If you have Hammer already open, you can click "refresh sounds" either on the main toolbar, or if you have the sound browser open, there should be an option for that as well.

Something to note is that if you're using an .mp3 you will NOT be able to preview it in the sound browser, as for whatever reason, that is not supported.

Hope this helps.
srredfire
Veteran
Veteran
 
Joined: Sat Jul 22, 2006 10:44 pm

Re: Where Do I Put Custom Files?

Postby Epifire on Mon May 16, 2011 5:11 pm

Ok so I got that to work with only one issue. I set the sound to loop, but when I get in game in doesn't loop. Is this in part to it being an mp3, or is there some thing else I need to know in order for it to loop in game?
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: Where Do I Put Custom Files?

Postby srredfire on Mon May 16, 2011 5:30 pm

As far as I know mp3s cannot loop. They might be able to if you add tags in them with a sound editor, like Sound Forge or Audacity, but I haven't tried it before. I've only done that with .wav files.

Your best bet is to use .wav files in most cases, they're much more supported. If they're taking up to much space, resample them to a lower Hz, and make sure to make them mono instead of stereo.
srredfire
Veteran
Veteran
 
Joined: Sat Jul 22, 2006 10:44 pm

Re: Where Do I Put Custom Files?

Postby Dives on Mon May 16, 2011 6:29 pm

MP3s unfortunately cannot automatically loop in source. There are some workarounds however. You can set up a logic_relay to tell the ambient generic to play, then make the relay trigger itself again after the duration of the sound. And this will loop infinitely until you give the relay a CancelPending or Disable input.
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: Where Do I Put Custom Files?

Postby MayheM on Mon May 16, 2011 9:14 pm

You can fool it into playing mp3s as a loop but you may have problems getting it to play perfectly seamless. If it is just the sound of static, you should not need to have a large looping file thus making it a wav would be far easier. I would imagine a 2 or 3 second long static sound would loop well and be very small as a wav.

In order to make the sound loop you just need to add a cue. If you need help let me know, I can give you more accurate instructions.
Image
User avatar
MayheM
Veteran
Veteran
 
Joined: Tue Oct 16, 2007 7:46 pm
Location: Lancaster SC

Return to Audio

Who is online

Users browsing this forum: No registered users