Jump to content
Official BF Editor Forums
Tcboss

Changing The Bf2 Sound [solved!]

Recommended Posts

Fist; Download this: http://files.filefront.com/Bf2_Sound_Tools...;/fileinfo.html

Take a .wav file and put it in the folder you just downloaded (you need to unzip the folder first ;-). rename the .wav file to "us_win" (without the quotes). Double click "Compile_ogg_for_BF2" file. This encodes the .wav file to .ogg with the bit-rate 112.001000. Take your newly encoded us_win.ogg, place it in your mod folder, point the mod.desc file towards it (for the menu music) and then It should work!

Share this post


Link to post
Share on other sites

K but now the problem is that if I give my map to my mate then he won't have the .ogg in his mod folder and the map will crash? Any way to point the target to an ogg file in your mod/level/Your_Map/Info folder or something?

Share this post


Link to post
Share on other sites

Yes, in theory you can put your sound anywhere in the mod or map if only the path in the *.desc file points to it. E.g. create a sound folder in your level and put the OGG in there, the path to it would be levels/Your_map/sound/myloader.ogg Of course adjust the name of sound and map to the real thing.

Share this post


Link to post
Share on other sites
Fist; Download this: http://files.filefront.com/Bf2_Sound_Tools...;/fileinfo.html

Take a .wav file and put it in the folder you just downloaded (you need to unzip the folder first ;-). rename the .wav file to "us_win" (without the quotes). Double click "Compile_ogg_for_BF2" file. This encodes the .wav file to .ogg with the bit-rate 112.001000. Take your newly encoded us_win.ogg, place it in your mod folder, point the mod.desc file towards it (for the menu music) and then It should work!

Does it work with weapons, I've fixed the SimRad and recorded my voice saying "Roger that target is painted missile is imbound over"

