The Informatics Philharmonic By Christopher Raphael

Similar documents
Music Plus One and Machine Learning

The Comparison of Selected Audio Features and Classification Techniques in the Task of the Musical Instrument Recognition

Quantitative Evaluation of Violin Solo Performance

The Use of the Attack Transient Envelope in Instrument Recognition

Convention Paper Presented at the 132nd Convention 2012 April Budapest, Hungary

Research on the optimization of voice quality of network English teaching system

Piano Why a Trinity Piano exam? Initial Grade 8. Exams and repertoire books designed to develop creative and confident piano players

Automatic Chord Recognition with Higher-Order Harmonic Language Modelling

Analysis of Technique Evolution and Aesthetic Value Realization Path in Piano Performance Based on Musical Hearing

19 th INTERNATIONAL CONGRESS ON ACOUSTICS MADRID, 2-7 SEPTEMBER 2007

Appendix A. Strength of metric position. Line toward next core melody tone. Scale degree in the melody. Sonority, in intervals above the bass

A Bayesian Network for Real-Time Musical Accompaniment

Can the Computer Learn to Play Music Expressively? Christopher Raphael Department of Mathematics and Statistics, University of Massachusetts at Amhers

Weiss High School Band

Dynamics and Relativity: Practical Implications of Dynamic Markings in the Score

Musically Useful Scale Practice

A guide to the new. Singing Syllabus. What s changing in New set songs and sight-singing

Kaena Point. for violin, viola, cello and piano. Nolan Stolz. Duration ca STUDY SCORE (performance score also available in 11 x17 size)

STRING ORCHESTRA INTERMEDIATE LEVEL. Two beethovian. Preview Only INSTRUMENTATION

Sequitur XIII for extended piano and live-electronics (two players)

Practice Guide Sonatina in F Major, Anh. 5, No. 2, I. Allegro assai Ludwig van Beethoven

Dixie Highway. Preview Only. Andrew H. Dabczynski (ASCAP) instrumentation. Conductor Score... 1 Violin II Viola... 5 Cello... 5 String Bass...

UNIVERSITY OF CINCINNATI

Transcribing string music for saxophone: a presentation of Claude Debussy's Cello Sonata for baritone saxophone

Computer Coordination With Popular Music: A New Research Agenda 1

Art and Technology- A Timeline. Dr. Gabriela Avram

Baroque Ornamentation in the German Style

Á La Recherche du [cinq] Temps Perdu

Contemporary Christmas Classics

2013 SCHOOLS NOTES. MOZART CLARINET CONCERTO Victoria. Image: Mats Bäcker

Debussy: The Sunken Cathedral Analysis Melodic Foreground/Harmonic Background. Explanation of symbols used in analysis:

29 Amazing Grace. Information. Teaching and rehearsing. Ideas. Starting

Theseus and the Minotaur

TORCHMATE GROWTH SERIES MINI CATALOG

A Chance Constraint Approach to Multi Response Optimization Based on a Network Data Envelopment Analysis

Sr. SYMS Percussion Information

Predicting when to Laugh with Structured Classification

1. A 16 bar period based on the extended tenorclausula.

DATA COMPRESSION USING NEURAL NETWORKS IN BIO-MEDICAL SIGNAL PROCESSING

On Some Topological Properties of Pessimistic Multigranular Rough Sets

Cyril Scott SONATA. for Viola & Piano. edited by. Rupert Marshall-Luck EMP SP006

IMPROVED SUBSTITUTION FOR ERRONEOUS LTP-PARAMETERS IN A SPEECH DECODER. Jari Makinen, Janne Vainio, Hannu Mikkola, Jani Rotola-Pukkila

Preview Only A DIVISION OF

Henry Walford Davies. SONATA n r 2. in A major for Violin & Piano. edited by. Rupert Marshall-Luck EMP SP002

Preview Only. I n s t r u m e n tat i o n

CAS LX 502 Semantics. Meaning as truth conditions. Recall the trick we can do. How do we arrive at truth conditions?

GCSE Music. Unit 2 Guidance

LIFESTYLE VS 1. Video Expander

Preview Only. I n s t r u m e n tat i o n

i loves you porgy full score

BEGINNING STRING ORCHESTRA. Gymnopédie No. 1. Preview Only INSTRUMENTATION

UBTK YSP-1. Digital Sound Projector OWNER'S MANUAL

J. HARRY WHALLEY. Mixed Quartet, NGS and EEG 2012

YSP-900. Digital Sound Projector OWNER S MANUAL

Jazz Lines Publications Presents. i got rhythm. recorded by ella fitzgerald. Arranged by nelson riddle

Revisiting Simplicity and Richness : Postmodernism after The New Complexity. Graham Hair

Hidden Markov Model based dance recognition

Article begins on next page

Johann Sebastian Bach Jeremy Woolstenhulme, Arranger. Baroque Minuet, BWV841. Correlated with String Basics, Book 1, page 37 SAMPLE

