Home
Up

Add Custom Sounds

NOTE:  This tutorial was originally composed by Donald Marshall of DeltaForce Command.   Visit Donald's Website


This tutorial explains how you can add your own custom sounds and custom music to your missions.

 

What are those .ogg files in the .pbo file?

The .ogg files in the demo1.demo.pbo file are the sound and music files used for the demo mission. All of the sound .ogg have "sound\" prepended to their name in the .pbo filelist and the music .ogg files have "music\" prepended to their names in the .pbo filelist.

These .ogg files are actually sound files encoded with the Ogg Vorbis codec developed by Xiphophorus software. Their website is http://www.vorbis.com/. Here is a brief description of the Ogg Vorbis sound codec from their website :

 

Ogg Vorbis is a fully Open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format for high quality (44.1-48.0kHz, 16+ bit, polyphonic) audio and music at fixed and variable bitrates from 16 to 128 kbps/channel. This places Vorbis in the same class as audio representations including MPEG-1 audio layer 3, MPEG-4 audio (AAC and TwinVQ), and PAC.

 

In the downloads section at http://www.vorbis.com/ there is a WinAmp plugin you can download which will allow you to play .ogg files using Winamp.

 

 

How can I listen to .ogg files?

Okay, so now we know what the format is but how does someone actually listen to these files?

Luckily it seems that this codec is catching on and a number of sound utilities support it.

In the downloads section at http://www.vorbis.com/ there is a WinAmp plugin you can download which will allow you to play .ogg files using Winamp. Download Winamp at http://www.winamp.com and then download the plugin and follow the instructions on how to use it with Winamp. There are also a couple other players in that section as well. I use Winamp myself.

 

 

How can I create my own .ogg files?

In the third party section at http://www.vorbis.com/ there are bunch of links to third party software which supports the .ogg file format. The one I choose to use was dBPowerAMP Music Convertor at http://www.dbpoweramp.com/ . The others might work...I didn't try them once I got this to finally work :) At their site you can download and then install their application. In addition, you need to download and then install their .ogg codec at http://www.dbpoweramp.com/codec-central.htm .

dBPowerAMP Music Convertor allows you to convert files from one format to another. For example, if you have an MP3 file you are dying to use as the music in your custom mission then you can convert it to .ogg format with this util. Same goes for other formats like the old but still used WAV sound format. If you want to record your own WAV sound files use any sound recording software for Windows and get a microphone. How to record WAV files is outside the scope of this tutorial.

 

 

Here is how you use dBPowerAMP to convert files to .ogg format that works with Operation Flashpoint :

1) Run the music convertor application. You will be prompted to enter the name of the file you want to convert. Select the file (MP3,WAV, or some other format) and click the open button.

2) A small window appears indicating what format you want to convert the file to. If you installed the .ogg codec correctly you will see the OggVorbis option. Select it with the mouse.

3) A larger window appears that allows you to specify parameters for the destination .ogg file as well as where you want to save the .ogg file. You need to use the following parameters in order for the .ogg file to work with Operation Flashpoint.

Encoding must be Constant Bit Rate

Bit Rate can vary. 56K seems to be good quality without taking alot of disk space.

Channels must be set to mono (at least for .ogg files used for sound. .ogg files used for music can be in stereo)

Frequency must be set to 44100 Hz

Preserve ID tags is checked

Volume Normalization is not checked (actually..not sure if this matters)

4) In the same window specify where you want to save the file and then hit the convert button. A small progress window will appear to indicate conversion progress. When it is done converting you can hit the finished button.

Voila! Test out your newly created .ogg file with WinAmp.

 

Now the adding the sounds you need to make a description.ext file, however for some reason OpF then refuses to play the sound (especially Music) I have asked Bohemia interactive for a response so once I get one I will let you know

here is an example of the description.ext file rename Airwolf to the name of the music file (minus .ogg):


class CfgMusic
{
    // Contains a list of all the .ogg files (without the .ogg extension) which are
    // in all of the CfgMusic class instances below.
    tracks[]=
    {
        Airwolf
    };
 

    // Definition for a specific music track
    // The class name is referenced in the mission.sqm file. (E.g. track="01demo")
    class Airwolf
    {
        // Name.  How is this used?
        name = "Airwolf";
 

        // Sound file to use
        // First entry is sound file to use (from music directory)
        // Second field?
        // Third field? Pitch maybe?
        sound[] = {\music\Airwolf, db+0, 1.0};
    };
};