MUS Format description

FileExtension : MUS 
Content : Description of playlists MUS files  
History : File done by Manveru Telcontar (and updated) on basis of jhauglid's post on TeamBG (08.07.2001) 
: MaltanarTeamBG (25.11.2001) 

Actually MUS files are simply ASCII files that could be edited by any text editor - These files are always localized in the MUSIC folder in main folder of the IE game. All references that are put in these files require to have the respect folder inside MUSIC folder. This format is valid for BG1/BG2/IWD (I haven't got PT so I cannot check it, however these files are probably the same as in case of other IE games)


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

Let's use BC1.mus as an example of how MUS-files work: 

BC1
10
A1                  @TAG ZA
B1                  @TAG ZA
C1                  @TAG ZA
D1                  @TAG ZD
E1                  @TAG ZD
E2                  @TAG ZD
F1                  @TAG ZD
G1                  @TAG ZG
H1                  @TAG ZH
J1        B1        @TAG ZJ
# B1B is loop

The first line indicates the subdirectory within MUSIC folder where the acm-files used, are found (in this case BC1). The second line is the number of acm-files. The remainder of lines are the play list.

A1                  @TAG ZA

This means "Play BC1A1.acm". If the music should be stopped while this sound clip is playing, play "BC1ZA.acm" after "BC1A1.acm" has finished and then stop. (Typically this is because the combat has ended). If the music should continue, go to the next line of the play list.

J1        B1        @TAG ZJ

This line indicates that the music should loop to "BC1B1.acm" (the second sound clip in this playlist) after "BC1J1.acm" has finished or finish using BC1ZJ.acm if the conditions in game are satisfied ( end of battle typically)

In IWD and BG2 there is also used one special acm file (SPC1.acm). This file is actually empty acm file that doesn't contain any sound - it has 62,23 seconds length and is used as the silence separator in play lists, like in the following example of file Tav1.MUS :

TAV1
6
SPC1
A
SPC1
SPC1
SPC1
SPC1    TAV1 A 

So this file says : play 62 seconds of silence, then our sound and later 4 silence files ( 248,92 s) after that come back to the song Tav1a.acm.
In fact, any tag that starts with 'SPC' is sought in the base music folder, so it is possible to 'share' parts in different music lists.
Tags must be four letters so you have exactly one letter to make a difference.

Some additional remarks :

Songlist.2da in case of BG2/ToB is the reference table for the ARE files and scripts to the proper playlist MUS file :

2DA V1.0
****
                       Name                   RESOURCE
0                     No_music             ****
1                     Area0011             MX0011.MUS


In aim to use play lists defined in MUS files we have to add entry to this file where :

first number is the number of playlist file that is used by proper section in ARE file (songs section) or used by PlaySong(number) scripting command.

The rest is as described in original part of Songlist.2da - Name is just the identifier and Resource is the name of playlist MUS file.  

Unfortunately I haven't been able to find the corresponding file for BG1/ToTSC - probably sound references could be hard coded into exe file.

For IWD the reference table is in the file MUSIC.2da. or MUSICLIS.ids
For IWD2 the reference table is MUSIC.ids
For PST the reference table is SONGS.ids

MaltanarTeamBG's Informations

MUS files act as playlist for ACM files, determining loops and "interrupt state" effects. An "interrupt state effect" means the music (usually, a fadeout effect) to play when another ACM file is interrupted by a special condition (end of combat, start of romance music, etc.).
Below is a MUS file example, BC1.mus from Baldur's Gate II:
--------------------------------------------------------
BC1
10
A1                  @TAG ZA
B1                  @TAG ZA
C1                  @TAG ZA
D1                  @TAG ZD
E1                  @TAG ZD
E2                  @TAG ZD
F1                  @TAG ZD
G1                  @TAG ZG
H1                  @TAG ZH
J1        B1        @TAG ZJ
# B1B is loop
-------------------------------------------------------
We shall examine each line and line component in this file.

Line 1-BC1
This line indicates the /music subfolder the files in this MUS can be found. In this instance, it is "BC1".

Line 2-10
This line reports the amount of ACM files in the main playlist. Interrupt state ACMs don't count. So the ten files in BC1.mus are: A1, B1, C1, D1, E1, E2, F1, G1, H1 and J1.

Line 3-A1                  @TAG ZA

This line, the first line of playlist, consists of the characters A1, 18 spaces and a @TAG ZA character.
The first part, A1, means play the file BC1A1.acm under the BC1 subdirectory of the /music main folder in the game.
The spaces are just that, spaces, used to seperate the playlist ACM and the interrupt state ACM. The amount of spaces is determined as:
AmountOfSpaces=20-AmountOfCharactersInMainPlaylistEntry
which equals:
18=20-2 in this case.
The third part, @TAG ZA, determines the interrupt state ACM. This entry is composed of a @TAG, a single space, and the name of interrupt state ACM, BC1ZA.acm in this case.

Similarly, the other entries in the playlist are composed this way.

Line 12-J1        B1        @TAG ZJ

The last entry in the playlist, in addition to normal ACM entry and interrupt state ACM entry, also includes a End of File Loop entry.
This line consists of a J1, 8 spaces, a B1, 8 spaces, and a @TAG ZJ. The first J1 is the usual playlist entry (BC1J1.ACM). The amount of spaces following is calculated as 10-AmountOfCharsInPlaylistEntry.
The next part, BC1, is the End of File Loop entry. Normally, any playlist entry may contain it, but due to the fact it'll block any following playlist entries after it, it's used at the end of the file. Its purpose is, when the playlist entry of that line is completely played, to switch to another ACM, BC1B1.acm in this case.
The following spaces are calculated as 10-AmountOfCharsInEndOfFileLoopEntry.
The last part is the usual interrupt state part.
************************
All MUS files are normally located in the main game /music folder. These MUS files are attached/linked to areas or romances, and also given an index number for use in sciripts, due to a special 2da file. This file is SONGLIST.2da in BGII, and Music.2da in IWD. BGI may have it hardcoded in the EXE. PS:T's music index is also unknown.

Music Subfolders in BGII

Folder BC1
Standard combat music. MUS entry BC1.mus. Index Number 46.

Folder BC2
Standard combat music. MUS entry BC2.mus. Index Number 47.

Folder BD1
Combat music for Irenicus' Dungeon. MUS entry BD1.mus. Index Number 48.

Folder BD2
Combat Music. MUS entry BD2.mus. Index Number 49.

Folder BD3
Dungeon combat music. MUS entry BD3.mus. Index Number 50.

Folder BF1
Combat music. MUS entry BF1.mus. Index Number 51.

Folder BF2
Combat music. MUS entry BF2.mus. Index Number 52.

Folder BJR
Dragons' combat music. MUS entry BJR.mus. Index Number 53.

Folder BM1
Combat music. MUS entry BM1.mus. Index Number 54.

Folder BM2
Combat music. MUS entry BM2.mus. Index Number 55.

Folder BP1
Dungeon combat music. MUS entry BP1.mus. Index Number 56.

Folder BP2
Vampire/Shadow Thief combat music. MUS entry BP2.mus. Index Number 57.

Folder BRD
Dragons' combat music. MUS entry BRD.mus. Index Number 58.

Folder BSD
Combat Music. MUS entry BSD. Index Number 59.

Folder BST
Combat Music. MUS entry BST.Index Number 60.

Folder harp_v2
Harp melody. MUS entry HARP_V2.mus. Index Number 62.

Folder harp_v6
Harp melody. MUS entry HARP_v6.mus. Index Number 63.

Folder MX0011
Dreams'  music. MUS entry MX0011.mus. Index Number 1.

Folder MX0012
Dreams' music. MUS entry MX0012.mus. Index Number 2.

Folder MX0013
Dreams' music. MUS entry MX0013.mus. Index Number 3.

Folder MX0015
Noble houses' music. MUS entry MX0015.mus. Index Number 4.

Folder MX0020
City Gates'music. MUS entry MX0020.mus. Index number 5.

 

 

