The online racing simulator
Discussion: Sampled sounds vs synthesized sounds and an experiment
Hopefully this topic has not been beaten to death. I'd like to discuss the pros and cons of synthesized vs sampled sounds engines in a peaceful fashion. I realize at this stage in the game the developers are not going to change the LFS sound engine. That's not what this topic is about.

With that said, last night I had an interesting idea. Since Outsim already provides RPM data, we're actually free to create our own sound engine. I know absolutely nothing about audio and even less about audio programming - I know that libraries such as DirectSound and OpenAL "exist" and that's about it. So I started digging around looking at various resources and this is what I found.

First, I learned the basics about sample based systems... cross-fading loop based samples, changing the volume/pitch, etc. Then I downloaded this neat tool called FMOD Designer. It's free to download here:

http://www.fmod.org/index.php/download

To my surprise, it actually has a Car Engine sound system built into the thing! I attached a screenshot below. You can insert engine samples from real cars under load, off load, low, mid, high rpm, and play around with the different cross fading techniques, etc. Really cool. Also interesting is that "load" is not an input. It's just derived from the RPM change with a smoothing factor (which is good because I don't think engine load is provided through outsim). If anyone plays around with it, if you click the tiny white bar that represents the current load, it shows you the load volume curve which isn't visible otherwise. My first thoughts were, this doesn't really seem like it would be too difficult to program at all. The biggest issue would probably be getting good samples.

Recording quality sound is another thing I know nothing about. Hell after 2 years I couldn't even get my in-car camera mic working properly... I found this article here on recording audio from cars:
http://www.gamasutra.com/view/ ... gine_sounds_for_games.php

It turns out the author is responsible for the sounds in iRacing and most other racing games. It seems like most recordings are done on a dyno with the mics placed inside, by the exhaust, and near the intake. Since I have no access to a dyno nor do I want to spend even more money I'd have to record the samples on a highway or something. I'm not exactly sure how I'm going to get a sample in 6th gear under load at high rpm though... without factoring in wind by the exhaust and whatnot. The article is a little old and although DAT may still be used I thought solid state would be a better/cheaper alternative. I found this site here after a bit of digging:

http://www.soundprofessionals.com

It looks like even on the lower end, it's still going to cost ~$350 to get quality stereo samples for my dumb experiment.

http://www.soundprofessionals. ... /item/TAS-DR-1-MIC-BUNDLE

Here's some other interesting reads I came across:
http://forum.racesimcentral.com/showthread.php?t=124451
http://www.developmag.com/tuto ... 41/Heard-About-Sega-Rally

So I guess my only question is, am I wasting my time and money? After playing iRacing for a couple of weeks I'm convinced that sample based sound systems can definitely sound good even if synthesized sounds are ideally what all sims should pursue. Could this possibly be a good community based project?

Discuss.
Attached images
fmod.png
A lot of that went over my head but if somebody has access to a dyno and a couple cars sounds like an awesome idea to me.
#3 - emqu
Could anyone point me to some detailed info of the sound synthesis used in lfs?
I know a bit about synthesis techniques from a musical background and bugger all about audio implementation in games.

Some sound synthesis techniques can create noises others just cant, for example, a true analogue synth sounds nothing like a wavetable synth which sounds nothing like a granular synth which sounds nothing like a physical modelling synth.......blah blah.

ty

M
#4 - bbman
You even have the tool to implement it in LfS already (if it still works):
http://www.lfsforum.net/showth ... p;highlight=sound+remixer

Samples (when done right) will sound very good, at the expense of being "flat" - there isn't just as much information in it as with synthesized sounds... Problem with the latter is a tiny change can (and most likely will) make a huge difference on the output, which is why they are way harder to realise...
Quote from emqu :Could anyone point me to some detailed info of the sound synthesis used in lfs?
I know a bit about synthesis techniques from a musical background and bugger all about audio implementation in games.

Some sound synthesis techniques can create noises others just cant, for example, a true analogue synth sounds nothing like a wavetable synth which sounds nothing like a granular synth which sounds nothing like a physical modelling synth.......blah blah.

ty

M

LFS' sound system generates the car sounds from a single very short base sample. It runs this sample through a series of filters which simulate different aspects of the car's engine. You can access LFS sound editor by pressing Shift-A ingame. For example see attachment. (FZ5_test_sample.mp3 was originally a wav file, but you get the idea, it may be too short for some mp3 players).

