When the motorcycle is moving towards the observer, the sound waves are compressed, resulting in a higher frequency. This is because the motorcycle is moving in the same direction as the sound waves, so the waves are "bunched up" in front of the motorcycle. This phenomenon is known as the "approach phase" of the Doppler effect.
Conversely, when the motorcycle is moving away from the observer, the sound waves are stretched out, resulting in a lower frequency. This is because the motorcycle is moving in the opposite direction of the sound waves, so the waves are "spread out" behind the motorcycle. This phenomenon is known as the "recession phase" of the Doppler effect.
The amount of frequency change depends on the relative velocity between the motorcycle and the observer. The faster the motorcycle is moving, the greater the frequency change will be. Additionally, the angle between the direction of the motorcycle's motion and the line of sight between the motorcycle and the observer also affects the frequency change. The closer the motorcycle is to moving directly towards or away from the observer, the greater the frequency change will be.
In summary, the relative motion of a motorcycle affects the frequency of sound heard by an observer on the sidewalk due to the Doppler effect. The approach phase of the Doppler effect causes a higher frequency when the motorcycle is moving towards the observer, while the recession phase causes a lower frequency when the motorcycle is moving away from the observer.