Computers Composing Music: An Artistic Utilization of Hidden Markov Models for Music Composition

Natural systems are the source of inspiration for the human tendency to pursue creative endeavors. Music composition is a language for human expression and can therefore be utilized in conveying the expressive capabilities of other systems. Using a Hidden Markov Model (HMM) learning system, a computer can be taught to create music that is coherent and aesthetically sufficient, given the correct tools. “A Hidden Markov Model (HMM) is a statistical model where the system being modeled is assumed to be a Markov process [a finite, probabilistic system with state relationships] with unknown parameters, and the challenge is to determine the hidden parameters, from the observable parameters, based on this assumption. The extracted model parameters can then be used to perform further analysis, for example, for pattern recognition applications. In a regular Markov model, the state is directly visible to the observer, and therefore the state transition probabilities are the only parameters. A hidden Markov model adds outputs: each state has a probability distribution over the possible output tokens. Therefore, looking at a sequence of tokens generated by an HMM does not directly indicate the sequence of states. ” 1 Such models have applications to speech recognition software, music transcription, and analysis of incomplete data because of this ability to approximate, as will be further described below. It is this capability of “fuzzy” pattern recognition that inspires the use of HMM’s for this project. The tools selected for this project include: twenty-two years of sun spot data as the natural system from which to creatively draw; a compositional framework for structure, pitch, dynamics, and rhythm to facilitate a human understanding of the system’s expressiveness; the jMusic, open source, music composition software; and an HMM learning system with implementations of the Forward-Backward, Viterbi, and Baum-Welch algorithms. Details of these tools shall be discussed later. In composing a final piece of music, the attempt was made to impose as few creative restrictions on the system as possible. Through these tools, every aspect of the composition’s generation can be repeated. In this way the robust analytical capabilities of the system are displayed via the piece and its generative procedures, thereby displaying an artificial intelligence’s potential for music composition and perhaps larger creative projects. Artistic Motivations The artistic bases of this project are as follows: •Nature has discernable patterns within its manifestations •Patterns are interpreted on a basis of past experience •Music composition is driven by a need to express relationships A clear and empirical observation is that natural systems exhibit certain repetitive and cyclic properties. Human beings interact with their environment on a constant basis, and one of the greatest skills we exhibit is the ability to recognize and learn from the patterns that occur within that environment. It is particularly interesting that we seem to be able to observe a pattern within nature and then apply the observations about that series of relationships to other, seemingly unrelated tasks. Engineering, mathematics, psychology, and any science martial arts, painting, music composition, and any artistic endeavor appear to be exhibitions of the human capacity to interpret nature. Inquiries into the foundation of this ability are at the heart of some of the greatest pursuits of philosophical study. What is already apparent, however, is that humans utilize past experience to interpret newly recognized patterns and to build on their base of knowledge. It is also interesting to observe the creative urge of the human condition. The need to express thoughts in some medium, whether it is through engineering or music composition, is a universal trait. One artistic assumption that was made during this project is that this human creative urge stems from a natural desire to express our interpretations of the patterns and relationships that we have recognized in nature. This does not appear to be an inappropriate leap in logic, because the fuel for creativity must come from nature in some capacity. Without learned concepts and patterns, we would have no basis for creation. Therefore, it seems possible to imbue an artificial system with the tools necessary to execute a similar process of creation through the medium of music composition; utilizing the proper learning tools (Hidden Markov Models) and with a person to guide the creation and transmission of the product to listeners (jMusic and the composer).