NFSAddons Forums

Main Menu

Quick NFSHS sound editing tutorial (better than the old one)

Started by Zpectre, Dec 29, 2011, 10:04 PM

Zpectre

The old sound tutorial was shit and I found out some new stuff along the years about the sound engine so I figured out I should post an update.

I would post this on NFSCars as well but that site is shit nowadays with a shitty community so if you want to post it there you can do it (giving me credit of course) but I myself won't (not that they have people who know to mod sounds in there anyway :D ).

First things first: how it works.

NFSHS uses the same system as a gazillion other racing games in the industry, it's just packaged a little differently.

There are 5 files in the viv file related to car sounds:

CARENG.BNK
CARENG.CTB
CARENG.LTB
OCARENG.BNK
SCARENG.BNK

Each viv file has the same bnk files, but the contents of the careng.bnk, ctb and ltb files are different depending on the car. For this tutorial it's best to use the Mercedes CLK files (and NOT the Camaro) as they're easiest to work with.

The CARENG.BNK file contains all the audio samples. It's just a container so trying to open it with something other than NFS Wizard won't work (I tried everything including TDU tools but only NFS Wizard works, and it has to be the most recent one).

Once you open it there will be a list of 18 sound samples in the file numbered in order:

Sample 1: Shifting sound.
Sample 2: Horn.

Samples 1 and 2 are the same for all the cars (sound changes obviously).

Samples 3 to 6: Deceleration (coast) sounds. In the CLK they're ordered according to pitch (lower pitch to higher pitch). The order is: idle, low, medium and high.
Samples 7 to 10: Acceleration (load) sounds. Same stuff applies here, the order is also the same.
Samples 11 to 14: Deceleration interior sounds. Same stuff, same order. Needs to be stereo.
Samples 15 to 18: Acceleration interior sounds. Same stuff, same order. Also needs to be stereo.

If NFS Wizard crashes when you open a bnk file it's probably because your sound card and NFS Wizard don't agree with each other very well. In case it happens, try going to Device Manager in Windows (not sure how to do it in recent Windows since I'm still an XP user) and deactivate (NOT uninstall) your sound card. It worked for me.

Now, on to the careng.ctb and ltb files. What are they? NFS Wizard can't open them, but they're of the utmost importance. They're the files which tell how many samples are inside the careng.bnk file and what pitch they are (akin to aud files in the SimBin games). I presume "ctb" is for coast (decel) while "ltb" is for load (accel). They have a matching bnk (meaning that you can't use the bnk of the CLK with the ctb and ltb of the McLaren for example) so it's imperative that all of the original files come from the same car or else you'll hear no sound in the game.

The problem is that NFS Wizard can export these files (ctb and ltb), but it can't import them. Ideally if you're making a car you'd just import the mesh, textures and performance into the Mercedes CLK viv file and edit the sounds after that since it's all already there, but if you only need the sound (like if someone released a sound mod) you need to import the correct ctb and ltb as well. The best way to do it is to rename these files to something else with an extension that NFS Wizard can recognise (viv, fce, tga, bnk, txt...), import them into the viv, delete the original careng.ctb and ltb files and rename the files you imported back to careng.ctb and ltb.

Finally, the ocareng.bnk and scareng.bnk files. The first one is the sound your AI opponent's car makes during the race, the other is the sound your split-screen opponent makes during the race. The ocareng.bnk structure is the same for all the cars: sample 1 for the engine sound and sample 2 for the horn. You can use the high rpm sample from the careng.bnk for a good effect. The scareng.bnk is exactly the same as the careng.bnk so you can just "duplicate" the latter in NFS Wizard and name the duplicated file "scareng.bnk" (without quotes).

Sound format:

.wav files, PCM 16-bit, stereo for interior and mono for everything else.

Frequency is 22050Hz standard, you can use 44100Hz (not recommended), or lower than 22050Hz. If you use 22050Hz samples, length of the sample must not exceed 1.3 seconds. The lower the frequency, the longer the samples you can use.

Stereo sounds need to be at half their normal pitch. Use your favourite sound program and lower pitch by 50% and presto. But sound length still has to be 1.3 sec or less. Very hard to make loops with samples like this, so I sometimes don't even use interior sounds (NFSHS plays the exterior sound in bumper and dash cam anyway).

