You are not logged in.

Please register in order to use all features of this site.

Anonymous

Unregistered

1

Saturday, May 24th 2008, 3:20am

Custom Music

Custom Music

Author:BBalaz's

Adding custom music to freelancer. In the tutorial, we'll add a custom 'space' music, the one which plays when you are freely exploring space, and there are no hostiles to be seen anywhere.

Freelancer stores the music in a 22kHz MP3 format. Note that the extension is .wav - however, the music is not in "wav format". To be correct, there is no such thing as a wav format. Wav is merely a container. Generally, what you would call a "wav format" is actually called PCM. The music files of Freelancer are MP3 files, in a wav container, using a 22kHz sampling rate, and the Fraunhofer codec. Yes, you will notice, that if you use some other mp3 codec (like LAME, which is the default of, for example, Audacity), FL will not play the music correctly. Also, I've been fiddling around with different versions of the Fraunhofer codec, and they don't seem to work correctly, either. Adding music to Freelancer, however, is not that complicated.

Let's get down to a simple-to-understand, step-by-step tutorial.
1: Create your music file. It is generally a good idea to keep 'space' type music to about two minutes long, 'bar' type music to about one minute in length, and so on.
2: Save it as WAV (PCM). When you are satisfied with your file, export it (or save it) as wav. Sampling rate, so far, doesn't matter, you can keep it as high as you wish.
3: Check the volume of the music. It is a good idea to go to FL's music folder, and open a music file, say, music_li_space, or music_bar_li02. Then, open up your own WAV file and check if it is loud enough. If it isn't loud enough, you'll need to amplify it. Check the appendix at the end of the tutorial. If your music file is loud enough,
4: Open it in WINDOWS SOUND RECORDER. Yes, that simple, seemingly good-for-nothing application. Once your file is open, go to File ==> Properties, then click the "Conversion..." button.
5: Convert your file. Select MPEG Layer-3 as a format, Attributes should be 56 kbit/sec, 24 000 KHz, Stereo. That should work. Click OK and wait for the application to finish converting the file.
6: Save the file! It is generally a good idea to use 'Save as..' in case you might want to get back to the original PCM wav file. You will also notice, that the extension to your MP3 will now be WAV.

