A stochastic musical composer based on adaptive algorithms

Similar documents
Building a Better Bach with Markov Chains

PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION

Musical Creativity. Jukka Toivanen Introduction to Computational Creativity Dept. of Computer Science University of Helsinki

Musical Harmonization with Constraints: A Survey. Overview. Computers and Music. Tonal Music

CPU Bach: An Automatic Chorale Harmonization System

Chapter 9. Meeting 9, History: Lejaren Hiller

Etna Builder - Interactively Building Advanced Graphical Tree Representations of Music

Algorithmic Composition: The Music of Mathematics

Figure 2: Original and PAM modulated image. Figure 4: Original image.

Bach-Prop: Modeling Bach s Harmonization Style with a Back- Propagation Network

A MULTI-PARAMETRIC AND REDUNDANCY-FILTERING APPROACH TO PATTERN IDENTIFICATION

Study Guide. Solutions to Selected Exercises. Foundations of Music and Musicianship with CD-ROM. 2nd Edition. David Damschroder

ORB COMPOSER Documentation 1.0.0

Automated extraction of motivic patterns and application to the analysis of Debussy s Syrinx

Elements of Music David Scoggin OLLI Understanding Jazz Fall 2016

Chapter 5: Synchronous Sequential Logic

Transition Networks. Chapter 5

AutoChorale An Automatic Music Generator. Jack Mi, Zhengtao Jin

EIGENVECTOR-BASED RELATIONAL MOTIF DISCOVERY

A probabilistic approach to determining bass voice leading in melodic harmonisation

Similarity matrix for musical themes identification considering sound s pitch and duration

Figured Bass and Tonality Recognition Jerome Barthélemy Ircam 1 Place Igor Stravinsky Paris France

Melody Sauce is an AU / VST / MIDI FX device that creates melodies as MIDI.

Figure 1: Feature Vector Sequence Generator block diagram.

StepSequencer64 J74 Page 1. J74 StepSequencer64. A tool for creative sequence programming in Ableton Live. User Manual

Perceptual Evaluation of Automatically Extracted Musical Motives

Robert Alexandru Dobre, Cristian Negrescu

ECE Real Time Embedded Systems Final Project. Speeding Detecting System

Instrument Recognition in Polyphonic Mixtures Using Spectral Envelopes

Chords not required: Incorporating horizontal and vertical aspects independently in a computer improvisation algorithm

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

Frankenstein: a Framework for musical improvisation. Davide Morelli

Arts, Computers and Artificial Intelligence

Applying lmprovisationbuilder to Interactive Composition with MIDI Piano

Evolutionary jazz improvisation and harmony system: A new jazz improvisation and harmony system

Take a Break, Bach! Let Machine Learning Harmonize That Chorale For You. Chris Lewis Stanford University

Toward an analysis of polyphonic music in the textual symbolic segmentation

Analysis of local and global timing and pitch change in ordinary

Sequential Association Rules in Atonal Music

Fingerprint Verification System


Computer Coordination With Popular Music: A New Research Agenda 1

Design of Fault Coverage Test Pattern Generator Using LFSR

Melodic Pattern Segmentation of Polyphonic Music as a Set Partitioning Problem

Jazz Melody Generation from Recurrent Network Learning of Several Human Melodies

AN ARTISTIC TECHNIQUE FOR AUDIO-TO-VIDEO TRANSLATION ON A MUSIC PERCEPTION STUDY

Automatic meter extraction from MIDI files (Extraction automatique de mètres à partir de fichiers MIDI)

Using the new psychoacoustic tonality analyses Tonality (Hearing Model) 1

A Model of Musical Motifs

A Model of Musical Motifs

Jam Tomorrow: Collaborative Music Generation in Croquet Using OpenAL

Week 5 Music Generation and Algorithmic Composition

EVOLVING DESIGN LAYOUT CASES TO SATISFY FENG SHUI CONSTRAINTS

Music Radar: A Web-based Query by Humming System

ANNOTATING MUSICAL SCORES IN ENP

INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR NPTEL ONLINE CERTIFICATION COURSE. On Industrial Automation and Control

Student Performance Q&A:

Augmentation Matrix: A Music System Derived from the Proportions of the Harmonic Series

