Assigned Date: Monday, Feb. 5, 2018
Due Date: Monday, Feb. 12
Due Time: 30 mins before class
Last modified on February 10, 2018, at 06:42 AM (see updates)
Write a Jython program that generates an interesting piece of music using pre-recorded sound material.
The piece should utilize up to seven different AudioSamples. Each file should be up to 10 seconds - no more.
These samples will be used as instruments to Play a particular score that you will put together (see example below).
- For polyphony, it is OK to load multiple copies of the same audio file - these do not count as separate files (for the total of seven).
- Before spending too much time on your score, make sure your computer's CPU and memory can handle all the audio files you are planning to use.
Do all four:
- Draw a sketch of your score on paper (by hand or otherwise).
- Upload your program file and audio files on OAKS.
- Hand in a printout of your Python program in class on the due date. Attach the sketch of your score.
- Be ready to perform it in class.
Your program should have a meaningful name, e.g., audioAllAround.py.
Follow the documentation instructions from Homework 1.
In addition, your header documentation should describe the following :
- Initial, high-level concept (i.e., what is this piece about, what is it trying to communicate / achieve, etc.).
- Sonic entities used and their symbolism (i.e., mention something about each recording - what it is, how it was recorded, why did you include it, etc.). It is OK to use someone else's material, as long as you provide a name and URL where it can be found.
- Macrocomposition or high-level structure of the piece (i.e., how you set up relationships between sonic entities, such as algebraic operations to make sonic entities line up, etc.)
 Xenakis, I. (1971). Formalized Music: Thought and Mathematics in Composition. Indiana University Press, p. 22.
For extra points, you may explore the microcomposition or low-level interactions of the sonic elements (i.e., creating or assembling complex timbres from the sonic material).
Your grade will be based on how well you followed the above instructions, and the depth/quality of your work.
Here is a not-so-serious example that demonstrates how to play a regular score using audio files as instruments. (Also compare with this.)
It utilizes the following sonic material (download and save in your JythonMusic folder prior to running):
(:source lang=Python tabwidth=3 -trim :)
- It plays the theme from "Autumn Leaves", in a Jazz trio arrangement
- but using actual audio files as instruments.
- NOTE: This is just an example of possibilities (and a bit tongue-in-cheek).
- (For your submission, follow full documentation instructions.)
from music import *
- load sonic material
a = AudioSample("moondog.Bird_sLament.wav", G4) # a loop from Moondog's "Bird's Lament"
b = AudioSample("It_s_Real_Easy.wav", BF2) # a funny voice recording
c = AudioSample("Korg-TR-Rack-Acoustic-Bass-C2.wav", C2) # an actual bass sample
- define the data structure (score, parts, and phrases)
autumnLeavesScore = Score("Autumn Leaves (Jazz Trio)", 140) # 140 bpm
trumpetPart = Part(TRUMPET, 0) # trumpet to MIDI channel 0
vibesPart = Part(VIBES, 1) # vibraphone to MIDI channel 1
bassPart = Part(ACOUSTIC_BASS, 2) # bass to MIDI channel 2
melodyPhrase = Phrase() # holds the melody
chordPhrase = Phrase() # holds the chords
bassPhrase = Phrase() # holds the bass line
- create musical data
melodyPitch1 = [REST, E4, FS4, G4, C5, REST, D4, E4, FS4, B4, B4]
melodyDur1 = [QN, QN, QN, QN, WN, EN, DQN,QN, QN, DQN, HN+EN]
melodyPitch2 = [REST, C4, D4, E4, A4, REST, B3, A4, G4, E4]
melodyDur2 = [QN, QN, QN, QN, WN, EN, DQN,QN, QN, 6.0]
melodyPhrase.addNoteList(melodyPitch1, melodyDur1) # add to phrase
chordPitches1 = [REST, [E3, G3, A3, C4], [E3, G3, A3, C4], REST,
[FS3, A3, C4]]
chordDurations1 = [WN, HN, QN, QN,
chordPitches2 = [REST, [D3, FS3, G3, B3], [D3, FS3, G3, B3]]
chordDurations2 = [DHN, HN, QN]
chordPitches3 = [REST, [C3, E3, G3, B3], REST, [E3, FS3, A3, C4],
[E3, FS3, A3, C4]]
chordDurations3 = [QN, QN, DHN, HN,
chordPitches4 = [REST, [DS3, FS3, A3, B3], REST, [E3, G3, B3],
[DS3, FS3, A3, B3]]
chordDurations4 = [QN, QN, DHN, HN,
chordPitches5 = [REST, [E3, G3, B3], REST]
chordDurations5 = [QN, HN, HN]
chordPhrase.addNoteList(chordPitches1, chordDurations1) # add them
- bass line
bassPitches1 = [REST, A2, REST, A2, E2, D2, REST, D2, A2, G2, REST,
G2, D2, C2]
bassDurations1 = [WN, QN, EN, EN, HN, QN, EN, EN, HN, QN, EN,
EN, HN, QN]
bassDurations2 = [EN, EN, HN, QN, EN, EN, HN, QN, EN, EN, HN,
bassPitches2 = [REST, C2, G2, FS2, REST, FS2, C2, B1, REST, B1, FS2,
bassPitches3 = [REST, E2, E2, B1, E2, REST]
bassDurations3 = [EN, EN, QN, QN, HN, HN]
bassPhrase.addNoteList(bassPitches1, bassDurations1) # add them
- combine musical material
trumpetPart.addPhrase(melodyPhrase) # add phrases to parts
autumnLeavesScore.addPart(trumpetPart) # add parts to score
- play it
- Play.midi(autumnLeavesScore) # play music
Play.audio(autumnLeavesScore, [a, b, c]) # new way!
Note: The above utilizes chords, but has not accounted for polyphony. See warning and how to fix this.