GIVE NOW about ocw help & faqs contact us
21M.383 | Spring 2023 | Undergraduate, Graduate

# Computational Music Theory and Analysis

The next topic moves into a particular representation of CWMN for the computer, the music21 Stream object which can hold notes and much more. Before we begin working with Streams, let us familiarize ourselves with a particular piece of music that we will be working with in this class: J.S. Bach’s chorale “Alleluia, des soll’n wir alle froh sein” from Cantata no. 66 Erfreut euch, ihr Herzen, designated BWV 66.6.

BWV = Bach Werkverzeichnes, or catalog of Bach’s works.

Score: Bach Chorale BWV 66.6

Recording: The Choir and Orchestra of the J. S. Bach Foundation, Rudolf Lutz, conducting. The organist improvises the organ parts at the fermatas; you will not see that notated in the score.

We will work with this because it is the shortest chorale Bach wrote and thus the easiest to understand. We will sing through this piece several times in class, so I encourage you to find a voice part or two and sing them along with the choir until you are very familiar with it. This piece has some strange and wonderful moments.

Questions to think about:

- What key is this chorale in?
- If multiple keys, where are the transitions?
- Where does the soprano line behave weirdly?

Readings: music21 User’s Guide

- Chapter 4 [Streams I]: provides a basic introduction to Python lists and Streams. It also introduces `getElementsByClass()` and `getElementsByOffset()`, which were not covered in class.
- Chapter 5 [programming review, Lists of Lists]: a refresher for people whose work with nested data structures is a bit rusty.
- Chapter 6 [Streams II]: Stream Recursion, Hierarchies, and Flattening.
- Chapter 26 [Iterations, Filters, and getContextByClass]: advanced techniques in moving through a Stream and finding the elements you want. Optional, but helpful for PSet 3

This introductory video concerns a major aspect of Music Information Retrieval that shows how the steps of going from Sound to Score present problems related to music theory and analysis:

Video 9a: Music Information Retrieval (MIR): Sound to Score and Music Theory

Questions for Sound to Score:

- For which of the following steps in the Sound to Score process are Fourier transforms most useful?
  - Group of answer choices
  - Layout Score to Output
  - Virtual Score to Layout Score
  - Pitches to Tempo Estimation
  - Time Domain to Frequency
- What is one way using an example from the video that music theory/musicology can learn/gather data from the MIR process?
- Describe one way not used as an example in the video that you believe that knowledge from music theory/musicology could be used to verify/correct data from a MIR Sound to Score process to send the process back to a previous step. Specify what part of the pipeline the data would be used at and what part of the pipeline the process might be sent back to.

The most important representation format for CWMN today is MusicXML. Video 9b provides a brief introduction to how MusicXML works:

Video 9b: Introduction to MusicXML

Michael Good, the inventor of MusicXML, sat down with me over Zoom to talk about the creation of MusicXML:

Video 9c: Interview with Michael Good on MusicXML

## Course Info

##### Instructor

- Prof. Michael Scott Asato Cuthbert

##### Departments

- Music and Theater Arts

##### As Taught In

Spring 2023

##### Level

Undergraduate
Graduate

##### Topics

- Fine Arts
  - Music
    - Music History
    - Music Theory
- Mathematics
  - Computation
  - Mathematical Analysis
  - Probability and Statistics

##### Learning Resource Types

notes Lecture Notes
theaters Lecture Videos
theaters Other Video
assignment Multiple Assignment Types
grading Exams
Editable Files

Browse Resources

# You are leaving MIT OpenCourseWare

Please be advised that external sites may have terms and conditions, including license rights, that differ from ours. MIT OCW is not responsible for any content on third party sites, nor does a link suggest an endorsement of those sites and/or their content.