For Those Who Need Help With Sound

Information and tutorials related to modding BF2.
marcoelnk
Retired PR Developer
Posts: 1581
Joined: 2007-03-03 11:30

Re: For those who need help with sound

Post by marcoelnk »

[R-CON]azn_chopsticks_boi wrote:Heh, i am assuming its the mg4 sounds
indeed.
would be great if anyone could provide us with sounds for the mg4.
Image
mp5punk
Posts: 1219
Joined: 2008-07-03 22:18

Re: For those who need help with sound

Post by mp5punk »

can someone explain ambient sounds to me when i put it on my map and then load into it will it just appear at random times or do i need to do something else?
Image
Scheintot887
Posts: 104
Joined: 2009-01-23 16:36

Re: For those who need help with sound

Post by Scheintot887 »

It is allowed to make a own Soundmod? But not for download!

I want to make a own Soundmod... but after 2 minutes PB kicked me... "MD5 Tool mismatch"....... how I can play with a Soundmod? :-(
Scheintot887
Posts: 104
Joined: 2009-01-23 16:36

Re: For those who need help with sound

Post by Scheintot887 »

Someone can help me?
orunes
Posts: 72
Joined: 2009-10-29 15:21

Re: For those who need help with sound

Post by orunes »

Embiance sound.


How can I, for example put music in game?

Another question. If I replace for example us_win, by a downloaded OGG file it doesn´t work, why?

Thank you very much.
Amok@ndy
Retired PR Developer
Posts: 5144
Joined: 2008-11-27 22:13

Re: For those who need help with sound

Post by Amok@ndy »

you need a 44 kHz .wav file and then convert it to .ogg
Image
orunes
Posts: 72
Joined: 2009-10-29 15:21

Re: For those who need help with sound

Post by orunes »

Amok@ndy wrote:you need a 44 kHz .wav file and then convert it to .ogg
TYVM for your help!!!! ;)
ChiefRyza
Posts: 620
Joined: 2008-06-29 07:37

Re: For those who need help with sound

Post by ChiefRyza »

If I place a sound effect (AmbientSound) in the editor, am I supposed to be able to hear it, or is it only audible in-game?


Current project: Operation Tempest
Rudd
Retired PR Developer
Posts: 21225
Joined: 2007-08-15 14:32

Re: For those who need help with sound

Post by Rudd »

ChiefRyza wrote:If I place a sound effect (AmbientSound) in the editor, am I supposed to be able to hear it, or is it only audible in-game?
for me it doesn't always start when I place it, but when I restart the map its there.
Image
ChiefRyza
Posts: 620
Joined: 2008-06-29 07:37

Re: For those who need help with sound

Post by ChiefRyza »

So far no luck....Is there a special way of adding an ambient, looping sound to an area in a map? I have my .ogg file of a jungle ambiance effect, and I want to play it through the areas with jungle in it. I made it from a 44khz .wav file but I can't get it to play in the editor.

Ok.....I got the jungle ambience working, however, how is it possible to have the sound effect become fainter as you move away from it? In the editor it just stops if your out of the radius and goes to full volume if inside of it - but never lowers in volume when moving away. I have the "Is3dSound" option ticked to no avail.
Last edited by ChiefRyza on 2010-06-01 06:33, edited 1 time in total.


Current project: Operation Tempest
ChiefRyza
Posts: 620
Joined: 2008-06-29 07:37

Re: For those who need help with sound

Post by ChiefRyza »

Is it normal that every single ambient sound placed on my map has disappeared after an editor crash, and replaced with a map wide one that can't be removed?


Current project: Operation Tempest
Tango Mike
Posts: 15
Joined: 2017-07-20 08:57

Re: For Those Who Need Help With Sound

Post by Tango Mike »

Jaymz wrote:Just thought I'd make a thread where everyone can ask about any sound designing/coding questions they have with the BF2 engine or with anything else.
Where do I start?

That is my question.
I'm trying to change the G36 sound in Project Reality since a few weeks now. Has not worked once. And I'm loosing my mind.


What do I have-/know?


I have a my new WAV. file, the original destination of the G36 sounds ingame, I have the Bf2 Mod Tools (I think) and Audacity.

