Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Solatar on September 21, 2002, 10:34:19 am

Title: Music Table limits
Post by: Solatar on September 21, 2002, 10:34:19 am
I was wondering, is there a limit on the number of tracks allowed in the music table? I'm trying to make a table with both the fs1 and fs2 music.
Title: Music Table limits
Post by: IceFire on September 21, 2002, 12:18:14 pm
0-9

So a max of 10 tracks...limited to the slots available for the game (FS1 has more slots available per-track I believe).
Title: Music Table limits
Post by: Solatar on September 21, 2002, 01:12:10 pm
Silent Threat has eleven tracks I believe. Darkside. But it is deleted when you patch to the next version.
Title: Music Table limits
Post by: IceFire on September 21, 2002, 01:15:00 pm
Darkside is 9.

Remember...its 0 to 9.  Not 1 to 10.  Darkside is technically 9...although its track listing is that of 10.  I readded Darkside to my FS1 for fun's sake....the bug was simple to fix.
Title: Music Table limits
Post by: Solatar on September 21, 2002, 01:58:45 pm
Same here. Darkside is pretty cool. its a shame they took it out.
Title: Music Table limits
Post by: Killfrenzy on September 21, 2002, 02:10:11 pm
How does music in FreeSpace 2 actually work anyway? I know it's fragmented, but what tracks go with what?
Title: Music Table limits
Post by: IceFire on September 21, 2002, 03:39:33 pm
From the TBP music table file:
Code: [Select]

#SoundTrack Start         ; SoundTrack 0
$Soundtrack Name: 1: Requiem of the Line
$Name: b5_1_ambient.wav 25.0 105840 ; * Ambience
$Name: b5_1_fwarp.wav 1.8 105840 ; * Allied Arrival during Normal
$Name: b5_1_ewarp.wav 3.8 81415 ; * Enemy Arrival during Normal
$Name: b5_1_battle1.wav 25.8 66150 ; * Battle 1
$Name: b5_1_battle2.wav 27.8 81415 ; * Battle 2
$Name: b5_1_battle3.wav 39.8 81415 ; * Battle 3
$Name: b5_1_fwarp.wav 1.8 105840 ; * Allied Arrival during Battle
$Name: b5_1_ewarp.wav 3.8 81415 ; * Enemy Arrival during Battle
$Name: b5_vic1.wav 2.8 52920 ; * Victory 1 ( goal completed )
$Name: b5_vic2.wav 30.8 52920 ; * Victory 2 ( all enemies dead, goals completed )
$Name: b5_debrief2.wav 23.8 132300 ; * Goal Failed
$Name: b5_debrief3.wav 23.8 132300 ; * Player dies
#SoundTrack End
; End Soundtrack 0


Pretty self explanatory...except the numbers for the length...those I haven't figured out yet.
Title: Music Table limits
Post by: Killfrenzy on September 22, 2002, 05:18:59 am
Thx Ice! :)
Title: Music Table limits
Post by: Sesquipedalian on September 22, 2002, 10:06:40 pm
In theory it oughtn't to be too hard to figure out the numbers re: length and measure for a music track.  

Basically, just listen to the music carefully, counting time to determine how many bars there are in the selection (e.g. if you count 256 beats and the piece is in 4/4 time, then you know there are 64 bars in the selection).  This gives you your first number.  Then open the wave file itself in your sound program and find the information on how many samples there are in the thing.  Take this number and divide it by the number of measures, and then divide that again by 2, and that will give you the number of samples per measure, which is your second number.  

The reason for the division by 2 bit is that that way FS2 will switch to a different wav file on a downbeat (i.e. beats 2 or 4), rather than just any arbitrary place (which would almost certainly be in the middle of a note, which would sound terrible).  Also note that this would indicate that FS2 assumes all the music to be in 4/4 time.  If you wish to add a piece in, say, 3/4 time, things will get far more complicated, but not impossible.

I must stress, however, that this is theoretical.  I haven't actually tried doing this myself.  I merely have the knowledge. ;)