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. 13

Working with Intervals (continued): Automatic Generation of 2nds and 5ths

Thursday, March 3, 2016

A video of this class is (or will be) posted at:  http://echo360.uml.edu/heines2016/comp-mued2120.html


Handouts and Materials


Scales and Intervals


Openings / Announcements / Reminders

Reminder:  Assignment No. 4 on Sequencing Sounds with Scratch is due tonight


Class Notes


Coding with Intervals

All of the following code is available at http://scratch.mit.edu/projects/19092595/#editor

The Major Fourth and Its Inversion

Playing an Interval Using a Broadcast

Creating a Generic Play Fourth Stack

Run the code at http://scratch.mit.edu/projects/19092595/#editor to hear what each of these bits of code produces


Putting It All Together

All of the following code is available at http://scratch.mit.edu/projects/19070222/

Sprite Control

Sprite Init (Initialize)

Sprite Maj. 2nd (generic Major 2nd interval)

Sprite Per. 4th (generic Perfect 4th interval)

Sprite Per. 5th (generic Perfect 5th interval)

Sprite Min. 7th (generic Minor 7th interval)

Sprite Ver. 1, which puts these all together to play a melody


Version 2 — Selecting a Direction and an Interval at Random


Version 3 — Correcting Note Doubling and Adding Musicality

The next version is the same as the previous one with the addition of the Play Starting Note variable

The interval scripts have all been modified to check the Play Starting Note variable before playing the starting note



This is document http://jesseheines.com:8080/~heines/91.212/91.212-2015-16s/212-lecs/lecture13.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.