@OP: I think if Scawen would spend some time upgrading LFS' sound system it really could provide high quality and very informative, dynamic sounds.
Attached files
FZ5_test_sample.mp3 - 1.3 KB - 223 views
FZ5_car_sound_test.mp3 - 95.2 KB - 258 views
#6 - emqu
Quote from _--NZ--_[HUN] :LFS' sound system generates the car sounds from a single very short base sample. It runs this sample through a series of filters which simulate different aspect of the car's engine. For example see attachment. You can access LFS sound editor by pressing Shift-A ingame. (FZ5_test_sample.mp3 was originally a wav file, but you get the idea).

I honestly thought it was pure synthsis (tbh LFS sounds like an FM synth) and was going to suggest the above may yield better results.

LFS sound lacks grit imo (best description i can come up with), its very detailed and communicative but it just lacks something other titles have in abundance, perhaps too much.

I notice the sound quality takes a big hit from the inital waveform to the final output, maybe the quality of the filters used could be bettered?

Many audio applications relating to music provide support for 3rd party effect/synth plug-ins (some of these plug-ins sound identical to the hardware they are copying), its almost a standard feature now, so the technology to implement any form of synthsis in a game is here.
Quote from emqu :I honestly thought it was pure synthsis (tbh FLS sounds like an FM synth) and was going to suggest the above may yield better results.

LFS sound lacks grit imo (best description i can come up with), its very detailed and communicative but it just lacks something other titles have in abundance, perhaps too much.

I notice the sound quality takes a big hit from the inital waveform to the final output, maybe the quality of the filters used could be bettered?

Many audio applications relating to music provide support for 3rd party effect/synth plug-ins (some of these plug-ins sound identical to the hardware they are copying), its almost a standard feature now, so the technology to implement any form of synthsis in a game is here.

IIRC Before patch V LFS used pure synth engine sounds, but only Scawen knows this for sure. I think LFS sounds can be improved in LFS' current state. It's just not a very easy task to make a sound which sounds good on most computers and doesn't clipping like hell (like a lot of custom sounds on LFS forum). As I said I'm sure if Scawen would take the time to improve engine modelling and sound generating we could have very nice and detailed sounds but there are far more important things to do before the sounds get reworked.
#8 - emqu
I understand other things will take priority in LFS but its always good to think before acting, discussion about sound in games prior to any attention given to the sound engine in LFS can only be productive.

From the moment i first fired up LFS i was intrigued by the noises i was hearing, just taking this opportunity to build on what i already know and maybe have some input.

m

edit: the more i think about sound in race sims the more my head hurts, if i could put some of the ideas i have at the moment in a sim i fear you would have no computing power left to run the thing, would sound shithot tho
Quote from bbman :You even have the tool to implement it in LfS already (if it still works):
http://www.lfsforum.net/showth ... p;highlight=sound+remixer

Samples (when done right) will sound very good, at the expense of being "flat" - there isn't just as much information in it as with synthesized sounds... Problem with the latter is a tiny change can (and most likely will) make a huge difference on the output, which is why they are way harder to realise...

Thanks! Hmm... this looks like it does everything I was hoping to do actually
#11 - Juls
Car Sound Remixer, with a good sound pack (there is one in the thread) gives very good results.

The difference between LFS and other sims concerning sound, is that LFS builds car sound from a lower level. LFS is a sample based system too, but samples used represent basic components of car sound. Then lots of filtering and combining is needed to build the overall sound.

Other sims use higher level samples, containing already most of the engine sound, but still have to alter these samples, change their tone and frequency, mixing them.

For me the best solution would be something between LFS and other sims. More synthetized than other sims, but based on richer samples than LFS:

- a high level system based on rich samples.

- many more samples than used today in sims, for many more conditions (various levels of throttle, revs decreasing or increasing...etc)

- more filtering, not only frequency scaling of samples as now, but more advanced adjustments in frequency domain.
Starting from a limited subset of samples, the sound engine could generate many more synthetized samples at initialisation time with scrambling/frequency adjustments....etc.


In fact the main problem with LFS approach is that engine sound is far more than a serie of explosion sounds. Explosions in cylinders are the source of broad band mechanical vibrations, and these vibrations will use all parts of the car to output sound.

