Pitch is a complex hearing phenomenon that results from elicited and self-generated cochlear vibrations. Read-off vibrational information is relayed higher up the auditory pathway, where it is then condensed into pitch sensation. How this can adequately be described in terms of physics has largely remained an open question. We have developed a peripheral hearing system (in hardware and software) that reproduces with great accuracy all salient pitch features known from biophysical and psychoacoustic experiments. At the level of the auditory nerve, the system exploits stochastic resonance to achieve this performance, which may explain the large amount of noise observed in the working auditory nerve.