BEGINNING STRING ORCHESTRA. g-force 5! Preview Only INSTRUMENTATION

EPSON PowerLite 5550C/7550C. User s Guide

Richard Barrett. pauk trumpet in Bb and accordion. performing score

Grouping structure and gesture: a sentence classification

The Silent Trumpet. A micro-oratorio for two-part choir and soprano/kazoo soloist. Michael Winikoff

PROCESSIONE DI LACRIME (PAVAN)

When the computer enables freedom from the machine. (On an outline of the work Hérédo-Ribotes)

6.UAP Project. FunPlayer: A Real-Time Speed-Adjusting Music Accompaniment System. Daryl Neubieser. May 12, 2016

Bach performance in Italian instructive editions

UAB YSP Digital Sound Projector OWNER S MANUAL

Preview Only. Legal Use Requires Purchase. Danza Africana. Note from the editor

THE SPECIALIZED USE OF MUSIC AS A MODE OF COMMUNICATION IN THE TREATMENT OF DISTURBED CHILDREN

SAMPLE. The Old Rocking Chair. Jeremy Woolstenhulme. Kjos String Orchestra Grade 1 Full Conductor Score SO274F $6.00

TOWARD AN INTELLIGENT EDITOR FOR JAZZ MUSIC

Exploring Principles-of-Art Features For Image Emotion Recognition

SAMPLE. Jeremy Woolstenhulme. Rain Festival. Steps to Successful Literature. Correlated with String Basics, Book 2, page 22

This thesis is protected by copyright which belongs to the author.

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

big bertha full score

Past papers. for graded exams in music theory Grade 7

COGNITION AND VOLITION

Franz Schubert. Jeff Bailey, Arranger

James M. Stephenson T O G E T H E R COMPOSERJIM.COM. for string orchestra.

about time written for harry james full score

Jr. SYMS Percussion Information

A Fractal Video Communicator. J. Streit, L. Hanzo. Department of Electronics and Computer Sc., University of Southampton, UK, S09 5NH

However, in studies of expressive timing, the aim is to investigate production rather than perception of timing, that is, independently of the listene

A New Day. Ryan Meeboer. Instrumentation: Flute - 8 Oboe - 2 PREVIEW ONLY

Automatic Rhythmic Notation from Single Voice Audio Sources

Eighth Note Publications

Music Segmentation Using Markov Chain Methods

Level 1 Music, Demonstrate knowledge of conventions used in music scores p.m. Friday 25 November 2016 Credits: Four

Kjos String Orchestra Grade 1 Full Conductor Score SO394F $7.00. Jeremy Woolstenhulme. Edge of the Horizon. Neil A. Kjos Music Company Publisher

Programme notes and information for performer. [B] contained. for clarinet and digitally-processed sound. confined -> enclosed -> implied -> revealed

YSP-500. Digital Sound Projector TM OWNER S MANUAL

A probabilistic approach to determining bass voice leading in melodic harmonisation

Definitions of Chord in the Teaching of Tonal Harmony

A STATISTICAL VIEW ON THE EXPRESSIVE TIMING OF PIANO ROLLED CHORDS

EMERGING JAZZ SERIES BABY. RYAN MEEBOER

SYMMETRY AND NARRATIVE IN CHRISTOPHER ROUSE S TROMBONE CONCERTO WITH WHITE SPACE WAITING (AN ORIGINAL COMPOSITION FOR CHAMBER ORCHESTRA)

Jazz Lines Publications Presents. love for sale. recorded by ella fitzgerald. Arranged by buddy bregman

Transcription:

