Home   Help Search Login Register  

Author Topic: My Music  (Read 1403 times)

0 Members and 1 Guest are viewing this topic.

B-2-0

  • Guest
My Music
« on: 25 Apr 2003, 08:31:59 »
I want to use custom music in my intro-cutscene......i have readNavy_Seals and Bloodmixer's sound tutes..... created the 'sound', 'music', 'description.ext' and 'stringable.csv' directories in my mission folder......  My music is in ogg format using the correct parameters stated in the tutes and it is in the music directory.......i have copied and pasted the description.ext from the tutes and inserted the name of my tracks in the right places-

kitno and tlp are the track names
--------------------------------------------------------
class CfgMusic
{
   tracks[] =
   {
      kitno, tlp
   };
   class kitno
   {
      name = "kitno";
      sound[] = {"\music\kitno.ogg", db+30, 1.0};
   };
   class tlp
   {
      name = "tlp";
      sound[] = {"\music\tlp.ogg", db+30, 1.0};
   };
};


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

...but the track still aint in the music section of the effects menu......obviously i have done something wrong but what ???

P.S. I am running the GOTY edition on XP
« Last Edit: 26 Apr 2003, 20:14:23 by B-2-0 »

B-2-0

  • Guest
Re:My Music
« Reply #1 on: 27 Apr 2003, 05:00:23 »
HELP!!!!  :'(

Something really weird is going on....now it's saying my intro and cut-scene can't be found either!!  They were working yesterday and i have made no alterations since then tho i have d/l some addons....could that be the problem??

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:My Music
« Reply #2 on: 27 Apr 2003, 05:05:58 »
>...but the track still aint in the music section of the effects menu...

Nope.And I'm pretty sure your tracks never will appear there. *EDIT: Oops, they do, my bad... :-X

So, then, how do you actually play the music? Have a look at the playMusic command in the cmd. ref:

playMusic name

Operand types:
    name: String
Type of returned value:
    Nothing
Description:
    Play music defined in description.ext.

Example:
    playMusic "musicname"


Try this: put a radio trigger on the map, say, Radio Alpha. In its On activation field, put this:
Code: [Select]
playMusic "kitno"
Then, by calling radio Alpha (0-0-1), you should hear that music play.

Note that the "musicname" parameter to the playMusic command should be the class name of the particular music piece you defined in the description.ext. An example: lets say you change your definition of the "kitno" piece in your posting above to:

Code: [Select]
...
   class kitnosong {
        name = "kitno";
        sound[] = {"\music\kitno.ogg", db+30, 1.0};
   };
...

Now, to play the kitno.ogg, you would use:

Code: [Select]
playmusic "kitnosong";
See the difference? In your post above, the kitno.ogg was defined in "class kitno", but now its
"class kitnosong".


Then, to "stop" the music before the song is played to its end, use fadeMusic. Like so:

Code: [Select]
2 fadeMusic 0
This will fade the music down to volume 0 (the last digit) in 2 (first) seconds.

To be honest, I haven't tried this myself, but from reading up on the subject and searching here on OFPEC,
I believe this to be the way to do it.

Good luck and hope it helps!


« Last Edit: 27 Apr 2003, 19:22:23 by Killswitch »

B-2-0

  • Guest
Re:My Music
« Reply #3 on: 27 Apr 2003, 05:34:44 »
PHEW!!!

Ok....i deleted the addons i d/l and it can now find the files....man, i was getting worried there :o

Hey Killswitch, thanx for the help with the cut-scene :thumbsup:

I've tried to play the tracks using the playmusic command and it still won't find the files but i'm gonna have a go at it now according to what u put in ur last post.

Oh yeah, according to Navy_SEALS sound tute the track should appear in the effects menu
« Last Edit: 27 Apr 2003, 05:37:05 by B-2-0 »

B-2-0

  • Guest
Re:My Music
« Reply #4 on: 27 Apr 2003, 05:51:17 »
Ok, here is my script now....

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

class CfgMusic
{
   tracks[] =
   {
      kitno, tlp
   };
   class kitnosong
   {
      name = "kitno";
      sound[] = {"\music\kitno.ogg", db+30, 1.0};
   };
   class tlpsong
   {
      name = "tlp";
      sound[] = {"\music\tlp.ogg", db+30, 1.0};
   };
};

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

...but it still can't find the track ???

I'm not sure about your idea on the class tho...i copied and pasted Navy_SEALS script straight from his tute (thx Navy ;)) and just inserted my track titles....the tute didn't say anything about using a different name for the class ???
« Last Edit: 27 Apr 2003, 06:14:12 by B-2-0 »

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:My Music
« Reply #5 on: 27 Apr 2003, 06:29:42 »
Oh... you don't *have* to change the class names like I did in my example - that was just to
emphasize that it is the "class name", not the string in the "name=" property within the class
that is to be used with the playMusic command.

Ok. I have a few other things you should check:

The .ogg-files should be put in a folder named "sound" that is within the mission's own "mission folder". This is not to be confused with the folder named "Missions" where all the other missions you're editing are.

Lets say the mission in question is named "mytest" and is on the Desert Island. The mission.sqm is then in a folder named "mytest.Intro". Then, this is how it should be (something like this, at least):

