This paper presents a representation for melodic segment classes and applies it to music data mining. Melody is modeled as a sequence of segments, each segment being a sequenceofnotes.Thesesegmentsareassignedtoclassesthroughaknowledgerepresentation hich allows the flexible construction of abstract views of the music surface. The representation is applied to sequential pattern discovery and to the statistical modeling of musical style. Keywords Music analysis . Music data mining . Statistical models . Music representation . Segmentation