MELONET I: Neural Nets for Inventing Baroque-Style Chorale Variations

Similar documents
Jazz Melody Generation from Recurrent Network Learning of Several Human Melodies

AP MUSIC THEORY 2006 SCORING GUIDELINES. Question 7

Bach in a Box - Real-Time Harmony

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

CSC475 Music Information Retrieval

AP MUSIC THEORY 2015 SCORING GUIDELINES

ILLINOIS LICENSURE TESTING SYSTEM

HST 725 Music Perception & Cognition Assignment #1 =================================================================

Music Composition with RNN

Student Performance Q&A:

Transition Networks. Chapter 5

AN ANALYSIS OF PIANO VARIATIONS

Calculating Dissonance in Chopin s Étude Op. 10 No. 1

Music Department Columbia University Ear Training Curriculum, Fall 2012 Sing and Play at the Piano Face the Music

Computing, Artificial Intelligence, and Music. A History and Exploration of Current Research. Josh Everist CS 427 5/12/05

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

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

Circle of Fifths - Introduction:

Exploring the Rules in Species Counterpoint

Grade Six. MyMusicTheory.com. Composition Complete Course, Exercises & Answers PREVIEW. (ABRSM Syllabus) BY VICTORIA WILLIAMS BA MUSIC

Rubato: Towards the Gamification of Music Pedagogy for Learning Outside of the Classroom

Arts, Computers and Artificial Intelligence

Analysis and Clustering of Musical Compositions using Melody-based Features

On Interpreting Bach. Purpose. Assumptions. Results

MUSIC THEORY CURRICULUM STANDARDS GRADES Students will sing, alone and with others, a varied repertoire of music.

CHAPTER ONE TWO-PART COUNTERPOINT IN FIRST SPECIES (1:1)

Piano Transcription MUMT611 Presentation III 1 March, Hankinson, 1/15

DAT335 Music Perception and Cognition Cogswell Polytechnical College Spring Week 6 Class Notes

King Edward VI College, Stourbridge Starting Points in Composition and Analysis

AP MUSIC THEORY 2011 SCORING GUIDELINES

Student Performance Q&A:

Virginia Commonwealth University MHIS 146 Outline Notes. Open and Closed Positions of Triads Never more than an octave between the upper three voices

Student Performance Q&A:

A probabilistic approach to determining bass voice leading in melodic harmonisation

THE INDIAN KEYBOARD. Gjalt Wijmenga

Sudhanshu Gautam *1, Sarita Soni 2. M-Tech Computer Science, BBAU Central University, Lucknow, Uttar Pradesh, India

Using Rules to support Case-Based Reasoning for harmonizing melodies

MELODIC AND RHYTHMIC EMBELLISHMENT IN TWO VOICE COMPOSITION. Chapter 10

Unit 5b: Bach chorale (technical study)

Similarity and Categorisation in Boulez Parenthèse from the Third Piano Sonata: A Formal Analysis.

Melodic Minor Scale Jazz Studies: Introduction

Music Preschool. Aesthetic Valuation of Music. Self awareness. Theory of Music. Creation of Music

A Model of Musical Motifs

A Model of Musical Motifs

PLANE TESSELATION WITH MUSICAL-SCALE TILES AND BIDIMENSIONAL AUTOMATIC COMPOSITION

Modeling memory for melodies

Melody Extraction from Generic Audio Clips Thaminda Edirisooriya, Hansohl Kim, Connie Zeng

Partimenti Pedagogy at the European American Musical Alliance, Derek Remeš

Building a Better Bach with Markov Chains

Chapter 5. Parallel Keys: Shared Tonic. Compare the two examples below and their pentachords (first five notes of the scale).

Opera Minora. brief notes on selected musical topics

Example 1 (W.A. Mozart, Piano Trio, K. 542/iii, mm ):

AP MUSIC THEORY 2016 SCORING GUIDELINES

On time: the influence of tempo, structure and style on the timing of grace notes in skilled musical performance

K-12 Performing Arts - Music Standards Lincoln Community School Sources: ArtsEdge - National Standards for Arts Education

Recurrent Neural Networks and Pitch Representations for Music Tasks

Harmonising Chorales by Probabilistic Inference

NetNeg: A Connectionist-Agent Integrated System for Representing Musical Knowledge

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

Student Performance Q&A:

Readings Assignments on Counterpoint in Composition by Felix Salzer and Carl Schachter

BIBLIOGRAPHY APPENDIX...

II. Prerequisites: Ability to play a band instrument, access to a working instrument

Student Performance Q&A: 2001 AP Music Theory Free-Response Questions

Concert Band and Wind Ensemble

