Jump to content
Sign in to follow this  
Silver_Star

Adding Music Not Working

Recommended Posts

When I try and add music to one of my missions, it crashes. I can run ARMA just fine, and when I have music in it (just one) it runs fine.

On the trigger I use, Playsound "song" for example.

I was working on creating a large map with lots of music triggers, but everytime I attempt to load the map it crashes, and once crashed when I tried to open the editor.

I use this line of code,

class CfgSounds

{

// List of sounds (.ogg files without the .ogg extension)

sounds[] = {song};

// Definition for each sound

class song

{

name = "air1"; // Name for mission editor

sound[] = {\sound\air1.ogg, 1, 1.0};

titles[] = {};

};

But I repeat the

name = "air1"; // Name for mission editor

sound[] = {\sound\air1.ogg, 1, 1.0};

titles[] = {};

for other songs, like "air2".

Has anyone had this problem? Are there any work arounds?

http://www.mediafire.com/?t8mohukbxyw35rv - Thing to play music (.ext)

http://www.mediafire.com/?x9adbjiqx1nou2f - Mission (.sqm)

EDIT: The error I get is 'Config: some input after EndOfFile.' I have no idea what that means.

Edited by Silver_Star

Share this post


Link to post
Share on other sites

XxAnimusxX is right; a crash is most like the result of a malformed description.ext. Try copying an existing (and working) description.ext and compare its class cfgSounds {}; with yours. It's okay to post the entire description.ext here, just make sure you use the code tags to preserve indentation (or I typically just don't bother reading it), and put it also in spoiler tags if its really long.

Share this post


Link to post
Share on other sites

I am using this.

Extra information btw,

16 .ogg files taking up 418, 991, 244 bytes (399 Megabytes)

class CfgSounds
{

// List of sounds (.ogg files without the .ogg extension)
sounds[] = {song};

// Definition for each sound
class song
{

