project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
01 Nov 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
Modding Tutorials Information and tutorials related to modding BF2.

Reply
 
Thread Tools Display Modes
Old 2010-06-01, 04:15   #31
ChiefRyza
Default Re: For those who need help with sound

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.
ChiefRyza is offline
Last edited by ChiefRyza; 2010-06-01 at 06:33..
Reply With Quote
Old 2010-06-30, 10:27   #32
ChiefRyza
Default Re: For those who need help with sound

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?
ChiefRyza is offline Reply With Quote
Old 2017-07-27, 19:05   #33
Tango Mike
Default Re: For Those Who Need Help With Sound

Quote:
Originally Posted by Jaymz View Post
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!
Tango Mike is offline Reply With Quote
Old 2018-01-31, 11:26   #34
[R-DEV]​Arab
PR:BF2 Developer
Supporting Member

Arab's Avatar
Default Re: For Those Who Need Help With Sound

Quote:
Originally Posted by Tango Mike View Post
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/Div...isible-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

Arab is offline
Last edited by Arab; 2019-03-08 at 00:17..
Reply With Quote
Old 2018-02-13, 20:11   #35
Tango Mike
Red face Re: For Those Who Need Help With Sound

Quote:
Originally Posted by [R-DEV]Arab View Post
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/Div...isible-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.
Tango Mike is offline Reply With Quote
Old 2018-02-13, 22:36   #36
[R-DEV]​Arab
PR:BF2 Developer
Supporting Member

Arab's Avatar
Default Re: For Those Who Need Help With Sound

Quote:
Originally Posted by Tango Mike View Post
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

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.

Arab is offline
Last edited by Arab; 2019-03-05 at 12:51..
Reply With Quote
Old 2018-02-15, 16:54   #37
Tango Mike
Default Re: For Those Who Need Help With Sound

Quote:
Originally Posted by [R-DEV]Arab View Post
Hehe, no worries

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?
Tango Mike is offline Reply With Quote
Old 2018-02-16, 02:48   #38
[R-DEV]​ALADE3N
PR:BF2 Developer

ALADE3N's Avatar
Default Re: For Those Who Need Help With Sound

Quote:
Originally Posted by Tango Mike View Post
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

ALADE3N is offline Reply With Quote
Old 2018-02-17, 17:09   #39
Tango Mike
Default Re: For Those Who Need Help With Sound

Quote:
Originally Posted by HeneraLuna View Post
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.
Tango Mike is offline Reply With Quote
Old 2018-02-18, 01:23   #40
[R-DEV]​Arab
PR:BF2 Developer
Supporting Member

Arab's Avatar
Default Re: For Those Who Need Help With Sound

Quote:
Originally Posted by Tango Mike View Post
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...available.html

Arab is offline Reply With Quote
Reply


Tags
sound

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 01:10.