A model was developed for estimating the pitch of complex sounds that are partially masked by background sound. Our ultimate aim is to obtain a model that can separate two simultaneous sounds on the basis of the harmonic structure of at least one of the sounds. The MDWS model is an extension of the Duifhuis, Willems, and Sluyter pitch meter (DWS) [J. Acoust. Soc. Am. 71 1568-1580 (1982)] which is a practical implementation of Goldstein's optimum processor theory of pitch perception [J. Acoust. Soc. Am. 54, 1496-1516 (1973)]. The main modifications incorporated in MDWS consist of a more faithful modeling of auditory frequency analysis and of an alteration to the criterion used to decide which fundamental best fits a set of resolved component...