Jump to content
Sign in to follow this  
warghost20

Music In Chopper

Recommended Posts

Hey,

I have found many things about this but after reading it all it still wont work, and its not realy clear what i have to do.

I want to play a song in chopper, the missions starts in a chopper and as soon as the mission starts and want to play the music.

What i got sofar,

in my mission folder a description with this:

class CfgMusic

{

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

tracks[] = {song};

// Definition for each track

class track

{

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

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

titles[] = {};

};

};

i only want to use 1 song,

What sound folders do i have to create and what more do i have to do so the music starts in the chopper?

Many Thanks!

Share this post


Link to post
Share on other sites

Well as per the code it says this:

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

So there for, in your mission's folder you would create another folder called:

'sound'

And in the sound folder you would put your music which is converted to .ogg

I am not sure how to trigger it in a chopper though sorry, I am sure you put code in the chopper's init line, just not sure what...

Share this post


Link to post
Share on other sites

You could trigger it: player in chopper = true or if youre already sitting in the chopper, just use "true" as condition.

Your Music-File will be under the other Musicfiles. Use a trigger.

Share this post


Link to post
Share on other sites

oke so i have a mission folder. Where do i need to place the music file?. i have to create a folder named Sounds, but do i place that in the mission folder or somewhere else?,

Edit

got music working in a chopper, i gave the choppers waypoints music effects, but i stil dont have my own music in it?

Edit

I have placed my music file almost everywhere but it keeps saying Song Not FOund?

Edited by warghost20

Share this post


Link to post
Share on other sites

class CfgMusic

{

tracks[]={};

class Musictrack1

{

name = "Music_1"; //The Name seen in the Editor

sound[] = {"\music\filename1.ogg", db+0, 1.0};

};

class Musictrack2

{

name = "Music_2"; //The Name seen in the Editor

sound[] = {"\music\filename2.ogg", db+10, 1.0};

};

};

Change the bold stuff. The filename(s)/Directory need to be like the ones you use ;-).

If its too quiet, turn up the DB just like in Class2. do not alter the pitch ;-)

Share this post


Link to post
Share on other sites

I've always wanted to make the chopper play external music, like in apocalypse now or battlefield vietnam. Yes it's a worn cliche - I know, but is it possible?

Share this post


Link to post
Share on other sites
class CfgMusic

{

tracks[]={};

class Musictrack1

{

name = "Music_1"; //The Name seen in the Editor

sound[] = {"\music\filename1.ogg", db+0, 1.0};

};

class Musictrack2

{

name = "Music_2"; //The Name seen in the Editor

sound[] = {"\music\filename2.ogg", db+10, 1.0};

};

};

Change the bold stuff. The filename(s)/Directory need to be like the ones you use ;-).

If its too quiet, turn up the DB just like in Class2. do not alter the pitch ;-)

stil not clear,

what name do i have to use for the music folder? CfgMusic or Musictrack1? and what name i give to the music files, the mp3 etc?, and were do i put these files, in the mission folder or somewhere else?

Share this post


Link to post
Share on other sites

1.) In your Mission-Folder create a folder named "music".

2.) The Name (Music_1; Music_2)is just the name shown in the editor.

3.) The Classname is just the name given, must be unique and maybe no blanks in the name.

4.) You have to convert MP3-Files to *.OGG-Files

5.) Place these OGG-Files into the created music-folder.

6.) Filename1.ogg / Filename2.ogg have to be the names of the ogg-files you have converted.

7.) In the editor, use a trigger, go to advanced, set Music onto the file(s) you have implemented.

Voila. ;)

Share this post


Link to post
Share on other sites
1.) In your Mission-Folder create a folder named "music".

2.) The Name (Music_1; Music_2)is just the name shown in the editor.

3.) The Classname is just the name given, must be unique and maybe no blanks in the name.

4.) You have to convert MP3-Files to *.OGG-Files

5.) Place these OGG-Files into the created music-folder.

6.) Filename1.ogg / Filename2.ogg have to be the names of the ogg-files you have converted.

7.) In the editor, use a trigger, go to advanced, set Music onto the file(s) you have implemented.

Voila. ;)

oke this thing is driving me crazy,

i did

i made a folder inside the mission folder named music, placed a ogg file named Filename1.

then i made a trigger and in effects i chose music_1