The Informatics Philharmonic By Christoher Rahael doi:10.1145/1897852.1897875 Abstract A system for musical accomaniment is resented in which a comuter-driven orchestra follows and learns from a soloist in a concerto-like setting. The system is decomosed into three modules: The first comutes a real-time score match using a hidden Markov model; the second generates the outut audio by hase-vocoding a reexisting audio recording; the third rovides a link between these two, by redicting future timing evolution using a Kalman Filter like model. Several examles are resented showing the system in action in diverse musical settings. Connections with machine learning are highlighted, showing current weaknesses and new ossible directions. 1. MUSICAL ACCOMPANIMENT SYSTEMS Musical accomaniment systems are comuter rograms that serve as musical artners for live musicians, usually laying a suorting role for music centering around the live layer. The tyes of ossible interaction between live layer and comuter are widely varied. Some aroaches create sound by rocessing the musician s audio, often driven by analysis of the audio content itself, erhas distorting, echoing, harmonizing, or commenting on the soloist s audio in largely redefined ways. 8, 12 Other orientations are directed toward imrovisatory music, such as jazz, in which the comuter follows the outline of a score, erhas even comosing its own musical art on the fly, 3 or evolving as a call and resonse in which the comuter and human alternate the lead role. 6, 9 Our focus here is on a third aroach that models the traditional classical concerto-tye setting in which the comuter erforms a recomosed musical art in a way that follows a live soloist. 2, 4, 11 This categorization is only meant to summarize some ast work, while acknowledging that there is considerable room for blending these scenarios, or working entirely outside this realm of ossibilities. The motivation for the concerto version of the roblem is strikingly evident in the Jacobs School of Music ( JSoM) at Indiana University, where most of our recent exeriments have been erformed. For examle, the JSoM contains about 200 student ianists, for whom the concerto literature is central to their daily ractice and asirations. However, in the JSoM, the regular orchestras erform only two iano concerti each year using student soloists, thus ensuring that most of these asiring ianists will never erform as orchestral soloist while at IU. We believe this is truly unfortunate since nearly all of these students have the necessary technical skills and musical deth to greatly benefit from the concerto exerience. Our work in musical accomaniment systems strives to bring this rewarding exerience to the music students, amateurs, and many others who would like to lay as orchestral soloist, though, for whatever reason, do not have the oortunity. Even within the realm of classical music, there are a number of ways to further subdivide the accomaniment roblem, requiring substantially different aroaches. The JSoM is home to a large string edagogy rogram beginning with students at 5 years of age. Students in this rogram lay solo ieces with iano even in their first year. When accomanying these early-stage musicians, the ianist s role is not simly to follow the young soloist, but to teach as well, by modeling good rhythm, steady temo where aroriate, while introducing musical ideas. In a sense, this is the hardest of all classical music accomaniment roblems, since the accomanist must be exected to know more than the soloist, thus dictating when the accomanist should follow, as well as when and how to lead. A coarse aroximation to this accomanist role rovides a rather rigid accomaniment that is not overly resonsive to the soloist s interretation (or errors) there are several commercial rograms that take this aroach. The more sohisticated view of the edagogical music system one that follows and leads as aroriate is almost comletely untouched, ossibly due to the difficulty of modeling the objectives. However, we see this area as fertile for lasting research contributions and hoe that we, and others, will be able to contribute to this cause. An entirely different scenario deals with music that evolves largely without any traditional sense of rhythmic flow, such as in some comositions of Penderecki, Xenakis, Boulez, Cage, and Stockhausen, to name some of the more famous examles. Such music is often notated in terms of seconds, rather than beats or measures, to emhasize the irrelevance of regular ulse. For works of this tye involving soloist and accomaniment, the score can indicate oints of synchronicity, or time relations, between various oints in the solo and accomaniment arts. If the aroach is based solely on audio, a natural strategy is simly to wait until various solo events are detected, and then to resond to these events. This is the aroach taken by the IRCAM score follower, with some success in a variety of ieces of this tye. 2 A third scenario, which includes our system, treats works for soloist and accomaniment having a continuing musical ulse, including the overwhelming majority of common ractice art music. This music is the rimary focus of most of our erformance-oriented music students at the JSoM, and is the music where our accomaniment system is most at home. Music containing a regular, though not rigid, ulse requires close synchronization between the solo and accomanying arts, as the overall result suffers greatly as this The original version of this chater is entitled Music Plus One and Machine Learning and was ublished in Proceedings of the International Conference on Machine Learning, Haifa, 2010. march 2011 vol. 54 no. 3 communications of the acm 87