Many parts of the car engine are resonnant, and will output a sound at their resonnance frequency when they receive these vibrations, at very different frequency than the revs.

Trying to recreate engine sound from one explosion sound is a bit like trying to recreate a piano sound from recording the noise of the hammer hitting the rope. It ignores resonnant parts which account for most of the sound.
Quote from Technique : After playing iRacing for a couple of weeks I'm convinced that sample based sound systems can definitely sound good even if synthesized sounds are ideally what all sims should pursue. Could this possibly be a good community based project?

Discuss.

Having some background interest in audio, (both as a recreational drummer and hi-fi buff), I don't actually agree that sythesized sounds are the way to go for a realistic driving sim. Samples are by far much higher quality and truer to original than any synth sound will be, and as you have found out already can be manipulated quite readily. The only issues are obtaining the correct samples in the first instance and then applying the correct manipulation.

On the point of not being able to record a car in 6th gear under load, there is no need. The engine has no idea what gear you're in, it will sound the same under load in 1st gear as it would in 6th gear for the same "load" percieved. However just using rpm as the control for producing engine sounds is never going to be completely accurate. You need to factor in throttle too as an engine often sounds completely different on the overrun than under load and neutral throttle positions.
#13 - Woz
For me its a matter of depth. Samples give more instant wow factor but can never give the detail of a synth based system. I love the way you can hear the engine bog down when you bodge using the clutch and also hear the engine try to spin up and rev match if you fail to do it yourself
One thing which LFS (amongst other sims) is missing is the fact that cars sound a lot different depending on their orientation to you. If you ever hear a racing car drive past you, as they approach you head on most of the the sound is dominated by the whirring of the gearbox, then as it passes, its mostly noise directly from the engine, then once it's past, the sound is mostly from the exhaust, all three sounding very different.
Quote from Woz :For me its a matter of depth. Samples give more instant wow factor but can never give the detail of a synth based system. I love the way you can hear the engine bog down when you bodge using the clutch and also hear the engine try to spin up and rev match if you fail to do it yourself

But those things are just a matter of gaining the correct samples. A samples based system does not have to rely on a single sample for all occasions. Various engine scenarios can be reproduced using various samples. That's why simple rpm inputs are not nearly enough as inputs for sample modification.

Engine sounds, are extremely complex. The problem with synthesising is that you are never going to accurately recreate a real engine sound through hit and miss manipulation. The only way to do it accurately through synthing would be to do an spectrum analysis of the sound of an engine and then use the synth to recreate that exact audio spectrum. What's the point? when that's exactly what a sample is doing anyway?

I think what people maybe don't understand is that there is absolutely no difference between the ability to manipulate sampled and synthesised sounds. The sole difference is the waveform you start with. With synthing you have to create the original "car sound" waveform before you can manipulate it to model the differing scenarios. With samples that whole first stage is done for you, all you have to do is pick the correct sample and then manipulate it. The advantage is that you are starting off with a realistic sound in the first instance, where as with synthing you're just guessing.
Quote from Crashgate3 :One thing which LFS (amongst other sims) is missing is the fact that cars sound a lot different depending on their orientation to you. If you ever hear a racing car drive past you, as they approach you head on most of the the sound is dominated by the whirring of the gearbox, then as it passes, its mostly noise directly from the engine, then once it's past, the sound is mostly from the exhaust, all three sounding very different.

Very true and a perfect example of why multiple samples are required in a samples based system.
#17 - Jakg
LFS is sampled, but rather than the samples used in other games (i.e. recorded direct from a car) it uses an "explosion" sample used to simulate the sound of the explosion in the cylinder, which is then (i assume) tweaked to make it sound like it's gone through the exhaust system etc.

Synth doesn't have to sound bad (as Todd proved with his simulated engine apps he made a while ago which I can't find now), but I just think no-one on the LFS team really has the experience required to do this...
Quote from gezmoor :...truer to original than any synth sound will be,.

Depends what you mean by 'truer'... Samples will always sound something like a real car, but by their very nature, this representational quality will deteriorate the further you push the sample from its originally recorded frequency rate.

If, however, you model the entire chain of processes (from stabbing the throttle to hearing the engine response) through synthesis, although it may not sound like any car, the feedback response may well be the 'truer' representation and offer nuances that are so desperately needed in the feedback starved environment of a two dimensional image devoid of g-forces.
Quote from gezmoor :The advantage is that you are starting off with a realistic sound in the first instance, where as with synthing you're just guessing.

