21M.380 | Spring 2010 | Undergraduate

Music and Technology: Algorithmic and Generative Music

Assignments and Projects

This page describes the musical design report assignments and sonic system project, and includes links to samples of student work.

Musical Design Reports

During the term, each student will produce three (3) musical design reports. This report is an original sonic sketch or musical work, lasting from two to five minutes, realized in notation, MIDI, digital audio, or code, and based on approaches, techniques, and/or models presented for each assignment. The sonic submission must be accompanied by written commentary (around 300 words, or about 1 double-spaced page in a 12 point serif font with one inch margins) consisting of at least the following components.

  1. A discussion of personal, musical, and/or aesthetic motivations.
  2. Commentary on how the techniques and/or tools shape and/or control the music versus how intuitive and/or aesthetic choices shape and/or control the music.
  3. An evaluation of the aesthetic quality of the results and a description of how the work might be improved and/or expanded.

For each report, a group of students will be selected to present and discuss their results.

Sample Student Work

Design Report 1 sample: AthenaCL generation and manipulation

Design Report 2 sample: Ethiopian krar-inspired, Markov chain generated

Design Report 3 sample: Cat sounds source, PD generated

Sonic System Project and Presentation

This project includes the creation of an original sonic system that functions as either a generative instrument with or without a performance interface or as a static or dynamic musical work employing techniques and/or tools of algorithmic composition. This project can be created with mechanical and/or acoustic tools, electrical circuits, creative extensions of conventional musical instruments and processors, or original software designs in any language or system. Students will present and demonstrate their system to the class and provide a written report describing their approach.

The project report is a written assignment (around 800 words, or about 3 double-spaced pages excluding citations and bibliography in a 12 point serif font with one inch margins) consisting of at least the following components.

  1. A discussion of personal, musical, and/or aesthetic motivations.
  2. An analysis of the system’s main components, interface, and/or sound production techniques.
  3. Comparisons to related historical or contemporary music technologies.
  4. An evaluation of the aesthetic quality of the results and a description of how the system might be improved and/or expanded.

Students must prepare and deliver a ten minute aural presentation on their sonic system. The presentation should include main points from the project report. Additionally, students must demonstrate the sonic possibilities of the system, treated in isolation and/or in the context of other sound sources and/or music.

Two weeks prior to the project’s final due date, students must bring to class and submit a working prototype or minimal implementation of their sonic system, and be prepared to demonstrate and discuss their goals and plans as they approach completion.

Sample Student Work

Generative Context-free Grammars

Genetic Algorithms

Video Soundtrack Generation with PD

Game of Life: With Music!

AthenaCL generation and manipulation

Courtesy of MIT student, used with permission.

In this assignment I used athenaCL as a generative tool to obtain sound clips that I then further manipulated. AthenaCL generated beta and exponential distributions for me, affecting rhythmic pattern, amplitude, and BPM. I did not compose in athenaCL but instead experimented with different texture parameters until I found ones I liked. Because of my limited skill with the interface, I didn’t save my source code that generated the sounds I used.

The composition is in ABA form and is influenced by my recent listening (the new Four Tet album, Nathan Fake, lots of dubstep). Both A sections are playing from the same original rhythmic sources. In these clips rhythm is highly varied through a long Basket Gen string, amplitude is controlled by beta and exponential distributions, and BPM is varied sinusoidally throughout the samples. In both cases the length and start positions of the clips are varied to produce a non-rhythmic sound cloud. In the first A, the rhythms are played by 505 drum sounds while in the last A the sounds come from wobbly bass sounds generated from a sawtooth wave sound with some LFO manipulations (I had it laying around in Ableton so I decided to use it). The B section is in time, beginning with percussion hits and using a consistent bass drum and a snare drum borrowed from a Tony Williams solo. A cymbal pattern in 12/8 is introduced but I feel like it could have been more prominently displayed. Everything is drenched in reverb. I used a Tascam control surface to mix sounds so the sections smoothly transition together. While the piece is too long, I enjoy how the sections overlap and the almost vintage feel that the old drum machine sounds deliver. I like producing sets of sounds that can be “performed,” even if means there is no definitive version of the piece.

 

Image courtesy of Ableton AG.  Used with permission.

To improve, I think I could have worked more in athenaCL to generate more diverse variations in the texture parameters. I also think more textures would make the piece have more depth and complexity. In athenaCL, I liked using distributions to affect the panning but I discovered that this quality isn’t kept when importing the MIDI file into a DAW. I hope to figure out how to get this to work as it would be useful.

Design Report 1 Sample: AthenaCL Generation and Manipulation

Ethiopian krar-inspired, Markov chain generated

Project courtesy of MIT student, used with permission.

