Recently, we can have large amounts of music thanks to the development of the computer technology. However, as the data of the music becomes larger, it is a hassle to classify the music based on the music content manually. We think that it is necessary to categorize the music automatically based on our mood. In this paper, we propose a novel method to analyze the music automatically based on melody analysis. The proposed method considers music genres as the measure of music analysis. We extract the acoustic features to characterize the music. Then, we classify music using multi-class classifiers based on the support vector machine (SVM). We adopt two approaches to the multi-class classification method. Furthermore, we propose a visualization method to specify the musical structure on the music genres from the classification result. Finally, computer simulations are done by using real music data in order to prove the effectiveness of the proposed method.