How to add sound?

  • If you're asking a question make sure to set the thread type to be a question!

massacre master

L2: Junior Member
Feb 2, 2018
88
20
So I want to add custom sounds to the game, is this possible? Thanks for any advice!

BTW I am using Microsoft so no GarageBand.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Well at the most basic level you want to use .wav file and the sample rate has to be 44,100. Hammer/TF2 can use .mp3 files, but you can't preview .mp3 files in Hammer while you can with .wav's.

Where you get sounds from is kinda up to you. Whether you create them yourself or use other sources, please remember to follow copyright laws. If you find a sound effect someone else has used in their map, ask them for their source or if you can use it as well.

All sound files need to be either in the the 'tf/sounds/' folder or the 'tf/custom/sounds/' folder. I suggest using the 'tf/custom/sounds/' and creating a folder in there for all files used by a map project, for example 'tf/custom/sounds/koth_madeupmapname/<your .wav files here>'

Individual sound effects can be placed using the ambient_generic entity. Give it a name and send it the inputs you want. Usually going to be 'PlaySound' and/or 'StopSound'. These are best used to have specific sounds play in relation to specific events.

Soundscapes are used to give an area background sound effects. Things like birdsong, flowing water, airplanes going overhead, ect. There are plenty of premade soundscapes in TF2 already, or if you wanted to create your own is possible but it's a little advanced, so give it a try if you want.

Also isn't Garageband for creating music? I'm not a Mac user either but from what I know that's for creating/recording music. What you use to create music or sound files shouldn't matter because Hammer and TF2 only use .wav and .mp3
 
Last edited:

FloofCollie

I really suck!
aa
Nov 5, 2016
600
669
Both are audio formats. .wav is lossless compression - no quality is lost, but the filesize is larger. .mp3 is lossy - quite a bit of quality is lost but the filesize is a lot smaller.
 

henke37

aa
Sep 23, 2011
2,075
515
Actually, *.wav is a mere container format. It's actually possible to put mp3 encoded audio in a * .wav file.