This assignment draws inspiration from traditional Ethiopian music. The krar, a 5-string harp-like instrument is strummed in quick motions with tight clumps of fast ornament and longer notes, typically in some 12/8 rhythm or freely. Ethiopian music is built on pentatonic scales and contains a few that Western music does not; I picked one to use called anchihoye, one of the most distinctive scales. Its tones are 1, ♭2, 4, ♯4, 6. Many Ethiopian melodies work in a scalar fashion, moving up or down the scale and only infrequently skipping tones. I thought that these two aspects of some Ethiopian music—the rhythmic density and melody scalar-ity—could be imitated and extended with markov chains.

Rhythm and melody are controlled only by markov chains of various orders between 0 and 1. I programmed an octave and a half of notes and set the melodic chain to favor notes closer together and to only rarely jump larger distances. The rhythmic chain is configured to favor fast passages but if a slower passage is played it allows for space before returning to faster movement. Various functions controlled the order of these chains. I also varied octave, bpm,and amplitude settings with a set of parameter objects such as the 1/f noise generator, basketgens, beta distributions, and break point lines.

The piece is AB. The first section is out of time and more chaotic and the second section features a repetitive beat. I used the patterns generated by athenaCL in Live, arranging them and using Live’s virtual instrument selections. I generated even further diversity by speeding up or slowing down some of the passages in a particular synth instrument that resembled some type of acidic gurgle. The second section features a beat made in Live and repeating clips from the markov passages that I found to be quite creative. I was surprised how quickly the markov generation resulted in a line that was desirable.

In listening again, I think the piece became too repetitive in the B section. This is due to the short loop lengths and the 1-bar drum pattern. This is a problem I’ve had a lot when trying to work in Live: it is designed to be idiomatic for the manipulation of short loops and not long-term behavior. AthenaCL can generate interesting beated sections that are groovy but with slightly varying parameters like amplitude to maintain interest. I also felt the virtual instruments used were too far from traditional instruments and didn’t give the sound I had wanted (something closer to strings). I was satisfied with my ability to write markov chains that resembled how the original instruments sounded.

After I completed the piece, I tried to compose everything in athenaCL. The experiment was going well and I was hopeful about its results but about 75% of the way through the process I got some strange error message and didn’t know how to continue or resume. The log from that session is included.

Design Report 2 sample: Ethiopian krar-inspired, Markov chain generated

Code files (ZIP) (This ZIP file contains: 2 .py and 4 .mid files.)

Cat sounds source, PD generated

Courtesy of MIT student, used with permission.

This assignment was generated completely in PD. I based the patch on one I used to play sounds at an event in early April. That piece was a series of cat purrs and I used the same source material for this piece (purrs, meows, and field sound). Most of the material sampled I found online in free sound databases (notably freesound.org) but I also spent a significant amount of time capturing sounds from my own cat, Eegloo. None of those sounds are used except for the “bird” sound that contains some birds outside my window that start talking at about 4:00 a.m.

The piece mainly uses array-controlled multiple granular synthesizers to cut up material. Both the phasor and pitch shift aspects are controlled by arrays. Each one moves at a different speed to create some interesting aspects when the values are at a maximum together, for example. A base of purrs is used to give some bottom to the sound where the granular synthesis is the top. The purrs have a low-pass filter on them to isolate them. The piece sounds the best on headphones or on a floor populated with transducers. Two different purrs begin (one in each channel) and then a faster, more frantic purr provides a setting for the other sounds. The granulated sounds are allowed to mingle for the main section of the piece before being removed and only the bird sound and a purr is left. The bird sound is then slowed to almost its recorded speed and pitch before exiting and allowing the purrs to finish the piece. The PD file does contain some objects to allow me to “punch” in meow sounds via MIDI input but I decided not to use them.

I am pleased with the sounds in the piece, though they do move slowly. More sculpting of the granular synthesis parameters could always strengthen their use, including developing more precise graphs in athenaCL to use in PD. I also think using a variable metro rate would be interesting too (using the reading of one graph to control the reading speed of another graph). Maybe another granular synthesizer would add more texture and could be used in the middle of the piece to have something super dense that is just a knot of sound and then it untangles back to discernible noises.

Design Report 3 sample: Cat sounds source, PD generated

Code file (PD)

Project Sample: Game of Life – With Music!

Courtesy of Spenser Skates. Used with permission.

This is a Java™ applet based on the cellular automaton Game of Life, devised by British mathematician John Conway in 1970. The display code is based on this freeware by Edwin Martin.

Load the applet

Screenshot from Game of Life – With Music!

Courtesty of MIT student, used with permission.

