Music.tbl

From FreeSpace Wiki
Revision as of 03:57, 11 December 2006 by Goober5000 (talk | contribs) ($Soundtrack Name:)
Jump to: navigation, search

General Format

  • Music.tbl consist of several sections. Some are used to define in-game soundtracks and others various other musics.
  • Sountrack entries
    • #SoundTrack Start
    • Soundtracks names and definitions
    • #SoundTrack End
  • Other musics
    • #Menu Music Start
    • Music names and definitions
    • #Menu Music End

Soundtrack Musics

$Soundtrack Name:

  • Soundtrack Name is immediately followed by the soundtrack order number and the name of the soundtrack.
  • Syntax: Value: Name
    • Example: 1: Genesis

Soundtrack Flags

If the music should be played according to the FS1 style, the following flags should be added after $Soundtrack Name:

  • +Cycle: FS1
    • This cycles the NRML and BTTL tracks the FS1 way, instead of the FS2 way.
  • +Allied Arrival Overlay: NO
    • This allows the Allied Arrival track to play on its own, as it did in FS1.

Music Tracks

  • All music track lines beging with $Name: followed by the filename of music track. After the tracks filename the number of measures in the track is defined followed by the number of samples per measure.
  • Syntax: $Name: Filename.xxx Value Value
    • Example: $Name: FS2_Amb_A01.wav 25.0 105840

Hints for sorting out problems

Goober5000:

Number of measures
Find out the number of measures in the file. The best way to do this is to keep time (by clapping or getting a metronome, finding the average time for one measure, and multiplying by the number of seconds. For reference, FS2_AArv_A01 is a march. Count "ONE, two, ONE..." and don't quite make it to "two" again. This corresponds with the table, where it says that this bit of music is 1.8 measures long. This is rather straightforward. The next part is what people had trouble figuring out, and needed the source to see.
Number of samples per measure
The number of samples per measure is the number of bytes per measure divided by 2. The event-driven music is usually formatted as 16 bits per sample. A stereo track at 44,100 Hz will be 172 kilobytes per second. So multiply this number by the length, in seconds, of your music to get the total number of kilobytes actually used by the music itself. Multiply this by 1024 to get the number of bytes in your music. Now divide the number of bytes by the number of measures to get bytes per measure, and then again by 2 to get samples per measure.

Order of the music tracks:

  • Ambience
  • Allied Arrival during Normal
  • Enemy Arrival during Normal
  • Battle 1
  • Battle 2
  • Battle 3
  • Allied Arrival during Battle
  • Enemy Arrival during Battle
  • Victory 1 ( goal completed )
  • Victory 2 ( all enemies dead, goals completed )
  • Goal Failed
  • Player dies

Menu Musics

  • Menu musics are defined with filename after the name of the tracks name.
  • Syntax for all of the Menu Music entries are similar
  • Syntax: $Filename: Filename.xxx
    • Example: $Filename: FS2_Brief_01.wav

$Name: Brief1

  • Defines the file used for music when briefing music 1 is selected

$Name: Brief2

  • Defines the file used for music when briefing music 2 is selected

$Name: Brief3

  • Defines the file used for music when briefing music 3 is selected

$Name: Brief4

  • Defines the file used for music when briefing music 4 is selected

$Name: Brief5

  • Defines the file used for music when briefing music 5 is selected

$Name: Brief6

  • Defines the file used for music when briefing music 6 is selected

$Name: Brief7

  • Defines the file used for music when briefing music 7 is selected

$Name: Success

  • Sets the music played during debriefing after successful mission

$Name: Average

  • Sets the music played during debriefing after average mission

$Name: Failure

  • Sets the music played during debriefing after failed mission

$Name: Aquitaine

  • Defines the main menu music

$Name: Psampik

  • Defines the alternate (Vasudan) menu music

$Name: Cinema

  • Defines the music that is playing when credits are shown

Sample

  • Uses normal soundtrack and menu musics from FS2
  #SoundTrack Start
  $Soundtrack Name: 1: Genesis
  $Name:   FS2_Amb_A01.wav      25.0     105840
  $Name:   FS2_AArv_A01.wav     1.8      105840
  $Name:   FS2_Arv_B01.wav      3.8      81415
  $Name:   FS2_Btl_A01.wav      25.8     66150
  $Name:   FS2_Btl_A02.wav      27.8     81415
  $Name:   FS2_Btl_A03.wav      39.8     81415
  $Name:   FS2_AArv_A01.wav     1.8      105840
  $Name:   FS2_Arv_B02.wav      3.8      81415
  $Name:   FS2_Vict_A01.wav     2.8      52920
  $Name:   FS2_Vict_A02.wav     30.8     52920
  $Name:   FS2_Dth_A01.wav      23.8     132300
  $Name:   FS2_Dth_A01.wav      23.8     132300
  #SoundTrack End
  #Menu Music Start
  $Name:      Brief1
  $Filename:  FS2_Brief_01.wav
  $Name:      Brief2
  $Filename:  FS2_Brief_02.wav
  $Name:      Brief3
  $Filename:  FS2_Brief_03.wav
  $Name:      Brief4
  $Filename:  FS2_Brief_04.wav
  $Name:      Brief5
  $Filename:  FS2_Brief_05.wav
  $Name:      Brief6
  $Filename:  FS2_Btl_A01.wav
  $Name:      Brief7
  $Filename:  FS2_Cinema2.wav
  $Name:      Success
  $Filename:  FS2_DB_01.wav
  $Name:      Average
  $Filename:  FS2_DB_02.wav
  $Name:      Failure
  $Filename:  FS2_DB_03.wav
  $Name:      Aquitaine
  $Filename:  Aquitaine.wav
  $Name:      Psampik
  $Filename:  Psampik.wav
  $Name:      Cinema
  $Filename:  FS2_Cinema2.wav
  #Menu Music End