Hard Light Productions Forums
General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: VypersnakeX on July 02, 2014, 09:37:44 am
-
I'm wondering how to import custom music into my levels. I'm guessing it's a command into Events or something. If someone knows how, please explain and if it is indeed an event, please type out the exact commands to input. Thanks!
-
Well, there's two ways to do it (that I know about). Either you add entries to music.tbl or you use the play-sound-from-file sexp in the change\music section.
It will be easier to use the sexp if you're looking for a quick way to get a song in. But if the song you're using has different nuances, like a battle phase and a tension phase, music.tbl will give you more power in the end.
Edit: For the sexp to work, the music file needs to be in .ogg. Also, the file needs to be in data\sounds.
-
If you can figure out the music.tbl syntax, which isn't trivial. play-sound-from-file is by far the easier solution, and can be just as flexible with a bit of FRED work.
-
Well, there's two ways to do it (that I know about). Either you add entries to music.tbl or you use the play-sound-from-file sexp in the change\music section.
It will be easier to use the sexp if you're looking for a quick way to get a song in. But if the song you're using has different nuances, like a battle phase and a tension phase, music.tbl will give you more power in the end.
Edit: For the sexp to work, the music file needs to be in .ogg. Also, the file needs to be in data\sounds.
Alright cool, what's the sexp command then? Cause I literally just started working with FRED last night.
Also how would you get music.tbl to even open? Like, I'm guessing there's a command bar for you to type it in or something.
-
... play-sound-from-file sexp in the change\music section.
For the sexp to work, the music file needs to be in .ogg. Also, the file needs to be in data\sounds.
sexps\change\music\play-sound-from-file
Edit: in the event editor.
Edit2: Table files can be opened with Notepad or notepad++. They're basically .txt files with a different ending.
-
Took me like 20 minutes to figure it out, but I got it working. Thanks guys!
-
Have you done the FRED walkthrough that is shipped with FS2 or Diaspora? It's really helpful in getting to know FRED.
-
Have you done the FRED walkthrough that is shipped with FS2 or Diaspora? It's really helpful in getting to know FRED.
I read quite a bit of the FRED walkthrough. It indeed helped a lot. It just didn't specify specific event commands, but otherwise worked well for me.
-
While we're on this subject, what do people use to convert music to .ogg?
-
Personally, I use audacity (http://audacity.sourceforge.net/), or the oggenc2 (http://www.rarewares.org/ogg-oggenc.php) commandline utility.
-
Alright, thanks. I'll have this thread bookmarked for when the time comes to experiment with custom music.