rip31st 98 Posted September 26, 2008 So I'm trying to figure out why the volume of my sample is a lot more quiet ingame then it really should be. I've got a 44,000khz 16 bit mono sound sample of a weapon at 96db. When you put it in game it's quiet as a mouse. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> sound[] = {"\rip31st\mg34_1sht.wav", 1, 1}; Any ideas? thx Share this post Link to post Share on other sites
scars09 9 Posted September 26, 2008 first 1 is (in your example) 1db in relative to a standard sound. normal values differ from 15 to 35, depending on how loud the weapon should be. try 25, should be ok then. second 1 is to make it faster/slower, wich can be quite usable for some sounds, /(one sound for 3 guns f.e.) and try change it to wss or ogg for size and result Share this post Link to post Share on other sites
.kju 3245 Posted September 26, 2008 none of em you need to make your sound file louder. 1st is how volume changes over distance (gets more silent). Share this post Link to post Share on other sites
rip31st 98 Posted September 26, 2008 IS there a way to increase the volume of a 16 bit mono sample? Share this post Link to post Share on other sites
rip31st 98 Posted September 26, 2008 Ok I've got it figured out. You can't take a 16bit mono and increase past 96db. So if you're in some recording software and you go over that, then normalization occurs when clipping beyond the 16 bit 96db barrier and the sound is reset after resampling. IF you want to increase then DON'T record the sample in the format you want to use. ie - .wav, .ogg, or .wss. Instead use one format and then convert to the one you want to use. During the conversion process, increase the original wave form's volume. Here's what I did to get around this: -Record my sample with windows sound recorder in .wma format. -Use free-rip to convert from .wma to .wav -Before the conversion process takes place, go into free-rips options and change the "ripping volume" to 150%. ( you can change it to whatever percentage you wish - just be careful not to blow out your speakers). Voila...desired results! Free-rip automatically records 16 bit stereo. So all you have to do is convert to mono. I hope this helps others that run into this problem. Share this post Link to post Share on other sites
.kju 3245 Posted September 27, 2008 thanks for the info Rip31st Share this post Link to post Share on other sites
Col. Faulkner 0 Posted October 1, 2008 1st is how volume changes over distance (gets more silent). Could you explain that a bit more? I've always been puzzled about what that second argument actually does. If I have a statement like... sound[] = ("\MySoundPack\whatacoolsound.ogg", 10, 1); ...what exactly does the 10 do? It makes the sound dissipate 10 times faster? Is setting this value wrongly perhaps the reason why whenever one of my addon guys reloads his rifle I hear it right in my ear even if he's 100 yards away? Share this post Link to post Share on other sites
.kju 3245 Posted October 1, 2008 i think general barron described this year somewhere in the forum. you can search for his posts otherwise the BIKI with google search might be worth a try too: http://www.google.com/custom?....dio.com like for DB Quote[/b] ] * 1st parameter: Sound file (path). *.wss is default, *.ogg can be specified. * 2nd parameter: Change of volume compared to the strongest sound that is audible at the camera's (player's) position. It means that the strongest sound is played on 100% and this sound is played weaker (calculated from dB value, distance, occlude, ...). If this sound is alone in sound scene then it is played on 100% every time. * 3rd parameter: Speed of playing, 1 = normal speed/time of playing, 2 = 2 times slower, with half lower pitch. Share this post Link to post Share on other sites
Col. Faulkner 0 Posted October 1, 2008 Yes, I saw that "Biki" entry some time ago but it didn't help much. I couldn't see how that description fits your "volume changes over distance" explanation. Never mind, I'll work it out. Share this post Link to post Share on other sites
General Barron 0 Posted October 1, 2008 There's some discussion of the subject in this post here. But I'll try to give a better explanation now. DB And Distance -The DB specified in the config is the starting decibel level for the sound file. -The DB level of a sound decreases depending on how far away the sound source is from the player / camera. Obstructed line of sight (occlusion) between sound source and the player / camera will also reduce the DB level. -So, starting with the configured DB level, and reducing it according to distance, you get the modified DB level for a given sound. -This is on a per-sound basis, meaning every time the same sound effect is played, it can end up hitting your player's ears with a different DB level, depending on how far away it is each time. -I do not know at what rate the DB level deteriorates over distance, but I'd think there is a standard real-world formula that applies. DB And Volume -A given sound effect will never be played louder than its recorded volume. -A given sound effect will be played quieter than its given volume, depending on its relative DB level. -Relative means you take all the sound effects that are currently being played, and you look at their modified DB level. Out of that set of sounds, the one with the highest DB level will be played at the highest volume (up to the full volume of the recording, but no higher). All sounds with lower DB levels will be played at lower volumes. -I'm not sure exactly if / how the volume of the highest DB sound file is modified. -Sounds with a modified DB level of below -70 will never be heard. Examples -A weapon is reloaded 1000m away from you. The DB level configured for this sound is like +200. Lets say it drops by 100 db over this distance. Its modified DB level is still 100, which is likely to be the highest sound at that moment. The sound file is then heard at its recorded (maximum) volume. -You are standing next to a tank, firing your DB+20 rifle. You hear your rifle at full volume. Then, the tank fires its DB+50 cannon. You will hear the tank cannon at full volume, but your rifle sound file will be played at a reduced volume. -A db-40 butterfly is fluttering around, say 100m from you. Lets say that makes the modified DB level -80 when it reaches your player / camera. The sound file will not be played at all, because it is below the cutoff value. -You are in an empty field. You should be able to hear the flies buzzing around you. You should be able to hear your footsteps, and the sound as you go prone. Next, enemies appear, and a firefight ensues. You will no longer hear your footsteps or the bees, even though they are just as close. The much higher DB level of the weapons causes the footstep and bee sound effects to be played at a much quieter level. Share this post Link to post Share on other sites
.kju 3245 Posted October 1, 2008 Great post General Barron! Sincere thanks for taking the time Share this post Link to post Share on other sites
rip31st 98 Posted October 2, 2008 OK another unique problem I have is I added a hull machine gun to a tank. IT works well inside the tank. When you get out, you can't hear it firing. I'm thinking since it's a custom sound being initialized for the first time from the cfgweapons section of my config, it might need to be set and initialized in the cfgsounds section of my config. any ideas? Share this post Link to post Share on other sites
rip31st 98 Posted October 2, 2008 Well if you decide to ever make a tank with a hull machine gun the answer lies within the config file. I had it set up the wrong way. I had it under the rifle class, which if attached to a vehicle, does not make any third person sound IF it has multiple weapons modes such as semi-auto,auto, burst, etc. The way I got it to work was class is under the "mgun" class and added a single mode of fire and deleted all the other modes. Share this post Link to post Share on other sites