When a xylophone bar is struck, it vibrates at its natural frequency, which is determined by its length, density, and material properties. The longer the bar, the lower the natural frequency and the lower the pitch of the sound produced. This is because the longer bar has more mass and therefore requires more energy to vibrate at the same frequency as a shorter bar. As a result, the longer bar vibrates at a slower rate, producing a lower pitch.
The same principle applies to other vibrating objects, such as strings, columns of air, and membranes. In general, the longer the vibrating object, the lower the pitch of the sound produced. This is an important concept in music and acoustics, and it is used to design and tune instruments to produce specific pitches.