What do I have to do in order to hear my own sound instead of the original one in Semi- and Fullauto?

I am a noob, yes. And I am sorry for annoying you guys. But I cannot find a single tutorial on YouTube about this and other Forums don't help me either.

PLEASE help me.

Thank you!
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: For Those Who Need Help With Sound

Post by Arab »

Tango Mike wrote:Where do I start?

That is my question.
I'm trying to change the G36 sound in Project Reality since a few weeks now. Has not worked once. And I'm loosing my mind.


What do I have-/know?


I have a my new WAV. file, the original destination of the G36 sounds ingame, I have the Bf2 Mod Tools (I think) and Audacity.

What do I have to do in order to hear my own sound instead of the original one in Semi- and Fullauto?

I am a noob, yes. And I am sorry for annoying you guys. But I cannot find a single tutorial on YouTube about this and other Forums don't help me either.

PLEASE help me.

Thank you!
Hi! Sorry for the late reply.

Here's the rundown on how to make your sounds work

The following tools are very helpful at giving information and converting channels and sound settings:
  • BF2 Sound Tools
    Contains tools like convert wav into BF2-readable ogg etc
  • BF2 Add Sound Regions
    Allows you to set the sound loop value without running Sony/Magix Sound Forge Audio Studio or Sony Vegas - Useful for weapons but can be used for vehicles too.
  • Format Factory
    Converts a wide range of formats, notably wav formats from stereo to mono
  • MediaInfo
    For viewing audio information
Requirements
  • Must be saved as 44.1 kHz or 48.0 kHz. 44.1 kHz is currently used but in the future it will be changed to 48.0 kHz to save on processing power for EAX cards.
  • 1p (First Person) can have Mono or Stereo sounds (1 or 2 channels respectively).
  • 3p (Third Person) sounds must be saved as Mono to avoid it playing throughout the map.
    ObjectTemplate.is3dSound 1 is responsible for this -> Fire3P and Deploy3P, anything 3P.
  • Must be in .wav or .ogg. It has differences. Explained below.
Differences between .wav and .ogg


WAV Advantages:
+Can use Sound Regions for loops (Used for Helicopter Rotor sounds, Automatic Rifles etc)
+Simple Format

Disadvantages:
-Heavy filesize

OGG Advantages:
+Suitable for level ambience, music and heavy non-sound region looping sounds
+Light and Optimized File size

Disadvantages:
-Can't be used for Sound Region-dependent sounds like Helicopter Rotor, Automatic Rifle sounds as it's not possible with the format.

For Sound Looping

Use BF2 Add Sound Region.exe to add to the sound file the area in which the engine will loop the sound. It uses the values of ObjectTemplate.fire.roundsPerMinute which has to be divisible by 1800 (https://researchmaniacs.com/Math/Divisi ... le-by.html). Enter the value which in the G36's case would be 600.

It will work it's magic after and save automatically.

To convert .WAV to .OGG

In BF2 Sound Tools, extract the folder.
Drag the sound file you want to convert into oggenc.exe.
It will create the .ogg in the exact same folder. Don't forget to rename it in the .tweak

Hope it helps, and if you have any questions, feel free to PM me :)
Last edited by Arab on 2019-03-08 00:17, edited 20 times in total.
Image
Tango Mike
Posts: 15
Joined: 2017-07-20 08:57

Re: For Those Who Need Help With Sound

Post by Tango Mike »

'[R-DEV wrote:Arab;2181314']Hi! Sorry for the late reply.

Here's the rundown on how to make your sounds work

The following tools are very helpful at giving information and converting channels and sound settings:
Requirements
  • Must be saved as 44.1 kHz. While it will work fine with 48.0 kHz, it's not recommended - You can use FormatFactory to change that, including converting sound channels.
  • 1p (First Person) can have Mono or Stereo sounds (1 or 2 channels respectively).
  • 3p (Third Person) sounds must be saved as Mono to avoid it playing throughout the map.
    ObjectTemplate.is3dSound 1 is responsible for this -> Fire3P and Deploy3P, anything 3P.
  • Must be in .wav or .ogg. It has differences. Explained below.
