Author Topic: [Guide] Music tables 301  (Read 955 times)

0 Members and 1 Guest are viewing this topic.

Offline JSRNerdo

  • [`_`]/
  • 29
  • King of Destroyer
[Guide] Music tables 301
DISCLAIMER 1:
Just so you know, the game considers a single stereo sample to be 2 samples. Thus, if (and only if) the song has 2 channels (which most do), you will need to double the samples-per-second value that you put into the table. If you don't do this, the song will only play halfway through.

Or:

How to turn this:


into this:




So, first off, couple requirements. You'll need Audacity, which is both available for free and absolutely awesome. You might also need a couple extensions for Audacity to allow it to decode certain formats. We'll get to those later.

Import your audio file in Audacity, like so:


You should see something like this:


First thing first, make sure of two things: The empty nothingness at the start is cut out. Do this by zooming in with control+mousewheel, selecting the empty space, and cuting it out with control-X. Done? Very good.

Second, go down to the bottom, and make sure the format is set to samples. This is because the FS2 music engine works in samples and samples per measure, and not milliseconds or whatever it is. Do so like this:


Okay, the basics are over with! Now, open up your music table, and start the beginnings of a new soundtrack entry like so:


Obviously we'll fill that in and make it not TODO later on, but that's for later.

Go back in audacity, and cut out a few portions as you'd like. Just use your judgement, cut out bits you feel are right for ambience, for battle, for enemy arrivals, for bad ends and such. Use control+X to cut, then open a new audacity window and paste your cut bit into the new audacity window.



Now, the advice I'm about to give may not be consistent through each and every music track you want to tablify and soundtrack-ify. Songs will have different methods, different "loop points" so to speak, use your judgement.
This is also going to be very hard to explain without being able to listen to it, bear with me, this'll probably be better in video format but I'm terrible at that so just bear with me!

Try and listen to the song, get a feel for it, get a feel for the points it "loops" or "repeats". In this example, it takes about four seconds for the cycle, so we'll start at four seconds in, or as the engine'll have it, 175000 samples.

Now, get the full length of your track in samples, and use a calculator. In my case, I've got 3116000 samples and 175000 samples per measure. The calculator gives me a result of 17.8057 whatever, so I'll just put in 18 in the table.

Export your cut bit as a .ogg in your mod's /music folder, put the numbers in the table like so...



And voila! You have your first track! Now, rinse and repeat the process about 8 to 11 times until you have your finished soundtrack.

This method may be a lot trickier and time-consuming than the wiki method of just dividing by sample frequency and such, but it also produces more accurate, better-sounding music that transitions much better ingame.
« Last Edit: June 04, 2015, 08:37:47 am by JSRNerdo »
AKA [`_`]
Inferno: It's the I in Inferno / It's the beam spam delight / Risin' up to a shock jump arrivaaaaaal
Between The Ashes: Look just a really cool and neat thing, OK?
Dimesional Eclipse: High speed anime girlies blowing **** up gets me excited
The Last Stand: A very episodic capship command mini-campaign
Breakthrough: A pretty standard but not really capship command mission

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: [Guide] Music tables 301
can has wiki?  :D

If you make a new page, it'd be trivial to link it under a new "Tutorials" section on the music.tbl page.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline Yarn

  • 210
Re: [Guide] Music tables 301
Just so you know, the game considers a single stereo sample to be 2 samples. Thus, if (and only if) the song has 2 channels (which most do), you will need to double the samples-per-second value that you put into the table. If you don't do this, the song will only play halfway through.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline JSRNerdo

  • [`_`]/
  • 29
  • King of Destroyer
Re: [Guide] Music tables 301
Just so you know, the game considers a single stereo sample to be 2 samples. Thus, if (and only if) the song has 2 channels (which most do), you will need to double the samples-per-second value that you put into the table. If you don't do this, the song will only play halfway through.

wait what

welp, editing tables and putting a disclaimer into guide now
AKA [`_`]
Inferno: It's the I in Inferno / It's the beam spam delight / Risin' up to a shock jump arrivaaaaaal
Between The Ashes: Look just a really cool and neat thing, OK?
Dimesional Eclipse: High speed anime girlies blowing **** up gets me excited
The Last Stand: A very episodic capship command mini-campaign
Breakthrough: A pretty standard but not really capship command mission