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
Notes for Class No. 21
Addditional Features of Pencil Code and ABC Notation
Thursday, April 7, 2016
A video of this class is (or will be) posted at: http://echo360.uml.edu/heines2016/comp-mued2120.html
Handouts and Materials
Openings / Announcements / Reminders
Important Date Reminders
- Saturday, April 9: Hawkettes Concert, Cumnock Hall (North Campus)
- Saturday, April 30: Hawkapella Concert, Durgin Concert Hall (South Campus)
Two things to be working on
- Assignment No. 7 — due next Thursday, April 14th
- as requested, I have added a template for 6 parts for students encoding 4 vocal parts + piano accompaniment
- Assignment No. 8 project registration — also due next Thursday, April 14th
People who have MaKey MaKey boards that need to be returned before we will release final grades
Mohd Anwar |
|
Tak Lo |
Greg Caldwell |
|
John McManus |
Alex Casperson |
|
Yusuf Mulyo |
Andrew Cornish |
|
Max Nelson |
Kyle Elardo |
|
Eddie Pozo |
Hannah Ewing |
|
Rodrigo Souza |
Nsoah Foster |
|
Brad Swenson |
Mat Har |
|
Dylan Wetherald |
Christian Hernandez |
|
Zack Wong |
Special Note to Kevin Goddu, Dylan Wetherald, and Daniel Lee
- you are now a group of three for Assignment No. 7
Class Notes
A Recommended Approach to Assignment No. 7
- Download and install ABC notation on your own system:
https://sourceforge.net/projects/easyabc/
- Code your music in ABC notation using EasyABC.
- remember that your first step in EasyABC has to be to click the New tune link in the ABC assist window
- you can then begin to enter your notes in ABC notation at the end of the code that the New tune link causes to be inserted
Please note:
- we are not recommending that you use WebMusicScore at this time because it doesn’t play well with multiple parts, but you may certainly give it a try if you wish
http://www.ronaldhutasuhut.com/wp-content/wms/WebMusicScore.html
- see the note I posted on Piazza re WebMusicScore and Safari:
https://piazza.com/class/iitblol1xyo35x?cid=17
- after class a student also showed us that playing music in Pencil Code doesn’t work in the newest version of Internet Explorer (sigh)
- as far as we know, all of the web-based music programs work in Google Chrome, so we recommend that you use that browser for this course
- Save the music you create in a text file with an extension of
.abc
- Open a new, blank document using any plain text editor on your computer.
- Copy the ABC code from WebMusicScore and paste it into your new document.
- Save that document with an extension of
.abc
.
- Open Pencil Code.
- Go to the appropriate template
MultiTemplate
in Jesse’s account.
- As shown in the assignment write-up, 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.
- You will have to supply the credentials for your Pencil Code account
- Be sure to specify an appropriate name for your copy, *not* “MultiTemplate”.
- Copy the ABC code from your
.abc
file and paste it into Pencil Code at the bottom of the file that you just created from the template.
- Surround each line of the ABC code with:
sing n, "
your copied ABC code"
sing
must be typed in lowercase
- replace
n
with the number of the keyboard that you want the music to play on
- n must be followed by a comma
- enclose your copied ABC code in double quotes
- Save your Pencil Code program and test it to ensure that it plays your music as desired
- remember that Pencil Code plays your music as if it used a Scratch
broadcast
- therefore, it can be difficult to stop the music once it starts playing
- therefore, test part of your music at a time using the
if
trick that we’ll go over in class
ABC Notation Encoding (continued)
- remember that some software requires rests to be coded with a lowercase z
- also note that the “standard” note value can be changed with te L: directive
- thus, if L:1/4 is specified, a G or G1 indeed represents a quarter note
- but if L:1/8 is specified, a G or G1 represents an eighth note
- dotted notes have a duration of 1-1/2 times the normal value of the note
- these are coded as a letter followed by 3/2 or 3/4 (as appropriate)
- E3/2 (dotted eighth note) or F3/4 (dotted sixteenth note)
- note that you cannot write E1.5
Coding Sharps and Flats and Naturals
- to sharpen a note, precede it with a carat: ^
- to flatten a note, precede it with an underscore: _
- to naturalize a note, precede it with an equals sign: =
However, note that if you set the key properly, ABC notation will automagically sharpen or flatten notes
Directives
- X: = reference number
- T: = title
- may be followed by another T: directive to add a subtitle
- example: T:The Kings' Entrance
- C: = composer
- must immediately follow a T: directive and precede the directives below
- example: C:Gian Carlo Menotti
- M: = meter = the time signature
- L: = the unit note value
- example: L:1/4 = a quarter note gets 1 beat
- K: = the key signature
- example: K:C = key of C with no sharps of flats
- example: K:Eb = key of E-flat with three flats (B, E, and A)
Example
figure source: http://www.letsplaykidsmusic.com/wp-content/uploads/2013/02/row-row-row-your-boat.jpg
Pencil Code implementation - Version 1 - using Pencil Code’s play function
Pencil Code implementation - Version 2 - using the sing function
The ABC Notation as generated by EasyABC
The ABC Notation as used in Pencil Code