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. 16
Review of List Concepts from Assignment No. 5
Tuesday, March 22, 2016
A video of this class is (or will be) posted at: http://echo360.uml.edu/heines2016/comp-mued2120.html
Handouts and Materials
Assignment No. 5
Assignment No. 6
Openings / Announcements / Reminders
List demonstrations developed in our last class
Class Notes
Another Way To Code Music
Hey Jude
Revisiting
Introduction to Lists from the Class Before Spring Break
Understanding the blocks related to lists
Editing list values
Extending the concept of intervals to “deltas” or “offsets”
- as offsets from the starting note (the first note of the piece)
- as offsets from the tonic note (the “key” note of the piece)
- as offsets from the previous note (the one that immediately precedes it in the list)
Demonstration Using Scales
Code for the following demonstrations
https://scratch.mit.edu/projects/54423380/#editor
Playing a list containing the MIDI values of a harmonic minor scale using a straight sequence of play note blocks
Playing that list using a loop
Transposing the scale into any key
Review: What is a delta?
- “delta” is the Greek letter Δ
- it is typically used to denote a change from one value to another
- a delta is also called a “offset”
Coding the list using deltas (or offsets) from the tonic (or key) note
Coding the list using deltas to each note from the preceding note
Using the import feature to avoid going crazy when you’re creating or editing lists
- on Windows, right-click the list, or on Macs, Ctrl-click it, to bring up the import / export / hide popup menu
- if you hide the list, Scratch will execute a bit faster
- if the list is hidden, display it by clicking the check box next to the list name in the Data section
Concepts Reviewed or Introduced
- loops and how they can be used to play all the notes from a list
- “deltas” or “offsets”
- “delta” is the Greek letter Δ
- it is typically used to denote a change from one value to another
- in the context we’ve been talking about, a delta and an offset and a change are all the same thing
- different ways to play music from a list in different keys
- by adding a delta or offset to the note value read from the list
- by reprogramming the list itself to contain deltas (or intervals) rather than absolute note values
- different ways to use deltas in lists
- as offsets from the starting note (the first note of the piece)
- as offsets from the tonic note (the “key” note of the piece)
- as offsets from the previous note (the one that immediately precedes it in the list)
A Fun Example
Harry Potter Theme