research highlights synchrony degrades. Our system is known interchangeably as the Informatics Philharmonic, or Music Plus One (MPO), due to its alleged imrovement on the lay-along accomaniment records from the Music Minus One comany that insired our work. For several years, we have collaborated with faculty and students in the JSoM on this traditional concerto setting, in an ongoing effort to imrove the erformance of our system while exloring variations on this scenario. The web age htt://www.music.informatics.indiana.edu/aers/ icml10 contains a video of violinist Yoo-jin Cho, accomanied by our system on the first movement of the Sibelius violin concerto, taken from a lecture/concert for our Art s Week festival of 2007. We will resent a descrition of the overall architecture of our system in terms of its three basic comonents: Listen, Predict, and Play, including several illuminating examles. We also identify oen roblems or limitations of roosed aroaches that are likely to be interesting to the Machine Learning community, and well may benefit from their contributions. The basic technology required for common ractice classical music extends naturally to the avant garde domain. In fact, we believe one of the greatest otential contributions of the accomaniment system is in new music comosed secifically for human comuter artnershis. The comuter offers essentially unlimited virtuosity in terms of laying fast notes and coordinating comlicated rhythms. On the other hand, at resent, the comuter is comaratively weak at roviding aesthetically satisfying musical interretations. Comositions that leverage the technical ability of the accomaniment system, while humanizing the erformance through the live soloist s leadershi, rovide an oen-ended musical meeting lace for the twenty-firstcentury comosition and technology. Several comositions of this variety, written secifically for our accomaniment system by Swiss comoser and mathematician Jan Beran, are resented at the web age referenced above. 2. OVERVIEW OF MUSIC PLUS ONE Our system is comosed of three sub-tasks called Listen, Predict, and Play. The Listen module interrets the audio inut of the live soloist as it accumulates in real time. In essence, Listen annotates the incoming audio with a running commentary, identifying note onsets with variable detection latency, using the hidden Markov model discussed in Section 3. A moment s thought here reveals that some detection latency is inevitable since a note must be heard for an instant before it can be identified. For this reason, we believe it is hoeless to build a urely resonsive system one that waits until a solo note is detected before laying a synchronous accomaniment event: Our detection latency is usually in the 30 90-ms range, enough to rove fatal if the accomaniment is consistently behind by this much. For this reason, we model the timing of our accomaniment on the human musician, continually redicting future evolution, while modifying these redictions as more information becomes available. The module of our system that erforms this task, Predict, is a Gaussian grahical model quite close to a Kalman Filter, discussed in Section 4. The Play module uses hase-vocoding 5 to construct the orchestral audio outut using audio from an accomaniment-only recording. This well-known technique wars the timing of the original audio without introducing itch distortions, thus retaining much of the original musical intent including balance, exression, and tone color. The Play rocess is driven by the outut of the Predict module, in essence by following an evolving sequence of future targets like a trail of breadcrumbs. While the basic methodology of the system relies on old standards from the ML community HMMs and Gaussian grahical models the comutational challenge of the system should not be underestimated, requiring accurate real-time two-way audio comutation in musical scenarios comlex enough to be of interest in a sohisticated musical community. The system was imlemented for off- theshelf hardware in C and C++ over a eriod of more than 15 years by the author. Both Listen and Play are imlemented as searate threads which both make calls to the Predict module when either a solo note is detected (Listen) or an orchestra note is layed (Play). What follows is a more detailed look at Listen and Predict. 3. LISTEN: HMM-BASED SCORE FOLLOWING Blind music audio recognition 1, 7, 13 treats the automatic transcrition of music audio into symbolic music reresentations, using no rior knowledge of the music to be recognized. This roblem remains comletely oen, esecially with olyhonic (several indeendent arts) music, where the state of the art remains rimitive. While there are many ways one can build reasonable data models quantifying how well a articular audio instant matches a hyothesized collection of itches, what seems to be missing is the musical language model. If honemes and notes are regarded as the atoms of seech and music, there does not seem to be a musical equivalent of the word. Furthermore, while music follows simle logic and can be quite redictable, this logic is often cast in terms of higherlevel constructs such as meter, harmony, and motivic transformation. Comutationally tractable models such as note n-grams seem to contribute very little here, while a comutationally useful music language model remains uncharted territory. Our Listen module deals with the much simler situation in which the music score is known, giving the itches the soloist will lay along with their aroximate durations. Thus, the score following roblem is one of alignment rather than recognition. Score following, otherwise known as online alignment, is more difficult than its offline cousin, since an online algorithm cannot consider future audio data in estimating the times of audio events. A score following must hear a little bit of a note before the note s onset can be detected, thus always resulting with some degree of latency the lag between the estimated onset time and the time the estimate is made. One of the rincial challenges of online alignment is navigating the trade-off between latency and accuracy. Schwarz 14 gives a nice annotated bibliograhy of the many contributions to score following. 88 communications of the acm March 2011 vol. 54 no. 3

3.1. The listen model Our HMM aroach views the audio data as a sequence of frames, y 1, y 2,..., y T, with about 30 frames er second, while modeling these frames as the outut of a hidden Markov chain, x 1, x 2,..., x T. The state grah for the Markov chain, described in Figure 1, models the music as a sequence of sub-grahs, one for each solo note, arranged so that the rocess enters the start of the (n + 1)th note as it leaves the nth note. From the figure, one can see that each note begins with a short sequence of states meant to cature the attack ortion of the note. This is followed by another sequence of states with self-loos meant to cature the main body of the note, and to account for the variation in note duration we may observe, as follows. If we chain together m states which each either move forward, with robability, or remain in the current state, with robability q = 1, then the total number of state visits (audio frames), L, sent in the sequence of m states has a negative binomial distribution Our data model is comosed of three features b t ( y t ), e t ( y t ), s t ( y t ) assumed to be conditionally indeendent given the state: P(b t,e t,s t ) = P(b t ) P(e t ) P(s t ). The first feature, b t, measures the local burstiness of the signal, articularly useful in distinguishing between note attacks and steady-state behavior observe that we distinguished between the attack ortion of a note and steady-state ortion in Figure 1. The second feature, e t, measures the local energy, useful in distinguishing between rests and notes. By far, however, the vector-valued feature s t is the most imortant, as it is well-suited to making itch discriminations, as follows. We let f n denote the frequency associated with the nominal itch of the nth score note. As with any quasi-eriodic signal with frequency f n, we exect that the audio data from the nth note will have a magnitude sectrum comosed of eaks at integral multiles of f n. This is modeled by the Gaussian mixture model deicted in Figure 2 for l = m, m + 1,.... While convenient to reresent this distribution with a Markov chain, the asymmetric nature of the negative binomial is also musically reasonable: While it is common for an inter-onset interval (IOI) to be much longer than its nominal length, the reverse is much less common. For each note, we choose the arameters m and so that E(T) = m/ and Var(T) = mq/ 2 reflect our rior beliefs. Before any rehearsals, the mean is chosen to be consistent with the note value and the nominal temo given in the score, while the variance is chosen to be a fixed increasing function of the mean. However, once we have rehearsed a iece a few times, we choose m and according to the method of moments so that the emirical mean and variance agree with the mean and variance from the model. In reality, we use a wider variety of note models than deicted in Figure 1, with variants for short notes, notes ending with otional rests, notes that are rests, etc., though all follow the same essential idea. The result is a network of thousands of states. Figure 1. The state grah for the hidden sequence, x 1, x 2,..., of our HMM. where h w h = 1 and N( j; m, s 2 ) is a discrete aroximation of a Gaussian distribution. The model catures the note s sectral enveloe, describing the way energy is distributed over the frequency range. In addition, due to the logarithmic nature of itch, frequency errors committed by the layer are roortional to the desired frequency. This is catured in our model by the increasing variance of the mixture comonents. We define s t to be the magnitude sectrum of y t, normalized to sum to constant value, C. If we believe the nth note is sounding in the tth frame, we regard Figure 2. An idealized note sectrum modeled as a mixture of Gaussians. 0.8 0.6 Note 1 q q q q q q atck atck start 1 m 0.4 Note 2 0.2 start 2 Note 3 etc. start 3 0.0 0 200 400 600 800 1000 Frequency (Hz) march 2011 vol. 54 no. 3 communications of the acm 89

