A xylophone keyboard and mallets
A xylophone produces sound when its wooden or composite material bars are struck with a hard rubber or plastic mallet. The pitch of each of the bars is determined by the length of the bar: Longer bars have a lower pitch; shorter bars have a higher pitch. The bars are tuned to the standard 12-note chromatic scale, and are arranged on the frame of the instrument like a piano keyboard, with the "black keys" raised above and overlapping the "naturals."
Cross-section of a xylophone
The bars of the xylophone are tuned not only by their length, but by cutouts on the underside of each bar. This allows precise tuning, and the hollow area under the center of the bar is more resonant than a solid slab of wood would be. In addition, resonator tubes are often suspended beneath each bar, tuned to the frequency of the bar. This reinforces the sound of the note when it is struck. To ensure that the bars vibrate freely, they are suspended on the frame of the xylophone by strings that run through each individual bar.