Map volume always too low?

Discussion in 'Mapping Questions & Discussion' started by sunbeam, Jun 29, 2015.

  1. sunbeam

    sunbeam L1: Registered

    Messages:
    6
    Positive Ratings:
    0
    Hello,

    I've always been disturbed on the way how hammer handles volumes of custom sounds. I'm making tf2 maps at the moment, and when I want to add custom sounds I always need to make them louder using audacity, but even then it's not really high enough compared to other maps, and if I keep turning it up soon or later the sound is ruined because of the peaks.

    I want to know if there's any way to make a sound, for example a song, to play as loud as it originally is. Maybe I've been doing it in the wrong way, so please tell me, it's seriously disturbing.

    Sincerely,
    sunbeams.
     
  2. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    735
    Positive Ratings:
    72
    it comes down to how tight the Area of Effect is,
    lets say you want the noise of a generator, you'd want that around 370-600 units
    but if you want an entire map sound, it'd be -1

    though often the world sounds are supposed to be quiet due to the natural in game voices, gunfire, and etc. hammer treats all sound file (unless specific) as light ambiences, that are barely to be heard. Most soundscapes are that of environmental origin (wind, animals, water), and rarely man made (machinery, computers, fluorescents). Your more likely just to change the Area instead of the volume. though knowing what exactly is the matter would be nice (pictures/vmf)
     
  3. Crash

    aa Crash func_nerd

    Messages:
    3,136
    Positive Ratings:
    4,718
    The way I got the voices on Trainsawlaser to play so loud was multiple ambient_generics playing on top of each other. Usually 3-4 was the best. Just keep them named the same thing and they will trigger together.
     
  4. sunbeam

    sunbeam L1: Registered

    Messages:
    6
    Positive Ratings:
    0
    I'm mostly looking to play songs over the whole map, let's say on a deathrun map. Then it would be nice to not have it as a light ambience. Take a look at dr_office and it's music room for example, that's the kind of volume I'm looking for. http://tf2.gamebanana.com/maps/164951
     
  5. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,032
    Positive Ratings:
    3,978
    If you're going to put sounds in Audacity to make them louder, you need to start with the highest quality file you can in the first place. Preferably uncompressed (ie, FLAC or WAV, but some wav files are compressed too) before you start editing it. If it's a song from a CD, you might need to rip it yourself using something like dbpoweramp to increase the volume as it's being ripped, though that could lead to problems also and is best used sparingly.

    Any sounds you use in a TF2 map should be created entirely by you, though. Otherwise you're probably committing copyright infringement. If you make the sound yourself it'll be easy to adjust the volume without sacrificing quality as well. If it's a free use song, try contacting the author and seeing if they can help you.

    Crash's method also works, but I'd be careful about creating too many entities. Depending on your map type, that could become a problem. Also don't use mp3 files.
     
  6. Crash

    aa Crash func_nerd

    Messages:
    3,136
    Positive Ratings:
    4,718
    If you have a lot of audio files you can do like I did and AddOutput the ambient_generics to change what they are going to play just before you play them. Saves a ton of entities this way, but you still have to have at least one ambient_generic with that clip on the map to cache it.

    Why no MP3 files, though? I used nothing but in both Trainsawlaser and Wubwubwub. Saved a ton on filesize.
     
    • Thanks Thanks x 1
  7. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,032
    Positive Ratings:
    3,978
    I believe mp3s don't loop properly? I should have said they're OK for sounds that don't need to loop. Also, I could be remembering wrong!

    I didn't know you could do this! Nice.
     
  8. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    735
    Positive Ratings:
    72
    uh, I always use soundscapes built in... typically I also use ambiences from other valve games (as for the exception of CS:GO, they all work mostly interchangeably if you know the proper .txt name)
     
  9. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,032
    Positive Ratings:
    3,978
    Right... I meant other than soundscapes as this topic is about custom sounds, and not soundscapes.
     
  10. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    735
    Positive Ratings:
    72
    yea I know, I have some basic ambience creation tools, haven't found a format that doesn't crash my computer when it plays in tf2... strangely enough it works perfectly fine in the Unreal engine
     
  11. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,032
    Positive Ratings:
    3,978
  12. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    832
    If you refer to sounds in Hammer using their raw directory location and filename (e.g. sound/mysounds/sound.mp3), they will play quietly in-game. It's not Hammer's fault, it's the way the game handles the sounds.

    If you want your sounds to play at a respectable volume you must turn them in to 'game sounds' by making your own custom sound script for your map. The sound script is an external file that you include packed inside your BSP, and it refers to each custom wav or MP3 file. It presents the game with a 'game sound name', typically taking the format category.sound_description. In this script file you specify volume, attenuation, speed and channel (is it an announcement, a voice line or a general sound?).

    If you want a sound file to be heard at a persistent volume throughout the world (not attenuated by distance from a source point), you simply set the 'Plays Everywhere' spawnflag, if you are using an ambient_generic. If you are making your own custom soundscript, you can set the attenuation in the script for that sound to SNDLVL_NONE. If you set your sound properties in your sound script you mostly won't need to touch the settings inside your ambient_generic as the properties in the sound script will take precedence. Using an external sound script means you don't have to recompile your map to test changes to your sounds. You can change the properties of each sound in the script and reload the map.

    If you are playing voiceover lines to your players, like announcer lines, you don't need to use ambient_generic for each line. You can send an output to the tf_gamerules entity, using its PlayVO input, specifying the game sound name as the parameter (use PlayVORed or Blue to play a sound for only one team). You can find the TF2 sound scripts in the scripts VPK dir file, packed under the scripts directory.

    MP3 files should always be used (128kbps, 44khz Stereo), unless you need the sound to loop, in which case use a looped wav file. Save the wav file using the MS-ADPCM codec for the best compression. Audacity and GoldWave support this codec (Audacity may need FFmpeg, I can't remember). If you are playing background music in your map, you may find that it continues to play in to the next round. You can combat this by fading it out or stopping it when one team wins, using logic (tf_gamerules also has some OnWin outputs). Alternatively, use the raw file path for your sound, rather than a game sound name, and remove the tick from the 'Is NOT looped' flag. This combination of settings makes TF2 stop the sound when the round changes, oddly.

    If you want a good example of a custom sound script used in a deathrun map, download dr_castle_steveh and extract its sound script (maps/dr_castle_steveh_level_sounds.txt). Decompile the map if you want (it's mine). Bear in mind that if you make a custom sound script Hammer won't be able to see its contents so you will have to work in blind faith. You can probably add your sound script to the scripts/game_sound_manifest.txt file, though (can be extracted from the VPK if it doesn't exist).
     
    • Thanks Thanks x 4
  13. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    735
    Positive Ratings:
    72
    maybe that's why
     
  14. Crash

    aa Crash func_nerd

    Messages:
    3,136
    Positive Ratings:
    4,718
    I personally didn't have any luck getting the volume I wanted, even making sound scripts for my clips. There is always the possibility I was doing it wrong, though.
     
  15. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    832
    Attenuation seems to have more control over the loudness of a sound than its volume.
     
  16. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,216
    Looking at Doomsday, it just uses ambient_generics with Max Audible Distance set to 1250, Volume set to 10, and the "Play everywhere" flag checked. So unless there's some special reason why this only works for default sound files, I have no idea what could be wrong.