research highlights s t as the histogram of a random samle of size C. Thus our data model becomes the multinomial distribution It is worth noting that the model generalizes in a straightforward way to situations in which multile itches sound at once, simly by mixing several distributions of the forms of Equation 3.1. In this way our aroach accommodates anything from double stos on the violin to large ensemble erformances. This modeling aroach describes the art of the audio sectrum due to the soloist reasonably well. However, our actual signal will receive not only this solo contribution, but also audio generated by our accomaniment system itself. If the accomaniment audio contains frequency content that is confused with the solo audio, the result is the highly undesirable ossibility of the accomaniment system following itself in essence, chasing its own shadow. To a certain degree, the likelihood of this outcome can be diminished by turning off the score follower when the soloist is not laying; of course we do this. However, there is still significant otential for shadow-chasing since the itch content of the solo and accomaniment arts is often similar. Our solution is to directly model the accomaniment contribution to the audio signal we receive. Since we know what the orchestra is laying (our system generates this audio), we add this contribution to the data model. More exlicitly, if q t is the magnitude sectrum of the orchestra s contribution in frame t, we model the conditional distribution of s t using Equation 1, but with t,n = λ n + (1 λ)q t for 0 < λ < 1 instead of n. This addition creates significantly better results in many situations. The surrising difficulty in actually imlementing the aroach, however, is that there seems to be only weak agreement between the known audio that our system lays through the seakers and the accomaniment audio that comes back through the microhone. Still, with various averaging tricks in the estimation of q t, we can nearly eliminate the undesirable shadow-chasing behavior. 3.2. Online interretation of audio One of the worst things a score follower can do is reort events before they have occurred. In addition to the sheer imossibility of roducing accurate estimates in this case, the musical result often involves the accomanist arriving at a oint of coincidence before the soloist does. When the accomanist stes on the soloist in this manner, the soloist must struggle to regain control of the erformance, erhas feeling deserate and irrelevant in the rocess. Since the consequences of false ositives are so great, the score follower must be reasonably certain that a note event has already occurred before reorting its location. The robabilistic formulation of online score following is the key to avoiding such false ositives, while navigating the accuracylatency trade-off in a reasonable manner. Every time we rocess a new frame of audio we recomute (1) the forward robabilities, (x t,..., y t ), for our current frame, t. Listen waits to detect note n until we are sufficiently confident that its onset is in the ast. That is, until P(x t ³ start n,..., y t ) ³ t for some constant, t. In this exression, start n reresents the initial state of the nth note model, as indicated in Figure 1, which is either before, or after all other states in the model (x t ³ start n makes sense here). Suose that t * is the first frame where the above inequality holds. When this occurs, our knowledge of the note onset time can be summarized by the function of t: P(x t = start n,..., y t *) which we comute using the forward backward algorithm. Occasionally this distribution conveys uncertainty about the onset time of the note, say, for instance, if it has high variance or is bimodal. In such a case we simly do not reort the onset time of the articular note, believing it is better to remain silent than rovide bad information. Otherwise, we estimate the onset as tˆn = arg max P(x t = start n,..., y t* ) (2) t t * and deliver this information to the Predict module. Several videos demonstrating the ability of our score following can be seen at the aforementioned web site. One of these simly lays the audio while highlighting the locations of note onset detections at the times they are made, thus demonstrating detection latency what one sees lags slightly behind what one hears. A second video shows a rather eccentric erformer who ornaments wildly, makes extreme temo changes, lays wrong notes, and even reeats a measure, thus demonstrating the robustness of the score follower. 4. PREDICT: MODELING MUSICAL TIMING As discussed in Section 2, we believe a urely resonsive accomaniment system cannot achieve accetable coordination of arts in the range of common ractice classical music we treat, thus we choose to schedule our accomaniment through rediction rather than resonse. Our aroach is based on a robabilistic model for musical timing. In develoing this model, we begin with three imortant traits we believe such a model must have. 1. Since our accomaniment must be constructed in real time, the comutational demand of our model must be feasible in real time. 2. Our system must imrove with rehearsal. Thus our model must be able to automatically train its arameters to embody the timing nuances demonstrated by the live layer in ast examles. This way our system can better anticiate the future musical evolution of the current erformance. 3. If our rehearsals are to be successful in guiding the system toward the desired musical end, the system must sightread (erform without rehearsal) reason- 90 communications of the acm March 2011 vol. 54 no. 3