The samples have to be at steady rpm. This is a problem since you won't find samples with steady rpm anywhere. So what can you do? You bend the sample's pitch so that it sounds similar throughout. With GoldWave you can use the Doppler Effect filter (not the most accurate but works).

Once you made the sample sound steady, it's time to create the loops. A loop is the continuous repetition of the sample in the game. To create a (not perfect but more pleasant to the ear) loop, first zoom in on the sample. You'll find the sound waves depicted in your software as a sequence of hills (pointing upwards) and valleys (pointing downwards). What you need to do is to ensure the sample starts with a hill and ends with a valley (or vice-versa). To do this, crop it in whichever way you see fit. Where to crop depends on the sample, some samples have background sounds at the beginning that they don't at the end, which creates what we call "bad loops".

A useful technique to create a sample with the length that HS requires is to crop a 0.6 sec section of the sample, copy the whole result, then reverse (and, if needed, invert) the sample you're working on and paste the original copied sample in front of the reversed-inverted sample. This is a very well known technique among sound modders and is what I did to create the M3 GTR and 924 GTS sounds. It results in quite good loops (not perfect). After you do this you can fix the start and end like you did with the original sample so that it sounds good. Also, if you're hearing a "click" in the very middle (center) of the whole sample, try selecting the problematic bit in the middle and deleting it to attempt to eliminate the click. If it doesn't work then go back to the step at the beginning of the paragraph.

After done (may take ages and requires good hearing), save the .wav in the correct format and import the samples into the .bnk files in NFS Wizard. When you do that, right-click the sound graph which shows the sample, then click on "Show Loop". Two vertical lines will appear over the sample. Move the left one to the beginning and the right one to the end so that HS recognises the loop perfectly. (NOTE: Don't do this for the horn sample!)

NOTE: Each time you open a .bnk with NFS Wizard, the program inserts a small click noise before the samples already contained within. So, if you made any changes to the samples, you have to reimport EVERYTHING to make sure it sounds good in the game. Tedious, isn't it?

Once you import everything, duplicate CARENG.BNK as SCARENG.BNK and fire up he game to check your result. It'll never sound 100% like the base because of HS' limited engine, though.

Correct pitch of the samples:

If you use the CLK sound files, and if you use GoldWave, here is the way to make the samples have correct transitions in the game:

High rpm: pitch must be in a way that, when increased to 135%, you hear the max rpm sound (using manual gearbox).
Mid rpm: 75% of high rpm.
Low rpm: 60% of high rpm (could be less, haven't tested much).
Idle: Obviously the same pitch as the source.

Oh and before I forget my tutorial is for MANUAL gearbox. If you use auto the game increases the pitch of the samples, but it'll still sound correctly.

XJ220

Nice post :)

One thing, though. NFS Wizard can import any file you want it to. It'll just not appear in the file dialog, but you can simply type in the filename or even 'car' only and you'll get suggestions. Click CARENG.CTB / CARENG.LTB and directly import the respective file.

I wonder whether the 'TB' in those extensions stands for 'table'?

Zpectre

Quote from: XJ220 on Jan 03, 2012,  5:01 AM
Nice post :)

One thing, though. NFS Wizard can import any file you want it to. It'll just not appear in the file dialog, but you can simply type in the filename or even 'car' only and you'll get suggestions. Click CARENG.CTB / CARENG.LTB and directly import the respective file.

I wonder whether the 'TB' in those extensions stands for 'table'?

Really? I never imported the ctb and ltb files because I didn't know they could be imported! Still, it makes it definitely easier to make car sound packs because you can just pick the files and import them instead of more cumbersome alternatives...

There's more that needs to be written but I don't know exactly when I'll do it... I've been thinking about converting the sounds from other games like Shift, GTL and GTR2 to NFS4 since they're easy to do and much easier than creating sounds from scratch... Not _much_ easier though since NFS4 has some limitations. But, it's certainly better than having Camaro sounds for the Viper and other cars though!

AJ_Lethal

lol@atshittyoldversion.

Good to see you around, man. BTW, I might pick the sound recording/editing part of the old tutorial one and adapt it to Audacity.

Zpectre


FranknFurter