Articulation Guide. TIME macro.

BayesianBand: Jam Session System based on Mutual Prediction by User and System

Visual Arts, Music, Dance, and Theater Personal Curriculum

Jazz Melody Generation and Recognition

Doctor of Philosophy

Automatic Polyphonic Music Composition Using the EMILE and ABL Grammar Inductors *

All rights reserved. Ensemble suggestion: All parts may be performed by soprano recorder if desired.

CSC475 Music Information Retrieval

Experiment 8 Introduction to Latches and Flip-Flops and registers

Pitch correction on the human voice

2D ELEMENTARY CELLULAR AUTOMATA WITH FOUR NEIGHBORS

Influence of timbre, presence/absence of tonal hierarchy and musical training on the perception of musical tension and relaxation schemas

LAB 1: Plotting a GM Plateau and Introduction to Statistical Distribution. A. Plotting a GM Plateau. This lab will have two sections, A and B.

Reducing False Positives in Video Shot Detection

Characteristics of Polyphonic Music Style and Markov Model of Pitch-Class Intervals

Chapter 1 Overview of Music Theories

AN ESSAY ON NEO-TONAL HARMONY

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

Module # 4 Musical analysis and contemporary music Designer : Anthony Girard

Factory configured macros for the user logic

A few white papers on various. Digital Signal Processing algorithms. used in the DAC501 / DAC502 units

Interacting with a Virtual Conductor

Music Theory. Fine Arts Curriculum Framework. Revised 2008

Speech and Speaker Recognition for the Command of an Industrial Robot

AP MUSIC THEORY 2006 SCORING GUIDELINES. Question 7

2. AN INTROSPECTION OF THE MORPHING PROCESS

BASIC CONCEPTS AND PRINCIPLES IN MODERN MUSICAL ANALYSIS. A SCHENKERIAN APPROACH

FLIP-FLOPS AND RELATED DEVICES

CHARACTERIZATION OF END-TO-END DELAYS IN HEAD-MOUNTED DISPLAY SYSTEMS

A GTTM Analysis of Manolis Kalomiris Chant du Soir

Chapter 1. Introduction to Digital Signal Processing

Notes on Digital Circuits

Claude Debussy. Prélude à l après-midi d un faune. A musical analysis. Dr Nick Redfern 2015 Cloud Factory Publications Limited

Outline. Why do we classify? Audio Classification

Perception-Based Musical Pattern Discovery

SAMPLE ASSESSMENT TASKS MUSIC CONTEMPORARY ATAR YEAR 11

Controlling Musical Tempo from Dance Movement in Real-Time: A Possible Approach

A repetition-based framework for lyric alignment in popular songs

Chapter 12. Synchronous Circuits. Contents

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

How to Predict the Output of a Hardware Random Number Generator

Speaking in Minor and Major Keys

Transcription:

A stochastic musical composer based on adaptive algorithms Bruno Abrantes Basseto & João José Neto Escola Politécnica da Universidade de São Paulo Abstract This paper presents an algorithmic composition technique derived from Markov chain modeling, which may be used for efficiently describing musical knowledge, providing means of hierarchical structuring and context expressing by linguistic formalis ms. 1 STOCHASTIC MUSIC SYSTEMS What does it mean to compos e music? This is an essential question, since its answer can lead to more interesting system s of automa te d composition. Composi ng is a creative attitude, in which something new is created, by a specific intention of a composer, who is motivated by aesthetic or expressive needs. Such a composing act can be thought as some organization of the sonorous material. Therefore, some sort of musical semantics is associated to an ordering imposed to musical sounds by the composer in a procedure that is just the opposite of chaos, which in sound terms may be identified to noise. From the previous definition, one must find paradoxical using computers in music composition, since these devices cannot make any creative decisions, so, it is impossible for them to perform innovative creation and they have no means of expression and are not able to manifest any kind of aesthetic reactions to anything. Although true creation is actually impossible to computers, since they are guided by machine progra ms that define a priori what will be their behavior, an interesting alternative would be found by relying on unpredictable results, that is, those related to stochas tic processes. In such processes, a kind of creative pheno m en o n would be associated to the production of something new, in the sense of unexpected. Following this idea, one may argue that the almost unpredictable results produced by such system s are more related to noise or chaos than to music itself. Although that is true for completely rando m system s, one may impose organization rules into this stochastic system in order to obtain some musical structure that a human listener would interpret as music. How can music be properly represente d in comput er systems? A better question is: how would musical knowledge for composing be properly represented in such systems? Considering the very nature of computi ng system s, it seems we should treat music as some kind of language. That subject is usually controversial, but it seems clear that using syntactic struct ure s may be very useful as a mental model for describing musical structu re. Therefore, gram m a r s are pointed to be valuable for representing musical knowledge in a computer, and they constitut e a very practical user interface as well. The present work is intende d to be part of a musical meta- instru me nt, which has the objective to work in music therapy applications, not only in contem po r ary music perfor m ances. In such applications, music perception and response from the performe r is the most import ant requirement. Therefore, our starting point relies on three principles: emulating musical creativity by means of rando m choice; representing musical knowledge and musical structure by means of syntactic structures, like gramm ar s; and real- time perfor m ance, allowing the presence of huma n performe rs who should interfere in composing decisions.