15. Corelli Trio Sonata in D, Op. 3 No. 2: Movement IV (for Unit 3: Developing Musical Understanding)

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

Active learning will develop attitudes, knowledge, and performance skills which help students perceive and respond to the power of music as an art.

Melodic Outline Extraction Method for Non-note-level Melody Editing

Queens College, Aaron Copland School of Music Rudiments of Music 1, fall 2010 Music 060, Section BM2WA or 1M2WA Room 363

Sample assessment task. Task details. Content description. Year level 8. Theme and variations composition

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

Melodic Pattern Segmentation of Polyphonic Music as a Set Partitioning Problem

AP Music Theory Course Planner

Standard 1: Singing, alone and with others, a varied repertoire of music

NUMBER OF TIMES COURSE MAY BE TAKEN FOR CREDIT: One

Bar 2: a cadential progression outlining Chords V-I-V (the last two forming an imperfect cadence).

COURSE OUTLINE. Corequisites: None

Instrumental Music II. Fine Arts Curriculum Framework

Outline. Why do we classify? Audio Classification

Comprehensive Course Syllabus-Music Theory

ORCHESTRA Grade 5 Course Overview:

GRADUATE/ transfer THEORY PLACEMENT EXAM guide. Texas woman s university

The Development of Modern Sonata Form through the Classical Era: A Survey of the Masterworks of Haydn and Beethoven B.

Theory of Music. Clefs and Notes. Major and Minor scales. A# Db C D E F G A B. Treble Clef. Bass Clef

Chorale Completion Cribsheet

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

PERFORMING ARTS Curriculum Framework K - 12

AP MUSIC THEORY 2013 SCORING GUIDELINES

In all creative work melody writing, harmonising a bass part, adding a melody to a given bass part the simplest answers tend to be the best answers.

CHAPTER 14: MODERN JAZZ TECHNIQUES IN THE PRELUDES. music bears the unmistakable influence of contemporary American jazz and rock.

2014 Music Style and Composition GA 3: Aural and written examination

CONCERT ORCHESTRA AND SYMPHONIC ORCHESTRA

Descending- and ascending- 5 6 sequences (sequences based on thirds and seconds):

A hierarchical self-organizing map model for sequence recognition

Audio Feature Extraction for Corpus Analysis

Lesson One. New Terms. Cambiata: a non-harmonic note reached by skip of (usually a third) and resolved by a step.

Music Theory. Fine Arts Curriculum Framework. Revised 2008

Grade Level 5-12 Subject Area: Vocal and Instrumental Music

Perceptual Evaluation of Automatically Extracted Musical Motives

Transcription:

MELONET I: Neural Nets for Inventing Baroque-Style Chorale Variations Dominik Hornel dominik@ira.uka.de Institut fur Logik, Komplexitat und Deduktionssysteme Universitat Fridericiana Karlsruhe (TH) Am Fasanengarten 5 D-76128 Karlsruhe, Germany Abstract MELONET I is a multi-scale neural network system producing baroque-style melodic variations. Given a melody, the system invents a four-part chorale harmonization and a variation of any chorale voice, after being trained on music pieces of composers like J. S. Bach and J. Pachelbel. Unlike earlier approaches to the learning of melodic structure, the system is able to learn and reproduce high-order structure like harmonic, motif and phrase structure in melodic sequences. This is achieved by using mutually interacting feedforward networks operating at different time scales, in combination with Kohonen networks to classify and recognize musical structure. The results are chorale partitas in the style of J. Pachelbel. Their quality has been judged by experts to be comparable to improvisations invented by an experienced human organist. 1 INTRODUCTION The investigation of neural information structures in music is a rather new, exciting research area bringing together different disciplines such as computer science, mathematics, musicology and cognitive science. One of its aims is to find out what determines the personal style of a composer. It has been shown that neural network models - better than other AI approaches - are able to learn and reproduce styledependent features from given examples, e.g., chorale harmonizations in the style of Johann Sebastian Bach (Hild et al., 1992). However when dealing with melodic sequences, e.g., folk-song style melodies, all of these models have considerable difficulties to learn even simple structures. The reason is that they are unable to capture high-order structure such as harmonies, motifs and phrases simultaneously occurring at multiple time scales. To overcome this problem, Mozer (Mozer, 1994)

