How does matter affect sound?
Sound travels as a longitudinal wave. These waves must have physical matter to transmit them.
The closer the particles are together, the faster sound will travel. Sound will NOT travel through a vacuum.
Sound travels rather poorly through air because air is a gas and because gases are not very dense, the particles are far apart, and they move around very rapidly, thus making propagation of sound waves difficult.
Solids have particles that are closer together and the particles are much more neatly organized. Thus, sound waves travel faster through solids than through liquids; and through liquids faster than gases.