Jump to content

LEGO Racers Custom Audio


le717
 Share

Recommended Posts

History

On April 25 of 2010, bartvbl posted how to import the .TUN files.

 

Ok. I found the right way to import the RAW data now:

1. Open Audacity, and clock project > import raw data

2. Select VOX ADPCM

3. You can play a bit with the endian options, but they don't seem to do much

4. Click import

Now the only problem is that the music is too loud for audacity, making it still sound a bit strange.

 

This post was written almost a year and a half before I came along and began expounding on his research.

Around October 2, 2011 I started on my hunt for a convertor for .TUN files. I found out that is no such audio file. The file type had actually been known since bartvbl made that post: VOX. The LEGO Racers music is actually VOX audio with a TUN extension.

I soon found a command-line program that was able to convert normal (MP3, WAV, such like that) to VOX, namely, Sound eXchange (SoX).

I found a piece of music that I liked, and converted it. I sapped it in the game files, and gave it the proper name. I loaded the game, and the music played. But it was really low in volume, and it was really, really slow.

I figured out that the file hertz was what made the file slow. I raised it, converted the music, and loaded the game again. This time, it was even slower. I lowered the hertz next, and to my surprise, the music went faster! I finally found the right hertz after a few more tries.

During this process, I discovered an interesting... issue, for lack of a better word. The higher the hertz of your custom music, the slower it will play in game.The lower the hertz, the faster the music will play.

The real music was produced at 44100 Hz, and it plays at the correct speed in Audacity when imported However, the custom music has to be produced at 22050 Hz to play correctly in-game.

Once I figured that out, I started working on the volume. I said earlier that my music was way too low in volume in-game. Combined with the fact that the official music was loud in raw form, I deduced out that the game lowers the volume of the music.

I tried amplifying the music in Audacity, but every time I did that, I got an error from the SoX that it was really loud, and that it lowered the volume. When that file was put in-game, the audio volume would be in flux: It would be loud for a second, then low for a while, the loud again. I found out that the convertor lowered the really loud parts, and the lower parts that were not too loud, it left alone.

I tried to amplify the music using the tools built into SoX, but that did not work. Amplifying in both Audacity and SoX did not work either. The result was the same: the music volume was in flux.

rioforce (my brother) had been watching me every now and then, and of course I told him what was going on and what was happening.. He said he might know what was going on.

The raw files, are very load when imported but, the waveforms are all the same: flat on top and bottom.

lr1-theme-tun1.png

rioforce suggested this: Amplify the music, normalize it, then export the file and convert it. I did that, and the results were better than what I was doing before. SoX did not give me an error, and the music was not in flux in-game.

I figured out a SoX command so the amplified music would not be clipped when being converted. Using that command, I got good results too, though not as good as amplifying then normalizing. In addition, with the command, the converted music was not distorted in-game, unlike the other method.

In the end, I chose to use the command over the amplifying and normalizing. After being amplified and normalized, some of the music I choose was back to its original volume, and completely wiped out my changes.

Fast-forward to the third week of February 2012. I had found out the month before that Audacity could export VOX files in addition to importing them, but it was very flaky. Sometimes it worked, sometimes it didn't. I had decided to wait for the next release of Audacity to update this tutorial to use only Audacity. But Audacity updates were spread far out, and I didn't really want to wait for the next one. So I started messing with VOX exports again, and I got it to export every time, even though I got a phony error message most of the time. I tested my files, and they did worked in LEGO Racers, a bit better than using SoX, but not perfectly. I proceeded to update this tutorial with the new info and method.

 

On April 29, 2013, rioforce began looking at creating working custom music for Racers. He actually had been developing a method for a few months, and had actually uploaded a video showing off his WIP method. But on the 29th, he really began finalizing that method. Once he had the proper settings, he recorded a video showing how to do it, and wrote up a new tutorial on LEGO Racers Audio Modding, releasing it all on April 30, 2013. The next day, May 1st, I updated the tutorial here, ushering in a new and very nosy wave of LEGO Racers modding.

Directions

 

Note: the following tutorial was written in the voice of rioforce. Anytime "I" or a similar reference is used, he is referring to himself.

 

  • Have a song that you like to hear.
  • Know where you want that song to play in-game. (I want my song to play on the main menu).
  • Import your Song into Audacity. I recommend that you use the newest version of Audacity.

import.png

  • Re-sample your track.
  • In the bottom right hand corner of the window, there is a drop-down menu labeled “Project Race (Hz)â€. Select 22050 from the menu.
  • Select all the audio by pressing Ctrl+A on your keyboard, and go to Tracks>Resample and select 22050 from the resulting box.
  • If your music is Stereo, select all the audio again and go to Tracks>Stereo Track to Mono and let that work. This step is necessary because VOX cannot support stereo audio, only Mono audio.

resample.png

  • Now, select all (Ctrl+A), go to Effects>Compressor. Change the settings according to the picture below.

