Between the ages of 5 and 10, children gain skill in focusing expectancies and attention. We asked children in that age range (and adults) to discern familiar target melodies whose notes were temporally interleaved with distractor notes. Targets varied in perceptual salience: the most hidden targets were interleaved with distractors of the same pitch range, loudness, and timbre, whereas the most salient targets differed in those dimensions from their distractors. Targets either retained their familiar "straight" form or wandered in pitch. Wandering targets preserved contour (ups and downs) but not pitch intervals, and either remained within the original key ("tonal") or deviated from it ("atonal"). Distractors were drawn from the original key ("tonal") or a distant key ("atonal"). Performance improved with age and experience, was better with salient (vs. hidden) targets, and better with straight (vs. wandering) targets. All but the 5- and 6-year-olds found salient targets easier with tonal distractors and hidden targets easier with atonal distractors. Only the youngest children found same-timbre distractors outside the pitch range of the target as disruptive as same-timbre distractors within that range. By 78 years of age, children were able to focus attention within the target pitch range to follow straight targets, indicating the focusing of attention in pitch; and by 9-10 years of age they were able to discern clearly the most hidden straight targets, demonstrating a rhythmic control of expectancies.