To faithfully encode complex stimuli, sensory neurons should correct, via adaptation, for stimulus properties that corrupt pattern recognition. Here we investigate sound intensity adaptation in the Drosophila auditory system, which is largely devoted to processing courtship song. Mechanosensory neurons (JONs) in the antenna are sensitive not only to sound-induced antennal vibrations, but also to wind or gravity, which affect the antenna's mean position. Song pattern recognition, therefore, requires adaptation to antennal position (stimulus mean) in addition to sound intensity (stimulus variance). We discover fast variance adaptation in Drosophila JONs, which corrects for background noise over the behaviorally relevant intensity range. We determine where mean and variance adaptation arises and how they interact. A computational model explains our results using a sequence of subtractive and divisive adaptation modules, interleaved by rectification. These results lay the foundation for identifying the molecular and biophysical implementation of adaptation to the statistics of natural sensory stimuli.