<> <> <> <> <> <> DIRECTORY MusicDefs USING [ColorType, NotePTR, ScorePTR, SheetPTR, StavesPTR, Time]; Sheet: CEDAR DEFINITIONS = BEGIN OPEN MusicDefs; New: PROC[length: CARDINAL] RETURNS[sheet: SheetPTR]; Free: PROC[sheet: SheetPTR]; Reset: PROC[score: ScorePTR]; -- reconstructs the sheet from the score Scale: PROC[score: ScorePTR, newScale: INTEGER]; -- causes a Reset SetBegin: PROC[sheet: SheetPTR, now: Time]; Scroll: PROC[sheet: SheetPTR, lines: INTEGER]; -- "currentLine _ currentLine+lines" Draw: PROC[sheet: SheetPTR]; -- draws what is currently visible DrawKey: PROC[sheet: SheetPTR, key, oldKey: INTEGER, time: Time]; DrawClef: PROC[sheet: SheetPTR, pitch, staff: INTEGER, time: Time]; DrawOctava: PROC[sheet: SheetPTR, pitch, staff, height: INTEGER, t1, t2: Time]; HiLite: PROC[sheet: SheetPTR, texture: ColorType, t1, t2: Time]; FindLine: PROC[sheet: SheetPTR, t: Time] RETURNS[INTEGER]; FindSection: PROC[sheet: SheetPTR, t: Time] RETURNS[INTEGER]; <> FindStaves: PROC[sheet: SheetPTR, t: Time] RETURNS[StavesPTR]; Last: PROC[sheet: SheetPTR, l: CARDINAL] RETURNS[CARDINAL]; LineNumber: PROC[sheet: SheetPTR, l: CARDINAL] RETURNS[n: CARDINAL _ 1]; NextLine: PROC[sheet: SheetPTR, l: CARDINAL] RETURNS[CARDINAL]; NextStaff: PROC[sheet: SheetPTR, s: CARDINAL, t: Time] RETURNS[CARDINAL]; NormalPitch: PROC[sheet: SheetPTR, staff: CARDINAL] RETURNS[INTEGER]; PriorLine: PROC[sheet: SheetPTR, l: CARDINAL] RETURNS[CARDINAL]; PriorStaff: PROC[sheet: SheetPTR, s: CARDINAL, t: Time] RETURNS[CARDINAL]; OctavaHeight: PROC[pitch, height: INTEGER] RETURNS[INTEGER]; <<*************************************************************************>> <> <<*************************************************************************>> < [Time, Pitch, Staff] => [Time, Height] => ScreenPoint; UNAMBIGUOUSLY!>> <<[Time, Height] < = ScreenPoint; ambiguous when point is between lines>> <<[Time, Pitch, Staff] < = [Time, Height]; ambiguous between staffs >> <> default: INTEGER = 1000; AlternateTime: PROC[sheet: SheetPTR, t1: Time, h1, lines: INTEGER] RETURNS[time: Time, height: INTEGER]; -- points on the screen are ambiguous Height: PROC[sheet: SheetPTR, t: Time, pitch: INTEGER _ default, staff: CARDINAL] RETURNS[INTEGER]; -- defaults to the bottom of the staff NearestStaff: PROC[sheet: SheetPTR, t: Time, height: INTEGER] RETURNS[INTEGER]; NearestTime: PROC[sheet: SheetPTR, x, y: INTEGER _ default] RETURNS[time: Time, height: INTEGER]; -- defaults to the position of the mouse Map: PROC[sheet: SheetPTR, t: Time, pitch: INTEGER _ default, staff: CARDINAL] RETURNS[x, y: INTEGER]; -- defaults to the bottom of the staff MapHeight: PROC[sheet: SheetPTR, t: Time, height: INTEGER] RETURNS[x, y: INTEGER]; MapNote: PROC[sheet: SheetPTR, n: NotePTR] RETURNS[x, y: INTEGER]; Pitch: PROC[sheet: SheetPTR, t: Time, height: INTEGER, staff: CARDINAL] RETURNS[INTEGER]; ScreenPoint: PROC[sheet: SheetPTR] RETURNS[x, y: INTEGER]; -- position of the mouse END..