Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: VypersnakeX on July 02, 2014, 09:37:44 am

Title: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post 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!
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: Cyborg17 on July 02, 2014, 09:48:23 am
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.
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: The E on July 02, 2014, 09:50:05 am
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.
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: VypersnakeX on July 02, 2014, 09:52:00 am
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.
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: Cyborg17 on July 02, 2014, 09:54:31 am
... 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.
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: VypersnakeX on July 02, 2014, 10:32:44 am
Took me like 20 minutes to figure it out, but I got it working. Thanks guys!
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: The E on July 02, 2014, 10:38:31 am
Have you done the FRED walkthrough that is shipped with FS2 or Diaspora? It's really helpful in getting to know FRED.
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: VypersnakeX on July 02, 2014, 10:48:23 am
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.
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: Lorric on July 02, 2014, 11:37:02 am
While we're on this subject, what do people use to convert music to .ogg?
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: The E on July 02, 2014, 11:47:28 am
Personally, I use audacity (http://audacity.sourceforge.net/), or the oggenc2 (http://www.rarewares.org/ogg-oggenc.php) commandline utility.
Title: Re: I've been working with FRED2 a lot lately, but I'm wondering how to...
Post by: Lorric on July 02, 2014, 02:05:56 pm
Alright, thanks. I'll have this thread bookmarked for when the time comes to experiment with custom music.