Implementing Music in Aleph One?

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.
Post Reply
Marathoner325
Cyborg
Posts: 295
Joined: Feb 2nd '08, 22:03
Location: British Columbia, Canada
Contact:

I have recently been attempting to insert music files into the Marathon 2 maps on Aleph One. However, I have so far been unsuccessful, partly due to the fact that I have very little prior experience with MML coding. But since the solution is likely quite simple?and I have already spent quite some time looking over the MML Guide, as well as past Pfhorum topics?I figured that going ahead and asking is probably the best choice.
Now, the MML Guide states that Level Scripts exist within the map file, and since I'm going to be editing the script within it, I assume it would be necessary to un-merge or expand its contents?

And so my first question is, how can I open the map file? There was the Marathon Map Splitter program, but that was made before the Aleph One upgrades, and is therefore only compatible with the original Marathon 2/Infinity engine. Might there any similar applications for Aleph One?
And as for merging the scripts and the map together, what map making program would be best suited? I gave an attempt with Forge, but didn't expect it to work?which it didn't?as Forge existed before MML coding was possible.

Please do answer if you can, and if I'm really going in a completely wrong direction, please do understand my lack of experience on the technical side of the Marathon engine, as with programming in general.
User avatar
goran
Vidmaster
Posts: 1468
Joined: Feb 2nd '06, 19:51
Contact:

The script doesn't need to be merged with the map file. Put the script in A1's script folder. Although, that would apply the songs to all maps you play. If you want to split and merge the map file, I recommend Atque.

Index decides which level to apply the song to. Index 0 is the first level. Index 1 is the second level and so on.

File is the search path to the song, starting from the A1 folder. In the example below, I have a folder called music in my A1 folder, where I've put two mp3s.

<marathon_levels>

<level index="0">
<music file="music/song1.mp3"/>
</level>

<level index="1">
<music file="music/song2.mp3"/>
</level>

</marathon_levels>
Last edited by goran on Oct 26th '10, 08:37, edited 1 time in total.
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

<marathon_levels> scripts do need to be merged with the map file. That's the only way to make music specific to a level.

You can have generic background music for all levels by using the <default_levels> tag in a standalone <marathon> MML script or plugin.
User avatar
Dugit
Vidmaster
Posts: 1803
Joined: Mar 22nd '09, 16:33
Location: Hampshire, UK
Contact:

How do you get a specific piece to play during a chapter screen? I tried de-merging M2 but I can't find anything helpful...
Polyplicity my second (less sucky) net pack. Go on. Download it. You know you don't want to.
Marathon Aeon- My scenario in the works ~on Simplici7y

riveting six-vertice amnesty ratifications
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

You can't play music during a chapter screen--but you can play a sound. You should find them in the SND folder in M2's resources.
User avatar
Dugit
Vidmaster
Posts: 1803
Joined: Mar 22nd '09, 16:33
Location: Hampshire, UK
Contact:

Thanks, TL! All is well.
Polyplicity my second (less sucky) net pack. Go on. Download it. You know you don't want to.
Marathon Aeon- My scenario in the works ~on Simplici7y

riveting six-vertice amnesty ratifications
Marathoner325
Cyborg
Posts: 295
Joined: Feb 2nd '08, 22:03
Location: British Columbia, Canada
Contact:

Well I just got the music files working properly.
Thanks for the help?both of you. :)
???Durandal???
Cyborg
Posts: 120
Joined: Feb 17th '08, 01:54
Contact:

hmm, i tried this myself but for some reason its not working for me. here is my script in its entirety.

<marathon>

<default_levels>
<level index="0">
<music file="MUSIC/mysong.mp3"/>
</level>
</default_levels>

</marathon>

I also tried:

<marathon>

<default_levels>
<music file="MUSIC/mysong.mp3"/>
</default_levels>

</marathon>


Am i missing something?
Marathon D.R.E.A.M. copyright � 2008-2011- Is a future and ongoing SECRET project by Yours truly and Jjarandal productions � 2011- :
most patents pending and accepted. any and all material conceived by ME is property of me and gives no one a right to lay claim to my imagined stuff


***INCOMING MESSAGE***
Check out my blog, I've developed a little game pfhor you to play...

>> http://thedurpartment.blogspot.com/ <<

***END MESSAGE***
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

The second one should work. Check your path and mp3 file to make sure they're valid.

You can't have <level> tags inside <default_levels> so that's why the first doesn't work.
???Durandal???
Cyborg
Posts: 120
Joined: Feb 17th '08, 01:54
Contact:

I validated them, but still no dice. unless I'm supposed list the entire path (I.e User/destop/marathon/tracks/mysong.mp3). strange...
Marathon D.R.E.A.M. copyright � 2008-2011- Is a future and ongoing SECRET project by Yours truly and Jjarandal productions � 2011- :
most patents pending and accepted. any and all material conceived by ME is property of me and gives no one a right to lay claim to my imagined stuff


***INCOMING MESSAGE***
Check out my blog, I've developed a little game pfhor you to play...

>> http://thedurpartment.blogspot.com/ <<

***END MESSAGE***
User avatar
treellama
Vidmaster
Posts: 6107
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

No, it's relative to the scenario directory, or the plugin directory if you're putting it in a plugin. Try using one of the M1A1 mp3s since we know they work--maybe it's your mp3.
User avatar
Dugit
Vidmaster
Posts: 1803
Joined: Mar 22nd '09, 16:33
Location: Hampshire, UK
Contact:

The folder holding your music is called tracks, yet you've cited it in the script as "MUSIC". Change "MUSIC" to "tracks" in the script, or "tracks" to "MUSIC" as the music folder.
Polyplicity my second (less sucky) net pack. Go on. Download it. You know you don't want to.
Marathon Aeon- My scenario in the works ~on Simplici7y

riveting six-vertice amnesty ratifications
Post Reply