compressor.png

  • I recommend repeating the previous step. Basically what the compressor does is makes all the audio volume level so there are not major changes in the volume. For some songs, you may want to repeat Compressor a third time! Just make sure that the waveforms look nearly the same level.

rinse-and-repeat.png

  • Your waveforms should look something like this:

waveforms.png

  • Now you need to Amplify the track a bit. Effect>Amplify. I try to amplify it until it is clipping a little bit.

amplify.png

  • Your amplified audio should look something like this:

clipping.png

  • Now export your music!
  • Go to File>Export and in the resulting window, in the Save as type drop-down menu, select Other Uncompressed Files and click the Options button to the right. Under the Header menu, select RAW (header-less), and select VOX ADPCM from the Encoding menu below. Click OK.
  • Navigate to where you want to save your audio. If it is music, you can save it in the same folder as LEGORacers.exe. If it is a sound effect or a voice, you will need to export them in the proper folders in your >extracted JAM archive.

export-options.png

Error Message Ahead!

  • More likely than not, you will get an error message from Audacity that it could not

    export the audio, and will give you the following error message. Don't worry, your audio exported correctly.

audacity-vox-error.png

  • Since I am replacing the main menu music, I will call my song “theme.tun“. Then, replace the original theme.tun in the LEGO Racers Program Files.
  • Now open LEGO Racers and listen to your music! :D

 

 

Videos

Video of my Music modding (using original SoX method):

 

http://www.youtube.com/watch?v=37IprrrQ_Ss

 

Video of my SFX modding (using original SoX method) :

 

http://www.youtube.com/watch?v=6WG3pfHxJow

 

Video of Voice modding, uploaded by (assumed to use using original SoX method):

 

http://www.youtube.com/watch?v=sCWmv7Yv3LU

 

Video of Music modding, uploaded by rioforce (using his method):

 

http://www.youtube.com/watch?v=1R8kwkRJP18

Link to comment
Share on other sites

This is just incredible. Once I am able to comprehend what you said I will use this

And destroy that horrible Royal Knights Raceway music >_<

Wait... if we can change the music... and if we could figure out how to change the tracks... oh yes.

Link to comment
Share on other sites

This is great.... Also There are files that list the .tun files that each track uses... I wonder if it's possible to add to those files. Then you won't need to overwrite any of the originals.

Link to comment
Share on other sites

Wow. I thought more people would have seen this...

Sure, this is a Rock Raiders forum, but there is a Racers section, and the how to import .TUN files was popular, so shouldn't being able to create music for the game be even more popular? :?:

Link to comment
Share on other sites

Sure, this is a Rock Raiders forum, but there is a Racers section, and the how to import .TUN files was popular, so shouldn't being able to create music for the game be even more popular? :?:

You'd think so, but I'm guessing that most members are elsewhere and don't have the time to check right now. It's a fantastic tutorial, but some people are just too lazy, and they get to miss out.

Link to comment
Share on other sites

You'd think so, but I'm guessing that most members are elsewhere and don't have the time to check right now. It's a fantastic tutorial, but some people are just too lazy, and they get to miss out.

I guess that is true.

That also means that everyone who has not seen this tutorial has to listen to (somewhat) annoying music, while we get to have custom music! :D

Link to comment
Share on other sites

You'd think so, but I'm guessing that most members are elsewhere and don't have the time to check right now. It's a fantastic tutorial, but some people are just too lazy, and they get to miss out.

I guess that is true.

That also means that everyone who has not seen this tutorial has to listen to (somewhat) annoying music, while we get to have custom music! :D

See, now that you're looking at the positives, everything is great! And when someone asks you how you get custom music, you can throw a shovel at them and point them in the direction of this tutorial.

Also, if you look in this LEGO Racers category, you should see your post on a list and a rough estimate of how many views it has.

Link to comment
Share on other sites

That also means that everyone who has not seen this tutorial has to listen to (somewhat) annoying music, while we get to have custom music! :D

I've never heard this annoying music you speak of /:| but then again I only have the PC game

Link to comment
Share on other sites

I've never heard this annoying music you speak of /:| but then again I only have the PC game

