Assigned Date: Friday, Oct. 22
Due Date: Monday, Nov. 1
Due Time: 30 mins before class
Assignment
Write a Jython program that generates an interesting, convincing piece of music with elements of randomness.
The piece should last about one minute, but longer pieces are OK (as long as they continue to be interesting throughout).
It is OK to include pre-composed (non-random, or deterministic) material, as long as you follow a 20-80% (or 30-70%) rule. That is, since this is an assignment on channeling randomness to create new, interesting material, the random parts of your piece should make up 80% (or 70%, or so) of it.
Use an interest curve approach to design the piece structure. Which parts will be random? How will you randomize things? Will it be pitch, duration, etc.? How will you structure randomness, i.e., how will you force it to create something non-chaotic, and meaningful?
The piece should contain combinations of random(), randint(), and choice. It is OK to use Mod random functions (see previous chapter), but the majority of your piece’s randomness should come directly from functions in the random library.
The piece can have any orchestration (instruments) you want.
Also, it is OK to re-use existing musical material from other composers (e.g., Bach, or Drake)… as long as you observe the 20-80 rule (see above). In particular, it is absolutely OK to use such material to feed your random functions, in order to create the random portions of your piece… just make sure that the new, random material is considerably transformed to “look and feel” (i.e., sound) fresh / interesting / different enough from the pre-composed material.
Remember
Start on a paper napkin (yes, preferably with pizza stains…). You will submit it too, so start here.
Draw the interest curve of the piece you are creating. How are you going to achieve these changes in interest (add something, subtract something)?
What instruments will you use?
What rhythms will they play?
Design, design, design – think and make decisions on paper first. Code later. Return back to paper often. Do NOT think in code… think on paper.
Always remember the adage –
“20 hours of coding can save you two hours of design”
Submissions
Do all three:
- Upload a photo of your paper design for your piece (it should show the interest curve and describe in words what elements are added, and where… and why). We should be able to see the structure of the piece and your choices by looking at this page.
- Upload your program file on OAKS.
- Be ready to perform it in class, on the due date.
Your program should have a meaningful name, e.g., stairwayToHeaven.py.
Program Documentation
Follow the documentation instructions from Homework 1. In particular, your header documentation should:
- mention the name of the piece and the composer / band where it comes from, and,
- if you used a score available online, include the URL where the score can be found.
Remember, 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] Your code should have general comments at the top, which explain what the program does. You should comment all variables, obscure statements, and blocks of code.
Follow the textbook examples on how to write comments.
Grading
Your grade will be based on how well you followed the above instructions, and the depth/quality of your work.
Reference
- Cooper, D. and Clancy, M. (1985) “Oh! Pascal”, 2nd ed., W.W. Norton & Company, New York, p. 42.