.TH MUDEF.P 7 "MIDI"
.SH NAME
mudef.p \- \fIpic\fP macros for music scoring
.SH SYNOPSIS
.B pic -D .../MIDI/etc/mudef.p file.p >file.ns
.SH DESCRIPTION
.I Mudef.p
contains definitions of numerous macros that draw staves, notes,
clefs, etc.
The file is often included in others with the \fI.so\fP troff
request (even though this requires passing through a preprocessor
before running through \fIpic\fP which will ignore \fI.so\fP).
.PP
Several ``global'' variables are defined at the head of the file.
\fBw\fP is the width of note bodies (in inches if SCALE = 1, the default).
\fBh\fP is the height of note bodies.
\fBl\fP is the note stem length.
\fBs\fP is one-half the staff line spacing.
\fBn\fP is the position of the next note or symbol
(sometimes called the ``current note position'').
\fBstem\fP is 1 if stems should be up, and -1 if stems should be down.
The default starting values are:
.ft B
w = 0.1i;
h = 0.08i;
l = 0.28i;
s = 0.042i;
n = w;
stem = 1
.ft P
.PP
There are also some global point names used by the macros.
\fBStem\fP is set to the top end of the stem on notes with setms
and is set to the place where a stem would attach on wholenotes.
Eight global point names (\fBN0, N1, ..., N7\fP)
are used by the beaming macros.
The beam macros are typically called in a sequence like:
.Cs
ledgerline(0);blacknote(0); n=n+2*w; N0: Stem
blacknote(3); n=n+2*w; N1: Stem
blacknote(2); n=n+2*w; N2: Stem
ledgerline(0);blacknote(0); n=n+2*w; N3: Stem
blacknote(4); n=n+2*w; N4: Stem
blacknote(3); n=n+2*w; N5: Stem
blacknote(7); n=n+2*w; N6: Stem
ledgerline(0);blacknote(0); n=n+2*w; N7: Stem
sbeam8(14, 14)
.Ce
.PP
The macros defined in \fImudef.p\fP are:
.nf
.in 0.5i
staff(y, l) - 5 line staff, center line at y, l long
staves(l) - standard 10 line staff, l long
trebleclef(y) - treble cleff centered on y
bassclef(y) - bass cleff centered on y
pstaff(l, y) - percussion staff at y, l long
meter(y, "n", "d") - meter indication at y, n/d (e.g. 4/4)
chord("name") - put chord name above the staff at standard height
chordy("name", y) - put chord name above the staff at specified height
tbarline() - treble staff barline at current note position, n
bbarline() - bass staff barline at current note position, n
barline() - full barline at current note position, n
sbarline(y0, y1) - special barline at current note position, n
ledgerline(y) - ledger line at height y and current note position
wholenote(y) - whole note at height y and current note position
wholerest(y) - whole rest at height y and current note position
notestem(y) - note stem at height y and current note position
halfnote(y) - half note at height y and current note position
halfrest(y) - half rest at height y and current note position
blacknote(y) - filled oval at height y and current note position
quarternote(y) - quarter note at height y and current note position
note(y) - synonym for quarternote(y)
quarterrest(y) - quarter rest at height y and current note position
quarterperc(y) - quarter percussion note, height y, current note position
flag(y, dy) - flag (1/8, 1/16, etc. notes) for note at (n, y), dy from end
eighthnote(y) - eighth note at height y and current note position
eighthrest(y) - eighth rest at height y and current note position
eighthperc(y) - eighth percussion note, height y, current note position
sixteenthnote(y) - sixteenth note at height y and current note position
sixteenthrest(y) - sixteenth rest at height y and current note position
sixteenthperc(y) - sixteenth percussion note, height y, cur note position
thirtysecondnote(y) - thirtysecond note at height y and current note position
thirtysecondrest(y) - thirtysecond rest, height y, current note position
thirtysecondperc(y) - thirtysecond percussion note at y, cur note position
sixtyfourthnote(y) - sixtyfourth note at height y and current note position
sixtyfourthrest(y) - sixtyfourth rest, height y, current note position
sixtyfourthperc(y) - sixtyfourth percussion note at y, cur note position
dtd(y) - dot for dotted notes at y, cur note position
sharp(y) - sharp sign at y, cur note position
natural(y) - natural sign at y, cur note position
flat(y) - flat sign at y, cur note position
slur(x1,y1, x2,y2, "3") slurred triplet, quintuplet, etc.
slet(x1,y1, x2,y2, "3") slurred triplet, quintuplet, etc. (for beamed notes)
blet(x1,y1, x2,y2, "3") bracketed triplet, quintuplet, etc. (unbeamed notes)
seq(x, y) part of a slur, slet, or blet sequence
eseq(type, sym) end sequence, type=slur|slet|blet, sym = "3"
lyric(y, text) - lyric text at height y and current note position
beam28(blh,brh) - Beam 2 8th notes with spec. end heights (uses N0 - N1)
beam216(blh,brh) - Beam 2 16th notes with spec. end heights (uses N0 - N1)
beam232(blh,brh) - Beam 2 32nd notes with spec. end heights (uses N0 - N1)
beam48(blh,brh) - Beam 4 8th notes with spec. end heights (uses N0 - N3)
beam416(blh,brh) - Beam 4 16th notes with spec. end heights (uses N0 - N3)
beam416s(blh,brh) - Beam 4 16th notes SPECIALLY (split beams)
beam432(blh,brh) - Beam 4 32nd notes with spec. end heights (uses N0 - N3)
beam88(blh,brh) - Beam 8 8th notes with spec. end heights (uses N0 - N7)
beam816(blh,brh) - Beam 8 16th notes with spec. end heights (uses N0 - N7)
beam832(blh,brh) - Beam 8 32nd notes with spec. end heights (uses N0 - N7)
.in
.fi
.SH FILES
\&.../MIDI/etc/mudef.p
.SH SEE ALSO
m2p(1)
.SH AUTHOR
Peter Langston, Bell Communications Research
(bellcore!psl)