2 MARKOV CHAINS AND LANGUAGES Looking at computer music history, we will find the early experiences in algorithmic composition at Hiller- Isaacson s Illiac Suite [1]. In that work, stochas tic paradigms were used for choosing compositional param eters, and musical structuring (or noise filtering) is represented by a transition state matrix or a Markov network. A Markov chain is a non- deterministic state machine, where the probability of the system being at some particular state depend s only on its previous state and on the probability of a transition between those states. This could be described by a state transition table. Such a device turns out to be useful for music composi ng through the attachme nt of compositional decisions to their transitions, such as producing musical output s as a response to the occurrence of some transition. Even though this kind of approach obtained very poor musical results, our interest in Markov chains rely on the fact that we can establish connections between them and the logical concept of language. In fact, the sequences of symbols produced by a series of Markov chain transitions can be proved to belong to some regular language. We may start from a linear gramma r for that language, generating a correspon di ng finite state automa to n and then transfor mi ng it into a non- deter ministic first- order state machine by converting its deterministic symbol- consu mi ng transitions into probabilistic symbolproducing ones by attaching them probabilities of occurrence. The second reason for the interest in Markov chains is the great simplicity shown by such devices, which makes its real- time implementa tion and interface very neat. The obvious limitation of this class of algorithm s is the fact that first order Markov chains can only produce results equivalent to those of linear gramm ar s. Considering that musical structure happens to be hierarchically organized, or, in other words, that there are usually nested structure s in most musical works, we have to choose a less restrictive type of language, namely the context- free languages. It is a consens u s that even this kind class of languages is not enough for representi ng music: one may find several examples in which a compositional decision affects future symbol substit uting; this fact is related to a specific context allowed by some rules in the gram ma r. These are context- sensitive ones, hardly implemente d on comput er system s. A quick analysis of compositions made by a first- order Markov chain will lead one to the conclusion that the system was only barely able to structure musical material as the composition enlarges, since its organization will be strictly local. The first choice for overcoming this difficulty was using higher order Markov chains, that is, a state transition probabilistic system where the next decision depends not only on the present state, but also on a number of past states. This does not lead to a practical solution since the original simplicity vanishes suddenly as the order of the system rises and the musical result is still poor. The use of higher order Markov chains usually conduces to non- linear behaviors, like the presence of cycles, and its relationshi p with formal gram mar s becoming less immediate. Our problem is then representing probabilistic system s which are able to model hierarchical musical structure (and not only a linear one), trying to find a particular means of introducing musical context- sensitive decisions, without discarding the simple idea of Markov networks. 3 ADAPTIVE FORMALISMS FOR MUSIC COMPOSITION The idea behind adaptive schemes is that, although the basic structure of the automa t a is maintained, it can be self modified in response to the occurrence of a transition. Therefore, an adaptive Markov network is defined by its initial set of states, initial state transition matrix and a set of transition functions, which are invoked whenever the associated transition is executed. Those functions may create or remove states or transitions in the