Not entirely true, since most sample based sound engines cross fade samples from a known rev range - this simply ignores all sorts of sonic nuances in favour of 'recognisability'.

By synthesising, you are not guessing. You are analysing a process and attempting to model it objectively, without presupposing what it should sound like.

Quote :For example, to model the sound of a drum, there would be a formula for how striking the drumhead injects energy into a two dimensional membrane. Thereafter the properties of the membrane (mass density, stiffness, etc.), its coupling with the resonance of the cylindrical body of the drum, and the conditions at its boundaries (a rigid termination to the drum's body) would describe its movement over time and thus its generation of sound.

http://en.wikipedia.org/wiki/Physical_modelling_synthesis
Quote from nihil :Not entirely true, since most sample based sound engines cross fade samples from a known rev range - this simply ignores all sorts of sonic nuances in favour of 'recognisability'.

By synthesising, you are not guessing. You are analysing a process and attempting to model it objectively, without presupposing what should be there.


http://en.wikipedia.org/wiki/Physical_modelling_synthesis

Fair point, but it's possible to multilayer sample sounds too which can vary the characterstics of the sampled sounds rather than a simple frequency shift type manipulation. Samples can just as easily be filtered and or augmented than synth sounds.

If you want to model car sound from scratch as aluded to in that article, then that is going to have the negative impact of requiring siginificant processing power just to reproduce the car sounds. Given that at the end of the day the only important requirement for sound in a racing sim are as you state the feedback relating to various car sound type rather than accuracy to any actual car is this processing over head realy required? wouldn't it be better used to get better handling/collision etc physics modelling. Samples based sound systems would surely be far less processor intensive than such a modelled system ?


Taking the example you quoted for instance. Early drum machines tried using synths and failed miserably. All drum machines now use high quality samples. But admittedly the scenario is different as there is no requirement to modify the samples, they just use a huge sample bank in order to reproduce the hundreds of differing sound that can be obtained from a single kit.
Quote from gezmoor :Samples based sound systems would surely be far less processor intensive than such a modelled system ?

Yes.

Which is why I would guess that the LFS sound engine isn't really a very hardcore physical model. We already know that it uses a sample as an impulse, so it would be a reasonable guess that the sound engine then applies a series of manipulating filters.

It would be really interesting to hear a properly implemented physical model though...
IMHO, the current model LFS uses has a more subtle deficiency than just the lack of detail or extra noises: the way it calculates available headroom before clipping and turning off the sound entirely needs to be more forgiving and discriminatory in relation to frequencies that are causing the clipping.

For example, if you use a really low frequency sample that's almost (or completely) inaudible in a high reving car (bf1) you'll notice that clipping will occur soon and all other sounds regardless of their frequency will be muted - it would make more sense if it gated sounds based on frequency bands relevant to the one that is causing the clipping or better still if it had an active compressor working as a limiter. A slightly more complicated compressor would also benefit the apparent overall volume in a as-realistic-as-possible sort of way without distortion.
Quote from gezmoor :On the point of not being able to record a car in 6th gear under load, there is no need. The engine has no idea what gear you're in, it will sound the same under load in 1st gear as it would in 6th gear for the same "load" percieved. However just using rpm as the control for producing engine sounds is never going to be completely accurate. You need to factor in throttle too as an engine often sounds completely different on the overrun than under load and neutral throttle positions.

My car sounds completely different in 1st gear than in 2nd and 3rd (from the driver's position). I don't know the technical reason why But roaring up to 9k in 1st sounds much different than running up to redline in 2nd, for example.
#24 - Jakg
Quote from Technique :My car sounds completely different in 1st gear than in 2nd and 3rd (from the driver's position). I don't know the technical reason why But roaring up to 9k in 1st sounds much different than running up to redline in 2nd, for example.

Surely that's to do with the gearbox and the tyre noise, though?
Quote from Technique :My car sounds completely different in 1st gear than in 2nd and 3rd (from the driver's position). I don't know the technical reason why But roaring up to 9k in 1st sounds much different than running up to redline in 2nd, for example.

It will be becuase 1st gear is shorter, so it goes through the revs to the redline alot faster, plus, from standstill, the engine has to make alot of effort to actually get the car moving, so it will sound slightly different.
1

FGED GREDG RDFGDR GSFDG