888 D. Hamel proposes context units that learn reduced descriptions of a sequence of individual notes. A similar approach in MELONET (Feulner et Hornel, 1994) uses delayed update units that do not fire each time their input changes but rather at discrete time intervals. Although these models perform well on artificial sequences, they produce melodies that suffer from a lack of global coherence. The art of melodic variation has a long tradition in Western music. Almost every great composer has written music pieces inventing variations of a given melody, e.g., Mozart's famous variations KV 265 on the melody "Ah! Vous dirai-je, Maman", also known as "Twinkle twinkle little star". At the beginning of this tradition there is the baroque type of chorale variations. These are organ or harpsichord variations of a chorale melody composed for use in the Protestant church. A prominent representative of this kind of composition is J. Pachelbel (1653-1706) who wrote about 50 chorale variations or partitas on various chorale melodies. 2 TASK DESCRIPTION Given a chorale melody, the learning task is achieved in two steps: 1. A chorale harmonization of the melody is invented. 2. One of the voices of the resulting chorale is chosen and provided with melodic variations. Both subtasks are directly learned from music examples composed by J. Pachelbel and performed in an interactive composition process which results in a chorale variation of the given melody. The first task is performed by HARMONET, a neural network system which is able to harmonize melodies in the style of various composers like J. S. Bach. The second task is performed by the neural network system MELONET I, presented in the following. For simplicity we have considered melodic variations consisting of 4 sixteenth notes for each melody quarter note. This is the most common variation type used by baroque composers and presents a good starting point for even more complex variation types, since there are enough music examples for training and testing the networks, and because it allows the representation of higher-scale elements in a rather straightforward way. HARMONET is a system producing four-part chorales in various harmonization styles, given a one-part melody. It solves a musical real-world problem on a performance level appropriate for musical practice. Its power is based on a coding scheme capturing musically relevant information. and on the integration of neural networks and symbolic algorithms in a hierarchical system, combining the advantages of both. The details are not discussed in this paper. See (Hild et ai., 1992) or (Hornel et Ragg, 1996a) for a detailed account. 3 A MULTI-SCALE NEURAL NETWORK MODEL The learning goal is twofold. On the one hand, the results produced by the system should conform to musical rules. These are melodic and harmonic constraints such as the correct resolving of dissonances or the appropriate use of successive interval leaps. On the other hand, the system should be able to capture stilistic features from the learning examples, e.g., melodic shapes preferred by J. Pachelbel. The observation of musical rules and the aesthetic conformance to the learning set can be achieved by a multi-scale neural network model. The complexity of the learning task is reduced by decomposition in three subtasks (see Figure 1):

MELONEI' I: Neural Netsfor Inventing Baroque-Style Chorale Variations 889 Harmony T T D, T S, T, D T k=tmod4 : MelodIc Vanallon Figure 1: Structure of the system and process of composing a new melodic variation. A melody (previously harmonized by HARMONET) is passed to the supernet which predicts the current motif class MGT from a local window given by melody notes MT to MT+2 and preceding motif class MGT-I. A similar procedure is performed at a lower time scale by the su bnet which predicts the next motif note Nt based on M CT, current harmony HT and preceding motif note Nt-I. The result is then returned to the supernet through the motif classifier to be considered when computing the next motif class MCT +1. 1. A melody variation is considered at a higher time scale as a sequence of melodic groups, so-called motifs. Each quarter note of the given melody is varied by one motif. Before training the networks, motifs are classified according to their similarity. 2. One neural network is used to learn the abstract sequence of motif classes. Motif classes are represented in a l-of-n coding form where n is a fixed number of classes. The question it solves is: What kind of motif 'fits' a melody note depending on melodic context and the motif that has occurred before? No concrete notes are fixed by this network. It works at a higher scale and will therefore be called stlpernet in the following. 3. Another neural network learns the implementation of abstract motif classes into concrete notes depending on a given harmonic context. It produces a sequence of sixteenth notes - four notes per motif - that result in a melodic variation of the given melody. Because it works one scale below the supernet, it is called stlbnet. 4. The subnet sometimes invents a sequence of notes that does not coincide