Quote from: ZpectreNOTE: Each time you open a .bnk with NFS Wizard, the program inserts a small click noise before the samples already contained within. So, if you made any changes to the samples, you have to reimport EVERYTHING to make sure it sounds good in the game. Tedious, isn't it?

Seen this thread only now, a little late sry. but was before my time here .. ;)
You say there something, that added 'click' noise is very annoying, and what you suggest to reimport all samples and save again wouldn't change that, tried that too ..

I noticed that when altering for example siren.BNK, the click noise will remain as you can see that when you reopen the altered BNK file and even if you export again and cut off that click noise, reimport HS adds it each time again .. :-\

On Car engine sounds it's not that evident since first sample is always shifting gear sound but in 'siren.bnk' first sample is U.S. siren 'wail' sound so it will be repeated each time when that sound is reloaded (even if you define the beginnig of loop differently behind the 'click') when for example change camera or Police car gets out of reach and is getting closer again :(

That's a well-known issue on HS sound editing but as you already stated and there's no other way yet to import .wav to BNK files? .. or is there any other tool still I haven't heard of? ... :P

Zpectre

Reimporting works, but of course you can't reimport the samples as-is. :P You have to manually delete the click in your favorite sound editor, which is a 30-second job, but annoying nonetheless. :(

This is a bug with NFS Wizard, no way around it other than manually fixing the samples and importing them again. NFS Wizard is quite limited in what it can do with the banks, and doesn't even work for most NFS3 sound editing. It cannot open the sound banks containing police speech either.

FranknFurter

yes noticed that, and it even crashes when trying to open 'gen.bnk' what is pity since that contains all the environmental sounds but seems too large for NFSWizard or that one uses different audio codecs that NFSWizard cannot decrypt .. ???

.. you mean reimporting all samples again? I only reimported the first sample again after I cut off the click noise in sound editor .. :o

