How does the engine sound for a car (or whatever has an engine) work?

When you increase the throttle the engine sound changes but it's never quite the same. When programming such a system what is the high level view of how it works. I know that there is some looping involved in the sound files but how do you transition when for example you change gear or you increase/decrease the throttle? How would one go about getting and preparing the sound files?

  • 1
    \$\begingroup\$ Looping sound, the faster the vehicle is moving the higher the pitch of the engine. Also take the doppler effect into account. \$\endgroup\$
    – Shaun Wild
    Jun 27, 2016 at 15:15

1 Answer 1


That's such an interesting topic, I definitely want to implement that one day, and I have given it random thought for many years.

I imagine that I would create a little library of base sounds. That is at least 3 sounds.

  1. auto-rotation sound (drive by momentum).
    This would be the sound the engine makes when not injecting gasoline (thrust pedal fully released).

  2. injection sound.
    That would be the sound of the engine when thrust is applied, or at least the component that we can add-mix over sound 1.

  3. turbo sound.
    that's a whistling sound caused by the high revs of the turbo blades which can be heard only from about 3500rpm and when gas are applied.

All 3 would have to be "tileable" like a texture, and last a very short amount of time. I guess about 350ms.
The playback will have to mix these sounds using weights according to real time driving condition, and all sounds will have a playback speed that is a linear function of RPM. (turbo is not linearly bound to main RPM but turbine RPM rather).

So anyway, a library that allows pitch/play speed adjustment is needed, and mixing.

Of course for cosmetics, 2 things on top:
1. doppler effect when using external camera
2. muffling when using in-cabin camera

the muffling could be low pass filter or something of the like.

  • \$\begingroup\$ Hmm sounds like a cool project, and a lot to keep in mind when designing such a system. Any chance that you'll open source it? \$\endgroup\$ Jun 28, 2016 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .