Beam.mesa
Copyright (C) 1983, 1984 Xerox Corporation. All rights reserved.
Author: John Maxwell
Last Edited by: Maxwell, November 18, 1983 1:33 pm
Last Edited by: Doug Wyatt, June 13, 1984 3:38:20 pm PDT
DIRECTORY
MusicDefs USING [BeamHeapPTR, BeamPTR, ScorePTR, SheetPTR, SyncPTR, Time, VariousPTR];
Beam: CEDAR DEFINITIONS
= BEGIN OPEN MusicDefs;
Draw: PROC[score: ScorePTR, b: BeamPTR] RETURNS[INTEGER, INTEGER];
Drawn: PROC[score: ScorePTR, b: BeamPTR] RETURNS[BOOLEAN];
AddItem: PROC[score: ScorePTR, beam: BeamPTR, item: VariousPTR];
RemoveItem: PROC[score: ScorePTR, beam: BeamPTR, item: VariousPTR,
free: BOOLEANTRUE];
removes item from beam.
If beam.length < 2 and free = TRUE, then beam is freed.
New: PROC[score: ScorePTR, length: CARDINAL] RETURNS[beam: BeamPTR];
Free: PROC[score: ScorePTR, b: BeamPTR];
removes beam from anything that points to it, then frees it.
Grace: PROC[b: BeamPTR] RETURNS[BOOLEAN];
InVoice: PROC[b: BeamPTR, voice: CARDINAL] RETURNS[BOOLEAN];
SetStems: PROC[sheet: SheetPTR, b: BeamPTR];
SetSyncs: PROC[b: BeamPTR];
GetSyncs: PROC[b: BeamPTR] RETURNS[sync1, sync2: SyncPTR];
returns the first and last sync in the beam (may recurse down nested beams)
Sort: PROC[b: BeamPTR];
GetHeapIndex: PROC[heap: BeamHeapPTR, p: BeamPTR] RETURNS[NAT];
Height: PROC[sheet: SheetPTR, b: BeamPTR, time: Time] RETURNS[h: INTEGER];
Length: PROC[b: BeamPTR] RETURNS[CARDINAL] = INLINE {RETURN[b.length]};
time: PROC[chord: VariousPTR] RETURNS[Time];
END.