Jump to content
Sign in to follow this  

Custom sounds in my missions

Recommended Posts

Hi guys I'm working on another mission and I wanted to know how I can put custom sounds/ music into my missions. Can anyone help me?

Share this post

Link to post
Share on other sites

Funny you should ask as I too need help on this. I am looking at the editor guide which i'm struggling with. It says...

Quote[/b] ]

If one wants to create his own sound, it has to be defined in the description.ext first. This

sound can be used by typing the respective name into the syntax. This name should be

the one which has been defined in the description.ext before.

MySound=createSoundSource ["SoundName",position Player,[],10]

in the description.ext I put

Quote[/b] ]

class CfgSounds


sounds[]= {Sound1};

class Sound1


name = "Sound1";

sound[] = {scottmills.ogg, db+0, 1.0};



The sound file is a .ogg and I use a game logic to include the initialization...

MySound=createSoundSource ["Sound1",position SM1,[],10]

Now I can see 3 tages here MySound, Sound1 and SM1. SM1 is the name of the game logic (which works if I use the little dog example from the editor manual, Dog1=createSoundSource ["LittleDog",position SM1,[],10]), sound1 is already defined in the description.ext but I don't see what MySound is?

When running the preview i get

NoEntry 'bin\config.bin/cfgvehicles.Sound1'.

Additional: I am now getting the following error when saving and now laoding the mission ...\description.ext, line 0:'.': ';' encountered instead of '='

Help smile_o.gif

Share this post

Link to post
Share on other sites

If you ask me the editor guid is a load of waffle (no offence). I've tried that and ofp wiki and they just don't work. I got it to work for arma once using arma edit.

Share this post

Link to post
Share on other sites

I find the guide is pretty good but it does assume in places prior knowledge - as do the other tutorials that I have found over at OFPEC which makes it very frustrating. I know the sound works because using a game logic I can get the radio to play music from a pre-selected list that's already in the ME. I just need to know how I get my sound to work but I can't figure out the syntax.

Maybe no-one else knows but if i do find a way to do it, I'll send you a PM. smile_o.gif

Share this post

Link to post
Share on other sites

Cheers mate thanks for your help. I'll try and look further into this.

Share this post

Link to post
Share on other sites

You can just add enviroment sounds and music using mission editor. Can be added in trigger or waypoint. Look and you'll see the options. Of course you'll need to have some kind of custom sound file in your addons folders. Many around and not to hard to make your own.

Share this post

Link to post
Share on other sites
You can just add enviroment sounds and music using mission editor. Can be added in trigger or waypoint. Look and you'll see the options. Of course you'll need to have some kind of custom sound file in your addons folders. Many around and not to hard to make your own.

Yeah that was really helpful. Did you even bother reading this thread? icon_rolleyes.gif

Share this post

Link to post
Share on other sites

Jex =TE=

Quote[/b] ]Yeah that was really helpful. Did you even bother reading this thread?  

My response was to GIJOS94's question;

Quote[/b] ]Hi guys I'm working on another mission and I wanted to know how I can put custom sounds/ music into my missions. Can anyone help me?

It appears your only contribution was to start another thread that so far seems to have yielded no answers.

Here is a tutorial on adding music and sounds:

Quote[/b] ]Music, Sound & Radio Tutorial


By Navy_Seals

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 ur song, like rock, u2, party, sunrise, etc... whatever

is in ur mind, otherwise if u'll 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 u 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 u 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 u need is a program to convert ur 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 r the two proven and tested programs which u can download for free.

U can use either of them, but I recommend both, the choice is yours.

Here is the first one:

dBpowerAMP Music Converter grab it here -> http://www.dbpoweramp.com/bin/dMC-r11.exe

and an ogg plugin for it so u'll be able to convert ur music to ogg format ->


The second one:

GoldWave, u can grab it here ->:

For Win95/98/NT - http://www.goldwaving.com/downloads/gwave426.exe

For Win2000/XP/Me - http://www.goldwaving.com/downloads/gwave510.exe

also a ogg plugin for it over here -> http://www.goldwave.com/downloads/calogg00.zip

Ok so now u have ur programs on ur hard drive, install them where u want (C: D: E: don't

know what u got there).

Great so now u have ur 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 u which file would u like to convert.

Choose the song u want and click Open, now u'll see another window which will show u the

list of file formats u 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 u want to save ur file and click convert, simple as that.

Here im gonna tell u 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 u can also use it for converting ur music.

So open the progy, a window will pop-up, don't really pay much attention to it unless u want

to, and click ok.

Then choose the file u want to convert and open it.

Then simply click file-> save as and choose ogg format and here we are!

(also I suggest unless u won't be doing anything with the sound like changing it or do some

editing I suggest u simply use the dBpowerAMP Music Converter , for ease of use)

So u have converted ur music into ogg, then create a folder in the mission where u r

currently working on, lets say:

E:\OperationFlashpoint\Users\Charlie\missions\assault.Eden and name the folder Music, this

is where we r 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 -> { } r very important when writing and defining classes, if u 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 r 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[]= u simply define which tracks u have in ur 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 u leave it blank then in the editor u'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 u have

placed ur music in the Music folder, that's

why we write \music\jade.ogg, db+0 is the

