Game Development Reference
In-Depth Information
successive wave will arrive a little bit earlier than the previous one. This causes an
increase in frequency, which leads to the heightened pitch. At the exact moment
the police car is next to you, the true pitch of the sound is audible. Finally, as the
car begins to travel away from you, the waves will take increasingly longer to get
to you, which leads to a lowered pitch.
It's interesting to note that the Doppler effect doesn't only apply to sound waves,
but it applies to any kind of wave. Most notably, for light waves, a redshift occurs
if the object moves further away and a blueshift occurs if the object moves closer.
But in order for the shift to be noticeable, the object must either be travelling
at exceptionally fast speeds or be exceptionally far away. This won't happen at
mundane speeds on earth, so the shifts are usually only noticeable in astronomy.
In games, a dynamic Doppler effect will usually only be applied for faster moving
objects, such as vehicles. It technically could also apply to something like a bullet,
but because they're travelling so quickly, it's typically preferred to just play a
canned bullet flyby sound. Because Doppler shift results in the pitch increasing or
decreasing, it can only be dynamically implemented if a DSP pitch shift effect is
available.
Sound Occlusion and Obstruction
Imagine you're living in a college dorm. Being the diligent student you are, you're
hard at work studying your copy of Game Programming Algorithms and Tech-
niques . Suddenly, a party starts up down the hall. The music is blaring, and even
though your door is closed, the sound is so loud it's distracting. You recognize
the song, but something about it sounds different. The most noticeable difference
is that the bass is dominant and the higher frequency sounds are muffled. This is
sound occlusion in action and is illustrated in Figure 6.7(a) .
Search WWH ::




Custom Search