Audacity will save the current sound settings for .wav without changing anything while with .ogg, I find it might do it.

Differences between .wav and .ogg


WAV Advantages:
+Can use Sound Regions for loops (Used for Helicopter Rotor sounds, Automatic Rifles etc)
+Simple Format

Disadvantages:
-Heavy filesize

OGG Advantages:
+Suitable for level ambience, music and heavy non-sound region looping sounds
+Light and Optimized File size

Disadvantages:
-Can't be used for Sound Region-dependent sounds like Helicopter Rotor, Automatic Rifle sounds as it's not possible with the format.

For Sound Looping

Use BF2 Add Sound Region.exe to add to the sound file the area in which the engine will loop the sound. It uses the values of ObjectTemplate.fire.roundsPerMinute which has to be divisible by 1800 (https://researchmaniacs.com/Math/Divisi ... le-by.html). Enter the value which in the G36's case would be 600.

It will work it's magic after and save automatically.

To convert .WAV to .OGG

In BF2 Sound Tools, extract the folder.
Drag the sound file you want to convert into oggenc.exe.
It will create the .ogg in the exact same folder. Don't forget to rename it in the .tweak

Hope it helps, and if you have any questions, feel free to PM me :)
Give me your adress so I can send you some flowers!

Thank you!


I still have a few problems left, one being the 3p sounds.

The sound I wanted to use is a stereo file.
I tried to change it to mono in Audacity and it actually only showed me one track after clicking on 'change stereo to mono'. I exported the soundfile and started the game; I'm still able to hear all weapon sounds on the entire map.
Why is that, or better, how can I fix it?

The other Problem is the sound I added to the M240b.
It seemed ok, but Ingame it's a very very loud and annoying sound. I checked it via MediaInfo and that's the result:

Format: PCM
Codec-ID: 3
Length: 3s 166ms
Bitrate: 2822kb/s
Channels: 2
Samplingrate: 44.1kHz
BitDepth: 32 Bits
Size: 1,07 MiB

Can you help me get this to work?

I got the basic concept however. I now have the ability to add custom sounds to PR. Hell that feels good and I cannot thank you enough!
Most sounds work, also when activating the funswitch. ;)
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: For Those Who Need Help With Sound

Post by Arab »

Tango Mike wrote:Give me your adress so I can send you some flowers!

Thank you!


I still have a few problems left, one being the 3p sounds.

The sound I wanted to use is a stereo file.
I tried to change it to mono in Audacity and it actually only showed me one track after clicking on 'change stereo to mono'. I exported the soundfile and started the game; I'm still able to hear all weapon sounds on the entire map.
Why is that, or better, how can I fix it?

The other Problem is the sound I added to the M240b.
It seemed ok, but Ingame it's a very very loud and annoying sound. I checked it via MediaInfo and that's the result:

Format: PCM
Codec-ID: 3
Length: 3s 166ms
Bitrate: 2822kb/s
Channels: 2
Samplingrate: 44.1kHz
BitDepth: 32 Bits
Size: 1,07 MiB

Can you help me get this to work?

I got the basic concept however. I now have the ability to add custom sounds to PR. Hell that feels good and I cannot thank you enough!
Most sounds work, also when activating the funswitch. ;)
Hehe, no worries :mrgreen:

For the stereo to mono sound, after you split it to mono separately, make sure to delete the other channel. Then re-save for it to work.

Forgot to mention, if you modified the rate of fire in the .tweak and you want to update the sounds, you would need a program to read and remove the loop marker on the audio before running the BF2 Add Sound Region tool since it won't replace an existing one. You can download and install Magix Soundforge (Free Trial) here: https://www.magix.com/au/sound-forge-audio-studio/ to do it.

For the loud M240b firing sound, try removing the Volume and Pitch Envelope (The one with 0/0/0/0/0/0/0/0 etc) plus LowSamples and HighSamples from the tweak.

If you edited your sound in the existing file (which is ideal), then you might need to reapply the sound region using BF2 Add Sound Region tool.