ably well. Otherwise, the layer will become distracted by the oor ensemble and not be able to demonstrate what he or she wants to hear. Thus there must be a neutral setting of arameters that allows the system to erform reasonably well out of the box. 4.1. The timing model We first consider a timing model for a single musical art. Our model is exressed in terms of two hidden sequences, {t n } and {s n } where t n is the time, in seconds, of nth note onset and s n is the temo, in seconds er beat, for the nth note. These sequences evolve according to the model s n + 1 = s n + s n (3) t n + 1 = t n + l n s n + t n (4) where l n is the length of the nth event, in beats. With the udate variables, {s n } and {t n }, set to 0, this model gives a literal and robotic musical erformance with each inter-onset-interval, t n + 1 t n, consuming an amount of time roortional to its length in beats, l n. The introduction of the udate variables allows timevarying temo through the {s n }, and elongation or comression of note lengths with the {t n }. We further assume that the {(s n, t n ) t } are indeendent with (s n,t n ) t N(m n, G n ), n = 1, 2,..., and (s 0, t 0 ) t ~ N(m 0, G 0 ), thus leading to a joint Gaussian model on all model variables. The rhythmic interretation embodied by the model is exressed in terms of the {m n, G n } arameters. In this regard, the {m n } vectors reresent the tendencies of the erformance where the layer tends to seed u (s n < 0), slow down (s n > 0), and stretch (t n > 0), while the {G n } matrices cature the reeatability of these tendencies. It is simlest to think of Equations 3 and 4 as a timing model for single musical art. However, it is just as reasonable to view these equations as a timing model for the comosite rhythm of the solo and orchestra. That is, consider the situation, deicted in Figure 3, in which the solo, orchestra, and comosite rhythms have the following musical times (in beats): solo 0 1/3 2/3 1 4/3 5/3 2 accom 0 1/2 1 3/2 2 com. 0 1/3 1/2 2/3 2 4/3 3/2 5/3 2 The {l n } for the comosite would be found by simly taking the differences of rational numbers forming the comosite rhythm: l 1 = 1/3, l 2 = 1/6, etc. In what follows, we regard Equations 3 and 4 as a model for this comosite rhythm of the solo and orchestra arts. The observable variables in this model are the solo note onset estimates roduced by Listen and the known note onsets of the orchestra (our system constructs these during the erformance). Suose that n indexes the events in the comosite rhythm having associated solo notes, estimated by the {ˆt n }. Additionally, suose that n indexes the events having associated orchestra notes with Figure 3. To: Two musical arts generate a comosite rhythm when suerimosed. Bot: The resulting grahical model arising from the comosite rhythm. Solo Accom Listen Udates Comosite Accom onset times, {o n }. We model ˆt n = t n + n 3 o n = t n + d n where n ~ N(0, r 2 ) and d s n ~ N(0, r o2 ). The result is the Gaussian grahical model deicted in the bottom anel of Figure 3. In this figure, the row labeled Comosite corresonds to the {(s n, t n )} variables of Equations 3 and 4, while the row labeled Udates corresonds to the {(s n, t n )} variables. The Listen row is the collection of estimated solo note onset times, {ˆt n } while the Accomaniment row corresonds to the orchestra times, {o n }. 4.2. The model in action With the model in lace we are now ready for real-time accomaniment. For our first rehearsal we initialize the model so that m n = 0 for all n. This assumtion in no way recludes our system from correctly interreting and following temo changes or other rhythmic nuances of the soloist. Rather, it states that, whatever we have seen so far in a erformance, we exect future timing to evolve according to the current temo. In real-time accomaniment, our system is concerned only with scheduling the currently ending orchestra note time, o n. The time of this note is initially scheduled when we lay the revious orchestra note, o n 1. At this oint we comute the new mean of o n, conditioning on o n 1 and whatever other variables have been observed, and schedule o n accordingly. While we wait for the currently scheduled time to occur, the Listen module may detect various solo events, ˆt n. When this haens we recomute the mean of o n, conditioning on this new information. Sooner or later the actual clock time will catch u to the currently scheduled time of the n th event, at which oint the orchestra note is layed. Thus an orchestra note may be rescheduled many times before it is actually layed. A articularly instructive examle involves a run of many 3 march 2011 vol. 54 no. 3 communications of the acm 91

