Re: how to produce the sound of a car ?

Hello Jerome!

Unless I misunderstood and you want the sound of a car breaking, granular
synthesis is what you need. Granular synthesis is based on overlaying the
same sample over itself at an interval small enough to produce an audible
frequency. This is actually how car sounds are formed in reality as well,
the piston pumping inside the cylinder forms overlapping sounds. There are
quite a few papers written about simulating car sounds, but afaict most of
them are non-free, so I suggest a visit to your local library, especially
if you have a university library nearby. But to get the idea, [1] [2] are
good starting points.

I have a naive granular sampler implementation in my audiolib.js, but it's
very inefficient and would require optimization to work reliably at
simulating a car engine. With Web Audio API, you could use the
BufferSourceNode to overlay the samples, maybe using noteGrainOn or just
start depending on what you have to go with. Maybe Chris has a better idea
of a good way to achieve granular synthesis with Web Audio API?

Jussi

P.S. If I misunderstood and you want the sound of an engine breaking, I
think you'll want Sound Modeling, too bad I don't have any links to share,
but I remember coming across a cool piece of software for exactly this
purpose (you could insert 3D models into the program and it would calculate
what would happen if you smashed it with a hammer and what it would sound
like, etc)

P.P.S. You're approaching one of the game industry's most precious secrets,
tread carefully. ;)

[1] http://en.wikipedia.org/wiki/Granular_synthesis
[2] http://www.granularsynthesis.com/guide.php

On Tue, May 8, 2012 at 5:14 PM, Jerome Etienne <jerome.etienne@gmail.com>wrote:

> Hi,
>
> I am playing with cars, and would like to produce the sound of the
> car. such as engine, break. I mostly understand the Web Audio API
> itself. But i lack the experience in designing the sound. Any hint on
> producing car sounds ?
>
> Jerome
>
>

Received on Tuesday, 8 May 2012 15:31:28 UTC