Car sounds

 

Home Make the car sound like one.


Dolphinity Organiser - free planning and organizing software for all your todo and action lists

Introduction

Car sounds are immensely important to a car. A car that sounds like one enhances the experience greatly.

For more information on car settings, check out the car physics reference guide.

You can specify a number of samples for the car. The files will be searched in the car's directory, and data/audio if the file isn't found locally in the car directory. Typical types of sounds are:

Racer v0.5.1 brings a big audio update, and as a result the audio properties of a car are now stored in a single audio subtree. Each type of audio is not just a single sample, but a set of samples (called an audio set). Depending on the audio set, different inputs determine how these samples are played back. For example, the engine sounds are mixed based on engine RPM, the throttle pedal and engine braking. The skid set is however used according to a skid amount. The precise way this is done is determined in the software.

The rest of this section explains the v0.5.2+ audio system.

Volumes are determined in 4 steps (apart from your system's audio board volume settings): each audio set has a master volume, which is used to downmix different audio sets (for example, if the skid sound is too loud in comparison to the engine, you might reduce the audio.skid.volume parameter).
Inside each set, all samples have a sample volume, defaulting to 1. An example would be audio.accelerate_in.smp0.volume=0.9. This volume is used to downmix samples within a single audioset, in case for example one engine sample is a bit louder in comparison to other engine samples in the same audioset.
Then, internally in Racer, each sample is mixed based on an input value. For the engine this is the RPM for example. This is used to fluently go from one sample (for example sampled at 2000rpm) to the next (samples at 5000rpm perhaps), without switching hard from one to the other. This gives a more gradual change in sound. See min/max/natural below.
Lastly (also internal to the software) a dynamic volume is used to determine if an audioset should be on or off. If the engine is off for example, all dynamic volumes for the engine audiosets are set to 0. If the engine is on, this volume goes up to a maximum of 1, depending on for example throttle (that's handled in the software).
This gives you an end volume formula that is: playbackVolume=masterVolume*sampleVolume*mixVolume*dynamicVolume.

Each set can contain a maximum of 10 samples. Here's an overview of car-specific audio sets:

Group Set (audio.<setname>) Sample determined by Notes (NYI=not yet implemented)
Engine accelerate_in RPM Inside car
  decelerate_in RPM Inside car
  accelerate_out* RPM Outside car
  decelerate_out RPM Outside car
  throttle_on random NYI, Turbo woosh...
  throttle_off random NYI, Unburnt fuel
  reverse_in RPM NYI, Driving in R (reverse gears are often more crude, so make more noise)
  reverse_out RPM NYI, Driving in R outside car
Car brake_squeal   NYI
  bottom_out random NYI, Suspension bottoms out
  gearwhine driveline rotational velocity

The driveline rotation sound. It's based on a rotational velocity, where you can expect values between 0 (standing still) and around 500 (driving fast).

This audio set is used when the driveline is loaded (accelerating).

  gearwhine_off driveline rotational velocity (v0.8.1+) This gearwhine is selected when the car decelerates. If not gearwhine_off sound is specified, all gearwhine sounds will be defined from the 'gearwhine' audioset above.
  skid slip amount

skid.sample=lateral skid, skid.sample2=longitudinal skid

v0.8.1 changed this to a full skid audio set, where you can use multiple samples based on a 'skid amount' internal variable. This skid amount varies from around 0 to 1 in normal sliding, values 1..10 for really skidding.

This allows you to add a 'scrubbing' sound for mild skidding, then progressing to screeching and screaming as the slip amount goes up.

Skid samples are not pitch-bended (in contrast to engine samples).

Environment wind car velocity vs wind velocity Wind sounds can add greatly to realistic sounds for most car.
  collide impact velocity NYI - crash samples will be handled globally (not per-car) and are differentiated in car-track and car-car samples.

* accelerate_out is the most important engine sound. The sets concerning the engine that are not defined will fall back to use accelerate_out to avoid silence.

Surface sounds (defined in racer.ini). Note that most sets will only have 1 sample, which might be good enough for most surfaces.

Surface Set Sample determined by Notes
Road audio.road Car velocity Default surface
Gravel audio.gravel Car velocity  

 

The engine sound is divided into 4 separate sets:

Every set will have a number of samples, each sample having a number of properties, indicating when it is to be used. Normally, most samples will be turned off. The maximum number of samples is currently set at 10, so you can have a smooth transition for every situation (accelerating or not, inside or outside of the car). An example audio fragment:

audio
{
acc_all
{
attack=100 decay=100 } accelerate_out { ; Master volume for this set (0..1) volume=0.9 smp0~audio.acc_all { ; Volume for this sample; this sample was a bit loud compared to smp1 volume=0.9 sample=low_revs.wav min=0 max=2000 ; The engine in the sample was running 1000rpm natural=1000 } smp1~audio.acc_all { sample=med_revs.wav min=2000 max=4000 natural=3000 } } wind
{
; Pitch determination; slightly rises with car velocity
pitch_scale=0.2
pitch_offset=50
smp0
{
sample=wind.wav
; Speeds in m/s; in this case just 1 sample from 0..200m/s
min=0
max=200 ; The wind was blowing 50m/s when recorded
natural=50
}
}
}

Each sample (smp<x> trees) explained in more detail:

Input values (that modify either pitch or volume) vary like this:

Every sound set has a number of properties:

Example: skid sounds in v0.8.2+

An example of the skid sound system as defined from v0.8.2 onwards. The explanation follows below.
audio
{
...
  skid
  {
    ; Master volume for this set
    volume=1
    ; Acceleration; outside of the car
    smp0
    {
      volume=1.0
      sample=slipping.wav
      min=0.1
      max=0.6
      attack=0.09
      decay=1.0
    }
    smp1
    {
      volume=1.0
      sample=squealing.wav
      min=0.3
      max=20
      attack=0.2
      decay=0
    }
 }

The skid volume is determined through a normalized 'skid' amount, which goes roughly from 0 (no skid) to 1 (skidding) to 10 or more (severe skidding).

 


Organiser -planning, organiser and time billing software

(last updated May 28, 2010 )