Then ideally, normalise the volume if it sounds quiet.
1. Load both the original sound and the custom sound, then highlight the custom sound.
2. Go to Effect > Normalise, select OK. This will bump up the sound waves to be the same as the original.
Last edited by Arab on 2019-03-05 12:51, edited 13 times in total.
Image
Tango Mike
Posts: 15
Joined: 2017-07-20 08:57

Re: For Those Who Need Help With Sound

Post by Tango Mike »

'[R-DEV wrote:Arab;2182882']Hehe, no worries :mrgreen:

For the stereo to mono sound, after you split it to mono separately, make sure to delete the other channel. Then re-save for it to work.

Forgot to mention, if you modified the rate of fire in the .tweak and you want to update the sounds, you would need a program to read and remove the marker on the audio before running the BF2 Add Sound Region tool since it won't replace an existing one. You can download and install Magix Soundforge (Free Trial) here: https://www.magix.com/au/sound-forge-audio-studio/ to do it.

For the loud M240b firing sound, try removing the Volume and Pitch Envelope (The one with 0/0/0/0/0/0/0/0 etc) plus LowSamples and HighSamples from the tweak.

If you edited your sound in the existing file (which is ideal), then you might need to reapply the sound region using BF2 Add Sound Region tool.

Then ideally, normalise the volume if it sounds quiet.
1. Load both the original sound and the custom sound, then highlight the custom sound.
2. Go to Effect > Normalise, select OK. This will bump up the sound waves to be the same as the original.
And Thanks again!

M240B Sound works perfectly fine now, as any other. I also managed to set all sound to Mono too.

Awesome result but now, there is a very annoying bug:
On some Maps, I'm not able to switch between 1st and 2nd kit on Supplyboxes. (You know, Leftklick on the Marksman kit for example gives you the unsuppressed mk12 and rightklick gives you the suppressed)
When I play Bamyan and try to get the suppressed Mk12spr, it gives me the UNsupressed variant (same with every other weapon: I'm not able to get the 2nd Kitvariant out of supplyboxes)
BUT
On other Maps like Jabal Al Burj, it works totally well.

:? : :? : :? :

Why is that?
User avatar
ALADE3N
PR:BF2 Developer
Posts: 574
Joined: 2016-02-13 17:34
Location: Philippines

Re: For Those Who Need Help With Sound

Post by ALADE3N »

Tango Mike wrote:And Thanks again!

M240B Sound works perfectly fine now, as any other. I also managed to set all sound to Mono too.

Awesome result but now, there is a very annoying bug:
On some Maps, I'm not able to switch between 1st and 2nd kit on Supplyboxes. (You know, Leftklick on the Marksman kit for example gives you the unsuppressed mk12 and rightklick gives you the suppressed)
When I play Bamyan and try to get the suppressed Mk12spr, it gives me the UNsupressed variant (same with every other weapon: I'm not able to get the 2nd Kitvariant out of supplyboxes)
BUT
On other Maps like Jabal Al Burj, it works totally well.

:? : :? : :? :

Why is that?
I think that's an issue on the game for now, you cant request alt kits
Image
Tango Mike
Posts: 15
Joined: 2017-07-20 08:57

Re: For Those Who Need Help With Sound

Post by Tango Mike »

HeneraLuna wrote:I think that's an issue on the game for now, you cant request alt kits
Ok, strange that it worked before I changed the sounds.
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: For Those Who Need Help With Sound

Post by Arab »

Tango Mike wrote:And Thanks again!

M240B Sound works perfectly fine now, as any other. I also managed to set all sound to Mono too.

Awesome result but now, there is a very annoying bug:
On some Maps, I'm not able to switch between 1st and 2nd kit on Supplyboxes. (You know, Leftklick on the Marksman kit for example gives you the unsuppressed mk12 and rightklick gives you the suppressed)
When I play Bamyan and try to get the suppressed Mk12spr, it gives me the UNsupressed variant (same with every other weapon: I'm not able to get the 2nd Kitvariant out of supplyboxes)
BUT
On other Maps like Jabal Al Burj, it works totally well.

:? : :? : :? :

Why is that?
You're welcome :)

As for that issue, it's been fixed for the next update (v1.5.3)
https://www.realitymod.com/forum/f26-pr ... lable.html
Image
Post Reply

Return to “Modding Tutorials”