890 D. Homel with the motif class determined by the supernet. This motif will be considered when computing the next motif class, however. and should therefore match the notes previously formed by the subnet. It is therefore reclassified by the motif classifier before the supernet determines the next motif class. The motivation of this separation into supernet and subnet arised from the following consideration: Having a neural network that learns sequences of sixteenth notes, it. would be easier for this network to predict notes given a contour of each motif. i.e. a sequence of interval directions to be produced for each quarter note. Consider a human organist who improvises a melodic variation of a given melody in real time. Because he has to take his decisions in a fraction of a second, he must at least have some rough idea in mind about what kind of melodic variation should be applied to the next melody note to obtain a meaningful continuation of the variation. Therefore, a neural network was introduced at a higher time scale, the training of which really improved the overall behavior of the system and not just shifted the learning problem to another time scale. 4 MOTIF CLASSIFICATION AND RECOGNITION In order to realize learning at different time scales as described above, we need a recognition component to find a suitable classification of motifs. This can be achieved using unsupervised learning, e.g., agglomerative hierarchical clustering or Kohonen's topological feature maps (Kohonen, 1990). The former has the disadvantage however that an appropriate distance measure is needed which determines the similarity between small sequences of notes respectively intervals, whereas the latter allows to obtain appropriate motif classes through self-organization within a twodimensional surface. Figure 2 displays the motif representation and distribution of motif contours over a 10xlO Kohonen feature map. In MELONET I, the Kohonen algorithm is applied to all motifs contained in the training set. Afterwards a corresponding motif classification tree is recursively built from the Kohonen map. While cutting this classification tree at lower levels we can get more and more classes. One important problem remains to find an appropriate number of classes for the given learning task. This will be discussed in section 6. ~...-".........', Winner, jj 3jl 1 st interval 2nd interval 3rd interval -1 Figure 2: Motifrepresentation example (left) and motif contour distribution (right) over a 10xlO Kohonen feature map developed from one Pachelbel chorale variation (initial update area 6x6, initial adaptation height 0.95, decrease factor 0.995). Each cell corresponds to one unit in the KFM. One can see the arrangement of regions responding to motifs having different motif contours.

MELONEr I: Neural Nets for Inventing Baroque-Style Chorale Variations 891 5 REPRESENTATION In general one can distinguish two groups of motifs: Melodic motifs prefer small intervals, mainly seconds, harmonic motifs prefer leaps and harmonizing notes (chord notes). Both motif groups heavily rely on harmonic information. In melodic motifs dissonances should be correctly resolved, in harmonic motifs notes must fit the given harmony. Small deviations may have a significant effect on the quality of musical results. Thus our idea was to integrate musical knowledge about interval and harmonic relationships into an appropriate interval representation. Each note is represented by its interval to the first motif note, the so-called reference note. This is an important element contributing to the success of MELONET I. A similar idea for Jazz improvisation was followed in (Baggi, 1992). The interval coding shown in Table 1 considers several important relationships: neighboring intervals are realized by overlapping bits, octave invariance is represented using a special octave bit. The activation of the overlapping bit was reduced from 1 to 0.5 in order to allow a better distinction of the intervals. 3 bits are used to distinguish the direction of the interval, 7 bits represent interval size. Complementary intervals such as ascending thirds and descending sixths have similar representations because they lead to the same note and can therefore be regarded as harmonically equivalent. A simple rhythmic element was then added using a tenuto bit (not shown -in Table 1) which is set when a note is tied to its predecessor. This final 3+1+7+1=12 bit coding gave the best results in our simulations. Table 1: Complementary Interval Coding direction octave interval size ninth \. 1 o 0 1 0 0 0 0 0 0.5 1 octave \. 1 o 0 1 1 0 0 0 0 0 0.5 seventh \. 1 o 0 0 0.5 1 0 0 0 0 0 sixth \. 100 0 0 0.5 1 0 0 0 0 fifth \. 100 0 0 0 0.5 1 0 0 0 fourth \. 1 0 0 0 0 0 0 0.5 1 0 0 third \. 1 o 0 0 0 0 0 0 0.5 1 0 second \. 1 o 0 0 0 0 0 0 0 0.5 1 pnme -+ 010 0 1 0 0 0 0 0 0.5 second /' o 0 1 0 0.5 1 0 0 0 0 0 third /' 0 0 1 0 0 0.5 1 0 0 0 0 fourth /' 0 0 1 0 0 0 0.5 1 0 0 0 fifth /' o 0 1 0 0 0 0 0.5 1 0 0 sixth /' o 0 1 0 0 0 0 0 0. 5 1 0 seventh /' o 0 1 0 0 0 0 0 0 0.5 1 octave /' 0 0 1 1 1 0 0 0 0 0 0.5 ninth /' o 0 1 1 0.5 1 0 0 0 0 0 Now we still need a representation for harmony. It can be encoded as a harmonic field which is a vector of chord notes of the diatonic scale. The tonic T in C major for example contains 3 chord notes - C, E and G - which correspond to the first, third and fifth degree of the C major scale (1010100). This representation may be further improved. We have already mentioned that each note is represented by the interval to the first motif note (reference note). We can now encode the harmonic field starting with the first motif note instead of the first degree of the scale. This is equivalent to rotating the bits of the harmonic field vector. An example is displayed in Figure 3. The harmony of the motif is the dominant D, the first motif note is B which corresponds to the seventh degree of the C major scale. Therefore the

