Can someone tell me how to *import* custom sounds?

Discussion in 'Mapping Questions & Discussion' started by XFunc_CaRteR, Aug 6, 2011.

  1. XFunc_CaRteR

    XFunc_CaRteR L5: Dapper Member

    Messages:
    248
    Positive Ratings:
    17
    I know all about using ambient_generics and soundscapes with existing in-game sounds.

    Does anyone know how to get custom sounds working with a new map? Sounds you brought in from a different Valve games, or just ones you want to bring in on your own?

    I believe there is a command called snd_buildsoundcachefordirectory, to "rebuild the sound cache", but I don't know what path we're supposed to use.

    Also, is there anything really different for post-OrangeBox games with this?

    thx
     
  2. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    You should just be able to drop the sounds in your /tf/sounds/ folder and get them working. As long as you distribute the sound with your map, they should work fine.
     
  3. XFunc_CaRteR

    XFunc_CaRteR L5: Dapper Member

    Messages:
    248
    Positive Ratings:
    17
    I drop .wav files, and whatnot, into my sounds folder, as noted above. Then I reference them in ambient generics. I get warnings in the console, when playing the game (Alien Swarm, actually), that said files can't be read. Yes, the sounds don't play.

    (It actually isn't difficult to drop a sound file into a folder. Sorry, but I'm not that stupid. It's really easy actually. Still it's hard to get these Valve games to play the sounds.)

    But, nevermindthat, I also imported custom sounds into TF2 and they wouldn't play either.

    There is an issue with rebuilding the sound cache that seems unaddressed here.

    Over here there is reference to rebuilding the sound cache. But there is very little documentation on this. So I'm asking for some step-by-step instructions on that, if anyone knows any - or if anyone knows a tutorial for this.
     
  4. Tehrasha

    Tehrasha L3: Member

    Messages:
    115
    Positive Ratings:
    26
    You just have to make sure the sounds are the same format as the ones being replaced.
    Not just being wav, but the same bit depth, stereo/mono, and sample rates as well.

    Also, they wont play if the server you are on is set 'sv_pure 2'.
     
  5. XFunc_CaRteR

    XFunc_CaRteR L5: Dapper Member

    Messages:
    248
    Positive Ratings:
    17
    I'm adding new custom sounds, not "replacing" sounds.

    Finally, as a mapper, I have no control over what settings anyone's server has when they play my map.
     
  6. gamemaster1996

    gamemaster1996 L13: Stunning Member

    Messages:
    1,065
    Positive Ratings:
    131
    I think it doesn't matter if It's a new sound (hence my ability to play the great escape theme on an old custom map..)
     
  7. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    Yes they will. If it's packed into the map, it will play even if purity is on.
     
  8. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Just to be clear here...

    The problem is you can't even get the map to preview correctly on your own computer, and this has nothing (yet) to do with packaging assets into the BSP for later?
     
  9. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    - snip -
     
    Last edited: Aug 8, 2011
  10. DaBeatzProject

    aa DaBeatzProject

    Messages:
    1,276
    Positive Ratings:
    1,091
    It's probably the fact that they aren't saved with the correct bitrate/samplefrequency/whatever... Sample frequency should be 44100 Hz, and I think the sample size should be 16 bit. But I might be wrong :p
     
  11. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    Okay, the problem is that your sound cache is out of date, right? Alien Swarm does this. After a quick search I found this solution: try using snd_rebuildaudiocache in console.
     
    Last edited: Aug 8, 2011
  12. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,573
    Also, make sure it's mono, not stereo.
     
  13. Kill_the_Bug

    Kill_the_Bug L14: Epic Member

    Messages:
    1,477
    Positive Ratings:
    240
    I think I read somewhere that said they should be 8 bit - but you do have to make it a monotone file.
     
  14. DaBeatzProject

    aa DaBeatzProject

    Messages:
    1,276
    Positive Ratings:
    1,091
    yeah I'm about 80% sure though 16bit works :p but that mono thing explains a lot :O