Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Easy Reliable Way to make New Music Files

The general place to discuss MOD''ing Freelancer!

Post Tue Sep 18, 2007 1:36 pm

Easy Reliable Way to make New Music Files

Hello pals.

After wasting 2 entire days following unclear (or simply bad) advice, please learn from my experience - here is a quick, useful, reliable and easy method for creating your own compressed music files for Freelancer.

Important Notes

Always observe copyrights and usage restrictions for music.

You can of course use any uncompressed standard .wav file directly in Freelancer without doing any of this conversion, but they are very big - my uncompressed files were 10MB to 25MB each for 3-minute to 5-minute tracks. The compressed versions are all between 400KB and 1.2 MB.

CDex

If you too want to avoid the same waste of time that I unfortunately wasted by following bad advice, then DON'T use CDex. If you save your CD track as a compressed format audio file with CDex, mine played back at 3-4 x the normal speed! It also turns out that CDex does NOT format compressed .wav music files in the way that Freelancer can use them reliably. None of my 20+ conversions worked, many of them just kept clipping short and repeated continuously from the beginning after a few seconds. Some would not even play at all in Media Player. I tried all possible methods within CDex to create them, and added the RIFF/WAV headers to no avail. Forget it.

NCH's Switch

Many other audio file converters are also a waste of time, I tried 6-7 different ones, some couldn't even read the FL compressed .wav format and none produced a working file except for NCH's Switch from http://www.nch.com.au.

BUT - Switch lied about the sampling rate and made bigger files than my way below, but at least the 3-4 files I made with it did work. (Switch told me it was setting 24,000 Hz, the maximum that I could select from the drop-down list, but in fact it set 44,100 Hz instead! The MPEG Layer-3 encoder should not have permitted that to happen!). You DON'T need Switch either for this work.

PROCEDURE

Here is how you can prepare and convert any .wav or .mp3 music file very easily quickly and reliably, first time and every time...

What you need

You may want to use Audacity for editing your wav files (optional but it's free!) from here:- http://audacity.sourceforge.net

You may need Windows Media Player together with Audacity to get your track from a CD into WAV format.

You DO need Sound Recorder (it's already in your Windows installation, click Start... All Programs... Accessories... Entertainment... Sound Recorder).

NOTE - Sound Recorder only opens .wav files, and it has a 60-second recording limit, you can extend this by clicking record again but there will be a small break in the track. But don't worry, you can just play your .mp3 or .cda or .xxx music file in Windows Media Player (or WinAmp or whatever else you like) and record it with Audacity as it's playing! Easy peasy.

Step 1 - Preparing your WAV file

If you want to get your track from a CD, play your CD track with Media Player and record it with Audacity while it's playing. Simple.

If you need to, use Audacity to edit your music:-
Trimming silence: just drag-select the silence you want to remove and press Del.
Adding fade-in and fade-out: just select the beginning or end of your music by click & drag over the end part, and then click Effect... Fade Out (or Fade In) as appropriate. It's a nice easy tool.

If you used Sound Recorder to record a playing track, then you can use Sound Recorder's buttons and cursor-slider to position the track just before the start of the music and use Edit... "Delete before current position", and then position it just after the end and use Edit... "Delete after current position" to remove any extra silences at the beginning and end of your recordings. It's very easy.

With either Sound Recorder or Audacity, when you've got your music track the way you want it, just click File... Export... and export your track as a normal uncompressed .WAV file. Don't worry about other settings, we will fix them in the next step.

Step 2 - Converting

Now to convert your music to a compressed .WAV that Freelancer can play properly...

Start Sound Recorder, and open your uncompressed wav file.

Click on File... Properties. Note the Length (mine was 70 seconds), Data Size (mine was 12.3MB!) and Format (mine showed PCM, 44,100 Hz, 16 Bit, Stereo).

Click Convert Now.... Leave "Name:" as (untitled) and select Format: MPEG Layer-3, and Attributes: 56 kBit/s, 24,000 Hz, Stereo, 6kb/s (it was the top selection on my drop-down list). Don't worry, this setting is exactly the right one for us.

Click OK and your file will be converted (but it's not been saved yet!)

Back on the Properties tab, confirm that your file is now far smaller, mine was now 700KB, MPEG Layer-3, 56 kBit/s, 24,000 Hz, Stereo. Perfect. Click OK.

Click the Play button and make sure all is still well. I had NO problems at all with Sound Recorder. It is a fab tool and is underestimated by most people including me - but not now!

Click File... Save As... and choose your folder and a new name for your file (remember it must be xxxx.wav), and save it. I use new names for the compressed files so I don't overwrite my original uncompressed wav file.

Close Sound Recorder.

Step 3 - Adding your music to Freelancer

Open your DATA\AUDIO\MUSIC\music.ini file and add the new music file to it. Just copy another entry, paste it at the bottom and change the filenames, it's so easy. It should look like this:-
<pre><font size=1 face=Courier>
[Sound} <-- make this } a square right-bracket
nickname = music_rw_space
type = music
file = audio\music\music_rw_space.wav
attenuation = -5
streamer = true
</font></pre>
I set attenuation = 0 to get good volume for my bar music file, but -5 was good volume for this space music file.

Step 4 - Adding your music to a system or base

Now if you want it as background space, danger, or battle music, open your system's DATA\UNIVERSE\SYSTEMS\xxxx\xxxx.ini file, and add your music to it:-
<pre><font size=1 face=Courier>
[Music} <-- make this } a square right-bracket
space = music_rw_space
danger = music_li_danger
battle = music_li_battle
</font></pre>
If you want it in your base bar or other room, open the DATA\UNIVERSE\SYSTEMS\xxxx\BASES\ROOMS\ room ini file you want, and insert it in the {Room_Sound} section:-
<pre><font size=1 face=Courier>
[Room_Sound} <-- make this } a square right-bracket
music = music_rw_space
ambient = ambience_bar_ground_larger
</font></pre>
If you want to hear the same track continuing in every room on your base, just add it to all the Room ini files, e.g. bar, deck1, deck2, planetscape etc.

All done! Start your game and check out your new music. Mine was great once I found out only this way works and did it this way.

Roleplay: - the art of self-deceipt!

Edited by - StarTrader on 9/20/2007 7:32:12 AM

Post Thu Sep 20, 2007 12:40 am

I noticed yesterday that Sound Recorder would record for only 60 seconds each time I clicked the Record button. It would extend if I immediately clicked Record again but then there is a short break in the recording.

I have updated the post above to include info on this and CDex and NCH's Switch.

Let me know if you have problems with this procedure and I will investigate, it is still working first time every time for me.

Cheers pals.

Edited by - StarTrader on 9/20/2007 7:25:16 AM

Return to Freelancer General Editing Forum