Perception of Pitch
Hair cells in different parts of organ of Corti are activated by sound waves of different frequencies. When the sound is composed of many frequencies, several populations of hair cells are activated simultaneously, resulting in the perception of multiple tones.
Detection of Loudness
Loudness is really a measure of the intensity of sound. Lower intensity of a particular frequency will oscillate the corresponding portion of the basilar membrane less. This would translate into fewer action potentials generated per hair cell per second. This in turn would be interpreted as less loud sound.