automa to n, what means that they are able to dynamically change the graph topology, that is, the algorithm itself. Adaptive formalism s are efficiently employed in compiler construction and natural language processing. Their use in non- deterministic schemes is new, and it showed to be a good contribution to computer music composition. It seems intuitive that such a mechanis m is able to attach new processing steps to the original algorithm, associated to decisions that would be taken later in the future. That is, at a moment we may be concerne d with choices that had a foundation in the past, what is equivalent of context sensitivenes s. This new flexibility is introduced to make it possible to handle more sophisticated types of languages, leaving the original simplicity of the finite automa ta formalism untouched. We can extend this concept to a set of adaptive state machines, where all state machines may be executed independen tly, but the set of transition functions can make transfor m a tions not only local to a particular machine, but in any of the machines belonging to the set. These relations hips between any pair of adaptive Markov chains can be of two types: the first, both state machines interfere with each other, by adapting its own behavior to the other. The second kind of interaction is when one machine controls the other, by imposing restrictions or constraint s it must meet; such inter- relation is called hierarchical. Presented this way, one may use adaptive sets of probabilistic state machines to make a compositional framework with a much smaller number of states, employing transition functions to change contexts or interacting with another machine at the same level or vertically structure d. One composer transcribing musical knowledge to this framework, can treat any isolated detail, modeled through a particular state machine, while having control over the entire structure, expressed by machine interactions. With this idea, we kept simple the model, by making it hierarchically structure d and by adding to it the capacity of taking contexts into account. 4 A PRACTICAL EXAMPLE In this example, we report a small experience, in which we generate increasingly complex melodies by imposing successive restrictions to the chosen musical notes. Let s start with a simple eight- state non- adaptive Markov chain to create a single melody line. For every transition arriving to each state we associate the generation of a musical note, in the scale of c major. The simpler machine has all transitions allowed between all states, with equal probabilities of occurrence (1/8). Hence, the probabilities of the system being in each of its states are the same, then the generated music will have the notes uniformly distribut ed among the possible notes. For instance, the system led to the following: This result shows a melody line without any structuring param et er, and even considering the fact that it generates only notes from a known scale, its random n es s gives us the sensation of noise. We would add some sort of redun da ncy in order to reduce such a noise effect. The first aspect one can note from the analysis of this melody is the fact that its melodic moves do not follow any principle of connectivity. We can improve that by making adaptive this probabilistic machine and by writing transition functions that increase the probabilities of transitions leading to non- distant states, which generate notes at intervals of seconds, thirds and fourths, in this order of preference. The octave jump is also allowed. With these restrictions, we can obtain the following:

We can observe that this particular result has much better melodic consistence, and its smaller degree of local rando m ne s s has reduced the noise sensation detected in the preceding case. The music generated still lacks any musical structure. The first level of structuring we have chosen to include refers to harmonic consistence. In order to achieve that, it would be convenient to use another Markov chain, which will be responsible for choosing the current harmonic function (tonic, dominant, subdo minan t), always following the correct evolution between two harmonic functions. That behavior is defined by a simple gramm ar. Each state of this machine will force preferential transitions to the earlier basic machine (which will corres pon d to preferential notes at the melody), increasing their probabilities at downbeats, like in: where the key was turned into g major. Capital letters over the measures represent the current state of the harmony Markov chain; the generated melodic line closely follows the chosen harmonic functions. One may easily identify the stronger musical character of this fragment. We may now aggregate to the music- generating framework some thematic - structuring feature, by adding yet another machine - a deter ministic one - which will induce directions of melodic movement by increasing the probabilities of the transitions that correspo n d to the desired movement. Such a change may give us the following result: This composition is more interesting. A motive that last one measure is clearly identifiable, which is repeated through the entire period. We can easily have phrase - structuring if we extend this idea by aggregating sections with different thematic material, allowing nesting phrase struct ures by means of adding hierarchically influencing adaptive Markov chains. Again, the syntactic structure of the musical phrase to be created is defined by a gram mar that will define the behavior of the top- most machine. In the following example, we show the result obtained by adding one more adaptive state machine interacting with the previous melody- generator, generating another melody line (the bass line), which will imply counter point restrictions over the former. The last example is particularly interesting, since it contains all the features presente d behind, its acoustical result carry several intrinsic musical properties, like harmonic,