At this point, we are done with the file itself. Let's get it working. In the tutorial, let's say our file will be saved as... tutorial_space.mp3 (Creative, isn't it?)

1: Copy the file (tutorial_space.mp3) into Freelancer\Data\Audio\Music.
2: Make sure the file Freelancer\Data\Audio\Music.ini is not write-protected.
3: Open the file "Music.ini" in a text editor. Note that I assume you are using the SDK. If you aren't, you will need binitools, or some other bini decoder/encoder application, but I won't get into that now.
3: You will see blocks of 'Sound' entries. Do a search for music_li_space.
4: Copy and paste music_li_space's block to the end of the file.
5: Now, change the entries:
nickname = music_tutorial_space (<== the nickname you will refer to in the system file)
type = music
file = audio\music\tutorial_space.wav (<== the name of your file!)
attenuation = -6 (<== this is meant to be some sort of volume adjustment, but I found little to no effect when modifying the value.. Play around with it)
streamer = true (<== makes your music fade in and fade out)

6: Save music.ini
7: Open up a system file. We will be using the New York system. Go to Freelancer\Data\Universe\Systems\Li01 and open up Li01.ini
8: Replace the music theme. Scroll down to the 'Music' entry (or do a search for it) and replace
space = music_li_space
with
space = music_tutorial_space (<== NOTE: This is the NICKNAME you defined. Not the filename.)
9: Save the file. That should do it.


APPENDIX:
1. It is ALWAYS better to make backups of all files you modify, and don't EVER work in the game folder, with game files; ALWAYS use copies. This is a general rule of the thumb, and you should stick to it.
2. Windows Sound Recorder can be found in Start menu, All Applications, Accessories, (Entertainment? sorry, my Windows is not English).
3. If you use binitools, remember to 'bini' the files back (encode them) after you 'unbini'-ed them.
4: Increasing/Decreasing music volume. Sound Recorder is capable of doing that under "Effects" - but I'll also give you another example. I use Audacity, a simple audio editor for my files. When your file is open in Audacity, press Ctrl+A (Select All), go to Effect menu ==> Amplify. Set Amplification to a positive or negative value. That will increase or decrease the volume. Note: You might need to "Allow Clipping" to be able to increase the volume - this, however, will have an impact on audio quality in the louder parts of the file.

Anonymous

Unregistered

2

Monday, May 26th 2008, 4:47pm

Re: Custom Music

Done by me. :P
Yea, I know. But still.

TubeJuice

Apprentice

(10)

Posts: 69

Activitypoints: 0

Date of registration: May 22nd 2008

Reputation modifier: 5

Level: 29 [?]

Experience: 239,422

Next Level: 242,754

  • Send private message

member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month

3

Thursday, October 2nd 2008, 5:39pm

Re: Custom Music

Thanks. This has been very useful. Anything that reduces file size for otherwise large files is extremely helpful. I'd been using uncompressed PCM *.wav files for music previously and the mod I was working took forever to load.

    United States

Posts: 70

Activitypoints: 80

Date of registration: Sep 15th 2008

Location: A pineapple under the sea

Occupation: I eat pie

Reputation modifier: 5

Level: 29 [?]

Experience: 234,777

Next Level: 242,754

Thanks: 4

  • Send private message

member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month member since 108 month

4

Sunday, April 19th 2009, 3:28am

Re: Custom Music

Does this work for sounds as well? Or are sounds PCM format?

Posts: 1

Activitypoints: 0

Date of registration: Jun 6th 2009

Reputation modifier: 4

Level: 13 [?]

Experience: 3,091

Next Level: 4,033

  • Send private message

member since 96 month member since 96 month member since 96 month member since 96 month member since 96 month member since 96 month member since 96 month member since 96 month

5

Sunday, July 12th 2009, 5:28pm

Re: Custom Music

Ah, freaking Sound Recorder! I knew I missed a step somewhere, thanks BBalazs for the tutorial, and thanks Mental Chaos for the repost! :mrgreen:

@themilkman: IIRC, the same process works for sounds as well. Just like the music, the sound files are also just MP3's disguised as WAV's (although the WAV format doesn't exist, ironic), as I was tinkering with the Arwing mini-mod a year or so ago and made custom engine sounds for it and everything! Or did I go through another step to get the engine sounds to work? I can't quite remember, I'll try to dig up the information. I was even going to expand upon it and make a complete Arwing mod, with altered flight mechanics (to make it more maneuverable and capitalize on it's role as a heavy interceptor/light bomber like in the games), custom weapons and tweaked hardpoints and everything! But I accidentally lost all my work when I had to do a clean install of Freelancer. Shame too, because it turned out really cool. :cry:

Oh, but I absolutely must mention a couple things that should be added to the OP:

1. Before you export your music/sound from Audacity, go to Edit -> Preferences, and select the File Formats tab. In the Uncompressed Export Format section, open the drop-down menu and select "WAV (Microsoft 16 bit PCM)", after you select it, the text under it should read "WAV (Microsoft), Signed 16 bit PCM". Click OK; it'll be saved so you won't have to do this again, but if you don't use these settings, Sound Recorder WILL NOT be able to convert the file! I spent the better part of a half-hour racking my brain on why Sound Recorder was unable to convert the file until I found this. Learn from my mistakes. ;)

2. In Windows XP (at least, I'm not sure about Vista or 7), Sound Recorder's "Convert" function is kinda hidden. To convert your exported WAV to MP3 in this case, go to File -> Save As... and in the save box, at the bottom of the window you will see "Format:" and the information after it, and next to it, click the "Change" button, and there you will change the format to MP3, and the attributes to "56kBit/s, 24,000 Hz, Stereo 6 kb/s" Once that's done, click OK and save your file. Sound Recorder will convert the file, and you can continue editing as usual. :)

On a side note, if you just want to test a music file in-game, you could simply stick it in place of an existing file and completely skip any .ini editing! In my case, I went to my DATA\AUDIO\MUSIC\ folder, and renamed the "music_omicron_space.wav" file to "music_omicron_space0.wav" to preserve the original, and stuck my new file in the same folder as "music_omicron_space.wav", so not only do I preserve the original file, but I don't even have to edit the .ini file as well! This works great when you want to replace the default music in the game; although it won't work if you have added systems that don't use the original music files, but if you're adding systems, you probably already know all that anyway. ;)

Hope my experience helps someone out there! I've got some experience playing with sound files and making calls to them from the game's .ini files, but it's been a while. If anyone needs help with sound or music I'll try to point you in the right direction! :)

