Jump to content

Soundbanks for Dummies


Recommended Posts

Ok, if you've read this thread and still don't get it, I'll write a little here to try to clear things up for you happy modders:

1) A wavebank is essentially a list of wavefiles either lying in the same folder or compressed in a .bank file lying in the same folder. The list also specifies the name the wavefiles are given by which they are recognized by the soundbank.

2) A soundbank is a list of "sounds" (an abstract object, not an actual wavefile) that can be called on by the script. Essential information such as the "rolloff" and "gain" of a sound are specified within the sound tag.

3) The sound in a soundbank calls for a sound in its corresponding wavebank; for example, the script for the Beretta pistol calls for its sounds in the beretta_sound.xml soundbank, and that soundbank in turn calls for the wavefiles found in the beretta_wave.xml wavebank. A sound can be set to randomly choose from a set of waves every time the cue is played, or randomly pitch the sound to make it sound less repetitive. Look in my xml documents to see the names for these attributes - they're self explaining.

3) The beretta_wave.xml wavebank in turn calls for the actual wave data in beretta_wave.bank. This is a single file containing all the sounds associated with the beretta. You cannot compress your own .bank files - we haven't released the tools for that. You can, however, create uncompressed wavebanks, or wavebanks containing wavefiles with lower sample rate (22050 or 11025 Hz) to save RAM. The wave files will have to lie "as is" in the same folder as the wavebank.

4) Any wavebank you put under local/english/sound/.. that has a corresponding wavebank under data/sound/.. will be used instead of the one in the data/sound/.. folder. This way you can exchange wavebanks without editing the original ones.

Hope that helps.

______________________________________________________

Advanced Soundbanks: Sequences and looped sounds

Soundbanks can be pretty advanced, with looped cues, queues and sequences of sounds, and sounds calling for other sounds. For example, look at sound/environment/birds/birds_sound.xml. The sound "birds" found in this soundbank is the sound you place in trees throughout a level to have bird singing coming from that location. The sound "birds" randomly calls for either one of the sounds "bird_a_looper" through "bird_f_looper". Each of those sounds contain a sequence - a call for another sound ("bird_a_looper" calls for "bird_a", etc) and a "wait". The sound this sequence calls for in turn contains a set of very short bird sounds as well as a call for the sound "pause". The sound "pause" in turn only contains a forced "wait" of random length (2-12 seconds). This is how things happen once you've placed the sound "birds" in a tree somewhere on the map, and start playing that map:

1. The script calls for the sound "birds" once the level starts.

2. The sound randomly selects one of the sounds it contains. Once any of these "daughter sounds" are done, the "mother sound" ("birds") would have to be retriggered - but an environmental sound placed in the level editor such as "birds" will only be triggered by the script once - when the level starts - so we've made sure that any sound it randomly plays is looped in eternety. This way the bird starts singing once the level starts, and it will never stop, and the script will never have to care about that environemental sound again.

3. Let's say that the "birds" sound randomly selects "bird_e_looper". This calls for the sound "bird_e_looper" further up in the xml code (a sound called on by another sound (a "daughter sound") always has to be above the "mother sound" in the xml code - so that it is read into the memory before it.

4. The sound "bird_e_looper" is a sequence containing a call for "bird_e" and then a "wait" (a wait is not a sound or a wavefile, but a sequence event that tells the sound sequence to wait until the previous instance in the sequence (in this case the sound "bird_e") is done before continuing to the next instance in the sequence. A "wait" can also contain a random or fixed delay of the following instance. Anyway, "bird_e_looper" only contains a call for "bird_e" and then a wait - this in combination with the fact that the sound ("bird_e_looper") is set to loop will cause it to play the sound "bird_e", and once that is done, wait for "0" seconds and then start the sequence all over again, forever.

5. Every time the sound "bird_e" is called on by "bird_e_looper", it randomly selects either of these waves from the birds_wave.xml file: bird_e_01, bird_e_02, bird_e_03, bird_e_04, bird_e_05 and bird_e_06, or it plays the sound "pause". Any of these waves (which are six different short short pieces of a bird call) or sounds (which as you know is a random wait of 2-12 seconds) are a events which the sound knows when its done with - and once it is done it will, as you know, return this information ("i'm done") to the mother sound ("bird_e_looper") whose looping sequence will go to the next instance ("wait") and then loop, meaning it will call back to "bird_e" in an instant.

When this looping procedure is set in motion, it will cause this kind of sound:

bird_e_looper calls for bird_e, who randomly selects "bird_e_02"

bird_e returns "i'm done" to bird_e_looper, which waits for "0" seconds and starts over

bird_e_looper calls for bird_e, who randomly selects "bird_e_01"

bird_e returns "i'm done" to bird_e_looper, which waits for "0" seconds and starts over

bird_e_looper calls for bird_e, who randomly selects "bird_e_05"

bird_e returns "i'm done" to bird_e_looper, which waits for "0" seconds and starts over

bird_e_looper calls for bird_e, who randomly selects "bird_e_02"

bird_e returns "i'm done" to bird_e_looper, which waits for "0" seconds and starts over

bird_e_looper calls for bird_e, who randomly selects "bird_e_04"

bird_e returns "i'm done" to bird_e_looper, which waits for "0" seconds and starts over

bird_e_looper calls for bird_e, who randomly selects "pause"

pause plays its sequence causing it to randomly pick an amount of seconds (2-12) to wait

pause randomly picks 8 seconds, and waits for that period of time

bird_e returns "i'm done" to bird_e_looper, which waits for "0" seconds and starts over

bird_e_looper calls for bird_e, who randomly selects "bird_e_01"

bird_e returns "i'm done" to bird_e_looper, which waits for "0" seconds and starts over

bird_e_looper calls for bird_e, who randomly selects "bird_e_03"

bird_e returns "i'm done" to bird_e_looper, which waits for "0" seconds and starts over...

...and it goes on and on and on and on... to a player walking around near the tree in which the sound source for the "birds" sound is placed, it will sound like a totally random "chirp chip-chip, chirrrp, chirp-chirp... (pause for X amount of seconds) ...chrip-chrip-chirrrrp, chip-chip... (pause for X amount of seconds) ...chirp, chip-chirp...."

It is essentially a neverending, never repeating bird call - superior in all ways to a looping wave file of a bird:

A) A looping file would quickly become repetitive, and the player would not only see through the illusion but maybe even become annoyed with it

