Spring2011.CSCI180Homework1 History

Show minor edits - Show changes to output

Changed lines 36-37 from:
Write a Jython program that generates an interesting piece of music. You have two options:
to:
Write a Jython program that generates an interesting piece of music. You have these options:
Changed lines 91-92 from:
You will submit your assignment via OAKS. Be prepared to demo your music to the rest of the class. Your submission consists of:
to:
You will submit your assignment via OAKS (Dropbox folder). Be prepared to demo your music to the rest of the class. Your submission consists of:
Changed line 2 from:
'''Due Date''': Monday, Mar. 21, 2011\\
to:
'''Due Date''': Wednesday, Mar. 23, 2011\\
Changed lines 38-39 from:
# Find an interesting minimalist piece (e.g., by Philip Glass), and work with it in jMusic.
to:
# Find an interesting minimalist piece (e.g., by Philip Glass), and transcribe it in jMusic.
# Find a song you like, and transcribe it in jMusic.
Changed line 2 from:
'''Due Date''': Friday, Mar. 18, 2011\\
to:
'''Due Date''': Monday, Mar. 21, 2011\\
Added lines 1-116:
'''Assigned Date''': Friday, Mar. 4, 2011\\
'''Due Date''': Friday, Mar. 18, 2011\\
'''Due Time''': 9:00am

Last modified on {$LastModified} (see [[http://www.cs.cofc.edu/~manaris/?n=Spring2011.CSCI180Homework1?action=diff&source=n&minor=n | 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.

!!Purpose

This assignment focuses on:

* creating interesting music with jMusic
* MIDI melodies
* MIDI percussion

!!Introduction

In class we worked through several programs that put all jMusic data structures into practice (see Ch4 of the jMusic book). We looked at:
* a program that creates a drum pattern consisting of kick, snare and hi-hat sounds;
* a program that creates a canon; and
* a program that creates a minimalist piece (''Piano Phase'' by Steve Reich).

As mentioned earlier, MIDI has 16 channels (numbered 0 to 15). Of these, channel 9 is reserved for percussion. When adding notes to a part assigned to channel 9, the pitch of the notes determines which percussive instrument to use. Again, here are pitch numbers for some percussive instruments:

* 36 (C2) -- Bass Drum
* 38 (D2) -- Snare Drum
* 42 (FS2) -- Hi Hat (closed)
* 46 (AS2) -- Hi Hat (open)
* 49 (DF3) -- Crash Cymbal

Here are more [[http://soundprogramming.net/file_formats/general_midi_drum_note_numbers | pitch numbers for percussive instruments]].

!!Assignment

Write a Jython program that generates an interesting piece of music. You have two options:

# Find an interesting minimalist piece (e.g., by Philip Glass), and work with it in jMusic.

# Or, create your own song in jMusic. If so, the song needs to have both a melody and drums (all done in MIDI via jMusic).

!!!Pitch

Here is a quick overview of music notation for [[http://datadragon.com/education/reading/clefs.shtml|note pitches]].
* jMusic defines the following [[http://www.cs.cofc.edu/~manaris/index.php/JMUSIC/Pitches| pitch constants]] for convenience.

!!!Rhythm Values

Here is a quick overview of music notation for [[http://datadragon.com/education/reading/typenote.shtml|note durations (rhythm values)]].
* jMusic defines the following [[http://www.cs.cofc.edu/~manaris/index.php/JMUSIC/Durations | note durations]] for convenience.
** It includes both American and British names. For example,
*** ''whole note'' = ''semibreve''
*** ''half note'' = ''minim''
*** ''quarter note'' = ''crochet''
*** ''eighth note'' = ''quaver''

!!!MIDI Instruments

jMusic provides the following MIDI [[(http://www.cs.cofc.edu/~manaris/?n=JMUSIC.)Instruments]].

!!Documentation

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

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

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

(:source lang=Python tabwidth=3 -trim :)
#
# Author: <Your Name(s)>
# Email: <Your email address(es)>
# Class: CSCI 180, Section 1
# Assignment: HMWK1
# Due Date: <The assignment's due date>
#
# Certification of Authenticity <remove one of the following>:
#
# I certify that this lab is entirely my own work.
#
# I certify that this lab is my own work, but I received
# some assistance from: <Name(s)>
#
# Purpose: <Provide a simple, yet complete description of the task being
# performed by this program. It may be several sentences long.>
#
(:sourcend:)

!!Submissions

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

# Your Python program. Give it a meaningful name.

# The MIDI file generated from your program.

!!Grading

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

!!Some Interesting Earlier Submissions

Here are a few interesting submissions:

# ''Disturbed'' ([[http://www.cs.cofc.edu/~manaris/uploads/Fall2010/Disturbed.mid | MIDI]] and [[http://www.cs.cofc.edu/~manaris/uploads/Fall2010/disturbed.py | Python]]), by Andrew Armstrong
# ''Water Spring'' ([[http://www.cs.cofc.edu/~manaris/uploads/Fall2010/WaterSpring.mid | MIDI]] and [[http://www.cs.cofc.edu/~manaris/uploads/Fall2010/WaterSpring.py | Python]]), by Evan Kosin
# ''Lux Aeterna'' ([[http://www.cs.cofc.edu/~manaris/uploads/Fall2010/LuxAeterna.mid | MIDI]] and [[http://www.cs.cofc.edu/~manaris/uploads/Fall2010/luxaeterna.py | Python]]), by Jacob Song
# ''Girls Just Wanna Have Fun'' ([[http://www.cs.cofc.edu/~manaris/uploads/Fall2010/GirlsJustWannaHaveFun.mid | MIDI]] and [[http://www.cs.cofc.edu/~manaris/uploads/Fall2010/girls.py | Python]]), by Leslie Stovall and Megan Hoffspiegel

!!!Relevant Quote

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

!!Reference

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