started the mission nothing happens,

then i did no music at effects and typed in the init line of the trigger 'PlaySound 'Filename1', then i sad song filename1 not found, this is realy getting me mad

but i dont understand what you mean with class?, what do i have to do for that?

Share this post


Link to post
Share on other sites

The classname is just a name - put it equal to the filename without extension and your good.

Did you setup the trigger correct?

Maybe you ran past it?

Or it wasnt triggered by you/your side?

Always display a text with the trigger (also under advanced), so youre sure to have triggered it :cool:

Got to be working now....otherwise ill do an examplemission for you tonight. ;)

Share this post


Link to post
Share on other sites

I think he needs a step by step guide...

ie... he has set up his music folders etc...

Now... tell him what trigger options he needs, what to click on and what code he may possible need to add in the init field of the chopper.

Does he need to edit the init file inside his actual mission folder as well?

etc...

Share this post


Link to post
Share on other sites
oke this thing is driving me crazy,

i did

i made a folder inside the mission folder named music, placed a ogg file named Filename1.

then i made a trigger and in effects i chose music_1

started the mission nothing happens,

then i did no music at effects and typed in the init line of the trigger 'PlaySound 'Filename1', then i sad song filename1 not found, this is realy getting me mad but i dont understand what you mean with class?, what do i have to do for that?

You need to set the trigger condition field to true in order for the music to be heard. Change "this" to "true" in the condition field of the trigger, supposing there's no error in compiling the description ext. it should work.

regards

Share this post


Link to post
Share on other sites

and it stil wont work,

1.jpg

2.jpg

There are apperently 2 ways to do this, one with selecting the song in the effects section in the trigger, wich doesent work for me, and to set the effects to no music and puting in the trigger the command 'PlaySound 'Filename1' , i have replaced the name 'Filename1' with Music_1 , Music, etc stil it keeps saying sound not found

Share this post


Link to post
Share on other sites
i have replaced the name 'Filename1' with Music_1 , Music, etc stil it keeps saying sound not found

According to your pics, you should name the files in your music folder exactly as in other file... you are calling Filename1 when it should be filename1... I think I had problems before with upper/lowercase... just try it the same in both.

You have people telling you what to put, and you haven't really done that word for word... copy and paste, use exactly what they put.

Edited by Mosh
info

Share this post


Link to post
Share on other sites

Is the file really a description.ext or is it maybe a description.ext.txt? Display your extensions and be sure to save it as .ext.

With which program did you convert the musicfiles? Maybe the conversion isnt good enough for ArmA2 ;-).

I'll setup a demo-mission tonight and upload it somewhere...

Your code and your mission seems fine. Don't think, the Capital-letter does the job, but give it a try.

Greetz.

Egosa-U

Edited by Egosa-U

Share this post


Link to post
Share on other sites

i have checked and its description.ext , i used Xilisoft Video Converter Ultimate, the change of capital letter also dident work. I am realy looking forward to your demo mission, because i am working on this already a few days. I copied the script, named the music files as told, and put the right commands in the trigger, so i realy dont know wye it keeps saying ''Not Found''

Share this post


Link to post
Share on other sites

I checked it now and got the problem (BI-Wiki is wrong too!!!!!!!!!):eek::eek:

The folder is not allowed to be called "music", it has to be called "sound"!

So heres the code which shows the change - should work now (@least did for me)!

===================

class CfgMusic

{

tracks[]={};

class Musictrack1

{

name = "Music_1";

sound[] = {"\sound\filename1.ogg", db+0, 1.0};

};

};

==================

Really sorry m8.

Greetz.

Share this post


Link to post
Share on other sites

it still doesent work, i have changed the folders name to sound, but it keeps saying Sound filename.ogg not found, i have uploaded my complete mission, perhaps you could load my mission and help me out?

http://www.megaupload.com/?d=1LMPQWW0

http://www.2shared.com/file/10862669/7f415e3d/musicutes.html

http://rapidshare.com/files/340150565/music.utes.rar.html

Edited by warghost20

Share this post


Link to post
Share on other sites

