Several time series matching techniques have been proposed for content-based music retrieval. These techniques represent a melody by a time series of pitch values and use time warping distance measures for melody matching. These methods have shown to be robust and effective for music retrieval by acoustic inputs, such as query-by-humming. However, due to the key transposition issue, all the current methods need to search a large space for the proper key in melody matching. This computation can be prohibitive for a practical music retrieval system with a large database.In this paper, we present a music scale modeling technique for melody matching. The root note of music scale (Major or Minor) of a melody is estimated by fitting the notes to a music scale model. The estimated root note can then be used as the key in melody matching. To the best of our knowledge, this is the first approach that utilizes music scale knowledge for retrieval. In our experiments, 96% of the songs in the database (3000 melodies) can fit into the music scale model. Promising results for query-by-humming retrieval have been obtained by using this novel approach.