I only have the PC version too. And when I say annoying, I mean somewhat annoying. (I'm looking at you, main menu!)

But now, I don't have to listen to it! That is because I have custom music! (LEGO Universe music anyone?)

Have you figured out my tutorial, Lair? I tried to write it as plainly as possible. Most of it is how I figured it out.

@Extreme110 76 views? I thought it was less. Than why have only 5 people posted on it? *Look at the positive, le717. Look at the positive. Just think, maybe a few days from now, a lot of people will have posted on here, and they will also share in the custom music reality. :P*

Link to comment
Share on other sites

I only have the PC version too. And when I say annoying, I mean somewhat annoying. (I'm looking at you, main menu!)

But now, I don't have to listen to it! That is because I have custom music! (LEGO Universe music anyone?)

Have you figured out my tutorial, Lair? I tried to write it as plainly as possible. Most of it is how I figured it out.

I have the PC too and I once again say I've never heard any annoying main menu music, only awesome :af:;P:smug:

I've not really yet. I will since it's the weekend. I only got lost because it was so long and involved a lot of stuff being gotten. But I definatally will look into it.

(actually I don't like any of the music from Royal Knights Raceway)

  • Like 1
Link to comment
Share on other sites

lol username

I've never heard this annoying music you speak of /:| but then again I only have the PC game

I only have the PC version too. And when I say annoying, I mean somewhat annoying. (I'm looking at you, main menu!)

But now, I don't have to listen to it! That is because I have custom music! (LEGO Universe music anyone?)

Are we clones?

Link to comment
Share on other sites

I only have the PC version too. And when I say annoying, I mean somewhat annoying. (I'm looking at you, main menu!)

Which isn't annoying?

Link to comment
Share on other sites

I've never heard this annoying music you speak of /:| but then again I only have the PC game

I only have the PC version too. And when I say annoying, I mean somewhat annoying. (I'm looking at you, main menu!)

But now, I don't have to listen to it! That is because I have custom music! (LEGO Universe music anyone?)

Are we clones?

Maybe... :P

Link to comment
Share on other sites

  • 3 weeks later...

This works in reverse, to get the TUNs into MP3s, right? Because I'd like this music in my computer but all I have now is the static-filled conversions I made when I was younger (nine?) and some that I downloaded that were not really a great job at recording.

Link to comment
Share on other sites

This works in reverse, to get the TUNs into MP3s, right? Because I'd like this music in my computer but all I have now is the static-filled conversions I made when I was younger (nine?) and some that I downloaded that were not really a great job at recording.

Good question.

SoX could not import mp3 files to convert to TUN. It said it was missing something. Audacity can import the music via the "Raw import" box, but static comes out.

I will look into it, but I'm pretty sure it's the raw files that have the static, and the converted files would also have static because of that.

Link to comment
Share on other sites

Then why don't they have static in the game?

Maybe the engine analyses the sound and removes the static?

I think you are right, Extreme.

I tried converting the TUN files using SoX, and they also have static.

As for why I say you are right, it comes from my experimentation from trying to make TUN files.

If I did not amplify the custom music, it would be really low in-game. Turn it up too much though, there would still static, but not as much if you listened to the music before it was converted.

Combine that with the fact that the game TUN files have static, but the in-game they don't ( as already noted by Lair), I think that Extreme's deduction is correct.

Plus, if you watch my Music Modding video on the topic post, you will see the my custom music lowers whenever I select something (read: a sound effect plays). I think that the engine lowers the music whenever a sound effect is played, but it is as not noticeable on the official music as it is on custom music.

I think that if you turn off sound effects, the music will not lower when you do something, but I have not tested that yet. (I'm going to do that right now.)

Link to comment
Share on other sites

So the only way to get the music is to record it myself. :|

Oh well. It was worth a try.

Yup. Pretty Much.

I tested that theory that I stated in my last post. I turned out to be true.

When you have custom music, if a sound effect on the main menu is played, the music will be lowered at the same time. Turning off the sound effects fixes that.

Link to comment
Share on other sites

I guess these developers are smarter than I accredited them for.

If someone was to make a track full of static, you could test the theory.

Link to comment
Share on other sites

I guess these developers are smarter than I accredited them for.

If someone was to make a track full of static, you could test the theory.

I would try to do that, but there are a few things stopping me right now.

1. The laptop that I was using is now dead.

2. The only other computer that I can use is be mean to me because it is older and slow.

3. Windows XP!

*Windows XP, why must you not have a "Open Cmd.exe here" command without installing something? And why must you take so long to boot into safe mode?*

I am also going to be modding some more audio in LR1. The menu sound effects, to be precise. I am thinking about doing it both without custom music and with custom music. Maybe the whole "custom music is lowered when sound effect is played" thing won't be there if you have both custom music and custom sound effects.

Link to comment
Share on other sites

Quick question: is double posting (a post by me comes after another post by me) allowed here? Just asking because I have an update to this, and the post above was by me.

I tested all the stuff that I wanted to test. Here is one update.

If someone was to make a track full of static, you could test the theory.

Done. Audacity>Generate>Noise>White.

I turned down the volume for a few seconds, then turned it way up, then back to normal. This is the result:

Author Edit: Video removed. See edit.

I had the sound effects changed at the time of this video. And from this I found out something.

If you have both custom music and custom sound effects, the music is lowered when a sound effect is played, just like when you have custom music and regular sound effects. But if you have official music and custom sound effects, the music stays the same. (I recorded that too, just haven't uploaded it yet.)

EDIT: AHHHHH! I just realized that my test was faulty! I'll rerun it later.

Edited by le717
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.