DIRECTORY MusicDefs USING [BeamPTR, ChordHeapPTR, ChordPTR, NotePTR, ScorePTR, SheetPTR]; Chord: CEDAR DEFINITIONS = BEGIN OPEN MusicDefs; default: INTEGER = 1000; Draw: PROC[score: ScorePTR, c: ChordPTR, stem: INTEGER _ default]; Adjust: PROC[sheet: SheetPTR, c: ChordPTR]; SetDefaultStem: PROC[sheet: SheetPTR, c: ChordPTR]; Sort: PROC[c: ChordPTR, up: BOOLEAN] RETURNS[n: CARDINAL]; AddNote: PROC[score: ScorePTR, chord: ChordPTR, note: NotePTR]; RemoveNote: PROC[score: ScorePTR, chord: ChordPTR, note: NotePTR, free: BOOLEAN _ TRUE]; New: PROC[score: ScorePTR, length: CARDINAL _ 10] RETURNS[chord: ChordPTR]; Free: PROC[score: ScorePTR, chord: ChordPTR]; Beam: PROC[c: ChordPTR] RETURNS[BeamPTR] ~ INLINE { n: NotePTR ~ c.note[0]; RETURN[IF n=NIL THEN NIL ELSE n.beam] }; SetBeam: PROC[c: ChordPTR, b: BeamPTR]; GetHeapIndex: PROC[heap: ChordHeapPTR, c: ChordPTR] RETURNS[CARDINAL]; Grace: PROC[c: ChordPTR] RETURNS[BOOLEAN]; InVoice: PROC[c: ChordPTR, voice: CARDINAL] RETURNS[BOOLEAN]; Length: PROC[c: ChordPTR] RETURNS[CARDINAL] = INLINE {RETURN[c.length]}; Width: PROC[c: ChordPTR] RETURNS[INTEGER] = INLINE {RETURN[IF Grace[c] THEN 5 ELSE 8]}; END. ~Chord.mesa Copyright (C) 1983, 1984 Xerox Corporation. All rights reserved. Author: John Maxwell Last Edited by: Maxwell, November 18, 1983 9:02 am Last Edited by: Doug Wyatt, June 14, 1984 6:26:32 pm PDT default means that the stem is drawn as part of a beam removes the note from its chord, if any adds the note to the chord's sync, if any sets note.beam to the chord's beam if it has one, otherwise the chord replaces the note in note.beam. removes note from chord. sets n.beam to NIL. If chord.length < 2 and free = TRUE, then chord is freed. removes chord from anything that points to it, then frees it. INLINE Procedures Ê:˜™ J™@Jšœ™Jšœ2™2Jšœ8™8J™—šÏk ˜ Jšœ œ@˜OJ˜—Jšœœ ˜Jšœœœ ˜J˜Jšœ œ˜J˜JšÏnœœ%œ ˜CJšœ6™6Jšžœœ˜+J˜Jšžœœ˜3Jš žœœœœœ˜:J˜šžœœ2˜?Jšœ'™'Jšœ)™)Jšœ1™1Jšœ3™3—šž œœ2˜BJšœœœ˜Jšœ/™/Jšœ9™9—J˜Jšžœœœœ˜KJšžœœ$˜.Jšœ=™=J˜Jšœ™J˜šžœœœ œ˜3Jš œœœœœœœ ˜@J˜—Jšžœœ˜'Jšž œœ"œœ˜GJšžœœœœ˜*Jš žœœœœœ˜=J˜Jš žœœœœœœ ˜Hšžœœœœœœœ œœ˜XJ˜—Jšœ˜—…—š R