Bill Manaris : Fall 2012 / CSCI 180 Homework 5

Assigned: Monday, Nov. 19, 2012
Due Date: Wednesday, Nov. 28
Due Time: 10:55am

Last modified on November 26, 2012, at 01:13 PM (see updates)

This is a pair-programming assignment (i.e., you may work with one partner). You may discuss the assignment only with your partner or the instructor.

(This project has been co-developed with Prof. Blake Stevens, Music Dept.)


Compose an interesting piece of music through the sonification of an image.

This assignment focuses on:

(It is OK to use more than one image, if you wish.)


In the pluralistic musical culture of present moment, in which many "languages" or "dialects" are spoken simultaneously, it is worth thinking about how composers can find a distinctive musical language that is new, personally meaningful, and "beautiful." This is one of the central questions any composer or "organizer of sound" must face: what musical material will I work with? Diatonic (Arvo Pärt)? Chromatic (Pierre Boulez)? Continuous sound (as Pierre Schaeffer and Edgard Varèse each did, with dramatically different results)?

Arvo Pärt has been able to achieve something "new" while speaking a diatonic language and working within the tradition of minimalism.

For example, take some time to listen closely (with headphones) to some of Pärt's music:


Select a digital image that you find beautiful or compelling. Create a musical realization of this image using Python. You should design the musical parameters (pitch, dynamics, timbre, panoramic, etc.) through which this image will be realized in sound, with reference to a specific musical tradition:

Expressionism (atonality), Serialism, Aleatory Music, Minimalism, Jazz, Rock, Ambient, Rap, etc.


  1. Make sure you are using the latest and libraries. They are available in the student wiki.
  2. You could use only part of the image, or different parts of the image for different part of the music. For example, a bass line (low register) may be generated from a single ("rhythmically" interesting) row (or column) in the image. Or, you may create a recurring theme by sonifying a small (interesting) area of the image, and repeating it through Mod.repeat() or Mod.cycle(). Mod.transpose(), Mod.fadeOut(), Mod.elongate(), etc. may prove useful.
  3. Explore high-level structure of your music. Do NOT expect that, just because you selected a beautiful image, everything will fall into place musically.
  4. Explore different possibilities, e.g., identify which image pixels (area? row? col?) will be used or what musical part. One possibility is to experiment with Arvo Pärt's Tintinnabuli system. I.e., one part of the image can generate a bass tone, another a diatonic arpeggio, another a stepwise melodic line.
  5. Decide ahead of time if you will create chromatic, or diatonic music (e.g., CHROMATIC_SCALE, MAJOR_SCALE, etc.).
  6. Start with a sound picture in mind (i.e., what type of sound you want to produce - major, minor, chromatic, etc). This will inform the image(s) you select. The parameters in your algorithm should be shaped by both your intended sound idea and the image. As you explore, you may refine your image selection, type of sound, high-level musical structure, etc.
  7. You may add ornamental (non-image generated) musical material (no more than, say, 20% of the overall material). For example, you might generate a low-pitched drone or an ambient background sound to give the composition greater density and color.


Follow the Golden Rule of Style: "A program should be as easy for a human being to read and understand as it is for a computer to execute." [3]

In general, you should comment any variable, obscure statement, block of code, method, and class you create.

Your comments should express why something is being done, as opposed to how – the how is shown by the code.

Top Documentation

Additionally, your code should always include opening comments as follows:

#   Author:    "Your names"
#   Email:      "Your email addresses"
#   Class:      CSCI 180
#   Assignment: HMWK5
#   Due Date:  The assignment's due date
#   Certification of Authenticity:     
#     < ! Delete one of the two statements below - also delete this comment ! >
#      We certify that this lab is entirely our own work.
#      We certify that this lab is our own work, but we received
#      some assistance from:  "add people's names, Web links, or other references"
#   Purpose: < ! Replace this comment with a simple, yet complete description of
#         what your program does - e.g., "This program plays Chopen's Nocturne,
#         Op 72. No. 1."  The description may be several sentences long. ! >


You will submit your assignment via OAKS. Be prepared to demo your music to the rest of the class. Your submission consists of:

  1. Your Python program. Give it a meaningful name.
  2. The MIDI file generated from your program.
  3. Your image(s).

Provide everything necessary for me to be able and generate your MIDI file from scratch, through your submission, if I wanted to check things out.


Your grade will be based on how well you followed the above instructions, and the depth/quality of your work.

Relevant Quote

"Any amount of work can be done in any amount of time... only the quality varies." ~Joao Meidanis

(Printable View of