Spring 2015»CITA 180 Homework 3

CITA 180 Homework 3

Assigned Date: Wednesday, Feb. 11, 2015
Due Date: Monday, Feb. 16, 2015
Due Time: 9:20 AM

Last modified on February 12, 2015, at 09:38 AM (see updates)


Write a Jython program that generates an interesting piece of music.

Learning Objectives

  • Understand the fundamentals of music theory.
  • Analyze music and create musical studies modeled on pre-existing works.
  • Apply numeric and string data types to represent information.
  • Use variables in program development.
  • Use predefined classes in program development (object-based programming).

Also how to:

  • Create interesting music with JythonMusic
  • Program MIDI melodies, chords, etc.
  • Program MIDI percussion (optional)


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." [1]

In general, you should comment any variable, obscure statement, block of code, etc. you create.

Follow the documentation instructions from Homework 1. In particular, your header documentation should mention the name of the piece where the melody comes from, and, if you used a score available on-line, include the URL where the score can be found.


Once you complete the above, feel free to do additional work, for bonus points:

  1. Any other idea you can think of (just document your idea in the program's comments, so that I'll know what you are trying to do, when I am grading).


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. A printout of your program - to be submitted in class during the performance.


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

Some Interesting Submissions

Here are a few interesting submissions from an earlier semester:

  • Avril 14 (MIDI and Python), by Daniel Hanf
  • Nonsense (MIDI and Python), by Samuel Cooper (original)
  • Intro (MIDI and Python), by Hudson Jones
  • Take Five (MIDI and Python), by Johnathan Hegler and George Woolston

Relevant Quote

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


  1. Cooper, D. and Clancy, M. (1985) "Oh! Pascal", 2nd ed., W.W. Norton & Company, New York, p. 42.