<> <> <> <> <> DIRECTORY MusicDefs USING [EventPTR, NotePTR, ObjectType, ScorePortionPTR, ScorePTR, Time]; Piece: CEDAR DEFINITIONS = BEGIN OPEN MusicDefs; default: INTEGER = 1000; AddEvent: PROC[score: ScorePTR, event: EventPTR]; RemoveEvent: PROC[score: ScorePTR, event: EventPTR, free: BOOLEAN _ FALSE]; <> Copy: PROC[score: ScorePTR, time1, time2: Time] RETURNS[ScorePortionPTR]; Merge: PROC[score, new: ScorePTR, begin, end: Time]; Replace: PROC[score: ScorePTR, new: ScorePortionPTR, delete1, delete2: Time]; <> Insert: PROC[score: ScorePTR, new: ScorePortionPTR, begin: Time] = INLINE {Replace[score, new, begin, begin]}; Delete: PROC[score: ScorePTR, begin, end: Time] = INLINE {Replace[score, NIL, begin, end]}; New: PROC[length: CARDINAL, auxiliary: BOOL _ FALSE] RETURNS[score: ScorePTR]; Free: PROC[score: ScorePTR]; -- utterly destroys score. removes from anything that might point to it. Raises Piece.Overflow with new = NIL. Sort: PROC[score: ScorePTR]; CleanUpNotes: PROC[score: ScorePTR]; CleanUpEvents: PROC[score: ScorePTR]; MaxToc: PROC[score: ScorePTR, time1, time2: Time, duration: BOOLEAN] RETURNS[Time]; NearestNote: PROC[score: ScorePTR, x, y: INTEGER _ default] RETURNS[NotePTR]; -- x and y default to mouse. NearestObject: PROC[score: ScorePTR, x, y: INTEGER _ default] RETURNS[obj: ObjectType, p: REF]; -- x and y default to mouse. NearestEvent: PROC[score: ScorePTR, t: Time, syncsOnly: BOOLEAN _ FALSE] RETURNS[index: CARDINAL]; -- returns score.length if none found END.