Author: Foxhound
Author Website:


Short description:

Date: 2007-06-30 19:28

Comments: (4)


Music, Sound & Radio Tutorial

Very Important
When converting music, the files recomended to be converted at Frequency 44100 hz max,
BitRate 128kbps, 16 bit, stereo, Encoding - Constant Bitrate.
(Note: 16 bit option is not included in dbPowerAmp, but don't worry about that)

For sounds, like speech: Frequency 44100 hz, 16 bit, mono, Bit Rate in ranges from 80 -
112kbps, Constant Bitrate.
Also very important thing. Don't use big names and upper case letters.
Try using one word for the name of your song, like rock, u2, party, sunrise, etc... whatever
is in your mind, otherwise if you have let's say for instance Red Hot Chilli Peppers or like
Eagle Eye Cherry, the game won't be able to read them, so try to keep it simple, but you can
write like this - RHCP or lets say Mick_Jagger, no spaces.

Ok and now it appears to be that the file size of the music file can be unlimited well
sorta, I dont think you're gonna use 15 megs song or something like that.

Alright, let's see what we have got here...Let's move on.

Conversion Programs
First what you need is a program to convert your music to ogg.
U see the game doesn't support standard files like mp3 or wav, that's why we have to convert
them to be able to hear them ingame.
Also the advantage of ogg file is it's size, it can be the same quality as mp3 but the size
can be up to 2-3 times smaller, cool ah?!

Alright so here are the two proven and tested programs which you can download for free.
U can use either of them, but I recommend both, the choice is yours.

Here is the first one:
The second one: Ok so now you have your programs on your hard drive, install them where you want (C: D: E: don't
know what you got there).

Great so now you have your progys installed.
What?! Tired?! hehe don't worry that's just the easy part.
Now im gonna explain how to use the first program dBpowerAMP Music Converter.
Will be working with music first, cos it's not so difficult as it seems to be, and will
move on to the sound later on.

Converting to Ogg
Open the program and a window will pop-up asking you which file would you like to convert.
Choose the song you want and click Open, now you'll see another window which will show you the
list of file formats you have.
Choose ogg. Now pay attention cos its important!!!
U can leave the channels: stereo, Bit rate must be 128kbps-standard and BIS used it too,
Encoding should be Constant Bitrate (a must) and Frequency-44100hz.

Now choose the folder where you want to save your file and click convert, simple as that.

Here im gonna tell you about GoldWave.
This is also a great program, it supports many formats and very useful.
I usually use it more for sounds and editing.
U can do a lot of things like noise reduction, shape volume (one of my favorites)
pitch, and many more!

But you can also use it for converting your music.
So open the progy, a window will pop-up, don't really pay much attention to it unless you want
to, and click ok.

Then choose the file you want to convert and open it.
Then simply click file-> save as and choose ogg format and here we are!
(also I suggest unless you won't be doing anything with the sound like changing it or do some
editing I suggest you simply use the dBpowerAMP Music Converter , for ease of use)

So you have converted your music into ogg, then create a folder in the mission where you r
currently working on, lets say:

E:\OperationFlashpoint\Users\Charlie\missions\assault.Eden and name the folder Music, this
is where we are going to store our converted music files.

So now we will create a description.ext file in a notepad.
U'll probably say, hey what a hell is this stuff?!

Description.ext is a special file created simply in notepad.
It contains all the info above; Extra information about the mission (weather, place,ect...)
Information about the player and other units (face, glasses, rank, type,ect...)
Weapons in the game and ammunition (also can be add-ons)
How to add sound or music in game! <- we'll be working with that part of file.
And many more...

Ok, now we know what a description.ext is, that means we can do some writing.
Create an empty file in notepad and write this down and then im gonna explain what
everything stands for, alright.

class CfgMusic
      		jade, blink
  	class jade
      		name = "jade";
      		sound[] = {\music\jade.ogg, db+0, 1.0};
  	class blink
      		name = "blink";
      		sound[] = {\music\blink.ogg, db+0, 1.0};

Simple isn't it? Ok now lets' see what we got here.

class CfgMusic
This defines a new class for all our music.
Brackets like these -> { } are very important when writing and defining classes, if you missed
one somewhere the whole file is not gonna work.

The syntax in OFP is very important so pay attention to it when creating files like this one
or scripts for example which we are not going to cover here.
Also semicolon is very important here, don't forget it to put it almost after each line
except when defining a class like class CfgMusic or class CfgSounds, etc...

Well in tracks[]= you simply define which tracks you have in your Music folder.

Now lets' take a close look at the first class jade, shall we...
class jade
here we define the new class for the song we specified in the tracks
      name = "jade";
this is the name that will be displayed in the trigger-effects-music drop down menu, but we'll talk about this later.
If you leave it blank then in the editor you'll see only an empty space.
sound[] = {\music\jade.ogg, db+0, 1.0};
this line tells the game which music is going to be used. Don't forget that you have placed your music in the Music folder, that's why we write \music\jade.ogg, db+0 is the volume of the sound. If you leave 0 then it will play at the volume you have specified in the game options and 1.0 is a pitch of the music.

and the closing brace with a semicolon showing that the definition of this class is finished.

Now save this file as All files name it exactly description.ext.
The common problem is sometimes people give it the same name, but save it as text file,
which then creates a lot of problems for them.
And you know why? No?! Ooh come on that's so simple, its because the file appears to be
description.ext.txt which OFP will not read, that's all!!!

Well... looks like we have done the big and difficult part of the job, aren't we. Hehe,
probably you are tired of reading all that crap, sitting at your home and saying, oh come on man
I wonna hear some music playing!!!

Well don't worry we are nearly there.

Playing the Music
Now launch your game and open your mission editor(choose any island you want, I suggest desert
island cos it loads at no time).
Now a simple test, to see if your music is working.
Place a unit- the player of course and put a trigger not far away from him in the trigger
choose activated by west and when present.
Then you'll see a button in the lower left corner called Effects.

Press it and a new window will appear.
Wow!!! Look at that we got so many different thing in here, but all we care about now is
music, so find the music drop down menu and got to the bottom until you find the name of ur

Choose it and click ok, you'll return to trigger window again, don't change anything there,
just press ok and preview.
Now run in the direction of a trigger and...what looks like I hear something ain't I yeah
it's the music file which I have converted!!! Uuupii!!! I can hear it, I can hear it.

Well we all did have our moments of joy when after trying to do something difficult we
finally succeed.
Well you can take a big brake, and we'll be right back with editing sounds now, stay tuned.

Now I assume that you know how to create description.ext files and how to get the music in
Now we gonna work with sound files.
Later on you will see that sounds as speech play where important role in the game.
It creates a whole new atmosphere and this gives a game a big plus, especially using speech
during cutscenes.
So for this task I suggest you use the GoldWave as you can record your voice through microphone
and it saves really good to wav file.
U'll probably ask me, why wav file I can save directly to ogg and don't bother myself with
that crap.

Well you see why.
To be able to use speech in the game you need not only ogg files, but also lip files which
will make the mouth of the unit move.
So what you need is simple program wav2lip converter.
U can download this program here ->

Now here we go, open the GoldWave and create a new file.
Then record something using your mic and save it as wav 16 bit mono, signed.
It will be set by default. Now locate the folder where you have saved your wav file and copy it
by using Ctrl+C or better cut it with Ctrl+X and go to the folder where you have placed
wav2lip program.

Simply drop the wav file onto the program file and in few seconds it will create a lip file
with the same name.
Don't suggest you putting this program on desktop cos it won't work. Trust me.
Now you can open the dBpowerAMP Music Converter and convert the wav file to ogg or just use
GoldWave and save the file with the same name just in ogg format.

So now we are ready to go on with our tutorial.

U are already familiar with the description.ext so just open the one we have created before.
Done? Alright!!!
Now write this down after the class CfgMusic.

class CfgSounds
   	sounds[] =
         	speech1, speech2
   	class speech1
      		name = "speech1";
      		sound[] = {"\sound\speech1.ogg", 1, 1.0};
      		titles[] = {   };
   	class speech2
      		name = "speech2";
      		sound[] = {"\sound\speech2.ogg", 1, 1.0};
      		titles[] = {   };

Well difficult? Not at all! As you can see its almost the same as class CfgMusic expect here
we have this line:
- titles[] = { };

It is used for stringtable.csv which we gonna cover a bit later, but you don't really need to do stringtable.csv for sounds, its up to u.
So now we are set and ready to go.

Playing the Sounds
Put your converted ogg files and lip files in the Sound directory.
Open the editor and put a trigger again or use the existing one if you have saved the mission
about adding music.
Now do the same go to effects, but not music! But voices drop down menu.
At the bottom as well you'll see your files. But we are not going to use triggers for speech.

U can either use waypoints if you have only one speech like man comes to the Officer and tells
him something.
That's all, in all other cases we use simple script and use the command line:
unitname say "speech1"

That's all, this simple.

Since you already know how to create your own speech, work with description.ext, etc... we just
gonna jump right down to the point of making everything look and sound good.

Ok lets say you already have a sound file which you recorded at 11025 - 44100Hz Frequency, 16
bit, mono, Constant or Average bitrate. (Note: the lower the settings the crappier the sound
will be, so feel free to tweak all the stuff)

Since now we have our ogg file we gonna use Excel a bit to create a stringtable.csv which is
also can be used for sounds, but the truth I never did it for sounds cos..... I just didn't
do it and it doesn't matter whether you have it or not the
choice is urs.

But anyways the stringtable should look like this:
Language       English <- here we gonna write what every radio file contains (BIS did the same for sounds, I don't)

Comment ---stuff---
STRD_D01v01 Butthead you dumbass <- write what the original radio file contains
STRD_D01v02 are you threatening me? <- same here
STRD_D01v03 Beavis, erh Beavis, shut up! <- same here

As you have noticed I began using the BIS stile which is better and more convinient for me and
i don't mix up anything like I did before.

STRD is simply an abriviation (string something...), you can write whatever you want but the
main body of the name in this case D01v01 should be the same as the ogg file in sound
directory which is d01v01.ogg.

Upper or lower case letters don't matter here, so don't worry much about it.
So for instance you can have charlie_Green01 or papaBear_Advise or anything you can think of,
any name as long as its easy and convinient for u.
(note: don't forget to save the file named as stringtable and from "Save As" drop down menu
choose CSV (Comma Delimited) and voila.

Ok then looks like we almost set, just few more tweaks with description.ext and we are ready
to Lock&Load.

class CfgRadio
   	sounds[] =
      		R01v01, R01v02

   	class R01v01
      		name = "R01v01";
      		sound[] = {"R01v01.ogg", db+40, 1.0};
      		title = $STRD_R01v01;
   	class R01v02
      		name = "R01v02";
      		sound[] = {"R01v02.ogg", db+40, 1.0};
      		title = $STRD_R01v02;

Alright lets do it quickly, cos you are familiar with most of the stuff from music & sound
sounds[] = {R01v01, R01v02};
radio sounds which we have:
class R01v01
create class for the first radio file

     	name = "R01v01";
name...says it all
sound[] = {"\sounds\radio\R01v01.ogg", db+40, 1.0};
directory where file is, its volume and pitch.

//note that you can create another folder in sound folder, called radio and place ur radio files there or have them in the same folder with sounds, therefor you would write:
sound[] = {"\sounds\R01v01.ogg", db+40, 1.0};
title = $STRD_R01v01;
for stringtable.csv to read
Ok so now we are done with description.ext, almost there, just few more tricks and you are set.

Extra Bits
A lot of times people ask how to use Papa_Bear or Base or Airbase, well its simple and the
answer is right here.

This is what you have to do.
[west, "Base"] sideRadio "black_02";
[west, "HQ"] sideRadio "02r1";
HQ, Base and Papa_Bear no matter what you'll type u will always get Papa_Bear radio message.

[west, "AirBase"] sideRadio "R01v02";
aP globalRadio "R01v01";
these are simple commands on how to make someone speak on the radio.

aP sideRadio "R01v02";
same here, but side radio is only for units on ur side, enemy units won't recieve it.

Well, well, well looks like you made and I guess i'll have to say that, thats it for today
Now you should have a strong background and knowledge on how use your own music and sounds in
game, how to create description.ext and stringtable.csv, use programs like GoldWave and
dBpowerAMP or others if you don't feel comfortable with these onse.

Well guys to tell you the truth now I am tired like hell.
So here we are that concludes our tutorial for this time, hope you enjoyed it and happy
music and sound editing.

Thank you for reading this so called "trash" should I say have fun and ill see ya around,


Oh and here are just couple of tricks you can do with the sound and music.

;small script for looping music or sound
_i = 0
_i = _i + 1
playmusic "name of your song"
~70 - the length of the song
? (_i <= 5): goto "end"
goto "loop"


If you want the music to come out of the radio or anything else you should make your ogg file with
the same specs as you do for sound, then we place a radio in the editor and write:

this exec "music.sqs" and now we'll write a music.sqs file.
So lets say that the length of your music file is 1:20, so you'll write in the notepad like
_this say "name of your song"
~120 - 		//the actual length of the song, we use it if you want the song to loop over
goto "loop"

Well that should bring some more fun to your mission, well thats all, cheers.

Source: OFPEC

Enable javascript to be able to download from Armaholic please!

Tags: No tags