research highlights solo notes culminating in a oint of coincidence with the orchestra. As each solo note is detected we refine our estimate of the desired oint of coincidence, thus gradually honing in on this oint of arrival. It is worth noting that very little harm is done when Listen fails to detect a solo note. We simly redict the ending orchestra note conditioning on the variables we have observed. The web age given before contains a video demonstrating this rocess. The video shows the estimated solo times from our score follower aearing as green marks on a sectrogram. Predictions of our accomaniment system are shown as analogous red marks. One can see the ending orchestra time jiggling as new solo notes are estimated, until finally the currently redicted time asses. In the video, one can see occasional solo notes that are never marked with green lines. These are notes for which the osterior onset time was not sufficiently eaked to merit a note detection. This haens most often with reeated itches, for which our data model is less informative, and notes following longer notes, where our rior model is less oinionated. We simly treat such notes as unobserved and base our redictions only on the observed events. The role of Predict is to schedule accomaniment notes, but what does this really mean in ractice? Recall that our rogram lays audio by hase-vocoding (time-stretching) an orchestra-only recording. A time-frequency reresentation of such an audio file for the first movement of the Dvorˆák Cello concerto is shown in Figure 4. If you know the iece, you will likely be able to follow this sectrogram. In rearing this audio for our accomaniment system, we erform an off-line score alignment to determine where the various orchestra notes occur, as marked with vertical lines in the figure. Scheduling a note simly means that we change the hase-vocoder s lay rate so that it arrives at the aroriate audio file osition (vertical line) at the scheduled time. Thus the lay rate is continually modified as the erformance evolves. This is our only control the orchestra erformance. After one or more rehearsals, we adat our timing model to the soloist to better anticiate future erformances. To do this, we first erform an off-line estimate of the solo note times using Equation 2, only conditioning on the entire sequence of frames, y 1,..., y T, using the forward backward algorithm to identify the most likely onset time for each note. Using one or more such rehearsals, we can iteratively reestimate the model arameters {m n } using the EM algorithm, resulting in both measurable and erceivable imrovement of rediction accuracy. While, in rincile, we can also estimate the {G n } arameters, we have observed little or no benefit from doing so. In ractice, we have found the soloist s interretation to be something of a moving target. At first this is because the soloist tends to comromise somewhat in the initial rehearsals, ulling the orchestra in the desired direction, while not actually reaching the target interretation. But even after the soloist seems to settle down to a articular interretation on a given day, we often observe further interretation drift over subsequent meetings. Of course, without this drift one s ideas could never imrove! For this reason we train the model using the most recent several rehearsals, thus facilitating the continually evolving nature of musical interretation. 5. MUSICAL EXPRESSION AND MACHINE LEARNING Our system learns its musicality through osmosis. If the soloist lays in a musical way, and the orchestra manages to closely follow the soloist, then we hoe the orchestra will inherit this musicality. This manner of learning by imitation works well in the concerto setting, since the division of authority between the layers is rather extreme, mostly granting the right of way to the soloist. In contrast, the ure following aroach is less reasonable when the accomaniment needs a sense of musicality that acts indeendently, or erhas even in oosition, to what Figure 4. A sectrogram of the oening of the first movement of the Dvoˆrák Cello concerto. The horizontal axis of the figure reresents time while the vertical axis reresents frequency. The vertical lines show the note times for the orchestra. 92 communications of the acm March 2011 vol. 54 no. 3

