.TH M2PUB 1 "MIDI"
.SH NAME
m2p - convert "m" format files into \fIpic\fP(1) files
.SH SYNOPSIS
.nf
\fBawk -f m2p.awk\fP < mfile > pfile
\fBawk -f m2p2.awk\fP < mfile > pfile
\fBawk -f m2pa.awk\fP < mfile > pfile
\fBawk -f m2ps.awk\fP < mfile > pfile
\fBawk -f m2pub.awk\fP < mfile > pfile
.fi
.SH DESCRIPTION
.I M2p
and its many relatives
convert data from a variant of MUTRAN called \fIm\fR format
(described in m(5)) to calls to \fIpic\fP macros defined in
\fImudef.p\fP (see mudef.p(7)).
.PP
\fIm2p.awk\fP scores each voice part on a separate page, in big, easy-to-read
notes.
It decides whether to use a bass clef (F clef), or treble clef (G clef),
or both based on the range of the part.
.PP
\fIm2p2.awk\fP scores two voice parts on the same staff with the second
part's stems inverted, (in big, easy-to-read notes).
.PP
\fIm2pa.awk\fP scores all the voice parts on the same page,
in big, easy-to-read notes.
Unfortunately, the program is simply overlaying the separate
parts, so the result can be quite messy.
.PP
\fIm2ps.awk\fP is identical to \fIm2p.awk\fP except it produces
smaller notes, staves, etc.
(I.e. it has ``SCALE = 1.4'' instead of ``SCALE = 1''.)
.PP
\fIm2pub.awk\fP produces even smaller output (``SCALE = 1.5'')
and either the treble or bass clef depending on the presence of
the #CLEF control line.
It's intended for illustrations in papers.
It's somewhat newer than the others.
.PP
\fIM\fP format is designed to be easy for humans to read and edit,
and was designed for notation of multipart scores with lyrics
(e.g. four-part harmonizations).
M-file format consists of control lines and data lines arranged such that
time proceeds downward with each part represented by a column of data
(and sometimes controls).
.PP
Because m format includes control lines for use by many different programs,
many of them are ignored by the \fIm2p\fP programs,
while others are crucial to their operation.
Some control lines ignored are:
#ARTIC, #CHAN, #CPQ, #ONLYSECT, #REPEAT, #SOLO, $SYNC,
#TEMPO, #<space> (i.e. comments).
Control lines given special handling or required by m2mpu are:
.IP #BAR
A measure ends here.  No arguments are used.
At this point in the score, a bar line will be generated.
.IP #CLEF
Defines whether \fIm2pub.awk\fP should use the treble or the bass clef.
Its single argument should be either ``treble'' or ``bass''.
.IP #METER
This control requires two arguments that are used to form the time
signature (e.g. "#METER  4  4" specifies 4/4).
The default is to have no time signature.
.IP #TITLE
The TITLE control specifies a title to be printed above the score.
.IP #TRANS
Certain types of music are often printed an octave higher or lower than
they are played (or sung).  Sometimes a baritone is much better at reading
the treble staff than the bass.  The TRANS control transposes the music
for scoring by a number of \fIscale steps\fP specified by the argument.
Thus if "#TRANS 7" is specified and a C4 (middle C) appears, the C above
middle C (above the center line in the treble staff) will be printed.
.IP #VOICES
The VOICES control defines the number of voices and associates a name with each
one.  Each voice is represented by an argument that can be any combination of
characters.  The \fIm2p\fP programs use the names provided here when
printing part scores.
\fIThis control must precede all data or controls that expect
one argument per voice.\fP
.SH EXAMPLE
.Cs
% awk -f ../MIDI/etc/m2pub.awk <tbp.m | so | pic -D | troff -ms
.Ce
.SH SEE ALSO
m(5), m2mpu(1), m2v(1), mpp(1)
.SH AUTHOR
Peter Langston, Bell Communications Research
(bellcore!psl)
