XEROX PLAY 2 4 1 PLAY 1 4 By: Kelly Roach (Roach.pa@Xerox.com) Last revised 5-Feb-84. INTRODUCTION The PLAY package, inspired by the Mesa PLAY package, offers Interlisp-D users a disciplined way to play simple musical melodies on Xerox 1108 machines. To use, loadPLAY.DCOM. Typing (PLAY.DEMO) will demo the PLAY package to the user. The main entry points to this package are functions (PLAY.NOTES NOTES) [Function] (PLAY.MELODY MELODY) [Function] Both these functions take a musical representation, a series of NOTEs or a MELODY, into a TUNE playable by Interlisp-D's PLAYTUNE function. To get some feel for this, a sample call to PLAY.NOTES might be (PLAY.NOTES '(b b >c >d >d >c b a g g a b b a+ a b b >c >d >d >c b a g g a b a g+ g a a b g a B/ >c/ b g a B/ >c/ b a g a dx b b >c >d >c b a g g a b a g+ g)) and the PLAY package's global DEMO.MELODY is the sort of argument taken by PLAY.MELODY. Function (PLAY.KEYBOARD) [Function] is a way to catch up on your piano practice. We now proceed to the details. We first discuss the particulars of NOTEs and MELODYs, then describe the PLAY package functions which can be used with these objects. NOTES A NOTE is a litatom whose pname characters are interpreted as follows: (1) KEY. "A", "B", "C", "D", "E", "F", "a", "b", "c", "d","e", or "f" specifies the note's key. If the note's key is in upper case, the note is held for its full duration with no break (a tied or slurred note). Most notes are followed by a break and so are in lower case. Two additional keys, "R" and "r" play silently and are used as rests. (2) OCTAVE. Each ">" raises the note an octave. Each "<" lowers the note an octave. Thus, Middle C, High C, and Low C are represented as C, >C, and F * >E *---------------- >D * >C *---------------- B * A *---------------- G * F *---------------- E * D * C * C, >D, and >E. Sharp keys can be found on the row above. Hitting the space bar causes PLAY.KEYBOARD to return the TUNE you played, which can be played by PLAYTUNE. (4) (PLAY.TRANSCRIBE TUNE) can transcribe a TUNE produced by PLAY.KEYBOARD. (Duration information is just thrown away since there does not seem to be a satisfactory way of getting it right). (5) (PLAY.ADJUST.TEMPO TUNE FACTOR) can be used to adjust the speed of a TUNE. TUNE's speed will be uniformly increased by FACTOR. (6) (PLAY.ADJUST.PITCH TUNE SEMITONES) can be used to adjust the pitch of a TUNE. TUNE's pitch will be uniformly increased SEMITONES semitones. (7) (PLAY.MESA STRING) converts a Mesa PLAY package string into a list of NOTEs that can be played by PLAY.NOTES. (8) (PLAY.DEMO) demos the PLAY package. (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC ) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(È (È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD MODERN MODERN TERMINAL MODERN ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) MODERN MODERNLOGOMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN &  ,  ˨b#ÔGZÉÈÓÞ"X¼H1–*5W%FkCVÓØg•HA;§ bl](KŽzº