B) To make it less obvious that a looping wave is looping, you would have to make it very long - and if you wanted the bird to occasionally go silent and wait for a second, that would be a second of silence in the wave file which would be a complete waste of memory AND a voice (channel) on the sound card. In my solution, all silences are only abstract "wait" instances in a sound sequence which neither take up RAM nor take up a voice on the sound card while "playing".

Also, the randomization in the "birds" sound means that if you put "birds" sound sources all over the map, each of them will randomly pick their own bird sound of the six "virtual birds" ("bird_a" through "bird_f") I've put in the "birds" sound randomizer, and stick to looping that "bird" - so there will be a plethora of different bird sounds everywhere and you don't have to do the job of typing in different sounds for each sound source you place in the map.

Now tell me I'm not a genius. :shifty:

/simon

Link to comment
Share on other sites

I don't follow. How do you mean there's a "glitch"? If the glock is set to full auto (by the player, in the game) and the player presses fire, "loop" will start playing, and once the player releases the fire button, "loop" will be cut off by "end". If the glock is set to semi outo (single shot), the sound "1shot" will play every time the player presses the fire button. This is all handled by the script, not by anything in the soundbank or wavebank. What glitch are you talking about?

You have to be describe in more detail what the problem is, I don't see how this could be one.

Link to comment
Share on other sites

Well you press fire and it plays the auto sound and then you let go and it plays the end sound. There is like a very short pause between the two sounds, like less than a millisecond (but it is quite notice able). It might just be me, I may have to fiddle with my sounds to get it to line up. Or it could be one of the conmmands. what does "offset" do?

Link to comment
Share on other sites

If you've followed my instructions in this thread you wouldn't have any "offset" attributes in the wavebank to ask questions about.

I don't know any nice way to say this, but here goes: I refuse to help you if I can't trust that you've done things the way I've instructed you to - the array of possible mistakes from your end would just be endless, so I wouldn't know where to start when addressing your issues.

So, once again, check this thread - and pay extra attention to point #10.

Link to comment
Share on other sites

Just like to say thanks Grin_desmond for the help!

I've got my custom sounds working, and that's really solely down to your explainations and tutorials. I would have stumbled around and probably have given up.

I was struck by how well organised the sound system in GRAW is. It's quite easy to modify original files, and not that akward to bring new sounds into the game. The hard part seems (for me anyway) to make them "fit", and that's just a matter of adjustment. (my farm animal noises don't really have a place in GRAW...even if it was lol funny)

(animal farm mod anyone?) :hmm:

So thanks again to Grin_desmond. Your input really does make a difference.

Happpy Christmas!

Edited by Vox*BDA*
Link to comment
Share on other sites

  • 1 month later...

A sound can be set to randomly choose from a set of waves every time the cue is played, or randomly pitch the sound to make it sound less repetitive. Look in my xml documents to see the names for these attributes - they're self explaining.

Where can I find these list of weapon sounds and explosions?

Link to comment
Share on other sites

In the data/sound/weapons folder, you have subfolders for all weapons in the game. These subfolders contain xml files (e.g. "g36_sound.xml") which you can view to see what different sounds compose the character of a weapon (single shot firing, full auto firing, echoes, reload sounds, trigger click, equip, unequip, go to ironsight, go from ironsight, etc). It's an xml document though, and not a list "per se". These sounds are "called for" from the wave-bank belonging to that sound-bank (e.g. "g36_wave.xml"), and these are the wave files you need to exchange if you want to mod the weapon sounds. Good luck with the modding.

Link to comment
Share on other sites

OK, here's what I did; I created some new sound waves, named them exactly like the name under the xml list, I then changed them to wma or wave because the ogg format didnt work. (unless I put the ogg files into the local/english/sound folder, which i havent tried yet) and then stuck them into local/english/sound folder I created. I have them in both that and in the data/sound/weapon folders that the sound corresponds to. Still I do not hear a change in sounds. Is there something Im doing wrong here?

Link to comment
Share on other sites

Ok, what I 'm trying to do now is , I used the bundle tool and unbundled the sound banks to check out the xml names there. I notice that they are different than the ones declared in the sound/settings "xml documents" file. Ok, so im trying that. Am I getting warmer? I am going by your previous tutorial in sounds.

Link to comment
Share on other sites

Ok, hopefully you're on today. um....so I'm not going to repack anything right? And these sound files, are they supposed to be ogg. or wav. ? And am I going to copy the xml layout and paste to a notepad or word pad document? I'm not quite understanding that part.

Notepad is ok to use right? Cause I notice you mentioned UltraEdit and was wondering if I needed that as well, or if notepad would do.

Edited by Chammy
Link to comment
Share on other sites

Ok, I'm still not getting it to work yet. Am I supposed to delete the sound bank thats in the data/sound/weapon/grenade folder? im trying to change the grenade sound) Or do I put a copy of the sound/weapon/grenade and put it into the local/english/sound/weapons/grenade ? Or do I stick the new copy of the grenade_wav.xml into it? Or do I make another grenade_wav.bank and stick it into the folder, or one of the folders. I'm lost.

Link to comment
Share on other sites

It's all described in detail in this thread (a thread linked from the very beginning of the first post of this thread you're reading right now).