892 D.Homel harmonic field for D (0100101) is rotated by one position to the right resulting in (1010010). Starting with the first note B. the harmonic field indicates the intervals that lead to harmonizing notes B, D and G. In the right part of Figure 3 one can see a correspondance between bits activated in the harmonic field and bits set to 1 in the three interval codings. This kind of representation helps the neural network to directly establish a relationship between intervals and given harmony., J 3d I D third up o 0 1 0 0 0.5 1 0 0 0 0 sixth up o 0 1 0 0 0 0 0 0.5 1 0 pnme 010 0 1 0 0 0 0 0 0.5 harmonic field 1 0 1 0 0 1 0 Figure 3: Example illustrating the relationship between interval coding and rotat.ed harmonic field. Each note is represented by its interval to the first note. 6 PERFORMANCE We carried out several simulations to evaluate the performance of the system. Many improvements could be found however by just listening to the improvisations produced by the neural organist. One important problem was to find an appropriate number of classes for the given learning task. The following table lists the classification rate on the learning and validation set of the supernet and the subnet using 5, 12 and 20 motif classes. The learning set was automatically built from 12 Pachelbel chorale variations corresponding to 2220 patterns for the subnet and 555 for the supernet. The validation set includes 6 Pachelbel variations corresponding to 1396 patterns for the subnet and 349 for the supernet. Supernet and subnet were then trained independently with the RPROP learning algorithm. 5 classes s'upernet s'ubnet 12 classes 20 classes 5 classes 12 classes 20 classes learning set 91.17% 86.85% 87.57% 86.31% 93.92% 95.68% validation set 49.85% 40.69% 37.54% 79.15% 83.38% 86.96% The classification rate of both networks strongly depends on the number of classes, esp. on the validation set of the supernet. The smaller the number of classes, the better is the classification of the supernet because there are less alternatives to choose from. We can also notice an opposite development of the classification behavior for the subnet. The bigger the number of classes. the easier the subnet will be able to determine concrete motif notes for a given motif class. One can imagine that the optimal number of classes lies somewhere in the middle. Another idea is to form a committee of networks each of which is trained with different number of classes. We have also tested MELONET I on melodies that do not belong to the baroque era. Figure 4 shows a harmonization and variation of the melody "Twinkle twinkle little star" used by Mozart in his famous piano variations. It was produced by a network committee formed by 3*2=6 networks trained with 5, 12 and 20 classes. 7 CONCLUSION We have presented a neural network system inventing baroque-style variations on given melodies whose qualities are similar to those of an experienced human organ-

MELONEI'L Neural Nets for Inventing Baroque-Style Chorale Variations 893!. Figure 4: Melodic variation on "Twinkle twinkle little star" ist. The complex musical task could be learned introducing a multi-scale network model with two neural networks cooperating at different time scales, together with an unsupervised learning mechanism able to classify and recognize relevant musical structure. We are about to test this multi-scale approach on learning examples of other epochs, e.g., on compositions of classical composers like Haydn and Mozart or on Jazz improvisations. First results confirm that the system is able to reproduce stylespecific elements of other kinds of melodic variation as well. Another interesting question is whether the global coherence of the musical results may be further improved adding another network working at a higher level of abstraction, e.g., at. a phrase level. In summary, we believe that this approach presents an important step towards the learning of complete melodies. References Denis L. Baggi. NeurSwing: An Intelligent Workbench for the Investigation of Swing in Jazz. In: Readings in Computer-Generated Music, IEEE Computer Society Press, pp. 79-94, 1992. Johannes Feulner, Dominik Hornel. MELONET: Neural networks that learn harmony-based melodic variations. In: Proceedings of the 1994 International Computer Music Conference. ICMA Arhus, pp. 121-124, 1994. Hermann Hild, Johannes Feulner, Wolfram Menzel. HARMONET: A Neural Net for Harmonizing Chorales in the Style of J. S. Bach. In: Advances in Neural Information Processing 4 (NIPS 4), pp. 267-274. 1992. Dominik Hornel, Thomas Ragg. Learning Musical Structure and Style by Recognition, Prediction and Evolution. In: Proceedings of the 1996 International Computer Music Conference. ICMA Hong Kong, pp. 59-62, 1996. Dominik Hornel, Thomas Ragg. A Connectionist Model for the Evolution of Styles of Harmonization. In: Proceedings of the 1996 International Conference on Music Perception and Cognition. Montreal, 1996. Teuvo Kohonen. The Self-Organizing Map. In: Proceedings of the IEEE, Vol. 78, no. 9, pp. 1464-1480, 1990. Michael C. Mozer. Neural Network music composition by prediction. In: Connection Science 6(2,3), pp. 247-280, 1994.