Later guys!

- Jonathan

  • "Lordadmiral Drake" is male
  • Austria

Posts: 734

Activitypoints: 430

Date of registration: Jan 15th 2009

Location: Imperial Avenue 271, Toledo City, Toledo

Occupation: Chief of the U.S.D.F. high command

Reputation modifier: 11

Level: 41 [?]

Experience: 2,372,312

Next Level: 2,530,022

Thanks: 12

  • Send private message

member since 96 month member since 96 month member since 96 month member since 96 month member since 96 month member since 96 month member since 96 month member since 96 month

6

Wednesday, November 3rd 2010, 11:42am

The Windows Sound Recorder of Vista and 7 can only record. All other functions have been scratched. Any suggestions?

EDIT: Freelancer Audio properties:

Dialogue:

Format : MPEG Audio
Format profile : Layer 3
Codec ID : 55
Codec ID/Hint : MP3
Bit rate mode : constant
Bit rate : 32,0 Kbps
Channel(s) : 1
Sampling rate : 22,05 KHz


Mixes:

Format : MPEG Audio
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Codec ID : 55
Codec ID/Hint : MP3
Bit rate mode : Constant
Bit rate : 80.0 Kbps
Channel(s) : 2
Sampling rate : 22.05 KHz


Music:

Format : MPEG Audio
Format profile : Layer 3
Mode : Joint stereo
Mode extension : Intensity Stereo + MS Stereo
Codec ID : 55
Codec ID/Hint : MP3
Bit rate mode : Constant
Bit rate : 80.0 Kbps
Channel(s) : 2

Sounds:

ormat : MPEG Audio
Format profile : Layer 3
Codec ID : 55
Codec ID/Hint : MP3
Bit rate mode : Constant
Bit rate : 32.0 Kbps
Channel(s) : 1
Sampling rate : 22.05 KHz
Signature from »Lordadmiral Drake« Life is a f****** game, but the graphics are super xD

This post has been edited 1 times, last edit by "Lordadmiral Drake" (Nov 3rd 2010, 11:42am)


SWAT_OP-R8R

Administrator

(12)

  • "SWAT_OP-R8R" is male
  • Germany

Posts: 1,577

Activitypoints: 3,030

Date of registration: Oct 15th 2010

Location: Germany

Occupation: Financial branch

Reputation modifier: 14

Level: 44 [?]

Experience: 4,090,942

Next Level: 4,297,834

Thanks: 160

  • Send private message

member since 84 month member since 84 month member since 84 month member since 84 month member since 84 month member since 84 month member since 84 month

7

Wednesday, November 3rd 2010, 12:36pm

for that case i have a winxp copy installed
however
there are good tools for free on the net which can do the same work as the old recorder
Signature from »SWAT_OP-R8R«


(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.
Only dead fish swim with the stream.
Diplomacy is the art of saying, "Nice doggie" while picking up a rock.

Social bookmarks

Legend:

Forum contains no new posts
Forum contains new posts
Forum is closed
Forum is an external link