thematic and voice structuring. We may describe the machine relations hips with the following diagram that also represent s the actual implement ation, where circles denote Markov chains and the arrows represent interactions between a pair of them: Harmony Motif Bass Line Melody line MIDI output 5 CONCLUSIONS There are two kinds of users of the impleme nte d system. The first is the composer, who will introduce machine definitions corres pon di ng to the musical knowledge actually modeled, by means of a simple language that is interpret ed for constructing individual state transition matrices for the desired machines. The second is the perfor mer, who interact to the system while it is composing and performing a new piece according to the behavior progra m m e d by the composer. While the progra m is being executed, transitions fire attached adaptive functions, according to the specification in the source code, which modify transitions within machine structures, and change their associated probabilities. A run- time MIDI output is produce d at each interaction and the system offers several primitives for controlling the MIDI channel. The perfor mer is allowed to control several paramet ers like tempo, dynamics and articulation, which are kept by a timing controller. Several other higher - level compositional paramet ers can be set and altered in real- time, serving as external param eters for the adaptive machines. They may be used for forcing some musical decision by increasing its associated probability of occurrence, or simply for decision through conditional if- then- else clauses. By now the perfor mer interacts to the system through a set of windows - like controllers like scrollers and buttons, but this interface shall be converted into a group of sensors and cameras for interacting with the performer into a non- comput ational environme n t. The system works as a musical meta - instrum ent, where the perform er make changes in highlevel musical language structures, like harmony, sentence structure, form, row and so on, and not only on low- level note events. The practical results we had obtained have demons t ra te d the power of the adaptive formalism in representi ng musical knowledge. The model kept simple our implement ation, which allowed efficient real- time perform a nce s. We found that the most important feature displayed has been the ability of formally describing musical knowledge. One can extend the shown examples to higher orders of musical material organization, like entire sections of musical pieces. For example, anot her Markov chain that controls the harmony generator behavior may be used for making the system to modulate to other keys inside a musical composition. The same way, the motif machine may be subordinate d to a higher - level struct ure - generating machine that would make the musical piece to exhibit some given structure, e.g., a ternary ABA struct ure. The last machines may interact to each other to make, for example, the internal section B to be in the key of the dominant, returning to the original key by the end of the composition. Note that all of these

enrichme nt s are extremely simple to implement, without changing any part of the rest of the state machines. The use of the adaptive formalis m is also useful for implementing some musical language characteristics that are usually difficult to be done with other approache s. One particular and interesting example is the production of the matic variations. This is a situation where there is a context change; it can be easily implemente d by allowing the theme - inducing machine to be affected by the current notes chosen by the melody generator. Therefore, such a memory of past variations works like an algorithm alteration over the original theme program m e d into the system. Although the examples shown were related to tonal music, the present system is perfectly applicable to many other forms of musical organizations, from serialism to microtonal music. The system would be used to control any low- level musical param eter and not only MIDI notes on and off, which may be very interesting for creating new forms of musical expression. 6 BIBLIOGRAPHY [1] HILLER, L., ISAACSON, Experimental Music, 1ed, New York, McGraw- Hill, 1959. [2] NETO, J. J., Contribuiçõe s à Metodologia de Construção de Compiladores, Tese de Livre Docência, São Paulo, Escola Politécnica da Universidade de São Paulo, 1993. [3] HOWARD, R. A. Dynamic Probabilistic Systems, v. 1 e 2, 1ed., New York, John Wiley & Sons, Inc., 1971. [4] LERDAHL, F., JACKENDOFF, R. A Generative Theory of Tonal Music, 1ed., Cambridge, The MIT Press, 1983. [5] POLANSKY, L. Live Interactive Comput er Music in HMSL, 1984-1992. Computer Music Journal v.18 n.2 pp.59-77, 1994. [6] ROADS, C. Grammars as Represent ations for Music. Computer Music Journal v.3 n.1 pp.48-55, 1979. [7] SCHOENBERG, A. Fundamentos da Composição Musical, 2ed, São Paulo, Editora da Universidade de São Paulo, 1993. [8] SMAILL, A., WIGGINS, G., HARRIS, M. Hierarquical Music Represent ation for Composition and Analysis. Computer and the Humanities n.27 pp.7-17, 1993.