	name = "combat1"; // Name for mission editor
	sound[] = {\sound\combat1.ogg, 1, 1.0};
	titles[] = {};
};
	name = "combat2"; // Name for mission editor
	sound[] = {\sound\combat2.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat3"; // Name for mission editor
	sound[] = {\sound\combat3.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat4"; // Name for mission editor
	sound[] = {\sound\combat4.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat5"; // Name for mission editor
	sound[] = {\sound\combat5.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat6"; // Name for mission editor
	sound[] = {\sound\combat6.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat7"; // Name for mission editor
	sound[] = {\sound\combat7.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat8"; // Name for mission editor
	sound[] = {\sound\combat8.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat9"; // Name for mission editor
	sound[] = {\sound\combat9.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat10"; // Name for mission editor
	sound[] = {\sound\combat10.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat11"; // Name for mission editor
	sound[] = {\sound\combat11.ogg, 1, 1.0};
	titles[] = {};

};	name = "combat12"; // Name for mission editor
	sound[] = {\sound\combat12.ogg, 1, 1.0};
	titles[] = {};
};
	name = "combat13"; // Name for mission editor
	sound[] = {\sound\combat13.ogg, 1, 1.0};
	titles[] = {};
};
	name = "city1"; // Name for mission editor
	sound[] = {\sound\city1.ogg, 1, 1.0};
	titles[] = {};
};
	name = "city2"; // Name for mission editor
	sound[] = {\sound\city2.ogg, 1, 1.0};
	titles[] = {};
};
	name = "hass"; // Name for mission editor
	sound[] = {\sound\hass.ogg, 1, 1.0};
	titles[] = {};
};
};

Share this post


Link to post
Share on other sites

Yup, your CfgSounds shouldn't look like this. You can tell immediately by those end brackets without open brackets before.

Have a look at the wiki to see how to correct this.

By the way, is this for real? 399 Mb of sounds for one mission? Or did I misunderstand?

Share this post


Link to post
Share on other sites

Yeah, I'll try fixing it with the wiki.

Yeah, 399mbs for one mission. They are .oggs (huge...). They are all just music, I'm experimenting with 'open'-ish world missions.

Share this post


Link to post
Share on other sites

Well and there you have your error :)

If you want to define several sounds in your definitions.ext you should do the following:

class CfgSounds
{

// List of sounds (.ogg files without the .ogg extension)
sounds[] = {song1, song2, song3 ...};

// Definition for each sound
class song1
{

	name = "combat1"; // Name for mission editor
	sound[] = {\sound\combat1.ogg, 1, 1.0};
	titles[] = {};
};
class song2
{

	name = "combat2"; // Name for mission editor
	sound[] = {\sound\combat2.ogg, 1, 1.0};
	titles[] = {};
};
class song3
{

	name = "combat3"; // Name for mission editor
	sound[] = {\sound\combat3.ogg, 1, 1.0};
	titles[] = {};
};
};

But as far as I saw some description.ext's before, the following notation should also work (no warranty!):

class CfgSounds
{

// List of sounds (.ogg files without the .ogg extension)
class sounds {
   	    class song1
   	    {
   	        name = "combat1"; // Name for mission editor
	sound[] = {\sound\combat1.ogg, 1, 1.0};
	titles[] = {};
    };
    class song2
    {
	name = "combat2"; // Name for mission editor
	sound[] = {\sound\combat2.ogg, 1, 1.0};
	titles[] = {};
    };
   	    class song3
    {
	name = "combat3"; // Name for mission editor
	sound[] = {\sound\combat3.ogg, 1, 1.0};
	titles[] = {};
    };
           // [...]
       };
};

I really don't know if the latter works but it does for Dialogs though :)

// edit: Shit, too late :> (relating your ogg-files: I'm used to scale down the bitrate of my files under 100kbit/s as no one really hears the difference, but it will downsize your files considerably)

Edited by XxAnimusxX

Share this post


Link to post
Share on other sites

Okay I did this:

class CfgSounds
{

// List of sounds (.ogg files without the .ogg extension)
sounds[] = {song1, song2, song3 ...};

// Definition for each sound
class song1
{

	name = "combat1"; // Name for mission editor
	sound[] = {\sound\combat1.ogg, 1, 1.0};
	titles[] = {};
};
class song2
{

	name = "combat2"; // Name for mission editor
	sound[] = {\sound\combat2.ogg, 1, 1.0};
	titles[] = {};
};
class song3
{

	name = "combat3"; // Name for mission editor
	sound[] = {\sound\combat3.ogg, 1, 1.0};
	titles[] = {};
	};
class song4
{

	name = "combat4"; // Name for mission editor
	sound[] = {\sound\combat4.ogg, 1, 1.0};
	titles[] = {};
};
class song5
{

	name = "combat5"; // Name for mission editor
	sound[] = {\sound\combat5.ogg, 1, 1.0};
	titles[] = {};
};
class song6
{

	name = "combat6"; // Name for mission editor
	sound[] = {\sound\combat6.ogg, 1, 1.0};
	titles[] = {};
};
class song7
{

	name = "combat7"; // Name for mission editor
	sound[] = {\sound\combat7.ogg, 1, 1.0};
	titles[] = {};
};
class song8
{

	name = "combat8"; // Name for mission editor
	sound[] = {\sound\combat8.ogg, 1, 1.0};
	titles[] = {};
};
class song9
{

	name = "combat9"; // Name for mission editor
	sound[] = {\sound\combat9.ogg, 1, 1.0};
	titles[] = {};
};
class song10
{

	name = "combat10"; // Name for mission editor
	sound[] = {\sound\combat10.ogg, 1, 1.0};
	titles[] = {};
};
class song11
{

	name = "combat11"; // Name for mission editor
	sound[] = {\sound\combat11.ogg, 1, 1.0};
	titles[] = {};
};
class song12
{

	name = "combat12"; // Name for mission editor
	sound[] = {\sound\combat12.ogg, 1, 1.0};
	titles[] = {};
	};
class song13
{

	name = "combat13"; // Name for mission editor
	sound[] = {\sound\combat13.ogg, 1, 1.0};
	titles[] = {};
};
class song14
{

	name = "city1"; // Name for mission editor
	sound[] = {\sound\city1.ogg, 1, 1.0};
	titles[] = {};
};
class song15
{

	name = "city2"; // Name for mission editor
	sound[] = {\sound\city2.ogg, 1, 1.0};
	titles[] = {};
};
class song16
{

	name = "hass"; // Name for mission editor
	sound[] = {\sound\hass.ogg, 1, 1.0};
	titles[] = {};
};
};

I'm going to go boot up ol' Arma and see how it goes.

Share this post


Link to post
Share on other sites

You'd better look at the CfgMusic then. Just below in the page I linked before.

Also I think the line

sounds[] = {};

is a necessary dummy one, and you don't need to put anything in those brackets.

Last thing, your pathnames should be in quotes.

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

And a more than 400mb mission file's gonna be a lot of trouble IMO. You might want to reconsider that.

Share this post


Link to post
Share on other sites

It allowed me to load and play it,

On a trigger I did,

[Playsound "Combat1"] Said it couldn't find file combat1

then

[Playsound "combat1.ogg"] said it couldn't find file combat1.ogg

then

[Playsond "song1"] It doesn't give me an error, but I don't hear anything.

Also, 400mbs is fine, it is over LAN :3

Share this post


Link to post
Share on other sites

No need for brackets here. The syntax is:

playSound "song1";

You use the classname, not the actual name.

I repeat, you should use CfgMusic and the playMusic command if this is for ambient music, as playSound is local.

Share this post


Link to post
Share on other sites

Okay, i'll try music.

---------- Post added at 20:53 ---------- Previous post was at 20:34 ----------

Do they have a manual for putting music in?

Share this post


Link to post
Share on other sites

As Blackmamb says... a 400MB mission file is probably not a good idea. Just testing that mission would be unbearable I would imagine. You'd be better off making an addon containing the sound files and distributing that to the players. Just my 2 cents.

Share this post


Link to post
Share on other sites

Okay, I'm using a new set of code this time around.

I've made a lot of some revisions to my music choice.

New code:

loadScreen =  "pictures\intro.paa";

onLoadMissionTime = 1;

onLoadMission = "Russian President Hass Weitersagen has finally launched an attack on Chernarus. You were on a annual survival training week, surviving in the forest."

respawn = 2;

respawnDelay = 15;

class CfgMusic
{
tracks[]={};

class Air1
{
	name = "Air1";
	sound[] = {"\music\air1.ogg", db+1, 1.0};
};
class Ambush 
{
	name = "Ambush";
	sound[] = {"\music\ambush.ogg", db+1, 1.0};
};
class Artillery
{
	name = "Artillery";
	sound[] = {"\music\Artillery.ogg", db+1, 1.0};
};
class city1
{
	name = "city1";
	sound[] = {"\music\city1.ogg", db+1, 1.0};
};
class city2
{
	name = "city2";
	sound[] = {"\music\city2.ogg", db+1, 1.0};
};
class combat1
{
	name = "combat1";
	sound[] = {"\music\combat1.ogg", db+1, 1.0};
};
class combat2
{
	name = "combat2";
	sound[] = {"\music\combat2.ogg", db+1, 1.0};
};
class combat3
{
	name = "combat3";
	sound[] = {"\music\combat3.ogg", db+1, 1.0};
};
class combat4
{
	name = "combat4";
	sound[] = {"\music\combat4.ogg", db+1, 1.0};
};
class combat5
{
	name = "combat5";
	sound[] = {"\music\combat5.ogg", db+1, 1.0};
};
class combat6
{
	name = "combat6";
	sound[] = {"\music\combat6.ogg", db+1, 1.0};
};
class combat7
{
	name = "combat7";
	sound[] = {"\music\combat7.ogg", db+1, 1.0};
};
class combat8
{
	name = "combat8";
	sound[] = {"\music\combat8.ogg", db+1, 1.0};
};
class combat9
{
	name = "combat9";
	sound[] = {"\music\combat9.ogg", db+1, 1.0};
};
class combat10
{
	name = "combat10";
	sound[] = {"\music\combat10.ogg", db+1, 1.0};
};
class combat11
{
	name = "combat11";
	sound[] = {"\music\combat11.ogg", db+1, 1.0};
};
class combat12
{
	name = "combat12";
	sound[] = {"\music\combat12.ogg", db+1, 1.0};
};
class combat13
{
	name = "combat13";
	sound[] = {"\music\combat13.ogg", db+1, 1.0};
};
class combat14
{
	name = "combat14";
	sound[] = {"\music\combat14.ogg", db+1, 1.0};
};
class combat15
{
	name = "combat15";
	sound[] = {"\music\combat15.ogg", db+1, 1.0};
};
class Hass
{
	name = "Hass";
	sound[] = {"\music\Hass.ogg", db+1, 1.0};
};
class Heroic1
{
	name = "Heroic1";
	sound[] = {"\music\Heroic1.ogg", db+1, 1.0};
};
class Heroic2
{
	name = "Heroic2";
	sound[] = {"\music\Heroic2.ogg", db+1, 1.0};
};
class Heroic3
{
	name = "Heroic3";
	sound[] = {"\music\Heroic3.ogg", db+1, 1.0};
};
class Heroic4
{
	name = "Heroic4";
	sound[] = {"\music\Heroic4.ogg", db+1, 1.0};
};
class Heroic5
{
	name = "Heroic5";
	sound[] = {"\music\Heroic5.ogg", db+1, 1.0};
};
class Heroic6
{
	name = "Heroic6";
	sound[] = {"\music\Heroic6.ogg", db+1, 1.0};
};
class LastStand
{
	name = "LastStand";
	sound[] = {"\music\LastStand.ogg", db+1, 1.0};
};
class Ordinance1
{
	name = "Ordinance1";
	sound[] = {"\music\Ordinance1.ogg", db+1, 1.0};
};
class Ordinance2
{
	name = "Ordinance2";
	sound[] = {"\music\Ordinance2.ogg", db+1, 1.0};
};
class Scout
{
	name = "Scout";
	sound[] = {"\music\Scout.ogg", db+1, 1.0};
};
class Sniper
{
	name = "Sniper";
	sound[] = {"\music\Sniper.ogg", db+1, 1.0};
};
class SpecialOps
{
	name = "SpecialOps";
	sound[] = {"\music\SpecialOps.ogg", db+1, 1.0};
};
class Sudden
{
	name = "Sudden";
	sound[] = {"\music\Sudden.ogg", db+1, 1.0};
};
class Tank1
{
	name = "Tank1";
	sound[] = {"\music\Tank1.ogg", db+1, 1.0};
};
class Tank2
{
	name = "Tank2";
	sound[] = {"\music\Tank2.ogg", db+1, 1.0};
};
};

Most of it is the music, but some of it is other code(if you can help with those too, it'd be great, but I'll create a thread later if it is an issue.)

I'll report back after I check to see how broken it is.

---------- Post added at 19:46 ---------- Previous post was at 19:08 ----------

The other stuff I'll get to, but the music doesn't work.

The command I use,

playMusic "Combat2"

doesn't work. No music plays.

When I use the track "Combat2", no music plays.

Had a few crashes, but fixed everything.

Edited by Silver_Star
fixing some code. EDIT2: Re-fixing it. EDIT3: Same.

Share this post


Link to post
Share on other sites

The only things I can think of at the moment are....

Make sure the music actually plays outside the game.

Check your music volume in the game preferences. I'm sure you've done this...right?

Make sure fadeMusic is set to 1

When you make changes to your description.ext either save or reload the mission for the changes to actually show up in your testing.

..or this might be your problem here.... the Biki entry for cfgMusic says...

Name can be left blank as in the examples above. Only specify a name if you wish to access these sounds via the environment options of a trigger.

Other than that I really can't think what your problem might be.

Share this post


Link to post
Share on other sites

That didn't work, I went to the volume mixer and boosted up Arma 2 (only other thing was System Sounds), still do not hear it.

Share this post


Link to post
Share on other sites

Do you hear any other game music, like when playing an official mission?

You can try putting a trigger on your map, under "Track" pick anything like 01: Dead Forest, ok, and set the trigger condition to true so it will start immediately when you preview the mission.

In the trigger -> effects -> track list, do any of your tracks show up? Mine always show up even though I don't even put titles[] in cfgMusic at all.

You can also just put this in your script (instead of the trigger test):

playMusic "EP1_track15";

to see if that plays, assuming you have Arrowhead.

Finally, here's a picture of my audio settings within the game:

audio.jpg

I hope something here will be of help.

Share this post


Link to post
Share on other sites

No, I don't have Arrow Head, I'm using the free version.

Also, it does show up in the tracks list, and the other songs play.

Share this post


Link to post
Share on other sites

Are new class definitions within description.ext considered an "addon", and thus not allowed in the free version?

Share this post


Link to post
Share on other sites

i also have this problem now, my other custom music works fine but my last music track doesnt play, it shows up in the trigger-effects-track but theres just no sound. the music file is 1.10mb if thats a problem?

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  

×