When an oscillator (the buzzer) moves toward you, in effect, it is catching up slightly with its own sound waves. With each successive pulse of the buzzer, the sound source is a little closer to you. The result is that the waves are squeezed together, and more of them reach your ear each second than if the buzzer were standing still. Therefore, the pitch of the buzzer sounds higher. As the buzzer moves away from you, fewer waves reach your ear each second, so the resulting pitch sounds lower. The frequency of the buzzer itself does not change in either case.
For your ears to detect this effect—called the Doppler effect—the sound source has to be moving toward or away from you at a minimum speed of about 15 to 20 mph (24 to 32 kph). As the source moves faster, the effect becomes more pronounced.
If the buzzer has a frequency of 100 hertz, and it is moving toward you through still air at 35 meters per second, then the pitch you hear will be 110 hertz. This result comes from the equation
pitch = f/(1–v/vs)
where f is the frequency, v is the speed of the sources of the sound, and vs is the speed of sound, which is 350 meters per second. If the object is moving away from you, simply replace the minus sign with a plus sign.