other layers do. Such a situation occurs with the early-stage accomaniment roblem discussed in Section 1, as here one cannot learn the desired musicality from the live layer. Perhas the accomaniment antithesis of the concerto setting is the oera orchestra, in which the accomanying ensemble is often on equal footing with the soloists. We observed the nadir of our system s erformance in an oera rehearsal where our system served as rehearsal ianist. What these two situations have in common is that they require an accomanist with indeendent musical knowledge and goals. How can we more intelligently model this musicality? An incremental aroach would begin by observing that our timing model of Equations 3 and 4 is over-arametrized, with more degrees of freedom than there are notes. We make this modeling choice because we do not know which degrees of freedom are needed ahead of time, so we use the training data from the soloist to hel sort this out. Unnecessary learned arameters may contribute some noise to the resulting timing model, but the overall result is accetable. One ossible line of imrovement is simly decreasing the model s freedom surely the layer does not wish to change the temo and aly temo-indeendent note length variation on every note. For instance, one alternative model adds a hidden discrete rocess that chooses, for each note, between three ossibilities: variation of either temo or note length, or no variation of either kind. Of these, the choice of neither variation would be the most likely a riori, thus biasing the model toward simler musical interretations. The resulting model is a Switching Kalman Filter. 15 While exact inference is no longer ossible with such a model, we exect that one can make aroximations that will be good enough to realize the full otential of the model. Perhas a more ambitious aroach analyzes the musical score itself to choose the locations requiring degrees of freedom. One can think of this aroach as adding joints to the musical structure so that it deforms into musically reasonable shaes as a musician alies external force. Here there is an interesting connection with the work on exressive synthesis, such as Widmer and Goebl, 16 in which one algorithmically constructs an exressive rendition of a reviously unseen iece of music, using ideas of machine learning. One aroach here associates various score situations, defined in terms of local configurations of score features, with interretive actions. The associated interretive actions are learned by estimating timing and loudness arameters from a erformance corus, over all equivalent score locations. Such aroaches are far more ambitious than our resent aroach to musicality, as they try to understand exression in general, rather than in a secific musical context. The understanding and synthesis of musical exression is one of the most interesting music-science roblems, and while rogress has been achieved in recent years, it would still be fair to call the roblem oen. One of the rincial challenges here is that one cannot directly ma observable surface-level attributes of the music, such as itch contour or local rhythm context, into interretive actions, such as delay, or temo or loudness change. Rather, there is a murky intermediate level in which the musician comes to some understanding of the musical meaning, on which the interretive decisions are based. This meaning comes from several different asects of the music. For examle, some comes from musical structure, as in the way one might slow down at the end of a hrase, giving a sense of musical closure. Some meaning comes from rosodic asects, analogous to seech, such as a local oint of arrival, which may be maybe emhasized or delayed. A third asect of meaning describes an overall character or affect of a section of music, such as excited or calm. While there is no official taxonomy of musical interretation, most discussions on this subject revolve around intermediate identifications of this kind, and the interretive actions they require. 10 From the machine learning oint of view, it is imossible to learn anything useful from a single examle, thus one must grou together many examles of the same musical situation in order to learn their associated interretive actions. Thus it seems natural to model the music in terms of some latent variables that imlicitly categorize individual notes or sections of music. What should the latent variables be, and how can one describe the deendency structure among them? While we cannot answer these questions, we see in them a good deal of deth and challenge, and recommend this roblem to the musically inclined members of the readershi with great enthusiasm. Acknowledgments This work was suorted by NSF Grants IIS-0812244 and IIS-0739563. References 1. Cemgil, A.T., Kaen, H.J., Barber, D. A generative model for music transcrition. IEEE Trans. Audio Seech Lang. Process. 14, 2 (Mar. 2006), 679 694. 2. Cont, A., Schwarz, D., Schnell, N. From Boulez to ballads: Training ircam s score follower. In Proceedings of the International Comuter Music Conference (2005), 241 248. 3. Dannenberg, R., Mont-Reynaud, B. Following an imrovisation in real time. In Proceedings of the 1987 International Comuter Music Conference (1987), 241 248. 4. Dannenberg, R., Mukaino, H. New techniques for enhanced quality of comuter accomaniment. In Pro ceedings of the 1988 International Comuter Music Conference (1988), 243 249. 5. Flanagan, J.L., Golden, R.M. Phase vocoder. Bell Syst. Tech. J. 45 (Nov. 1966), 1493 1509. 6. Franklin, J. Imrovisation and learning. In Advances in Neural Information Processing Systems 14. MIT Press, Cambridge, MA, 2002. 7. Klauri, A., Davy, M. (editors). Signal Pro cessing Methods for Music Transcrition. Sringer-Verlag, New York, 2006. 8. Lie, C. Real-time interaction among comosers, erformers, and comuter Christoher Rahael (crahael@indiana. edu), School of Informatics and Comuting, Indiana University, Bloomington, IN. 2011 ACM 0001-0782/11/0300 $10.00 systems. Inf. Process. Soc. Jn. SIG Notes, 123 (2002), 1 6. 9. Pachet, F. Beyond the cybernetic jam fantasy: The continuator. IEEE Comut. Grah. Al. 24, 1 (2004), 31 35. 10. Palmer, C. Music erformance. Annu. Rev. Psychol. 48 (1997), 115 138. 11. Rahael, C. A Bayesian network for real-time musical accomaniment. In Advances in Neural Information Processing Systems (NIPS) 14. MIT Press, 2002. 12. Rowe, R. Interactive Music Systems. MIT Press, 1993. 13. Sagayama, T.N.S., Kameoka, H. Secmurt anasylis: A iano-rollvisualization of olyhonic music signal by deconvolution of logfrequency sectrum. In Proceedings 2004 ISCA Tutorial and Research Worksho on Statistical and Percetual Audio Processing (SAPA2004) (2004). 14. Schwarz, D. Score following commented bibliograhy, 2003. 15. Shumway, R.H., Stoffer, D.S. Dynamic linear models with switching. J. Am. Stat. Assoc. 86 (1991), 763 769. 16. Widmer, G., Goebl, W. Comutational models for exressive music erformance: The state of the art. J. New Music Res. 33, 3 (2004), 203 216 march 2011 vol. 54 no. 3 communications of the acm 93