DIRECTORY Graphics USING [Context], MusicDefs; Sheet: CEDAR DEFINITIONS = BEGIN OPEN MusicDefs; Draw: PROC; DrawClef: PROC[pitch, staff: INTEGER, time: Time]; DrawOctava: PROC[pitch, staff, height: INTEGER, t1, t2: Time]; FindLine: PROC[t: Time] RETURNS[INTEGER]; FindSection: PROC[t: Time] RETURNS[INTEGER]; GetStyle: PROC[time: Time] RETURNS[INTEGER]; HiLite: PROC[tex: Texture, t1, t2: Time]; Initialize: PROC[dc: Graphics.Context]; Reset: PROC; Scale: PROC[newScale: INTEGER]; Scroll: PROC[lines: INTEGER]; -- "currentLine _ currentLine+lines" SetBegin: PROC[now: Time]; SetClef: PROC[pitch, staff: INTEGER, time: Time]; SetOctava: PROC[pitch, staff, height: INTEGER, t1, t2: Time]; SetStyle: PROC[index: INTEGER, t1, t2: Time]; Last: PROC[l: CARDINAL] RETURNS[CARDINAL]; LineNumber: PROC[l: CARDINAL] RETURNS[n: CARDINAL _ 1]; NextLine: PROC[l: CARDINAL] RETURNS[CARDINAL]; NextStaff: PROC[s: CARDINAL, t: Time] RETURNS[CARDINAL]; NormalPitch: PROC[staff: CARDINAL] RETURNS[INTEGER]; PriorLine: PROC[l: CARDINAL] RETURNS[CARDINAL]; PriorStaff: PROC[s: CARDINAL, t: Time] RETURNS[CARDINAL]; OctavaHeight: PROC[pitch, height: INTEGER] RETURNS[INTEGER]; default: INTEGER = 1000; AlternateTime: PROC[t1: Time, h1, lines: INTEGER] RETURNS[time: Time, height: INTEGER]; Height: PROC[t: Time, pitch: INTEGER _ default, staff: CARDINAL] RETURNS[INTEGER]; NearestStaff: PROC[t: Time, height: INTEGER] RETURNS[INTEGER]; NearestTime: PROC[x, y: INTEGER _ default] RETURNS[time: Time, height: INTEGER]; Map: PROC[t: Time, pitch: INTEGER _ default, staff: CARDINAL] RETURNS[x, y: INTEGER]; MapHeight: PROC[t: Time, height: INTEGER] RETURNS[x, y: INTEGER]; MapNote: PROC[n: NotePTR] RETURNS[x, y: INTEGER]; Pitch: PROC[t: Time, height: INTEGER, staff: CARDINAL] RETURNS[INTEGER]; ScreenPoint: PROC RETURNS[x, y: INTEGER]; END. ÌSheet.mesa Copyright (C) 1981, 1984 Xerox Corporation. All rights reserved. Author: John Maxwell last modified: November 23, 1981 11:10 AM Edited by Doug Wyatt, June 14, 1984 1:03:00 pm PDT (formerly) INLINE Procedures ************************************************************************* mapping from sheet to screen and vice-versa ************************************************************************* NotePTR => [Time, Pitch, Staff] => [Time, Height] => ScreenPoint; UNAMBIGUOUSLY! [Time, Height] <= ScreenPoint; ambiguous when point is between lines [Time, Pitch, Staff] <= [Time, Height]; ambiguous when between staffs NotePTR <= [Time, Pitch, Staff]; ambiguous because of graphical adjustments Ê ˜šœ ™ Jšœ@™@Jšœ™Jšœ*™*J™2J˜—šÏk ˜ Jšœ œ ˜Jšœ ˜ J˜—Jšœœ ˜Jšœœœ ˜J˜JšÏnœœ˜ Jšžœœœ˜2Jšž œœœ˜>Jšžœœ œœ˜)Jšž œœ œœ˜,Jšžœœ œœ˜,Jšžœœ˜)Jšž œœ˜'Jšžœœ˜ Jšžœœ œ˜ JšžœœœÏc%˜CJšžœœ ˜Jšžœœœ˜1Jšž œœœ˜=Jšžœœœ˜-J˜Jšœ œ ™J˜š žœœœœœ˜*J˜—š ž œœœœœ˜7J˜—š žœœœœœ˜/J˜—š ž œœœ œœ˜9J˜—š ž œœœœœ˜5J˜—š ž œœœœœ˜/J˜—š ž œœœ œœ˜9J˜—š ž œœœœœ˜Jš ž œœœ œœ˜PJš žœœœœœœ˜UJš ž œœœœœ˜AJšžœœ œœ˜1Jš žœœœ œœœ˜HJšž œœœœ˜*J˜Jšœ˜—…—2 ž