...\OperationFlashpoint\Users\B-2-0\Missions\mytest.Intro\mission.sqm
...\OperationFlashpoint\Users\B-2-0\Missions\mytest.Intro\description.ext
...\OperationFlashpoint\Users\B-2-0\Missions\mytest.Intro\music\kitno.ogg
...\OperationFlashpoint\Users\B-2-0\Missions\mytest.Intro\music\tlp.ogg

Also, make sure that the description.ext isn't named "description.ext.txt". If you have Windows set to show
you the file extensions (like .exe, .zip, .doc, .txt and so on) then this should not be an issue.

However, it may be that you have a file that actually is called "description.ext.txt", but all you see in
Windows is "description.ext". Set the folder view to "Detailed List" (in stead of just "List" or "Icons").
Not sure what those view settings are called in your version of Windows, so...

Now, in that detailed list view, look at the column "Type" of your description.ext file. If it says "EXT-file", all is well and OFP should read it. If it shows "Text document" (again, not sure what it is called in the english version
of Windows, if that's what you have) it means that the file is actually named "description.ext.txt" and you need
to rename it. Navy_Seals had a note on that problem in his tute, so maybe I'm just grabbing for straws here.

So: check your folder structure and by all means name the "sound classes" just the way you had them. Make sure the .ext file really is an .ext file.

Now I *really* have to get some sleep... been an all-nighter here. Good luck! :)

B-2-0

  • Guest
Re:My Music
« Reply #6 on: 27 Apr 2003, 07:05:48 »
I really aprieciate ur help mate but, yes, all my files are in order (.sqs, .ext etc.).   I too have been losing vast amounts of sleep due to catching the editing bug and trawling the tutes ;D  That's why this has got me so bugged coz my first map is nearly finished and i can't see what is wrong with this ???

Somebody....Anybody....HELP!!!!
Please :-[

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:My Music
« Reply #7 on: 27 Apr 2003, 19:38:07 »
 ???   me scratches head... If so then I really dont get why it won't work. I just made my own test mission and added two songs to it. My description.ext file contains this, and only this:

Code: [Select]
class CfgMusic {

   tracks[] = {finawar,model};

   class finawar {
      name = "I fought in a war";
      sound[] = {"\music\finawar.ogg", db+0, 1.0};
   };

   class model {
      name = "The model";
      sound[] = {"\music\themodel.ogg", db+0, 1.0};
   };
};

(The music are two songs from a Belle & Sebastian album, if anyone wonders).

Using that description.ext file I do get both titles to appear in the music effects drop-down within a
trigger 'Effects' settings dialog in the game. I put a Radio Alpha and a Radio Bravo trigger on the map
and can play both songs no problem. (Again, not using "playmusic", but via the Effects of the trigger).

The songs show up as "I fought in a war" and "The model", just as expected, and they play fine.

Could it be that you have missed to put in a newline character ("Enter") at the very end of the file? (you know, just hit enter after the very last "};" so that it is on a line of its own. I think I've seen OFP choke on that issue before.

Can you post the whole description.ext file here, and I'll have a look-see at it? Maybe there's something above
or after your CfgMusic that's doing something?

« Last Edit: 27 Apr 2003, 20:27:52 by Killswitch »

B-2-0

  • Guest
Re:My Music
« Reply #8 on: 28 Apr 2003, 20:17:18 »
Right, the only thing in my description.ext is the music cfg.

I copied and pasted yours and added my tracks and it still won't work, here it is....

-----------------------------------------------------------
class CfgMusic {

   tracks[] = {killing,post};

   class killing {
      name = "Killing in";
      sound[] = {"\music\kitno.ogg", db+0, 1.0};
   };

   class post {
      name = "The last post";
      sound[] = {"\music\tlp.ogg", db+0, 1.0};
   };
};

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

One thing, does the folder that my description.ext is in have to be called description or description.ext?
(I'm gonna kick my own ass if it's description.ext) :)

P.S.  What version of the game are u running and on which OS?  I have the GOTY edition running on XP.

Thanx again Killswitch ;)

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:My Music
« Reply #9 on: 28 Apr 2003, 20:49:58 »
>One thing, does the folder that my description.ext is in have to be called description or description.ext?

Aaah haa!  ;D

The answer is "none of the above" ;) The description.ext file should be in the same place as
your mission.sqm file, i.e. right in the mission folder. Not in any sub-folders!

Again, just put it "beside" the mission.sqm and you should be good to go.

(Running OFP Resistance here, 1.91, the "expansion" version, not GOTY. Win XP Pro)

*EDIT: Looked at your first post where you say that you've created directiories called "description.ext" and
"stringtable.csv". None of these should be folders - they are ordinary files that both should be placed in
the same folder as the mission.sqm file. Silly me -  should have seen that from the beginning...

*EDIT2: the stringtable.csv file is not necessary unless you start to add other language strings to your
missions. I suggest you wait with that until you are more comfortable with/used to mission editing.

« Last Edit: 28 Apr 2003, 20:56:56 by Killswitch »

B-2-0

  • Guest
Re:My Music
« Reply #10 on: 28 Apr 2003, 21:31:14 »
IT WORKS!!!!!! ;D

Man, i knew it had to be something simple!!

I can't believe i missed that, in Bloodmixer's tute it states:

1) Create a directory called sound.
2) Create a directory called music.
3) Create a file called stringable.csv
4) Create a file called description.ext

...I have obviously just skimmed it and took the names without checking :tomato:

Thanxs loads for your time and help mate :thumbsup: :cheers:

P.S. Remind me to take a bullet for u one day...lol :gunman: :noo: ;D