UMass Lowell Dept. of Computer Science

COMP 2120 / MUED 2120 — Sound Thinking

Spring 2016 Semester, Section 201

Prof. Jesse M. Heines and Prof. Gena Greher

Assignment No. 7

Programming Multiple Parts in Pencil Code

Date Due:  Thursday, April 14, 2016


Contents


What This Assignment Is About

In this assignment you will program a multipart piece of music of your choice using ABC Notation (http://www.abcnotation.com), which you will use via a website called Pencil Code (http://pencilcode.net).  The computing side of this assignment introduces you to another way to encode music, and the music side will expand your knowledge of basic music theory (at least for some of you).

As an example of what can be produced with this software, please go to Pencil Code using the following URL:

http://drjay.pencilcode.net/edit/ThreeKings

To play the music after clicking the above link, click the big arrow key in the middle of the screen.  We will obviously discuss the coding techniques used in this program in class.


Partner Assignments     Top

Please see the Class Roster for your partner’s email address.

Team
No.
Partner 1 Partner 2 Partner 3


What You Are To Do     Top

  1. Remember that all aspects of this project except responding to the reflective questions are to be done with your partner.
     
  2. Begin by choosing a simple song that has multiple parts.  You may use a choral or other standard piece of music as the Three Kings example does, or you may use a song that is performed as a round. 
     
  3. Create an account for yourself on http://pencilcode.net and log into your account.
     
  4. Go to one of the following URLs to access the code template you are to use for this assignment.  Choose the appropriate template based on the number of parts you are going to program.
    Number
    of Parts

    Code Template
    2 http://drjay.pencilcode.net/edit/MultiTemplate2
    3 http://drjay.pencilcode.net/edit/MultiTemplate3
    4 http://drjay.pencilcode.net/edit/MultiTemplate4
    5 http://drjay.pencilcode.net/edit/MultiTemplate5
    6 http://drjay.pencilcode.net/edit/MultiTemplate6
  5. Click the down arrow next to the Save button and click Copy and Save As... to save a copy of the template to your own account.

  6. Using the template as a starting point and the Pencil Code and ABC Notation Cheat Sheet to help you, code the parts for your song as explained in class using the sing function that we’ve provided.
    • remember that the first parameter to the sing function is the number of the keyboard to play on
    • the second parameter is a string containing the ABC notation for the notes to play

    Your song need not be long, and you don’t need to code the entire song.  Coding four or five phrases that require a variety of ABC Notation techniques will be sufficient.

  7. As you work, write notes on what you did so that someone else (or even yourself a few months from now) can reproduce what you did.  Take notes on things that you did and then undid, too, so that you do not forget the things you tried that you don’t feel worked out well. 
     
  8. Follow the directions below to submit your assignment.


Submitting Your Assignment for Grading     Top

For this assignment you and your partner are to submit one Pencil Code program. 

  1. When you’re finished coding your song, click the Share button.  Then click the copy icon next to the Share Code entry in the Shared dialog box.  This is the URL of your program that you must submit so that we can grade it.  Save that URL somewhere on your computer so that you can paste it into the reflection form in response to the appropriate question.

  2. Answer the reflective questions in the Google Form at:

    https://docs.google.com/forms/d/1zfBMSE5pG5SKuJ8p42_qx72DCxSDLts4aIfBi8Vxum8/viewform

    • This is the individual part of the assignment.
    • To improve your grade, look over our comments on your responses to the reflective questions for our previous assignments.


How You Will Be Graded     Top

This assignment will be evaluated on the following criteria.


Additional Information on the Three Kings Example

Just FYI, the music that the Pencil Code example at the beginning of this write-up encodes is the first part of the Kings’ Entrance from Amahl and the Night Visitors (Wikipedia link) by Gian Carlo Menotti.  It was the first opera ever written specifically for television, was first broadcast on NBC at Christmastime in 1951, and featured the incredible boy soprano Chet Allen.  If you’re interested, the original choral score for this excerpt from the opera can be found here (PDF file).  You can play that score using the audio control below.  You can see the fully staged production of this part of the opera here (YouTube link to 1978 production).



This is document http://jesseheines.com:8080/~heines/91.212/91.212-2015-16s/212-assn/PencilCode-01.jsp.  It was last modified on Friday, August 26, 2022 at 4:09 PM.
Copyright © 2022 by Jesse M. Heines.  All rights reserved.  May be freely copied or excerpted for educational purposes with credit to the author.