Note.mesa
Copyright (C) 1983, 1984 Xerox Corporation. All rights reserved.
Author: John Maxwell
last modified: November 4, 1983 2:12 pm
Last Edited by: Maxwell, November 17, 1983 2:35 pm
Last Edited by: Doug Wyatt, June 13, 1984 3:51:52 pm PDT
DIRECTORY
MusicDefs USING [Accidental, ChordPTR, Embellishment, NotePTR, noVoice, ScorePTR, SheetPTR, SyncPTR, Time];
Note: CEDAR DEFINITIONS
= BEGIN OPEN MusicDefs;
default: INTEGER = 1000;
Draw: PROC[score: ScorePTR, n: NotePTR, stem: INTEGER ← default];
DrawHead: PROC[score: ScorePTR, n: NotePTR, x, y, dotX: INTEGER];
DrawTie: PROC[score: ScorePTR, n: NotePTR];
Free: PROC[score: ScorePTR, n: NotePTR];
removes note from anything that points to it, then frees it.
GetBackTie: PROC[score: ScorePTR, n: NotePTR] RETURNS[NotePTR];
Duration: PROC[n: NotePTR, metrenome: INTEGER] RETURNS[Time];
SetAccidental: PROC[score: ScorePTR, n: NotePTR, a: Accidental];
SetEmbellishment: PROC[score: ScorePTR, n: NotePTR, e: Embellishment];
GetSyncIndex: PROC[s: SyncPTR, p: NotePTR] RETURNS[NAT];
inline procedures
InVoice: PROC[n: NotePTR, voice: CARDINAL] RETURNS[BOOLEAN] = INLINE {
RETURN[voice = noVoice OR n.voice = voice]};
Delta: PROC[sheet: SheetPTR, n: NotePTR] RETURNS[INTEGER] = INLINE {
RETURN[IF sheet.display#graphical THEN 0
ELSE IF n.chord=NIL THEN n.delta ELSE n.delta+n.chord.delta] };
Width: PROC[n: NotePTR] RETURNS[INTEGER] = INLINE {
RETURN[IF n.grace THEN 6 ELSE IF n.value=whole THEN 10 ELSE 8]};
END.