Unstable tones in a tonal context demand resolution to stable pitch neighbors. The stable tones serve to anchor unstable tones in their pitch neighborhood. Two constraints characterize this process of melodic anchoring: the anchor and the anchored tones are close in pitch (proximity), and the anchor always follows the anchored tone (asymmetry). Given these two constraints, anchors function like cognitive reference points, and melodic anchoring can be thought of as a special case of a more general cognitive phenomenon. This paper represents an attempt to understand the cognitive mechanisms underlying this phenomenon. The pervasiveness of these constraints is demonstrated by analyzing the use of nonchord tones in the exposition of Mozart's Piano Sonata in Eb Major, K. 282. Nonchord tones were almost always followed by a chord tone at an interval of two semitones or less, and no such stricture held for how these tones were approached or for how chord tones were followed or approached. The proposed model postulates that an unstable tone attracts auditory attention to its pitch neighborhood. The focus of frequency-selective auditory attention accounts for the pitch proximity constraint. The most active representational units in that neighborhood—typically the most stable tones—then drive the expectation. This process is inherently asymmetric. The expectation underlying melodic anchoring is modeled as a vector, called the tonal force vector. The strength of the tonal force vector in each direction is proportional to the activation of the nearest anchor in that direction and inversely proportional to the distance to that anchor. The overall directional expectation, modeled as the sum of all possible expectation vectors, including the tonal force vector, is called the yearning vector.