Jump to content
Sign in to follow this  
kierandobbin54

Can someone show me how to put songs on ofp?

Recommended Posts

In your mission make a file called "description.ext" and put your song file in the mission folder.

Add this text to the "description.ext" file.

class CfgMusic

{

tracks[]={mysong};

class mysong

{

name = "My Song";

sound[] = {\Music\mysong.ogg, db+30, 1.0};

};

};

  • Like 1

Share this post


Link to post
Share on other sites

hi,

if you do know how to?

bullit point how to or email a song :)

thankyouuu

First of all I suggest you to grab a basic editing tutorial on ofpec here's a link for ofp tutorial of any kind collected over the years. Have a look. The basics (WP, triggers,briefing, description...) will have to be learnt by yourself and reading tutorials.

After for more advanced people there's the Wiki where you have every scripting command explained (this is what I use everytime)

Ok now for your specific question here's a link to know everything about description file (include, music, sounds, text... in your mission)

If you want to play the music you included in your mission use playMusic "name_of the_music_file".

Ho and your music file must be in ogg format, there's a ton of converter google is your friend ;)

If it's not enough I made a little demo on how it works.

DEMO LINK

put the folder in C:\Program Files\Codemasters\Operation Flashpoint\Users\youName\missions, open it in the editor and study the demo.

Good luck.

cya.

Nikiller.

  • Like 1

Share this post


Link to post
Share on other sites

Ohhh man!, sorry, but i don't get any of this! lol

erm... soo right, ive got a mission called "1" right, in that file i have a file called "description.ext" and in that i have my song which is a "OGG File", now what do i do ?

thankyou for the help:)

Share this post


Link to post
Share on other sites

Ok,

If you copied and pasted the previous text into your description.ext file you need to edit it slightly. "MySong" needs to be the actual name of the OGG file, if it is MySong that's fine.

Also you need to either put your OGG file into a sub folder called "Music" or edit the path from:

sound[] = {\Music\mysong.ogg, db+30, 1.0};

to:

sound[] = {mysong.ogg, db+30, 1.0};

Now you should be able to find "MySong" in the Misison Editor in either Triggers or Waypoints by hitting the Effects button. Then look in the Tracks box in the Music section.

The tutoriial below might help you understand this.

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 ->

http://www.dbpoweramp.com/codecs/dBpowerAMP-codec-ogg.exe.

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.

Description.ext

---------------

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.

-----------------------------------------------------------

Music

-----

class CfgMusic

{

tracks[]=

{

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.

First,

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

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 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

song.

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.

-----------------------------------------------------------

Sounds

------

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

game.

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.

Wav2Lip

-------

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.

cfgSounds

---------

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.

-----------------------------------------------------------

Stringtable.csv

---------------

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.

-----------------------------------------------------------

Radio

-----

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

example.

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

folks.

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,

cheers!

Looping

-------

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

#loop

_i = _i + 1

playmusic "name of ur song"

~70 - the length of the song

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

goto "loop"

#end

ForceEnd

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:

#loop

_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.

  • Like 1

Share this post


Link to post
Share on other sites

Try to make it with Chris' OFP script editor...

Share this post


Link to post
Share on other sites

hi,

I done every thing it asked, still didint work!, fml

Did you studied the demo I uploaded for you? :confused:

I put the link again in case you didn't saw it.

DEMO LINK

You just have to copy and paste the descrption.ext in your mission folder and change the music name by the one you have in your mission.

Don't worry if it doesn't at the first try it can take mounths/years to become familiar with editing stuffs. ;)

Ho and BTW if you change something in the description.ext, save the mission and load it again

For edits to description.ext to take effect in Preview you must first save or re-load the mission into the editor.

source: http://community.bistudio.com/wiki/description.ext

Please fully read the link above you have EVERYTHING you need to make a proper description file.

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

Whats VLC? its says im downloading it ?

---------- Post added at 07:02 PM ---------- Previous post was at 06:54 PM ----------

@nikiller

i clicked on the link for the demo, i can't download it, just says"demo_music.intro.rar" but other things is there to download for example"VLC" its all media software, :S ?

Share this post


Link to post
Share on other sites

hi,

@nikiller

i clicked on the link for the demo, i can't download it, just says"demo_music.intro.rar" but other things is there to download for example"VLC" its all media software, :S ?

Here's what I got when I click on the link.

mini_305712multiupload.jpg

click on one of the download button I have surround in red.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

Right! :), my song is in the editor but! lol

theres no sound when i play it :S, even tho i but "db+30, 1.0} ."

? :D

Share this post


Link to post
Share on other sites

Well have you tested it with a media player outside of OFP?

Also did you pay attention to this note in the tutorial I posted?

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.

Share this post


Link to post
Share on other sites

Sorry, you've lost me again lol

If im getting on your ***s haha, don't help me haha, ive never did anything like this before :/ lol

(thankyou up to now) :)

Share this post


Link to post
Share on other sites

Whoops - didn't see a second page...

Did you convert the ogg file yourself?

You may not have the right settings for it to run properly within game.

If so - perhaps send file as it can be done in no time by an experienced editor.

Edited by WW2Weasel

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  

×