volume of the sound. If u leave 0 then it

will play at the volume u have specified in

the game options and 1.0 is a pitch of the


}; <- and the closing brace with a semicolon showing that the definition of this class is


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 u 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 u r tired of reading all that crap, sitting at ur home and saying, oh come on man

I wonna hear some music playing!!!

Well don't worry we r nearly there.

Playing the Music


Now launch ur game and open ur mission editor(choose any island u want, I suggest desert

island cos it loads at no time).

Now a simple test, to see if ur 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 u'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 u find the name of ur


Choose it and click ok, u'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 u can take a big brake, and we'll be right back with editing sounds now, stay tuned.




Now I assume that u know how to create description.ext files and how to get the music in


Now we gonna work with sound files.

Later on u 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 u use the GoldWave as u can record ur 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 u see why.

To be able to use speech in the game u need not only ogg files, but also lip files which

will make the mouth of the unit move.

So what u need is simple program wav2lip converter.

U can download this program here -> http://www.ofpec.com/editors/resource_view.php?id=352

Now here we go, open the GoldWave and create a new file.

Then record something using ur mic and save it as wav 16 bit mono, signed.

It will be set by default. Now locate the folder where u have saved ur wav file and copy it

by using Ctrl+C or better cut it with Ctrl+X and go to the folder where u 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 u putting this program on desktop cos it won't work. Trust me.

Now u 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 r ready to go on with our tutorial.



U r 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[] = {"\sounds\speech1.ogg", 1, 1.0};

titles[] = { };


class speech2


name = "speech2";

sound[] = {"\sounds\speech2.ogg", 1, 1.0};

titles[] = { };



Well difficult? Not at all! As u 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 u don't really need to

do stringtable.csv for sounds, its up to u.

So now we r set and ready to go.

Playing the Sounds


Put ur converted ogg files and lip files in the Sounds directory.

Open the editor and put a trigger again or use the existing one if u 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 u'll see ur files. But we r not going to use triggers for speech.

U can either use waypoints if u 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 u already know how to create ur 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 u already have a sound file which u 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 u 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 u dumbass <- write what the original radio file contains

STRD_D01v02 R u threatening me? <- same here

STRD_D01v03 Beavis, erh Beavis, shut up! <- same here

As u 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...), u can write whatever u 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 u can have charlie_Green01 or papaBear_Advise or anything u 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 r 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 u r 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 u 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 u would

write: sound[] = {"\sounds\R01v01.ogg", db+40, 1.0};

title = $STRD_R01v01; <- for stringtable.csv to read


Ok so now we r done with description.ext, almost there, just few more tricks and u r 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 u have to do.

[west, "Base"] sideRadio "black_02";

[west, "HQ"] sideRadio "02r1"; <- HQ, Base and Papa_Bear no matter what u'll type u

will always get Papa_Bear radio message.

[west, "AirBase"] sideRadio "R01v02";

aP globalRadio "R01v01"; <- these r 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 u made and i guess i'll have to say that, thats it for today


Now u should have a strong background and knowledge on how use ur own music and sounds in

game, how to create description.ext and stringtable.csv, use programs like GoldWave and

dBpowerAMP or others if u don't feel comfortable with these onse.

Well guys to tell u the truth now I am tired like hell.

So here we r that concludes our tutorial for this time, hope u 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 r just couple of tricks u can do with the sound and music.

;small script for looping music or sound

_i = 0


_i = _i + 1

playmusic "name of ur song"

~70 - the length of the song

? (_i <= 5): goto "end"

goto "loop"



If u want the music to come out of the radio or anything else u should make ur ogg file with

the same specs as u 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 ur music file is 1:20, so u'll write in the notepad like



_this say "name of ur song"

~120 - //the actual length of the song, we use it if u want the song to loop over

goto "loop"

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

Share this post

Link to post
Share on other sites


Thanks for the verbose explanation. Being OFP is so old I sometimes take for granted that basic game functions are common knowledge. icon_rolleyes.gif

I also aggree this topic needs to be moved to mission editing/scripting.

Hope to see you on LOL Funhouse again, or perhaps another of the COOP servers I frequent. wink_o.gif

Share this post

Link to post
Share on other sites
Quote[/b] ]

It appears your only contribution was to start another thread that so far seems to have yielded no answers.

And how exactly am I going to contribute to the answer when I'm asking the same question??

You're "contribution" basically boils down to "use the mission editor - if you look you'll find out". How exactly does that constitute an "answer". Also, I started another thread because this one is in the wrong section and I thought we'd get more exposure over there.

Quote[/b] ]I suggest it is helpful (if terse). Your failure to appreciate it is your issue.

Appreciate what exactly - that the answer to the question is to use the mission editor? Won any awards for tuition recently? When someone asks for help writing a script - do you think telling them to "use code - look and you'll find the answer" is helpful in any way? Your view on the matter is simply obtuse though I appreciate the effort of both your answers so thank you for those.

Share this post

Link to post
Share on other sites

Ok lets evrybody just calm down now eh? We can settle this in a civil manner lol. Well still trying over here, must be the sound files are corrupt on my computer :-(. I'll try and get more. How about you guys?

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
Sign in to follow this