I can't waste time helping people who can't even follow step-by-step instructions.

However, since I am so kind, I'll still give you a quick answer:

1. Don't touch anything in the /data/sound/folder. Period.

2. Make duplicates of the .xml files (grenade_frag_wave.xml & grenade_frag_sound.xml in you case) and put them in the corresponding folder in the /local/ folder (/local/english/sound/weapons/grenade/ in your case)

3. Delete all wave header data in the *_wave.xml (instructions in point 10 in the thread linked in the beginning of this post).

4. Put your own sounds in the same folder as your edited .xml file (that is, the /local/english/sound/weapons/grenade folder in your case). The sounds should be in .wav format - as that is how they are specified in the *_wave.xml file. Did you even check any xml file, or the thread linked in the beginning of this post? If you did, you wouldn't have to ask whether the file format of the sounds should be .ogg or .wav.

5. Rename your sounds so that they correspond to the ones listed in the *_wave.xml. You have to replace all sounds - you can't just put new explosion sounds in the folder and leave out, say, the sounds of the grande landing on the ground, because then the greande won't make any sound when it lands on the ground. Missing sounds might even crash the game.

6. Read my previous posts before asking for personal help:

6-A. The thread you're reading right now, from the beginning (since it seems you haven't read even that).

6-B. This thread

6-C. Once again, the thread linked from the beginning of this post.

Link to comment
Share on other sites

Sorrreee, I didnt know game developers were that egotistical and grouchy that a request for clarification by devoted fans is so down right a waste of your precious time, gee, that really attracts alot of would be fans ,like you care.

I did read your thread over and over again and I'm sorry there are some people like me who arent educated enough in computer programing cause a life outside of playing games is more important and we may have a few problems deciphering certain step by step procedures due to maybe ADD or other , that a more alternate way of explaining them shouldnt be too much to ask for. if you're going to be that arrogant then I apologize for bothering you.

Ok you never explained anything that said its imperative that you USE a "certain" program for the xml, except that YOU use UltraEdit and that you also use ADPCM, of course you said that we need to place the sounds or wave sounds into a specific folder but its very vague to me since we cant repack them, and I still do not know if the xml provided in the game is whats going to call for the sounds or if we need to make another xml, (which I did but didnt work either).

I'm sure I'll have more questins and you 'll probably get all mad and impatient from this post that you'll flame me to the T and then close it.....if you have time to do that either.

Link to comment
Share on other sites

4. Put your own sounds in the same folder as your edited .xml file (that is, the /local/english/sound/weapons/grenade folder in your case). The sounds should be in .wav format - as that is how they are specified in the *_wave.xml file. Did you even check any xml file, or the thread linked in the beginning of this post? If you did, you wouldn't have to ask whether the file format of the sounds should be .ogg or .wav.

I did read that also but someone else had said I needed to use ogg.

Link to comment
Share on other sites

I have a couple of quick questions so please bear with me:

1) Do i need UltraEdit (in which im using the trial version right now)or can I just use notepad?

2) Now, to know what other wave samples are since each one has a few other samples that are of the same origin but of a different label, how can we find out which one is used for what? Cuz since there is end_reverb_1 and end_reverb_2 and such , how do we know how long is what, or which one is for what?

Edited by Chammy
Link to comment
Share on other sites

  • 2 weeks later...

Hi

1) You can use any text editor you may find (notepad included) But text editors like Ultra Edit gives you many advantages when you edit the text.

Example.

You have Line Nr at the side making you able to quickly find the line that has an error.

Color-codes : There are different colors fore different commands. (example lines that arent read are light green <!-- your text here -->

also makes it easier to spot missing " or = or <>

2) sry im still new to the sound editing. dont know the answer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...