Equal pitch need not mean equal frequency spectrum. For an ideal periodic sound wave of fundamental frequency , a Fourier series has the form
Changing relative amplitudes changes the waveform and generally its timbre without changing its fundamental period. Attack, decay and the time evolution of the frequency spectrum also matter for real musical notes.
The middle ear transfers vibration into the cochlea. The basilar membrane supports a frequency-selective travelling wave: higher-frequency responses occur nearer the base and lower-frequency responses nearer the apex. Hair cells in the organ of Corti transduce mechanical stimulation into signals transmitted through the auditory nerve. Different spectral and temporal patterns therefore produce different sensory-activity patterns.[ref]
This supplies a physical basis for timbre discrimination. It does not make the cochlea a set of independent strings, nor does excitation position alone explain every perceptual distinction: the cochlear amplifier and temporal neural coding also contribute.