I just dled you mission and took a look at this. Your problem was firstly that you used PlaySound instead of PlayMusic, your configs are set for a music track (CfgMusic), not for a sound (CfgSounds). Secondly you must call for the class name when you're using PlayMusic or PlaySound, that's "Musictrack1" in your case. I succeeded in getting the music play either by setting the condition to "true" and selecting you music file in the "Track" combo box (the one that says "Music_1") or with condition also "true" I put in on activation " PlayMusic "Musictrack1" ". Hope you get it working now! :)

---------- Post added at 07:17 AM ---------- Previous post was at 07:08 AM ----------

I've always wanted to make the chopper play external music, like in apocalypse now or battlefield vietnam. Yes it's a worn cliche - I know, but is it possible?

It's possible, put in you description.ext:

class CfgSounds
{
sounds[] = { MyNamMusic }; 

class MyNamMusic
{
name = "MyNamMusic";
sound[] = {\sounds\MyNamMusic.ogg, db+0, 1.0};
titles[] = {};
};
};

and the put in you music activation trigger helo1 say "MyNamMusic", helo being you choppers name. With the db+0 part you can tinker with the distance of how far the sound can be heard, db+25 means the music will be heard kilometers away and db-25 means that the sound can be heard only within meters away.

Share this post


Link to post
Share on other sites

still no on this one, it doesent say filename1.ogg not found but there is no music playing in the background

i have uploaded the mission again, could you perhaps download it again and help me out?, i have tried to create both things, so music that plays in the chopper from a distance, and the one that was already in it.

Much appreciated

http://www.megaupload.com/?d=BOWRXFKT

Edited by warghost20

Share this post


Link to post
Share on other sites
still no on this one, it doesent say filename1.ogg not found but there is no music playing in the background

i have uploaded the mission again, could you perhaps download it again and help me out?, i have tried to create both things, so music that plays in the chopper from a distance, and the one that was already in it.

Much appreciated

http://www.megaupload.com/?d=BOWRXFKT

Again, use the class name instead of the file name when using PlayMusic command, in other words PlayMusic "Musictrack1", not PlayMusic "filename1". And with the helo1 say "MyNamMusic" you had the music file under 'sound' folder but in the description.ext it said \sounds\MyNamMusic.ogg with an extra "s". I know, it's tricky with these things. ;) You'd better name all classnames and filenames with the same name in description.ext to avoid confusion, as with the MyNamMusic one.

I corrected everything and did it for you this time, get it below. Have fun! :)

music.utes.7z

Edited by King Nothing

Share this post


Link to post
Share on other sites

it still doesent works,

as soon as i start the mission, there is no music playing, the chopper flys over and there is no music comming out of it, then i removed the chopper, created a trigger area, placed myself into it, then when i start the mission, the trigger should be activated but still no music

i have changed what i want to have, i want to have a chopper on the airfield, were my own music is comming out, then everyone has to board the chopper and the music should be like there are real speakers in the chopper it self. could you please help me out?, i dont understand wye its not working

Edited by warghost20

Share this post


Link to post
Share on other sites

Then I think it's the music file itself. It's not converted into ogg correctly somehow. I believe it's not compressed enough for arma2, 10mb for one song is a bit too much from an ogg file to my ear anyway. I remember I had a problem with an ogg file not being played by OFP once, just plain silence. Finally I got it working by finding another ogg converter software and recompressed the file with it. I suggest you to do the same. The mission I gave you is working just fine in my comp so just keep replacing the oggfiles with different ones until you hear something, remember to save the mission after replacing the files if you have the editor open.

Share this post


Link to post
Share on other sites

still negative, i have tried 10 diffrent songs, but still nothing playing,

could you perhaps make a misson with a chopper or tank in it, that is not moving and were your own music is comming out?, i realy want this to work and i dont understand wye it wont work, i have already spent so many hours trying to get this work.

Thanks!

Share this post


Link to post
Share on other sites
still negative, i have tried 10 diffrent songs, but still nothing playing,

could you perhaps make a misson with a chopper or tank in it, that is not moving and were your own music is comming out?, i realy want this to work and i dont understand wye it wont work, i have already spent so many hours trying to get this work.

Thanks!

Ok, I reconverted your song with audacity and now it's less than 50% of the original size, only 4mb. Try it, if it doesn't work I'm out of ideas. It's strange that for me that mission works alright, maybe it's your arma installation or sound card drivers or something, really don't know. Hope this .ogg file works for you though.

filename1.ogg

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  

×