For my final project, I made a system for defining context-free grammars (CFGs) and expanding a sequence of terminals into non-terminals using randomized productions. This contrasts with the more common activity of parsing a string of already-generated terminals into higher-level nonterminals,which is essentially the reverse process. A sequence of terminals can then be processed to produce some sort of output, such as a sound or a song. Using this system, complex definitions can be easily created as a series of productions, each of which maps a symbol to one or more probabilistically-weighted expansions, in order to create complex randomized, but structured, behavior.

Complete report (PDF)

Code files and sample audio outputs (ZIP) (This ZIP file contains 3 .py, 4 .yaml, and 2 .wav files). The audio files are a 1-second sound and a 4-second song.

Courtesy of MIT student, used with permission.

Genetic Algorithms (GA’s) have been applied since the 1950’s to simulate the evolution of a population. Soon enough, they became a widely known method to solve optimization problems in computer science and several genetic algorithmic systems were developed, such as Evolver. Genetic algorithms are not only suited for computer science; they may also be applied to artistic domains. For example, Ariza discusses an alternative application of GA’s. Rather than moving towards a complex solution, Ariza’s genetic algorithm system pulls from a trajectory of rhythmic populations that moves towards a simple solution. My work with Genetic Algorithms also focuses on creating interesting trends from an evolutionary process that moves towards a simple solution. I show that my system can be applied to granular synthesis to make compelling gestures…

Complete report (PDF)

Project Sample: Genetic Algorithms 1. (NOTE: this track starts at very low volume and emerges slowly.)

Project Sample: Genetic Algorithms 2.

Project Sample: Genetic Algorithms 3.

Code files (ZIP) (This ZIP contains 2 .py files.)

Courtesy of MIT student, used with permission.

My sonic system was an attempt at soundtrack generation to a given piece of film. For my video test material, I used an old 1950s PSA about surviving a nuclear attack. The footage is part of the Prelinger Archive. It is in black and white deliberately to limit the amount of visual information I have to deal with and to make the project simpler.

I used PD as my platform for producing sound. I also used tools from GEM to both play the footage and to draw color values from frames of the video. To start, I used a 3x3 grid of pixel “sensors” to pick up color information from the frames of the video. While the GEM object “pix_data” can also produce RGB values, I only needed the greyscale values. This gave me 9 streams of values ranging between 0-1 where 1 = white and 0 = black to use in sound generation.

The most difficult part of the process was the mappings from data to sound. I recognized that frames that were lighter in contrast had higher tension in the narrative of the film so I decided to make them softer than the other frames. I used each vertical section of data sensors to control three polyphonic granular synthesizers to generate the low base of the sound. They are fed various sound files: two explosions and one sample of bass. Then each data sensor controlled an oscillator and a noise generator. I tried to manipulate the data more by generating more information: how the current data value compares to a local average, how it compares to a local minimum and maximum, how it compares to values of closely adjacent frames. These other data streams controlled values such as the pitch of the oscillator (within a specified band), band pass values for the pink noise generator, volume of the noise, and LFO on the oscillator.

Additionally I tried to build in some “recognition” into the system. I noticed that the bombs in the film were always in the center of the frame and almost white when exploding. I calibrated a counter to trigger the sound of an explosion when a bomb was shown on the screen but not at another time.

The project is a medium success. The sound produced is mostly without large-scale contour or interest. Admittedly, most of the time was spent on making sound on a micro-scale— the amount of LFO, the frequency range, the band pass values—and not as much on overall contours (except for basic considerations such as overall contrast values controlling the master volume). There could have been more effort but into trigger-based sounds instead of continuous sounds whose control values were constantly being changed. This would introduce both more space and interest into the sound. Also using more pre-composed segments that could be triggered would be useful. There may have also been too many “sound units” going on—when listening to one voice, the oscillations and sound over time are sort of interesting but this type of concentration is lost when hearing all 9 voices together with the granular synthesizers.

I also think the project would have sounded better if the three channels were separated out in space, in an installation set-up instead through headphones or speakers. This would help to “spatialize” all of the sounds being made and allow the listener to focus more closely on individual movements in each of the channels. I hope to keep working with this patch in order to produce something that sounds much better and improve my skills in PD.

Project Sample: Video soundtrack generation with PD 1.

Project Sample: Video soundtrack generation with PD 2.

Project Sample: Video soundtrack generation with PD 3.

Source video: 1951 US Civil Defense film Survival Under Atomic Attack

Code and input audio samples (ZIP) (This ZIP file contains 1 .pd and 3 .wav files)

Course Info

As Taught In
Spring 2010
Learning Resource Types
Music
Projects with Examples
Lecture Notes
Written Assignments with Examples
Design Assignments with Examples