# Automated Composing System for Sub-melody Using HMM: A Support System for Composing Music

Ryosuke Yamanishi, Keisuke Akita, Shohei Kato

► To cite this version:

Ryosuke Yamanishi, Keisuke Akita, Shohei Kato. Automated Composing System for Sub-melody Using HMM: A Support System for Composing Music. 9th International Conference on Entertainment Computing (ICEC), Sep 2010, Seoul, South Korea. pp.425-427, 10.1007/978-3-642-15399-0_49. hal-01055614

HAL Id: hal-01055614

https://inria.hal.science/hal-01055614

Submitted on 13 Aug 2014

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Automated composing system for sub-melody using HMM: a support system for composing music

Ryosuke Yamanishi, Keisuke Akita, and Shohei Kato

Dept. of Computer Science and Engineering, Graduate School of Engineering,
Nagoya Institute of Technology,
Gokiso-cho Showa-ku Nagoya 466-8555 Japan
{ryama, shohey}@juno.ics.nitech.ac.jp

**Abstract.** We propose an automated composing system for sub-melodies focusing especially on pitch and rhythm. We constructed the system using a Hidden Markov Model (HMM). In a composing experiment, we obtained various melodies depending on the song set used for learning, and the results suggest that this system can learn the features of song sets that are selected while considering music genres, music culture, or nuances of composers.

**Key words:** automated composing, HMM, machine learning, music

## 1 Introduction

Nowadays, many forms of entertainment exists, e.g., computer games, movies, and sports. Music is another form, and it has been especially loved by people all around the world since ancient times. Composing music can also be thought of as a form of entertainment as interesting as listening to music, and therefore, many people who love music have also tried to compose it. The question we have to ask here is whether people who do not have much music experience can compose songs. Most music is composed by taking many elements into consideration, e.g., rhythm, chord progression, and melody [1]. In particular, composing music that has many parts requires a high level of knowledge because there may be several different sub-melodies. However, it is difficult for people who do not have a musical background to obtain this knowledge. Some simple melodies or chord progressions can be hummed or imagined without this knowledge. We expect that music which is not by book reflects the newest styles of music. Thus, some support systems for composing music are necessary, for example the one described in reference [2].

In this paper, as the first step in composing music responding to a demand, we propose a support system for composing a sub-melody. This system focuses on pitch and rhythm, which are thought to be the most important factors in a melody, and learns them using Hidden Markov Model which is a probabilistic learning model.
<figure><img src="image_2.png" /><figcaption>Fig. 1. Flowchart of the system</figcaption></figure>

## 2 System

In this study, rhythm, chords, and pitch were each modeled and learnt from songs that had many parts, melodies and sub-melodies. *SN* indicates the song set, and score information about a song *sn* ∈ *SN* was modeled and learnt according to the following procedure. The songs in *SN* were without modulation.

Rhythm series of melody and rhythm series of sub-melody are each modeled using following states, "sound", "silent", or "continuance of the previous state." In this study, we used an eighth note as the minimum unit, or beat in scores. Taken in the light of tonality, we use degrees for tonic in each bar, song *sn* to represent the chord's name for learning chord progressions. In this study, any bar in *sn* have only one chord. And then, we use three chords over the three bars as a chord progression. A pitch series of the sub-melody in each bar, song *sn* is learnt as a series of degree for a tonic of the song *sn*. Conditional probability that show the relationships between rhythm series of melody and rhythm series of sub-melody, and conditional probability that show the relationships between chord progressions and pitch series are each calculated. Additionally, score information about each bar in *sn* were learnt respectively using Left-to-Right HMM where the state change in a single direction.

When we input a melody and chord progression, then the system automatically outputs a sub-melody using the HMMs. Fig. 1 shows the flowchart of this system.

## 3 Composing experiment

We prepared five songs from the "RWC Music Database: Jazz Music Database [3]" as the song set for jazz music, five songs from Japanese popular music randomly selected as the song set for J-POP, and five compositions by Tchaikovsky as the
<figure><img src="image_3.png" /><figcaption>Fig. 2. Results of composing sub-melodies using various HMMs</figcaption></figure>

song set for classical. All songs used in learning had four-four time. Namely, we prepared three categories of song sets to learn. In this experiment, we composed three sub-melodies with same input melodies using an HMM for jazz music, an HMM for J-POP, and an HMM for classical. We prepared a song from the “RWC Music Database: Jazz Music Database” that was not used in learning as an input melody. Part of the input melody, the original sub-melody (for reference), and the sub-melodies composed by the proposed system using each HMM are shown in Fig. 2. Although the input melodies are the same, the sub-melodies composed by using the proposed system are different due to using different HMMs.

## 4 Conclusion

In conclusion, we should note that the proposed system can be used as a system to support composing. In the future, we plan to expand this study and consider accessory notes while dealing with notes below the eighth notes. We will also construct a system to allow feedback between the systems and the composer when transcribing the music.

## References

1. Merwe, P.V. : *Origins of the Popular Style: The Antecedents of Twentieth-Century Popular Music*, Oxford University Press, 1992.

2. Hasui, H., Ogura, H.: "Application of Interactive Composing System, i-Sonneteer, to Other Musical Styles," *Information Processing Society of Japan*, Vol. 2008, No. 12, pp. 157-162, 2008.

3. Gotou, M., Hashiguchi, H., Nishimura, T., Oka, R.: "RWC Music Database: Music Genre Database and Musical Instrument Sound Database," *Proceedings of the 4th International Conference on Music Information Retrieval (ISMIR 2003)*, pp.229-230, 2003.