You are well aware that 'siren.bnk' contains more than fourty samples? >:( ??? :P :'(

noise

In addition to files NFSWizard can't open.

I always wondered about the showcase file (sh----.qfs) in data/showcase/art path.
It's needed to get the showcase button working ''in game'', but NFSWizard can't open it.

AJ_Lethal

Quote from: noise on Mar 05, 2017,  9:39 AM
In addition to files NFSWizard can't open.

I always wondered about the showcase file (sh----.qfs) in data/showcase/art path.
It's needed to get the showcase button working ''in game'', but NFSWizard can't open it.
sh****.qfs files are literally empty files, that's why NFSWizard can't open them.

Zpectre

Quote from: FranknFurter on Mar 04, 2017,  8:48 PM
yes noticed that, and it even crashes when trying to open 'gen.bnk' what is pity since that contains all the environmental sounds but seems too large for NFSWizard or that one uses different audio codecs that NFSWizard cannot decrypt .. ???

.. you mean reimporting all samples again? I only reimported the first sample again after I cut off the click noise in sound editor .. :o

You are well aware that 'siren.bnk' contains more than fourty samples? >:( ??? :P :'(

I think that's the case, but never tried doing it with siren samples. :(

Paul Spain

Quote from: Zpectre on Mar 05, 2017, 11:18 AM
Quote from: FranknFurter on Mar 04, 2017,  8:48 PM
yes noticed that, and it even crashes when trying to open 'gen.bnk' what is pity since that contains all the environmental sounds but seems too large for NFSWizard or that one uses different audio codecs that NFSWizard cannot decrypt .. ???

.. you mean reimporting all samples again? I only reimported the first sample again after I cut off the click noise in sound editor .. :o

You are well aware that 'siren.bnk' contains more than fourty samples? >:( ??? :P :'(

I think that's the case, but never tried doing it with siren samples. :(

Your police sirens are:

1.U.S./Canada Wail
2.U.S./Canada Yelp
3.U.K. Yelp
4.France Hi-Lo
5.Germany Martinhorn

The other sounds are radio SFX,the spike belt being laid,and the chopper. I don't know why no one found a way for N.F.S. Wizard to be able to delete the extra Siren.Bnk files you don't need on some mods, Like say you want to mod U.S. to Wail only or Yelp only yet you can't accurately as when you do if you import which ever into sample 2 it then lopps that part in reverse sounding wierd. Had someone found a way to delete extra non needed sirens or even be able to move which country round each siren is for (like making U.K. have 2 sirens instead of 1) it would allow much more accurate siren modding.

On one of my DDR Presston 7512 sirens I did (and NOT easily) manage to squeeze in both Wail/Yelp tones on it for Germany but if one could move the 2 siren space for U.S. to Germany it would sound better, Also Kent Traffic cop made a great U.K. siren pack some years back that would sound great if you could move the U.S. siren slot to U.K. Maybe someday someone will find a way to make N.F.S. Wizard do this.
NFS HighStakes is the best

pete9516

Hello guys, first off, thank you very much for this tutorial, Zpectre.
But i'm having a problem: I just don't get a satisfying loop together. I did it as you wrote in your tutorial, the samples should do the trick, i edited them in Audacity, but with no success. The thing is, i can't show you my loops because of when i open the careng.bnk there's gonna be that click that displaces every sample in the .bnk
But anyway here's what i did so far:
EDIT: I forgot to say that i'm using the base of the Porsche 911, but in the meantime i did the same with the CLK-GTR. Same effect, only a bit different though

MADMAN_nfs

Hello pete9516,

the EA audio format never was fully decrypted and some bnk-files cannot be opened at all. Thus tools for audio editing are prone for glitching out, i.e. crashing or corrupting the file. This also means EAX mode (sound options) should be avoided when using modded audio; stereo mode is reliable from my experience. This annoying click noise it is a bug in the audio importer/editor of NFS Wizard obviously, as mentioned before:
Quote from: Zpectre on Mar 04, 2017,  8:43 PM
Reimporting works, but of course you can't reimport the samples as-is. :P You have to manually delete the click in your favorite sound editor, which is a 30-second job, but annoying nonetheless. :(

This is a bug with NFS Wizard, no way around it other than manually fixing the samples and importing them again. NFS Wizard is quite limited in what it can do with the banks, and doesn't even work for most NFS3 sound editing. It cannot open the sound banks containing police speech either.
Quote from: FranknFurter on Mar 04, 2017,  8:48 PM
yes noticed that, and it even crashes when trying to open 'gen.bnk' what is pity since that contains all the environmental sounds but seems too large for NFSWizard or that one uses different audio codecs that NFSWizard cannot decrypt .. ???

.. you mean reimporting all samples again? I only reimported the first sample again after I cut off the click noise in sound editor .. :o
You are well aware that 'siren.bnk' contains more than fourty samples? >:( ??? :P :'(
Summing up the mentioned work-around:
- First you need to export all samples from your EA source bnk-file to a seperate folder.
- A click is added, to all audio samples inside, everytime a bnk-file is opened. Cut any clicks in the exported wav-files with mastering-software (e.g. Audacity).
- Newly imported samples are not effected. So you have to reimport ALL wav-files before saving, everytime you make a change to the bnk-file (including loop editing).
This might sound tedious, but works for me - since the data is processed/compressed to bnk, using "Hex-Magic" to fix the file seems no option here, unfortunately.
Last desperate measure i can think of, not to loop the 1st sec of the sample (so the click stays well outside the loop area).
Hope this solves your issue.

Greetings

BTW: Since this topic was meant as tutorial, i suggest to make a seperate project thread, if you have further questions.

edit PS: just found another NFS3/4 audio editing thread in the Help/F.A.Q section.
NFSAddons Forums »Need For Speed Forums »Help/F.A.Q »NFS III/IV Engine "Click" noise
Seems Theycallmebk14  gone through a "Click-Noise"-odyssee. He draw pretty similar conclusions regarding bnk files, might be helpful.


tatarusss

Hi guys!
Thanks for the info, but I still have that clicking issue on Sample#1.

Here's what I do (just an example):
- Open EA's stock CARENG.BNK from Corvette with NFSWizard 0.5.7.9. No click in gearshift Sample#1, obviously.
- Import new WAV file (with NO click in it) instead of Sample#1. Still no click heard when played in NFSWiz.
- Save and close the BNK.
- Import BNK into car.viv.
- Launch the game, hear the click on gearshift sound.

If just importing a fresh wav into a stock CARENG file produces the click, then there's no way to avoid it?
I mean, exactly the gearshift Sample#1 will always have the click in any custom CARENG file?

BTW, it doesn't allow to set loop boundaries for Sample#1 either.

Or am I doing something wrong here?
Any suggestions?