Bill Manaris : Spring 2018 / CITA 180 Homework 4

Assigned Date: Friday, Feb. 16, 2018
Due Date: Friday, Feb. 23
Due Time: 30 mins before class

Last modified on February 21, 2018, at 03:55 AM (see updates)


In homework 3, you were asked to write a Jython program that generates an interesting piece of music using pre-recorded sound material.

Here, we revisit this with the following added implications:

To Do

Use about 3 to 7 different AudioSamples (more or less is OK - with approval).

Use at least 3 different Mod functions to construct your Score.

The piece should last about about 1 to 3 minutes approximately.

Create a sketch of your score on paper (use MS Word, Google docs, or by hand). It should explain [1]:



Do all four:

  1. Hand in a sketch of your score on paper.
  2. Hand in a printout of your Python program in class on the due date. Attach the sketch of your score.
  3. Upload your program file and audio files on OAKS.
  4. Be ready to perform it in class.

Your program should have a meaningful name, e.g., or, or, etc.

Program Documentation

Follow the documentation instructions from Homework 1.

In addition, your header documentation copy and paste the same information as in your score (see above):


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


The following code demonstrates how to create a loop. This may be used for ambient or drone backdrops of sound to build on.

from music import *

loopTimes = 4

# load audio instruments
a1 = AudioSample("moondog.Bird_sLament.wav")

# create musical data structure
score = Score()

part1 = Part(0, 0)

phrase1 = Phrase()

# create musical data
pitches   = [A4] * loopTimes
durations = [4.12152] * loopTimes   # duration is in seconds (assuming 60bpm)
volumes   = [120] * loopTimes
pannings  = [0.5] * loopTimes
lengths   =  durations              # force playing length to be same as noted duration!

phrase1.addNoteList(pitches, durations, volumes, pannings, lengths)



# play it! score, [a1] )


[1] Xenakis, I. (1971). Formalized Music: Thought and Mathematics in Composition. Indiana University Press, p. 22.

(Printable View of