when i loaded it in it plays extremaly fast :(:(:(

Share this post


Link to post
Share on other sites

OGG is great for ambient sounds and other repeating sound loops but e.g doesn't provide for region ( loop ) markers.

For weapon sounds use Microsoft WAV format and save your 1P sounds as 22khz, stereo. 3P sounds should be stored in 22khz, mono with the 'is3DSound 1' property set in the sound template.

Share this post


Link to post
Share on other sites

This doesnt work for me :S. Ive put a .wav file into the folder, and renamed it to us_win then i double-clicked compile_ogg_for_bf2.bat and in that "black" window, it says:

ERROR: input file us_win.wav is not a supported format.

Then i press a key and, yes you guessed it, nothing happens =(.

Please.. Whats the problem?? Im so damm tired of that old bf2 menu music...

Share this post


Link to post
Share on other sites

The ogg converter cannot adjust the samplerates , you need to supply a WAV with the correct bitrate first.

The front end sounds use a 352 kbps bitrate and i seem to remember that the /Common/Sound/menu/music/menu_music.ogg which we use originated form the same bitrate.

Share this post


Link to post
Share on other sites

Isnt that what the -b command line argument does? For example: oggenc -b 352.0 -s 00023548 yoursound.wav

Share this post


Link to post
Share on other sites

This might work, 1/2 Hawk

As i'm using two batch files for all my conversions i didn't examine them for a long time. But i know certain combinations do not work and the BF2 engine doesn't accept all samplerates for ogg's. So far it seems to eat only 19khz and 56 khz oggs derived from 8khz resp. 22 Khz WAV's.

Here's the contents of my drag & drop batch file to make a 56khz OGG with a serial number:

@Echo OFF
set prog="Z:\BF2\Bf2 Sound Tools\oggenc.exe" 
set /p serial=Enter the desired serialnumber:
%prog% -b 56.000 -s %serial% %1
pause

The prog path points into my server, you need to adjust that to your location of the ogg encoder. The serial number is entered in decimal format

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

no. read again :P

If the sound is not an ambient or loading sound but one which interacts with a BF2 object you should use Microsoft WAV codec as this format provides region markers needed by BF2 to play the sound right. OGG sounds are good for loader musics, ambient sounds or other endless sound loops.

Share this post


Link to post
Share on other sites

This little program is goddamn lifesaver!

I got around all the above .wav problems by opening my mp3 in Audacity.

This can export as a generic .wav, with ID3 possible, that seems to work perfectly with this little wonder.

No matter what sound i need, i export it as a .wav, change the name to us_win.wav. I run the program, it makes my .ogg version and i rename that to whatever it was.

eg.

original WarthogFlyover.mp3

open in Audacity, file-->exporte as wav. --> WarthogFlyover.wav

place into the folder, rename to us_win.wav

double click on the .bat file, runs fine, it saves a copy as us_win.ogg

rename this back to my original WarthogFlyover.ogg

save to objects_clients.zip in main folder (within the zip file, to effects/sounds/ambient (i think) )

create an ambient sound in the editor, point to warthogflyover.ogg

voila, a sound of an A-10 Thunderbolt passing close overhead!

This program gets my nomination as Most Useful Utility!

Cheers,

HDK

Edited by Headlock

Share this post


Link to post
Share on other sites
This little program is goddamn lifesaver!

I got around all the above .wav problems by opening my mp3 in Audacity.

This can export as a generic .wav, with ID3 possible, that seems to work perfectly with this little wonder.

No matter what sound i need, i export it as a .wav, change the name to us_win.wav. I run the program, it makes my .ogg version and i rename that to whatever it was.

eg.

original WarthogFlyover.mp3

open in Audacity, file-->exporte as wav. --> WarthogFlyover.wav

place into the folder, rename to us_win.wav

double click on the .bat file, runs fine, it saves a copy as us_win.ogg

rename this back to my original WarthogFlyover.ogg

save to objects_clients.zip in main folder (within the zip file, to effects/sounds/ambient (i think) )

create an ambient sound in the editor, point to warthogflyover.ogg

voila, a sound of an A-10 Thunderbolt passing close overhead!

This program gets my nomination as Most Useful Utility!

Cheers,

HDK

THANK YOU!!!!!!

Share this post


Link to post
Share on other sites

I'm not here to burst your bubbles , mind you. But you should test your OGG sounds on a LAN/internet game first 'cause sometimes the ogg's serial number is in the way and the sound doesn't play , even if it works on your local machine.

Share this post


Link to post
Share on other sites

I'm not here to burst your bubbles , mind you. But you should test your OGG sounds on a LAN/internet game first 'cause sometimes the ogg's serial number is in the way and the sound doesn't play , even if it works on your local machine.

hello,

I am having some trouble getting this to work. I have encoded a WAV file in the manner that the instructions suggest, but the sample rate comes out wrong.

music_console.jpg

It seems to be rounding it to 112.000000 instead of 112.001000. BF2 CTD's before the login screen. What am I doing wrong.

I placed the new file in mods\mymod\common\sound\menu\music\ and packaged it

If I remove this file from my mod it load fine.

Edited by Coronaextra

Share this post


Link to post
Share on other sites

Okay okay sorry about that, disregard my last 2 posts

I've just got it to render as 112 kbps 44100Hz ogg file, testing it to hear if it works

Seems like it gives a list of all types of bitrate, but no 112kbps

If I want 112 kbps I have to set to "VBR quality" (see picture), then experiment until I got the bit rate I need, I set to 0.30.

Will tell you guys if successful.

Update: Nope, that serial stils hinders the file.

sonygl.jpg

Edited by urban_fighter_0181

Share this post


Link to post
Share on other sites

Which one is correct: 112 or 112.001000?

None of them works for me...I even thought that my cmd is broken so I've formatted my laptop...

Turns out that Windows 7's cmd works that way.

Later I think I found something: I've set my sound card settings to 24 bits 192000Hz Studio quality.

Is this my true problem?

Share this post


Link to post
Share on other sites

If other BF2 sounds play ( like in the retail game ) but only your selfmade sound doesn't its fair to assume that this one sound is coded wrongly and your sound system isn't the problem.

You should use a bitrate of either 56.000 or 19.600 to code your OGG. Use a 22khz WAV file to convert to 56k OGG and an 8 khz WAV to make a 19.6k OGG.

Here's my drag&drop batchfile to create a 56k OGG (make56koggwithserial.bat):

@Echo OFF
set prog="Z:\BF2\Bf2 Sound Tools\oggenc.exe" 
set /p serial=Enter the desired serialnumber:
%prog% -b 56.000 -s %serial% %1
pause

Drive Z: is my server, replace with your location of oggenc.exe

Edited by mschoeldgen[Xww2]

Share this post


Link to post
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.

Loading...

×
×
  • Create New...