Key-based melody segmentation for popular songs
In music theory, a key specifies the tonal structure of a music piece. Popular songs are mostly composed using particular music keys. It is common that the key changes at some point of the piece for an emotional uplifting effect. The change is usually in pitch of the tonic rather than in key style. Automatically segmenting melody based on the key changes can facilitate content-based music retrieval. Little work has been done for this problem. In this paper, we present a novel approach for detecting multiple keys and locating the key boundaries in the melody of popular songs in MIDI format. A tonality analysis of the melody using diatonic scale model first extracts overlapping segments of the melody that each conforms to the tonal structure of a single key. A modality (key style) analysis then determines the center mode of the melody based on the modes of the extracted melody segments. The segments of unrelated modes are then eliminated, and finally the keys and the key boundaries are determined by grouping remaining segments according to the pitch of the tonic. The proposed method is not confined to the two key styles, major and minor, as the previous techniques. Thus, this method is effective for detecting key changes and insensitive to the presence of accidental notes. Experimental results on 50 randomly selected MIDI songs have demonstrated the performance of the proposed method.