File: pmx220.tex

package info (click to toggle)
pmx 2.2.0-1
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 1,876 kB
  • ctags: 1,026
  • sloc: sh: 109; makefile: 64
file content (1652 lines) | stat: -rw-r--r-- 80,304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
% pmx220.tex   LaTeX 2.09-*-
\documentstyle[11pt]{article}

\def\MusiXTeX{MusiX\TeX}
\def\bs{{\tt\char'134}}
\def\PMXX{{\bfx PMX}}
\def\PMX{{\PMXX~}}
% Use \bfx for program names only.  Use \bf for single embedded letters 
\font\bfx=cmb10 scaled\magstephalf
\font\bfi=cmbxti10 scaled\magstephalf 
\setcounter{secnumdepth}1
\setcounter{tocdepth}3
\def\Bslash{\tt\char'134}
\def\|{{\tt\char'174}}
\def\LBR{{\tt\char'173}}
\def\RBR{{\tt\char'175}}
\textheight= 9.5in \voffset-.8in%
\textwidth= 6.5in \hoffset-1.0in
\def\newfrom{2.0}  % changed every now and then 
\def\NEW#1{\ifdim#1 pt<\newfrom pt\else% 
\marginpar{\fbox{#1}}\fi}

\let\rulet\rule\def\rule#1#2{\if#1<#2\rulet{.05in}{#2}\else\relet{#1}{.05in}\fi} 

\begin{document}

\title{
  \Huge\bf
  PMX~--~a Preprocessor for \MusiXTeX{}\\
  \null\vskip-15pt
  \Large\sl
  Version 2.2~--~March 2000\\ 
  \author{\Large\rm Don \sc Simons\\
  \large\sl
  Dr. Don's PC and Harpsichord Emporium\\
  \normalsize\sl
  Redondo Beach, California, USA.\\
  dsimons@logicon.com}}
\date{}

\maketitle

\setcounter{page}1
\tableofcontents
\setcounter{secnumdepth}1
\pagestyle{headings}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
\setcounter{secnumdepth}1

        \PMX can help you typeset a musical score if you have a reasonably
 up-to-date version of \MusiXTeX{}. The goal
of \PMX is to facilitate the efficient production of scores and parts
that have an almost professional appearance.  It can do {\it all} the work
involved in setting up {\tt \bs notes-\bs enotes} groupings, 
selecting groups of
notes to be beamed, defining beam heights and slopes, spreading the
entire piece evenly over specified numbers of systems and pages, and inserting
extra spaces where needed to make room for accidentals, flags, dots,
and new clefs.    The input language for \PMX is much simpler than
\MusiXTeX.  You can enter note values and rests from 64ths to double 
whole notes ({\it breves}), ornaments, slurs, and limited text strings.  Every
voice in every bar must have exactly the correct number of beats in
the current meter, but you may change the meter at the beginning of any
measure, with or without printing the new time signature.  Before making a 
\TeX{} file, \PMX checks these timings and other aspects of the input.
\PMX has special features for dealing with baroque chamber music, including
the ability
to notate figured bass below the bottom staff in each system.  If \PMX hasn't
yet learned to do something you want to do, you can usually work around the 
problem by inserting literal \TeX\ strings in the \PMX input file.

     You can automatically create parts from a score using {\bfx scor2prt}.  
This auxiliary program generates a set of {\tt .pmx} input files, one for 
each part, from a single {\tt .pmx} file for the score.  
You can control the appearance of the 
parts with special commands in the main file, thereby making it  
possible to include within a single input file all the information 
that defines the score and the individual parts.

The native language of \PMX is FORTRAN and its home port is DOS. The basic
distribution contains the FORTRAN sources, and binaries that will run in a DOS
\NEW{2.0} window on a PC with\break WINDOWS95 or higher.  Thanks to 
some very helpful individuals, ports are available for Macintosh and UNIX (see
section~\ref{where} on page~\pageref{where}).  

\subsection{Conventions for This Manual}

	Hey, this is boring stuff, but if you take a minute to understand
the typographic conventions and a little jargon, 
it may avoid some confusion down the road.

	The typewriter typeface always indicates verbatim text as it would
be input to a computer.  This includes file names, \MusiXTeX{} tokens, and 
\PMX commands, e.g., {\tt barsant.pmx, \bs internote, c44}. 

	Bold is used for program names (e.g., {\bfx pmxab}), or when applied
to a single letter, to relate a \PMX command to its meaning (e.g., ``{\tt e}
signifies a l{\bf e}ft shift'').

        Italics may mean several different things depending on the context:
simple emphasis, or the first appearance of {\it jargon} 
(buzz-words that need to be explicitly defined), 
or finally  
to represent input variables for which some verbatim text would need to be 
substituted.  In the latter case the variable will be surrounded by
square brackets, e.g., [{\it basename}], but the brackets are not to be 
included with the verbatim text. 

        Speaking of jargon, there are several special words that have very 
specific meanings here: A {\it staff} is one set of 5 lines (plural 
{\it staves}), a {\it system} is a group of staves, {\it voice} is the same as
{\it staff}, and  {\it line of music} refers to one of the one or two 
simultaneous allowable sequences of notes in a voice. Note that this  
definition of voice is a little unconventional, since a single voice may have
more than one line of music.

\subsection{Setup}

	This section describes the setup for the DOS version or for those 
compiling the FORTRAN source.  Other versions should be accompanied by their
own setup instructions.  

	After decompressing the distribution file if necessary, 
you should have these 
files: \NEW{2.0} {\tt pmxab.for, scor2prt.for}, two corresponding 
DOS executables, several sample {\tt .pmx} files,
{\tt pmx.tex},\break {\tt ref220.tex} (\TeX\ source for a command summary),
{\tt pmx220.tex }(\TeX\ source for this file), 
and Postscript images of the latter two files.
If necessary, compile the FORTRAN programs.  
I have tried to keep the source code as generic as possible, but minor 
modifications may be needed for FORTRAN-to-C translation and/or other
compilers.  

	Once you have assembled a full set of files, put the executables 
somewhere in the path or in your working directory, {\tt pmx.tex} into the 
texinput directory, and the sample {\tt .pmx} files in your working 
directory (the one from which you will run \PMX).  

\subsection{Basic Operation, by Example}

Edit the 15th line of {\tt barsant.pmx} to contain the path to the 
texinput directory; \PMX will write the {\tt .tex} file there.  For example, 
if you want this to be the same as the working directory, type {\tt .\bs} 
for DOS, or {\tt ./} for UNIX.   

Execute \PMX by typing {\tt pmxab barsant} . \NEW{2.0} Or, for backward 
compatibility, you may type {\tt pmxab <return>} and you will be prompted
for a jobname.  {\bfx pmxab} will always generate two files in the working 
directory: {\tt barsant.pml}
is a log file, and {\tt pmxaerr.dat} contains a single integer, 0 if 
the run was successful, otherwise the line number in the {\tt .pmx} file of the 
fatal error (useful for batch processing).   Also, on successful completion, 
{\tt barsant.tex} will be placed in the path specified in the setup.  

Now you are right where you would be after 
entering, debugging, and rough-editing the {\tt .tex} file manually.  To see 
the results, process {\tt barsant.tex} just as you would for any \MusiXTeX{} 
file, running all three passes, and view the {\tt .dvi} file.  To make 
separate parts, run {\bfx scor2prt} by typing {\tt scor2prt barsant} .\NEW{2.0} 
The program will create a new {\tt .pmx} file for each instrument, in this
case {\tt barsant1.pmx} and {\tt barsant2.pmx}.
You may then process these 
files like you did the original one to create separate parts.

\section{Elements of PMX}
\def\l@subsection{\@dottedtocline{2}{5em}{20em}}%original 2 3.8 3.2
\setcounter{secnumdepth}2

\subsection{Setup Data in the Input File} \label{setupdata}

	To see how the input file is put together, we'll look at 
{\tt barsant.pmx}.  For reference, here are are the first few lines:  
\begin{verbatim}
%----------------%
%
%  barsant.pmx   Revised 31 August 1997
% 
%----------------%
%
% nv,noinst,mtrnuml,mtrdenl,mtrnmp,mtrdnp,xmtrnum0,isig,
  2    2      4       4        0      6      0       0 
%
% npages,nsyst,musicsize,fracindent
    1      7     20        0.07
Basso
Recorder
bt
./
\end{verbatim}
The lines 
with {\tt \%} in column 1 are comments.  
Some special handling of comment lines will be 
discussed in the section on creating parts from a score.  
The rest of the lines in this example are the {\it setup data}.  

	Starting in the first non-comment line above,   

{\tt nv} (integer$\leq$12) \NEW{2.0} is the total number of {\bf v}oices, or 
sta{\bf v}es 
per system.  [We will use the terms {\it voice} and {\it staff} (plural 
{\it staves}) interchangeably].  Each 
voice or staff may contain either one or two lines of music.

{\tt noinst} (integer$\leq${\tt nv}) is number of {\it instruments}.  Each 
instrument has a unique name (see below), and any instrument
with more than one voice will have its staves joined with a curly bracket. 
Usually there is only one voice per instrument and {\tt noinst=nv}.  There
are two ways to assign more than one voice to one or more instruments. 
If only the first (lowest) instrument has more than one voice, such as in
a score for piano and a solo instrument, simply make
{\tt noinst$<$nv} and any difference will show up in instrument 1, the bottom
one in each system..  
\NEW{1.4}
For a
more general distribution, put a minus sign in front of {\tt noinst},
  and follow {\tt noinst} with the number of voices  in each  instrument  in
succession, separated by spaces.  These numbers must add up to {\tt nv} or your
computer will explode.  For a typical example of keyboard music, see 
{\tt mwalmnd.pmx}, in which {\tt nv=2} and {\tt noinst=1}, producing two 
staves per system with a curly bracket at the left.  

{\tt mtrnuml} is the {\it logical} numerator of the meter, or the number of 
beats per measure; {\tt mtrdenl} the denominator.  Please note the special
considerations in the paragraph after the next. If {\tt mtrnuml} is 
divisible by 2 or 3, beam grouping will be automatic; otherwise you will
have to force all beams using {\tt [}$\dots${\tt ]} as described in
subsection~\ref{beams} on page~\pageref{beams}.

{\tt mtrnmp} and {\tt mtrdnp} are the {\it printed} numerator and denominator.  
These determine the appearance of the meter in the printed output but 
have no effect on the internal timing analysis.  If {\tt mtrnmp$>$0} then it 
and {\tt mtrdnp} are printed literally as the numerator and denominator 
of the time signature.  Please note the special considerations in the following 
paragraph. If 
{\tt mtrnmp$<$0}, then the numerator is abs({\tt mtrnmp}) and the 
entire time signature will be printed with a vertical slash through 
it.  If {\tt mtrnmp}=0, then {\tt mtrdnp} determines the printed meter 
as follows: 

\begin{tabular}{ll}
\tt 0 & No meter is printed ({\it blind} meter change)\\
\tt 1, 2, 3, or 4 & A single digit, between the 2nd and 4th lines\\
\tt 5 &  Cut time (alla breve)\\
\tt 6 &  Common time\\
\tt 7 &  Numeral 3 with a vertical slash\\
\end{tabular}

There are special considerations for n/16 and n/1 time signatures (where the 
latter "1" normally means a whole note).  To get
n/1 time, use {\tt 0} (zero) for {\tt mtrdenl} and {\tt 1} for {\tt mtrdnp}.  To 
remember this rule, recall that the printed denominator is taken literally,
while the logical denominator can always be represented
by the same single digit used for the corresponding time value when entering 
ordinary notes (see section~\ref{notes} starting on page~\pageref{notes}). So
for n/16 time, use {\tt 1} for {\tt mtrdenl} and {\tt 16} for {\tt mtrdnp}. 

If the first bar is a partial bar containing a pickup, {\tt xmtrnum0} is 
the number of beats in it; otherwise set it to 0.  It need not be an 
integer.  The first bar is the {\it only} bar that can have a different 
number of beats than the current value of {\tt mtrnuml} (Later we'll see how 
to change the meter).

{\tt isig} is the key signature, positive integer for sharps, negative for 
flats.

If {\tt npages}$>$0, it is the number of pages and {\tt nsyst} is the total 
number of systems in the entire piece.  \PMX will spread the entire 
piece horizontally over this number of systems, and vertically over 
{\tt npages} pages.  For proper vertical spacing there should be from 
about 9 to 16 staves per page.  If you specify too many staves for the number
pages,  one or more staves will spill over onto an extra sheet.  If this 
happens it will only become obvious when you preview the {\tt .dvi} file.  
However, with
practice, you can spot the problem by watching the page numbers printed 
to the screen on the
first pass through \TeX. The most common 
solution is either to increase {\tt npages} or 
decrease {\tt nsyst}.  

If {\tt npages} is set to 0, then {\tt nsyst} is interpreted as the average 
number of measures per system.  This is useful while building up a 
file a little at a time. \PMX will decide how many pages to use.

{\tt musicsize} is either 20 or 16, the height of a staff in points.

{\tt fracindent} is the indentation of the first system from the left 
margin, expressed as a decimal fraction of the total line width.

	Next come the names of the {\tt noinst} instruments as you want them to 
appear within the indentation in the first system, one per line, 
starting with the {\it bottom} instrument.  If you've set {\tt fracindent}=0 
and don't 
want instrument names to appear, you must still leave {\tt noinst}
blank lines here.  Next comes a single string of {\tt nv} 
letters or numbers for the clefs, again starting with the bottom voice: 
{\tt b,~r,~n,~a,~m,~s,~t,~f} or digits 0-7 respectively for {\bf b}ass, 
ba{\bf r}itone, te{\bf n}or, {\bf a}lto, {\bf m}ezzo-soprano, {\bf s}oprano, 
{\bf t}reble, or \NEW{2.2} {\bf F}rench violin clef.  
The last line of setup data contains the path to the texinput directory, 
where you want the {\tt tex} file to go when \PMX creates it.  The one here, 
{\tt ./}~, represents the current directory in UNIX and some versions of DOS.  
The path must terminate with {\tt /} or {\tt \bs}~.

\subsection{Structure of the Body of the Input File} \label{structure}

	The rest of the {\tt .pmx} file is the {\it body} of the input.  
The basic unit of input from here on is called an {\it input block} or 
just {\it block}, each one 
representing an integral number of bars except 
possibly the first, which may include a pickup.  There will usually be 
4 to 8 bars in a block.  15 is the most allowed.  It is good practice 
to separate the blocks with comment lines showing which bars they 
represent, as I've done in {\tt barsant.pmx}.  
It is also advisable, although not required, to separate the bars with
the symbol {\tt |}, whose main functions 
are to provide visual separation in the input file, and to help isolate input
errors: if you put one anywhere except 
at a bar-end, {\bfx pmxab} will stop and show you where it detected the 
timing error. Otherwise, with several minor exceptions,
{\tt |} has no effect.  

At the start of each block there may be a few special symbols 
(described in section~\ref{pmxcmds} starting on page~\pageref{pmxcmds}).  
Next come the input data for the selected number 
of bars of the first (lowest in the system) line in the first staff, followed by 
either {\tt /} to move to the next staff, or {\tt //} to move to the next line 
of music on the same staff.  Each new line of music should start on a new line 
in the input file, i.e., there should be no further data on the same input line
after {\tt /} or {\tt // }. 
   Continue entering other lines of music, each with 
{\it exactly} the same number of bars as the first, 
terminated by {\tt /} or {\tt //}, until
 the last (topmost in the system) ends with a {\tt /} and the block is 
finished.  Within 
a block every line must have the same number of bars, but every block 
needn't have the same number of bars as other blocks.  The number of 
lines in a voice can only be 1 or 2, and cannot change within a block, but
may vary from block to block. 

	The data for each line of music 
in each voice are a sequence of {\it symbols} 
containing one or more adjacent characters.  Symbols are separated from each
other by spaces.  The line-terminating symbols {\tt /} and {\tt //} should also
naturally be preceded by a space.

\subsubsection{Notes} \label{notes}

	Symbols for notes always start with a lower-case letter and end at 
the first space. The first letter is the note name ({\tt a-g}).  The 
rest of the characters can be in any order with only a few 
restrictions.  The first digit defines the {\it basic time value} of the 
note: {\tt 9, 0, 2, 4, 8, 1, 3} or {\tt 6} respectively for double-whole,
whole, half, quarter, 
eighth, sixteenth, thirty-second, and sixty-fourth notes.  The second 
digit sets the octave (for reference, octave 4 runs from middle C to 
the B above).  Certain letters may appear after the initial one: {\tt d} 
for {\bf d}ot; {\tt dd} for \NEW{1.4} double dot; 
{\tt f, n,} or {\tt s} for {\bf f}lat, {\bf n}atural, 
or {\bf s}harp (repeat the letter  
immediately for a double); {\tt u} or {\tt l}, which  force the stem 
direction of any un-beamed note; {\tt e} or {\tt r} to shift the notehead 
l{\bf e}ft 
or {\bf r}ight by its own width; and {\tt a} (for {\bf a}lone) which inhibits 
beaming for this note.  Other characters allowed in note 
symbols are {\tt +}, {\tt -}, {\tt .}(period), {\tt ,}(comma), {\tt x}, and 
several special characters following {\tt x}, all to be described below.  
Between the first letter and the end or {\tt x} if present,
non-digits can be in any order with respect to each other and to the digits, 
with minor exceptions involving shifting dots and accidentals.  

To move
a dot from its default location, simply follow the {\tt d}
with one or two decimal numbers, each predeced by 
{\tt +} or {\tt -}.  
The first is the 
vertical shift in \bs{\tt internote}s, the second, the horizontal shift in 
notehead widths.  

Accidentals \NEW{1.4} can be shifted too.  One way is to enter 
{\tt +} or {\tt -} right after the accidental character, 
then an integer 
for the vertical shift, then another {\tt +} or {\tt -} followed by the 
horizontal shift in notehead widths.  If you use this method, you {\it must}
enter both numbers.  Or, to just shift horizontally, use
{\tt <} or {\tt >} followed by the shift in notehead widths.  When shifting
a sharp to avoid another sharp, a left shift of 0.85 is usually best.  When 
shifting a flat to avoid a flat above it, a left shift of 0.3 is suggested.

  Dots and accidentals always have to be entered when and if a note 
calls for them. i.e., they are never carried over from previous notes.  
On the other hand, the octave only needs to be entered if the note is 
more than a fourth away from the most recent note in the same voice.  
This feature lets you go for long stretches in a voice before needing 
to enter the octave.  An alternate way to jump more than a fourth but 
less than a twelfth is to type {\tt +} or {\tt -}.  In other words, these 
symbols mean to put the note an octave higher or lower than it 
otherwise would have gone.  Two {\tt +}'s will raise the pitch two octaves 
above what it otherwise would have been, and so forth.  
The basic time 
value is also carried over from the past if it is not re-entered,   
except for the first note or rest in each line of music in an input block, 
for which it {\tt must} be entered.   
Therefore, when the melody jumps more than a 4th, using {\tt +} or {\tt -} is 
often more convenient than using a digit.  This is because in order to 
use the digit, you must first enter the basic time value whether it 
changes or not.  

	For example {\tt c44 d e f g a b c c0-} is an ascending quarter-note  
scale starting on middle C, followed by an octave jump down to a 
whole note middle C.  

	Starting with version 1.2, octave numbers can be combined with one or
more {\tt +} or {\tt -} .  In earlier versions, {\tt +} or {\tt -} was
ignored if an octave number was specified.  This is a slight backward 
incompatibility; {\bfx pmxab} prints a warning when it happens.

The first note symbol of each line of music in a block must 
contain at a minimum the note name or {\tt r} for a rest (see below), 
and a basic time value.  An option in setting the 
pitch level of the first note in a line in any block except the first, is to 
rely on some fairly obvious inheritance rules from the 
end of the prior block.  
However, if the number of lines of music in a staff  
has changed from the prior block, it is safest to reset the octave at the
start of a new block.  Duration is never inherited and must be set at the
start of each input block.   

	Dots can be a little tricky, because even though they affect the 
actual time value, they don't affect the basic time value, and it is only the
latter that is ``sticky".  Therefore, if a note is dotted, you always have to 
enter a {\tt d} (or a period, see next paragraph) somewhere within the 
symbol, after 
the note name, even if the actual time value and octave are the same 
as the prior note.  But the {\it basic} time value need not be re-entered if 
it hasn't changed (unless the note is more than a fourth from the 
prior note {\it and} you have for some strange reason elected to indicate the 
octave with a number rather than {\tt +} or {\tt -} ). So for example, 
consecutive dotted half notes, each within a fourth of the previous 
one, could be most cleanly entered as {\tt cd24 ed gd ed}, whereas {\tt cd24 e}
would represent a dotted half note followed by a plain half note 
(since the basic time value--as defined by the first digit--was a half 
note all along).

	There are two special shortcut rhythmic notations.  For normal dotted
rhythms (3:1 ratio), if you    
include a period ({\tt .}) in the note symbol, it will 
(a) assign a dot to the note just entered, (b) terminate that note, 
(c) prepare to 
receive the next note name {\it without any space}, and (d) automatically 
assign a time value to the second note equal to one-third of the first one.
No time value may be entered for the second note, but octave and accidental
data may.  Ornaments and slurs (see below) following this symbol will apply 
to the second member; you can't use it if you need such adornments on the 
first.  However, the main advantage of this shortcut comes if you want to 
follow one such pair with another of the same rhythm; in that case you 
needn't enter any further time value for {\it either} member of the second pair.  
This is only possible because after using the shortcut,
the basic (inheritable) time value is set to that of the
{\it first} note in the pair, without the dot.

     For paired notes with 2:1 rhythmic ratios, the symbol {\tt ,}~(comma)
behaves similarly to the {\tt .}~(period) for 3:1 rhythms.

	Xtuplets can have from 2 to 24 notes or \NEW{1.4} rests all of equal 
duration.  The symbol for the first note of an xtuplet begins exactly like a 
note or rest symbol, with the name of the first note in the xtuplet, or
{\tt r} if it starts with a {\bf r}est (see next subsection), and an optional 
time value.  
However, the actual time value (including a dot if present and a basic 
duration that may have been inherited from the prior note) now represents the 
{\it total} duration of the xtuplet.  
Next (with no space, as usual) comes 
{\tt x} followed by a one- or two-digit integer for the number of notes in 
the xtuplet, then optionally an {\tt n} to control the printing of the 
{\bf n}umber. A blank following {\tt n} signals that the number should not be
printed. On the other hand, if one or two decimal numbers follow {\tt n}, 
each preceded by {\tt +} or {\tt -}, the first 
is a vertical shift in {\tt \bs internote}s, and the second, a horizontal shift 
in notehead widths.  A final option after {\tt n} is {\tt f}, to {\bf f}lip
the number vertically from its default position. 

The second through last notes of the xtuplet are each then 
represented by a separate symbol containing a subset of the characters 
permitted for ordinary notes or rests: note name or {\tt r} (the only required 
character), accidental, and octave change character ({\tt +} or {\tt -}). 
\NEW{1.4} The octave may be given explicitly instead, and any integer will be 
interpreted as such, as no time values or dots are permitted.

The last note of an xtuplet may not be a \NEW{1.4} rest. 

As an example, an ascending quarter-note triplet scale would be 
notated\hfil\break {\tt~c44x3~d~e~f4x3~g~a~b4x3~c~d~\dots} 

\subsubsection{Rests}

	The symbol for a rest starts with {\tt r}.  
Then for a normal rest, in either order come a digit for the basic time value 
(using same codes as for notes, optional if unchanged from previous value),  
a {\tt d} if the rest is dotted, and a second {\tt d} if double dotted.
\NEW{2.0} The basic time value of a rest 
affects future notes and rests the same as if it had come from a note, 
i.e., it applies until another value is entered with a subsequent note 
or rest in the same line of music.  The symbol {\tt rp} represents a 
full-bar rest notated with a {\it pause} character (whole rest) regardless of 
the time signature; in this case no other duration information is 
needed or allowed.  {\tt rb}, followed if necessary by a duration 
specifier, denotes a {\bfi b}{\it lank} rest, one that occupies space and time 
but is invisible. This is most often used when there are
two lines of music in a staff and one drops out for some of the duration
of the current input block.  (See {\tt mwalmnd.pmx} for examples).  
\NEW{1.4} The 
option {\tt o} (for {\bf o}ff-center) suppresses centering a full bar rest.  If
you don't exercise this option, then 
{\it all} full-bar rests will be horizontally centered between bar 
lines, including pauses ({\tt rp}) as well as normal rests that fill the bar.
   {\tt rm} followed immediately by an integer will generate a 
{\bfi m}{\it ulti-bar} 
rest, a special combination of symbols between two bar lines with an integer 
above representing two or more bars of rest.   
This symbol will generally only be used in separate parts 
after having been automatically generated by {\bfx scor2prt}.

	The default vertical position of a rest depends on whether there
are one or two lines of music in the staff. 
For one line it is just the \MusiXTeX{} default 
(approximately centered on the middle line).  On the other hand, in  
the lower line of music in 
a two-line voice, the rest is lowered {\tt 4\bs internote}, while 
in the upper line it is raised {\tt 2\bs internote}.  The \PMX default can be 
manually overridden by appending {\tt +}~or~{\tt -} and an integer 
representing the offset from the {\it middle} line of the staff 
(not from the \PMX default if there are two lines in the voice!).  
So for example, in a single staff 
in 3/4 meter, two lines of music each with a half note followed by its own
quarter rest would be either 
\begin{verbatim}
c24 r4 //
c25 r4 / 
\end{verbatim}
or equivalently
\begin{verbatim}
c24 r4-4 //
c25 r4+2 / 
\end{verbatim}
while
\begin{verbatim}
c24 r4+0 //
c25 r4b /
\end{verbatim}
would produce two notes followed by a single, vertically centered rest.

\subsubsection{Chords}

      Chordal notes, which always share a stem and the same time value as the 
prior note, are symbolized with {\tt z} followed by a note name and 
optionally an accidental, {\tt +} or {\tt -} as octave indicator, and {\tt e} 
or {\tt r} for a l{\bf e}ft or {\bf r}ight shift by one notehead width.
No basic time value is allowed.  If the main note
is dotted, then the chordal note will appear with a dot regardless of whether
a {\tt d} is entered.  The only time a {\tt d} is required in a chordal note
symbol is if the dot's position is to be adjusted; in this case the
{\tt d} is required, followed by one or two decimal numbers, each preceded by
{\tt +} or {\tt -}.  The first is the vertical shift in \bs{\tt internote}s;
the second, the horizontal shift in notehead widths. 
Any number of chordal notes can follow a 
single main note.  The stem direction of a chord is controlled by the main
note, but may be manually overridden with {\tt u} or {\tt l} in the main note
symbol.

    When chordal notes are beamed together, the default height and angle of 
the beam will be determined by the main note on each stem (the one without 
{\tt z}).  If a beam joining chordal notes looks bad, you can usually  
fix it either by changing which note acts as the main one, 
or by fine-tuning the beam parameters as described starting
on page \pageref{beams}.

\subsubsection{Grace notes}

	A grace note symbol starts with a {\tt G}.  It is entered in its natural
order, normally before the main note, but sometimes after.  After {\tt G} and
before the note name, comes any 
combination of the following options: a single digit representing the number of 
notes in the grace (default is 1), {\tt m} and a digit for 
{\bfi m}{\it ultiplicity} 
(number of flags or beams, default is 1, 0 is allowed), 
{\tt s} for {\bf s}lur (joining all notes of the 
grace to the main note; no other {\bf s} is needed on the main note), 
{\tt x} for a slash (only for single graces), 
{\tt l} or {\tt u} to force the direction of the stem(s), {\tt A} (for
{\bf A}fter) or {\tt W} (for {\bf W}ay-after) to associate 
the grace note with the {\it prior} note.  Next comes the only 
required character, the 
first note name.  No time value can be entered, but if needed, the 
octave or an accidental can be given as in a normal note.  Second and 
later notes must follow immediately in sequence, set apart by spaces, likewise 
without any time value, and without any intervening symbols.

	Normal or after-graces will be placed {\it immediately} before or after
the main note; way-after's, as far to right as possible before the next note 
or bar line.  If either type of after-grace is slurred, the slur will start 
on the main note and end on the last one in the grace.  
	

\subsubsection{Ornaments}

	Symbols for ornaments are entered {\it after} their associated 
note symbol.  The ornaments now available are shake ({\tt ot}), {\bf m}ordent 
({\tt om}), ``x"- or ``+"-shaped ornament symbols ({\tt ox, o+}), pizzicato 
({\tt ou}), strong {\bf p}izzicato ({\tt op}), left parenthesis before 
\NEW{1.4}
notehead ({\tt o(}), right parenthesis after notehead ({\tt o)}), 
upper {\bf f}ermata ({\tt of}), {\bf d}own {\bf f}ermata ({\tt ofd}), 
staccato ({\tt o.}), tenuto ({\tt o\_}), se{\bf g}no 
({\tt og}), arbitrary-length wavy-line {\bf t}rill with {\it tr} ({\tt oT}), 
arbitrary-length wavy-line
trill without {\it tr} ({\tt oTt}), sforzando ({\tt o>}), and 
duncecap ({\tt o}\hbox to 6pt{\tt\^~}).
All except the parentheses, staccato,
tenuto, and down fermata will 
appear above the staff; the parentheses appear at the level of the note 
head, and staccato and tenuto just above or below depending on the 
stem direction.  (The only difference between staccato and 
pizzicato is the vertical positioning of the dot.)
The trill and segno symbol may have additional optional
characters.  Either trill symbol may include a decimal number 
to specify the length of the printed symbol in current \bs{\tt noteskip}s; the 
default is 1. Thus {\tt oT0} represents {\it tr} with no wavy line.  
A segno can only appear in the first (lowest) voice.  It 
may be immediately followed by a positive or negative 
integer, which indicates a number of points that it will be offset 
horizontally; and it will appear above every system.

	Once the ornament type has been specified, most of them can be raised 
or lowered from their default position by appending
a signed integer to the symbol, representing the vertical offset
in \bs{\tt internote}s. 

     If an ornament is to be repeated on a series of consecutive notes, end 
the first ornament symbol with {\tt :} .  The every note in that line of music 
will then 
have the same ornament until a note is followed by the repeat terminator
{\tt o:} .

\subsubsection{Editorial accidentals}

     To place a small sharp, flat, natural, or question mark above the staff, 
after the affected note enter {\tt oe} followed by {\tt s, f, n} or {\tt ?}. 
\NEW{2.2} You may also put a question mark right after the accidental.

\subsubsection{Slurs}

	The normal symbols for slurs are {\tt (} placed with a space 
before a note, and {\tt )} placed after.  The symbol {\tt s} is equivalent to
{\it both} of them (!), except that it always follows the affected note.
A fourth symbol {\tt t} is also equivalent to {\tt s} and {\tt )} but 
with one minor difference to be explained later.  
In truth there are all {\it toggles}, turning
a slur off if it's already on and starting one otherwise.    

   The first character is optionally followed by
a single-character ID code ({\tt 0-9} or {\tt A-Z} , then by other
options described below.  ID codes are only needed if two or more slurs are 
open at the same time within one line of music, such as when several chord 
notes are tied.  Using ID codes in such cases tells \PMX which open slur to
close.  
 
The rules for finding the default direction and position of the a slur
are complex; many factors enter into defining visually pleasing values.  But 
there's no need for gory details here; the result will usually satisfy, and if 
not, all can easily be tweaked.  Default direction can be 
overridden with {\tt u} ({\bf u}pper), {\tt l} ({\bf l}ower),
or equivalently {\tt d} ({\bf d}own).  
Starting or ending position can be shifted from its default by
entering one or two explicitly signed numbers.  The first, which must be
an integer, represents the vertical shift in \bs{\tt internote}s; the second,  
which may be decimal, the horizontal offset in notehead widths.

The shape of the slur may be altered as well, \NEW{2.1}
although the results may be less 
than fully satisfying due to fundamental limitations of \MusiXTeX. At the slur
termination only, one or three
more parameters may follow the two just described.  The first, a signed, nonzero
integer, is a vertical adjustment to the mid-height of the slur in  
\bs{\tt internote}s.  The next two, integers between 1 and 7 following a 
``{\tt :}", are alterations to the starting and ending slopes. These numbers are
passed directly as arguments of the \MusiXTeX{} macros \bs{\tt midslur} (if only
one is given) or \bs{\tt curve} (if there are three).

A dotted \NEW{1.41} slur is activated by including the option {\tt b} (for
{\bf b}roken) in the symbol that starts the slur. 

Slurs involving grace notes are specified within the symbol for the grace.

The unique aspect of {\tt t} slurs is that if one starts or ends on the same 
note as an {\tt s} slur, the former will be moved away from the notehead to 
avoid a collision.  {\it This only works if neither slur has an ID code.}  This
feature is retained mainly for backward compatibility.

The available options should cover most circumstances, but if not, 
the \TeX\ macros \bs{\tt isu} etc, defined in {\tt pmx.tex}, can be entered 
as in-line \TeX\ commands (see section~\ref{LitTeX}).  
These commands have three arguments: 
slur number, vertical position (pitch, or offset from bottom staff line in 
\bs{\tt internote}s), and horizontal offset in
notehead widths.  When using these commands, begin slur numbering at 0 to avoid 
conflicts with \PMXX 's automatic slurs, which are numbered from \NEW{2.1} 11 
downward. 
Also, remember that non-spacing in-line \TeX\ commands such as this one must 
come {\it before} the note they apply to, in contrast with the \PMX 
slur toggles which may come after.  

\subsubsection{Ties}

The only difference between ties and slurs is the default positioning.
Ordinary slur ends are centered horizontally above or below the notehead, 
while tie ends are shifted inboard and closer to the midheight of the 
notehead.  To specify a tie, use a slur symbol and include the option {\tt t} 
in it, somewhere after the initial {\tt ( , ) , s } or {\tt t} .

\subsubsection{Beams} \label{beams}

	For the most part, \PMX automatically takes care of the details of 
defining beams: selecting which notes are beamed together, and setting 
the angle, direction, height, and {\it multiplicity} (the number of bars 
along the top or bottom).  However, one may define a {\it forced} beam -- 
which overrides \PMXX 's selection of which notes are beamed together -- by 
surrounding the included notes with {\tt [} and {\tt ]}, being certain to 
separate these symbols and their options from the included note symbols with
spaces.  One may also wish to edit certain features of a beam even when 
\PMXX 's grouping decision 
would otherwise be acceptable; here again the beamed notes must be set 
apart with {\tt [} and {\tt ]}.  The {\tt [} may optionally be followed 
immediately by several options. 

{\tt u} or {\tt l} will override 
\PMXX 's selection of the direction of the beam. 

{\tt j} {\bf j}oins the beam
grouping to a prior one started in another system (see below).  

One, two, or three consecutive integers, each preceded with {\tt +} 
or {\tt -} , will affect the beam's appearance.  The first integer is 
an adjustment to the starting level (in \bs{\tt internote}s) and may range 
from -30 to 30; the second is a slope adjustment with the same 
permissible range; the third is an alternate adjustment to the 
starting level (in beam thicknesses) and may only range from 1 to 3, 
always acting to increase the stem length.  The latter may be used to 
align consecutive horizontal beams which have internal multiplicity 
changes.  For example, in 2/4 time, {\tt c84~c1~c~c~c~c8} would cause two 
beams but the 
first one would be lower than the second; {\tt [+0+0+1~c84~c1~c~]~c~c~c8}
would align the tops of the beams with each other.  Due to the 
complexity of \PMXX 's beam analysis procedures, these editing commands 
may sometimes produce unexpected results, and some iteration may be 
required to get exactly what you want.  For example, 
{\tt [+0+0+3~cd8~c3~c6~c~]~c~c~c3~cd8} 
will not produce two aligned beams as desired, because 
when \PMX analyzes the first beam, it automatically raises the starting 
level a bit for another reason, namely, to avoid too short a stem on 
the 64th notes at the end of that beam.  In this case, 
the user could counteract \PMXX 's internal adjustment by using 
{\tt [-1+0+3~cd8~c3~c6~c~]~c~c~c3~cd8}.

The character {\tt m} followed by a digit 1-4 forces the {\bf m}ultiplicity 
of the
beam, the number of stem-joining bars.  

The option {\tt h} forces the beam to be {\bf h}orizontal.

        By default, xtuplets are set apart with their own beam.  To beam 
an xtuplet together with other non-xtuplets, just include it with the 
other notes in a forced beam.

        Rests may also be included within forced beams, provided they are 
shorter than quarter rests, and of course that they come {\it between} the first
and last notes under the beam.

	Some users may wish to define beamed groupings with subgroups 
joined by a single beam.  The symbol {\tt ][}, standing alone between two 
note symbols in a forced beam, causes the multiplicity to decrease to 
unity and immediately increase to its natural value for the next note.  
For example, {\tt [~c14~c~c~c~][~c~c~c~c~]} will generate two doubly-beamed 
groups connected by a single beam.

        If there are large jumps in pitch between notes in a beam within
a single staff, as a matter of taste you may wish 
to start the beam for example as an upper one and end it as a 
lower.  \PMX will never do this automatically, but you can accomplish
it by forcing the beam with appropriately modified up/down-ness, starting level,
and slope.  If you use this technique, there are two details to note: (1)~if 
there are any intermediate multiplicity changes, they will only be handled
properly if the initially specified up-down-ness is consistent with the 
vertical position
of the intermediate notes involved, and (2)~for proper appearance in crowded
scores you may wish
to insert hardspace or shifts as described in section~\ref{hardspace} on 
page~\pageref{hardspace}.  Some examples are included in {\tt most.pmx}. 

       Beams cannot normally jump staves.  But if that is desired, start
the beam normally in one voice, and terminate the part of the beam in that
voice with {\tt ...~]j} .  Then resume the beam in the new voice with 
{\tt [j~...} . For staff-jumping beams, it's OK to have just a single note 
inside one or both of the members.  Some adjustment of the beam height and
slope may be required.  Sometimes the ending section's up-downness must be 
overridden; you will know this is so if the ending is shifted horizontally 
from its proper position.  Each line of music must still have the right number
of beats, so you will probably need to fill time with blank rests after the 
first member of the beam and before the second.  
In \NEW{2.1} version 2.1 we have removed certain restrictions on the 
multiplicity and jump direction for staff-jumping beams.

\subsubsection{Clefs}

	A clef change is signaled by {\tt C} followed by a single lower-case 
letter using the code specified at the end of section~\ref{setupdata} on 
page~\pageref{setupdata}.  Numbers may also be used as 
defined in the \MusiXTeX{} documentation.  If clefs come out at the wrong 
vertical position, refer to the note in {\tt pmx.tex}.

\subsubsection{Arpeggios}

To set an arpeggio (a vertical wavy line), simply place the symbol {\tt ?} 
after the symbols for both the first and last note.  

\subsection{Commands That Affect All Voices}  \label{pmxcmds}

	Most commands that affect all the voices can only appear in the first 
(lowest) line of music in the first (lowest) staff. Most such commands will 
automatically be 
transferred from score to parts when separate parts are generated by 
{\bfx scor2prt} (see section~\ref{scor2prt}, page~\pageref{scor2prt}). 

\subsubsection{Repeats, double bars, forced single bars}

	Repeat signs and double bars are signaled by {\tt R} followed by 
{\tt l, r, lr, d, D,} or {\tt dl} for 
{\bf l}eft repeat, {\bf r}ight repeat, {\bf l}eft-{\bf r}ight repeat, 
thin-thin {\bf d}ouble 
bar, thin-thick {\bf D}ouble bar, or thin-thin {\bf d}ouble bar followed by
{\bf l}eft repeat.  
\NEW{1.4} {\tt Rb} forces a single bar before a movement break (page~\pageref{movbrk}), 
where otherwise by default there is a double bar.  That can be useful for
example if you
change the number of instruments (via an option in the movement-break command)
in the middle of a movement.  These symbols must be in the 
first voice.  It is best only to place them before the first note in an 
input block or if necessary after the last one; otherwise {\bfx scor2prt} 
may behave erratically.  

Using two separate {\tt R..} symbols in succession will cause 
unpredictable results.  

If {\tt Rlr} falls at a system break, \PMX will automatically split it in 
two.  The symbol {\tt Rdl} will likewise be split at a system break, but if
not at a system break, the {\tt d} will be ignored. 

\subsubsection{Voltas (first and second endings)}

	Beginnings and ends of first and second endings are signaled by 
{\tt V} (for {\bfi v}{\it olta}).  
If it's the {\it end} of the volta, enter {\tt b} (for 
{\bfi b}{\it ox}) or {\tt x} for {\it no bo}{\bfi x}.  
If it's the {\it start} of a volta, you can 
optionally enter any text at all that doesn't include a space and doesn't 
start with {\tt b} or {\tt x} (most 
commonly {\tt 1} or {\tt 2}).  A period will automatically be 
appended to the text.  If one volta ends and another starts right 
away, only a single {\tt V} is needed.  Voltas must only be entered in the 
first voice.  If separate parts are to be created from a score using 
{\bfx scor2prt}, then only a single volta may appear in any given input 
block, and it must be at the beginning of the block.

\subsubsection{Meter changes}

     Meter can only be changed at the beginning of an input block.  
A {\bfi m}{\it eter change} symbol starts with the letter {\tt m}.
There are two different ways to complete the symbol.

{\bfx Method 1.}  Enter 4 numbers 
with no intervening spaces.  The four numbers are {\tt mtrnuml}, 
{\tt mtrdenl}, {\tt mtrnmp}, {\tt mtrdnp} as defined in section 2.1, with the
following exceptions for this method only:     
You must use {\tt o} to represent 
the number 1; if you enter the digit {\tt 1} then \PMX will interpret that 
digit and the next as a 2-digit integer, between 10 and 19 inclusive.
19 is the largest number that can be entered with this method. Note that 
{\tt mtrdenl=0} still represents a whole note.

{\bfx Method 2.}  \NEW{1.4} Enter the four numbers in the same order as 
described above, but separate them with slashes ({\it /}).

\subsubsection{Transposition and key changes}

	To transpose an entire score, at the beginning of the first block 
enter {\tt K} (for {\bfi K}{\it ey}) followed by two explicitly signed digits.  
The 
first is the distance to transpose (in \bs{\tt internote}s); the second is the 
new key signature.  When transposing, you should always use relative 
accidentals, activated by the separate symbol {\tt Ar} at the start of the first
input block (see below).  For example,
 to transpose a piece in C major to E major you would enter 
{\tt Ar K+2+4} at the beginning of the first block. 

	A key change can be signalled at any time in the first voice, and will
affect all voices.  Use the command {\tt K} with {\tt +0} as the first
argument and the new key signature as the second.

\subsubsection{Text}

	The symbols {\tt h} or {\tt l}, when placed in the first 
column of an input line and followed by a blank or, for {\tt h} only, by 
a signed integer,  
stand for {\bfi h}{\it eader} and {\bfi l}{\it ower text}.  They will put a 
text string 
above or below the {\it top} staff in the {\it first} bar of the block where 
they are entered.  The text string must be on a line of its own, 
immediately following the symbol.  The integer is a vertical shift in
\bs{\tt internote}s.  

	A {\it title block} with up to three elements can be defined at the 
beginning of the first input block.  {\tt Tt} signals that the text 
{\it on the following line} is to be set as a {\bf t}itle for the whole piece, 
and it will be centered. {\tt Tc} similarly indicates a {\bf c}omposer's name, 
to be set below the title and right justified. {\tt Ti} likewise stands for 
an {\bf i}nstrument name, which will be set above the title, left-justified. 
{\tt Ti} will automatically be invoked by {\bfx scor2prt} when it generates 
parts from a score.  Extra vertical space can be added between the title 
block and the top system by appending to {\tt Tt} a one- or two-digit 
number representing the space in \bs{\tt internote}s.  This only works if 
{\tt Tt} is the {\it final} title block element entered.

\subsubsection{Page numbering, centered header text}

	If you want pages to be numbered at the top left or right, place 
the symbol {\tt P} anywhere within the \PMX code that represents the first 
page to be numbered (usually the first or second).  
{\tt P} can be followed optionally by the starting 
page number and/or by {\tt l} or {\tt r}, the latter overriding the default 
locations of odds on the right and evens on the left. \NEW{2.0}  
There is also a special option {\tt c} for {\bf c}entered header text.  
It must be the {\it last} 
option in the {\tt P} symbol.  It will define text to be printed at the top of
every page {\it after the first}.  If a blank follows {\tt c}, the default 
header text will
be the instrument name entered with the symbol {\tt Ti} .  If any non-blank
character except {\tt "} follows {\tt c}, the header text will start with that
character and end at the next blank.  If {\tt "} follows {\tt c}, the 
header text will be everything between that and the next {\tt "} (this
permits headers containing spaces).  The {\tt P} symbol and its options 
will be ignored when making parts from a score (since page numbering 
will usually be different in the score than in the parts), but page 
numbering (and centered headers) for parts can be still be initiated 
independently, for example with {\tt \%!P2} or {\tt \%1P2r} (see 
section~\ref{scor2prt}, page~\pageref{scor2prt}).

\subsubsection{Overriding defaults for accidentals, dot positions, 
spaces at start of bar and between staves}

	The symbol {\tt A} can be used to override a grab-bag of 
default settings:  

{\tt b} makes all accidentals 
{\bf b}ig, {\tt s} makes them all {\bf s}mall.  By default, big ones are used 
unless unaltered spacing doesn't provide enough space.  Thus the default 
behavior may cause a mixture of big and small accidentals, and in fact is not
recommended.

If transposing, then the {\it relative} accidental convention should be used, 
indicated by {\tt r}.  The default is the normal, absolute convention.
 
In staves with two lines of music, {\tt d} causes dots in the lower line 
to appear on or {\it below} center, in contrast with the default. 

Use {\tt a} followed by a 
decimal number to override the default setting for \bs{\tt afterruleskip},
the space before the first note in a bar.  The default in \PMX is  
{\tt 1}\bs{\tt elemskip}, 20 percent smaller than \MusiXTeX{}'s. 

If \PMXX's vertical spacing between staves within a system is not pleasing, use {\tt I} or
{\tt i} , followed by a decimal number, to apply a scale factor to 
\bs{\tt interstaff} . {\tt I} 
affects all pages, {\tt i} only the current one.  Shrinking the space between
staves within each system will cause the space between systems to increase, and
conversely.

\subsubsection{Extra hardspace, horizontal shifts} \label{hardspace}

	Despite the author's best intentions to relieve you of the chore 
of adjusting {\it any} horizontal spacing by hand, there may be some occasions 
where you 
will want to do it.  A symbol starting with {\tt X} initiates one of two 
types of horizontal adjustment: A {\it shift} moves one or more 
characters but does not affect any other spacing anywhere; a 
{\it hardspace} inserts a fixed amount of space at a particular time and
affects the horizontal positions of everything in all staves in the system. 
If the symbol includes {\tt S}, it is a {\bfi s}{\it ingle} shift and affects 
only the next note or rest.  If it includes a {\tt :} it either starts or 
terminates a {\it group} shift.  
All {\tt X} symbols except group shift terminations 
must include a decimal number; in fact it is the absence of a number 
(and presence of {\tt :}) that
signals a group shift termination.  If the number is immediately followed by
{\tt p}, then the number represents points, otherwise, notehead widths.
Group shifts symbols must occur in 
start/terminate pairs, and group shifts cannot extend across a bar line.

An {\tt X} symbol with no {\tt S} or {\tt :} is automatically a hardspace.  

Because horizontal spacing in parts will usually differ from that in the 
score, by default the hardspace command will {\it not} be copied into parts 
by {\bfx scor2prt}; however the shift commands will be copied.  
These behaviors can be overridden using the methods to be described in 
section~\ref{scor2prt},  Alternatively, \NEW{1.42} to help keep \PMX score 
files neat 
and readable, the character {\tt B} can be used within the {\tt X} symbol 
to signify that it applies to {\bf b}oth score and part, or {\tt P} for
{\bf p}art only.

\subsubsection{Minimum spacing between notes in crowded systems}

	\PMX does some special, complex analysis to adjust horizontal spacing 
in crowded systems.  By default, the minimum space between consecutive 
noteheads is 0.3 notehead widths.  If you want to change 0.3 to some 
other fraction, enter {\tt W. }(decimal point is required) followed by 
{\tt 1}-{\tt 9} to represent the number 
of tenths of a notehead width to be used as the minimum spacing.

\subsubsection{Page size}

	The default page size is 740 by 524 pt (10.3 by 7.3 in).  To change 
the height or width, use the special symbols {\tt h}[{\it n}][{\it u}] or 
{\tt w}[{\it n}][{\it u}] at 
the beginning of the first input block.  Here {\it n} is a decimal number 
for the new dimension and {\it u} defines the units; {\tt i} for inches, {\tt m} for 
millimeters, and {\tt p} or nothing for points.  This command can be used 
together with {\tt \%\%} or {\tt \%!} 
(see section~\ref{scor2prt}, page~\pageref{scor2prt}) to give the parts made by 
{\bfx scor2prt} different page sizes than the parent score.

\subsubsection{Line, page, and movement breaks} \label{movbrk}

	It is possible to force line, page, or movement breaks anywhere.  
For a line break, just enter {\tt L}[{\it n}] at 
the start of an input block (in the first voice only), and the {\it n}-th 
system will start there.  To start page {\it m} at line {\it n}, enter 
{\tt L}[{\it n}]{\tt P}[{\it m}].  You can't force a page break without 
first forcing a line break.

        To force a movement break, you must first force a line break as above,
then enter {\tt M}.  If a page break also occurs here, the {\tt P} must precede 
the
{\tt M}.  Options following {\tt M} are {\tt +}[{\it integer}] to insert
vertical space in \bs{\tt internote}s before the break, 
{\tt i}[{\it decimal number}] to reset the first-line indentation as a fraction
of the line width, and {\tt c} \NEW{1.41} to {\bf c}ontinue bar numbering rather 
than resetting the bar number to 0.
 \NEW{1.4} Also, to change the {\bf n}umber of instruments, 
enter {\tt n}[{\it integer}], then the number of each instrument in their new
order, then a clef symbol for each staff of each instrument.   
(An instrument's number is simply its position in the original sequence.)
There can never be more than the original number of instruments.

Another \NEW{1.4} option after {\tt M} is {\tt r+} or {\tt r-}, which either 
forces or 
suppresses {\bf r}eprinting the instrument names.  The default is to print 
them if the number of instruments changes, but otherwise not.

      Immediately after a movement break, any desired meter changes, 
key changes, or text can be entered in the normal way.

\subsubsection{Fractional bars}

	Often if a piece starts with a pickup, the last bar may not be 
complete.  In such cases, it is usually possible to 
place the last bar in an input block by itself, headed by a {\it blind} meter 
change.  
For example, if the meter had been 4/4 and there was a quarter note 
pickup, leaving 3 beats in the last bar, the last bar might be coded 
{\tt m3400 cd24 /}.

\subsubsection{Stem direction of bass notes}

	By default \PMX makes stems go up for middle-line D's in bass 
clef, but down for notes on the middle line of all other clefs.  If 
you want middle-line bass-clef notes also to have downward stems by default, 
enter a {\tt B} near the beginning of the file.

\subsection{Putting \TeX ~Commands into the {\tt .pmx} File } \label{LitTeX}

        There are five ways enter \TeX ~commands into the .pmx file. Four of
them are {\it in-line}, where the commands are entered directly; the fifth
is by way of an external file.

	The four categories of in-line \TeX~strings 
differ mainly in where they will appear in the {\tt .tex} file.  
(A \TeX\ {\it string} consists of a starting character, a sequence of 
\TeX~commands, and a terminal character). 
In the {\tt .pmx} file, 
only type 4 \TeX~strings may wrap over line breaks.  All in-line \TeX\ must 
adhere to the 128-character limit per line, but each line can have more than 
one \TeX\ command.
Type 1 begins with a single \bs\ and will appear in the {\tt .tex} file 
right before the \TeX 
~command for the next note or rest in the {\tt .pmx} file. Starting with
version 2.1, \NEW{2.1} multiple
type 1 strings associated with the same note or rest are allowed, although 
the total length may not exceed 128 characters (so there is generally no 
reason not to combine all \TeX\ commands for a single note into a single 
type 1 string). 

A type 2 string begins with \bs\bs\ 
and will appear at the top of the {\tt .tex} file, right before 
\bs{\tt startmuflex}, regardless of where it appears in the {\tt .pmx} file.  
A type 3 string starts with \bs\bs\bs\ and will appear right before the 
{\tt\bs xbar}
or {\tt \bs alaligne} at the beginning of the current input block, before the
first barline of the block.  While individual type 2 and 3 strings may not wrap 
over line breaks, strings of like type entered on consecutive lines will 
appear together in the {\tt .tex} file.   
Types 1, 2, and 3 strings must end with \bs\ (backslash-space). 
This means that they may not contain
the \TeX\ macro \bs\  (backslash-space).  Finally, each type 2 or 3 string
should be isolated on a line of its own, and should be started in column 1.

Type four permits multiple
lines of arbitrary text to be entered at the top of the {\tt .pmx} file;
they will be transferred literally to the top of the {\tt .tex} file.  Type
four is initiated with {\tt ---} alone as the top line of the {\tt .pmx}
file.  Then follows any text on any number of lines, until the next line
starting with {\tt ---} terminates the block to be transferred.  

The only other distinction among the types of in-line \TeX\ strings arises when 
{\bfx scor2prt} is used to make separate parts 
(see section~\ref{scor2prt}, page~\pageref{scor2prt}):
types 2-4 will be copied into all parts, while type 1 only goes into its 
original part. 

If you should want to enter a type-1 (note-based) string longer than 
128 characters, you could use a series of type-2 or -3 strings to define
a \TeX\ macro containing the desired commands.  

	\PMX provides one further option for entering an unlimited set of
\TeX ~commands 
just before \bs{\tt startmuflex}, and before any Type 2 in-line \TeX ~strings. 
Simply put the commands into a text file named [{\it basename}]{\tt .mod} 
in the texinput directory.  It will then automatically be 
entered with an \bs{\tt input} command.  This feature is retained mainly for 
backward compatibility; it has been essentially replaced by the various options
for in-line \TeX ~strings.

\subsection{Figured Bass}

	Figure symbols are entered {\it after} their associated note symbols.  
They only work in the first (lowest) voice.  Enter the characters as 
they would appear from top to bottom, and as you might pronounce them, 
e.g., {\tt 64} or {\tt 73}.  Flats here are {\tt -} (minus), sharps are 
{\tt \#}, and 
naturals {\tt n}, {\it before} the number (if there is a number) (notice
the characters are different here than in notes).  
So for example {\it sharp third} is {\tt \#3}, just a sharp is {\tt \#}, {\it six (over) 
flat five} is {\tt 6-5}, and {\it sharp six (over) 4} is {\tt \#64}.  
The program 
positions all the figures for each system below the lowest staff of that 
system, with their tops aligned, and just low enough to clear the 
lowest beam, notehead, or stem that could interfere.  If you want a figure to
align horizontally in the second tier, insert the placeholder figure
{\tt\_} (underscore) before the one you want lowered. 

	Sometimes you may need to enter a figure when there's no bass 
note sounding.  To do this, just after the most recent bass note enter 
{\tt x}, followed by a two single digits (the first is a repeat count; the 
second a time value, i.e., {\tt 2,4,8,1,} or {\tt 3}), immediately followed by a figure symbol 
as defined in the previous paragraph.  This will 
offset the figure from the associated note by the specified time 
value.  For example, if the lowest voice contained {\tt c03 x3465}, there 
would be a whole-note c, and 3 quarter notes later a figure 65 below 
the staff.

	There is also a {\it continuation} symbol, a zero followed by another 
digit.  This produces a horizontal line under the bass note, starting 
just to the left and extending to the right by the given number of 
\bs{\tt noteskip}s.  The height and length of the line are set by the current 
note's level and \bs{\tt noteskip} respectively.  
If \bs{\tt noteskip} changes or a note drops 
below the starting level before the line ends, it is possible to trick 
\PMX by entering separate {\tt 0}[{\it n}] symbols under each consecutive note; \PMX 
will automagically join them together at the same height 
(thanks to Werner Icking for this idea).  \PMX 
can't directly handle continuation symbols above or below other 
figures.  If you want to do that you could look for the macros 
{\tt \bs Figu} 
and {\tt \bs Cont} in {\tt pmx.tex} and work out how to use them manually 
as in-line \TeX ~commands.

	If there are figured bass commands in a {\tt .pmx} file but 
you want them to be ignored, then enter the symbol {\tt F} at the 
beginning of the body of the file.  This feature would most often be 
used in the form {\tt \%1F} 
(see section~\ref{scor2prt}, page~\pageref{scor2prt}), which make a 
separate bass part with no figures.

        Figured bass symbols will not be altered in any way under 
transposition.  There is no universal set of interpretations of figured bass 
symbols, so no automatic transposition is possible.

\subsection{Macros}

     A \PMX macro is a single symbol that stands literally for any 
any string of characters that may occur in the input file (sorry, no 
variables).  
It may be useful if you need to repeat the same string later.
There is no practical length limit.    

To 
{\bf r}{\it ecord} a macro, type {\tt MR}{\it n} where {\it n} is between 1 and 20.  
Everything you then type will be processed normally as well as stored, 
until you enter the symbol {\tt M}.  The next time you need to enter the same 
string, just type {\tt MP}{\it n} to {\bf p}lay back the macro.  
  
To just {\bf s}{\it ave} a macro without having \PMX process it as you
enter it, start it with {\tt MS}{\it n}.  

Macros can be redefined at will.  \PMX will print a warning whenever this
occurs.

If you use macros and want to make separate parts, some care is necessary.
{\bfx Scor2prt} will only transfer {\tt MR} macros into the part where they 
originated, but will transfer {\tt MS} macros into all parts.

\subsection{Batch Processing}

Due \NEW{2.0} to the number of different programs that must be run in sequence 
to produce a printed sheet of music with the \MusiXTeX{} system, most users 
prefer to use a batch file to control the process.  Since batch commands are
platform-dependent we will not provide examples here, but will mention
several \PMX features that can facilitate batch processing. 

First, whenever {\bfx pmxab} terminates due to a syntax
error, the exit code is set to 1.  There are various ways of detecting this
with batch commands, then acting accordingly.  
\NEW{1.4} Second, {\bfx pmxab} always writes a file 
{\tt pmxaerr.dat} containing a single number: 0 if it exited normally, 
otherwise the line number in the {\tt .pmx} file where the syntax
error was.  With advanced batch programming techniques, this file can be 
opened and read, and if there was an input error, a text editor can be 
opened and the input point placed on the line with the error.  

There have been several requests to allow \PMX to keep running even 
after it detects an input error.  
This has not been done because in most cases, any error messages after
the first one would be meaningless, or worse, uncorrected errors could 
cause crashes.  In any event, all the output from {\bfx pmxab} will be
stored in the log file [{\it jobname}]{\tt.pml}.

\subsection{Lyrics}

	\PMX has no special provisions for lyrics.  One way to include them
is by using the macro package {\tt musixlyr.tex} developed 
by Rainer Dunker.  It introduces lyrics into \TeX\ more easily than with
\MusiXTeX's own facilities.  The macros could be 
entered as in-line \TeX\ directly into the {\tt .pmx} file, but most would 
prefer the convenient interface to {\tt musixlyr} via the
program {\bfx M-Tx} developed by Dirk Laurie.  It is a pre-preprocessor which 
produces a {\tt .pmx} file containing the proper in-line \TeX\ commands.  
Its input language is similar (but not identical) to \PMX and includes most
\PMX functionality as a subset.  Both {\bfx M-Tx} and {\tt musixlyr.tex} are 
available on {\tt ftp.gmd.de} (see section~\ref{where}).

\setcounter{secnumdepth}1
\section{Making Parts from a Score} \label{scor2prt}

	Separate parts can be made by running {\bfx scor2prt} and entering the 
basename when prompted. The program 
will create {\tt noinst} separate 
{\tt .pmx} files, one for each instrument. The files will be named
\break [{\it basename}][{\it n}]{\tt .pmx}, where [{\it n}] 
is the number of the voice.  

	In this section we describe how to control the layout of the 
parts separately from that of the score, but by using commands 
that are placed in the {\tt .pmx} file for the score.  This eliminates the 
need for ever editing the {\tt .pmx} files for the parts separately.  You 
can make all corrections in the file for the score, and then re-run 
scor2prt.

	Normally all lines starting with {\tt \%} in the parent {\tt .pmx} are 
transferred into all the parts.  However, if a line has {\tt \%\%} in 
columns 1-2, both it {\it and the following line} will be ignored when 
making parts.  If the ignored line contains only {\tt h} or {\tt l} in the 
first column, then one additional line will be ignored.  

	Conversely, if a line begins with {\tt \%!} then it will be ignored as 
usual in creating the parent {\tt .tex} file, but after stripping the first 
2 characters the rest will be put in the {\tt .pmx} file for {\it all} the 
parts.  

To enter a line into the score file that is only to be transferred to one part,
begin the line with \NEW{2.1} {\tt\%}{\it h}, where {\it h} is the hexadecimal
digit representing the part number ({\tt1, 2,..., 9, a, b, c}).  The first 
two characters will be stripped and the rest transferred to the desired part.
For example, to force a line break to system 15 and a page 
break to page 2 in part 11 only, enter {\tt \%bL15P2}. The use of the hex 
digits {\tt a-c} creates a potential incompatibility with prior versions.  
To minimize this, the
character after ``{\tt\%}" will {\it only} be interpreted as a part number if 
it represents a number less than or equal {\tt noinst}; otherwise the entire
line will be treated as an ordinary comment and transferred to all parts as
a comment.  

	Although only permitted in the first voice in the score, the 
following symbols with all their options will automatically be copied 
into all parts (unless the preceding line has {\tt \%\%}):
 {\tt m, V, R, A, h, w, K}.  Literal \TeX\ strings of types 2-4 will also be 
copied into all parts, while type 1 will only go into its original part.

User-defined hardspaces ({\tt X} without {\tt :}) are handled specially.  By
default they are not copied into parts.  There are two ways to circumvent this.
One way to insert hardspace {\it x} into part 
{\it n} is to place in the score, on a line of its own, the symbol 
{\tt\%}[{\it n}]{\tt X}[{\it x}] .  The \NEW{1.42} other way is with options 
in the {\tt X} command in the score: {\tt B} causes the hardspace to be
used in {\bf b}oth score and parts; {\tt P} puts it into the {\bf p}art but not
the score.   

Lateral shifts ({\tt X}[$\dots$]{\tt :}) will be handled normally,
staying with their original line of music.

	By default the total number of systems in each part will be the 
same as in the score.  If you want to override this, there is a symbol 
{\tt S}[{\it n}] (where {\it n} is the desired number of systems), which 
can only appear at 
the beginning of the first input block.  This can be used after {\tt \%!} 
to affect all the parts, or after {\tt \%}[{\it k}] to affect just part {\it k}. 
 {\bfx Scor2prt} will also 
compute how many pages it thinks each part should have, and enter that 
in the startup data for that part.  If you wish to override that, then 
in the {\tt .pmx} file for the score, insert for example {\tt \%3S14P2} to 
force the third part to have 14 systems and 2 pages (you cannot override the 
number of pages without first overriding the number of systems).  

        A \NEW{2.0} musicsize of 20 is the default in all parts.  This may be 
overridden with the option {\tt m} in the symbol {\tt S}; e.g., 
{\tt \%2S15m16} .

	As already noted, a {\tt P} symbol for page numbering in the parent 
file is ignored when making parts.  To initiate page numbering in the 
parts, use for example {\tt \%!P} anywhere within the \PMX code representing 
the first page of the parts (from \TeX 's standpoint the command must occur 
between the beginning and end of the page on which the numbering is to begin). 
It \NEW{2.0} will often be useful in this case to use the option {\tt c} , 
which by default causes the instrument name to be centered in small type at 
the top of every page after the first.  

Note the distinctions among the various usages of {\tt P}: as an option with 
{\tt S}, it sets the total number of pages in a part; as an option with 
{\tt L}, it forces a page break; and as a command on its own, it controls page 
numbering and centered headings.

MIDI \NEW{2.2} commands, i.e., those starting with {\tt I}, will never be 
copied into parts, unless they are in a special comment line as just described.

	One function of {\bfx scor2prt} is to condense consecutive bars of rest 
into a single group of special printed characters with a number above it.    
The symbol {\tt rm} defines such a {\bf m}ulti-bar {\bf r}est as described 
in section~\ref{structure}. 
{\bfx Scor2prt} will automatically insert {\tt rm} symbols into the 
{\tt .pmx} files 
for the parts where appropriate.  However, for this feature to work, 
the {\it first} full-bar rest in the sequence {\it must} have its duration 
explicitly defined in the parent {\tt .pmx} file, either with a digit or 
with {\tt p}.  I.e., the feature will not work if the first rest in the 
sequence inherits its duration from the previous note.

Using the special \PMX commands listed in this section, 
augmented where needed with literal \TeX ~commands, it is possible to store 
{\it all} the information for both the score and the parts in a single 
{\tt .pmx} file.  This greatly simplifies the editing process, since 
both the score and the part can be corrected at once, and parts need not be
re-edited each time they are regenerated from the score.

\section{Making MIDI Files}\NEW{2.2}

Entering the command {\tt I} before any notes have been entered 
will cause a file [{\it jobname}]{\tt.mid} to be 
written in current directory.  Options may follow, without spaces.  They
are defined in the following paragraphs.  Multiple 
options can be combined in one {\tt I} command.  
{\tt I} commands can appear later in the file as well, but only at the start 
of an input block.  Sometimes the order of the 
options matters, determining for example whether or not a user-defined pause 
is included inside a macro block.  

{\tt t}{\it x} sets the tempo to {\it x} quarter notes per minute. 
Default is 96.  You can change tempos as often as you like, but only at the
start of an input block (as with all MIDI commands).

{\tt i}{\it i1i2...in} assigns MIDI instruments {\it i1,i2,...,in} to the
respective \PMX instruments. The default is harpsichord, of course.  If
you use this option, you must specify {\it all} instruments.
Each {\it in} is either 
a 2-letter abbreviation or an integer between 1 and 255. Acceptable 
abbreviations are listed below.  Numbers and pairs of letters may be mixed, 
but consecutive pairs of numbers must be separated by {\tt :} (colon) .  
This option can only be exercised once per file. 
Also, the number of instruments cannot change during a piece.

{\tt M} initiates a macro operation.  This is used for repeats, da capo's, etc.  
Macros must have ID numbers between 1 and 20.  Operations are start record
macro {\it i}:  {\tt MR}{\it i} ; end recording: {\tt M} ; and playback (insert)
macro {\it i}: {\tt MP}{\it i} .  Only one macro can be active at a time, 
recording or playing but not both.  If you try nesting or overlapping macros, your computer will become 
psychotic.

{\tt p}{\it x} inserts a pause of {\it x} quarter notes.  Decimals are 
allowed, but will be rounded to the nearest sixteenth note.

{\tt g}{\it i} Sets the MIDI gap to {\it i} MIDI clock tics.  This is a silence 
inserted at the end of every note, while decreasing the sounding duration 
by the same amount.  The default is 10, which is 2/3 of a 64th note.  

      The module does not recognize graces, ornaments, repeats, voltas, or 
segnos.  The only ties that are recognized are those using {\tt s} or {\tt (} 
alone, with no explicit ID number.  Key signatures,
time signatures (meter) and instrument names will be written into the MIDI file, 
the latter as track names.  This will have no effect whatsoever on audible 
output but will affect on-screen appearance of some MIDI file players 
and editors.  Location of the \PMX key-change and meter-change commands 
relative to MIDI macro delimiters in the source will affect (in the obvious
way) how these data are passed to such programs.

The MIDI file generator does not yet support changing the number of 
instruments in midstream.  Doing so will cause unpredictable results.

      The instruments are a subset of ``The General MIDI Instrument 
Specification." Of course how they sound depends on your hardware and software. 
Instruments not listed below can still be used but must be specified by number.  
The numbers listed here are from the 1-128 range; when passed to the MIDI file 
they are reduced by one.

%\def\toc#1#2{\hbox to 3.1in{{#2}\leaderfill{#1}}}
\def\tentry#1#2#3{\hbox to 2in{
\hbox to .24in{\tt #1\hfill}\hbox to 1.7in{#2 (#3)\hfill}\hss}} 

\null
\hbox to 6.5in{\vbox to 1.7in{
\tentry{pi}{Acoustic Grand Piano}{1}
\tentry{rh}{Rhodes Piano}{5}
\tentry{ha}{Harpsichord}{7}
\tentry{ct}{Clavinet}{8}
\tentry{ma}{Marimba}{13}
\tentry{or}{Church Organ}{20}
\tentry{gu}{Acoustic Nylon Guitar}{25}
\tentry{ab}{Acoustic Bass}{33}
\tentry{vl}{Violin}{41}
}\hss\vbox to 1.7in{
\tentry{va}{Viola}{42}
\tentry{vc}{Cello}{43}
\tentry{cb}{Contrabass}{44}
\tentry{vo}{Synth Voice}{55}
\tentry{tr}{Trumpet}{57}
\tentry{tb}{Trombone}{58}
\tentry{tu}{Tuba}{59}
\tentry{fr}{French Horn}{61}
\tentry{so}{Soprano Sax}{65}
}\hss\vbox to 1.7in{
\tentry{al}{Alto Sax}{66}
\tentry{te}{Tenor Sax}{67}
\tentry{bs}{Baritone Sax}{68}
\tentry{ob}{Oboe}{69}
\tentry{ba}{Bassoon}{71}
\tentry{cl}{Clarinet}{72}
\tentry{fl}{Flute}{74}
\tentry{re}{Recorder}{75}
}}

\section{Limits}

For simplicity in writing the program, \PMX has numerous variables with
fixed dimensions.  In most cases there are no checks against these limits
(hey, I've got more important things to program), so
occasionally there may be hangups due to exceeding a dimension.  
Any of these can be increased on request.  However, before making such a
request, it will usually be possible to work within existing limits by 
breaking the input into smaller blocks.  

\subsection{Limits under direct user control}  

\ \ \ \ \ 128 characters per input line.

12 \NEW{2.0} voices (staves).

2 lines of music per staff.

12 \NEW{2.0} lines of music.

125 systems.

500 bars.

40 forced line breaks.

10 forced page breaks.

18 key changes.

20 pages.

200 notes per input block.

15 bars per input block.

101 slurs per input block. 

74 figures (figured bass) per input block.

37 grace note groups per input block.

74 notes in grace note groups per input block.

52 literal \TeX\ strings per input block.

6 voltas per input block.

18 trills per input block.

62 chordal notes (non-spacing) per input block.

8 beams per line of music per bar.

20 forced beams per line of music per input block.

10 clef changes per line of music per input block.

24 notes per beam.

24 notes per xtuplet.


\subsection{Limits not under immediate user control}

% Need all the spaces because this damn format insists on left-justifying
% first line of *first* paragraph in a section..
%
\ \ \ \ \ 2000 \bs{\tt notes} groups.

20 \bs{\tt notes} groups per bar.

20 inserted standard anti-collision spaces (not xtuplet or end-of-bar) per bar.

20 inserted anti-collision spaces within xtuplets per bar.
 
19 inserted anti-collision end-of-bar hardspaces per system.

83 inserted anti-collision end-of-bar hardspaces.

400 inserted standard anti-collision spaces per system.

100 inserted anti-collision spaces within xtuplets per system.

1000 inserted standard anti-collision spaces.

200 inserted anti-collision spaces within xtuplets.

24576 \NEW{2.2} bytes of MIDI output data per line of music.

\section{Closing Notes}

\subsection{About the Example Files}

{\tt most.pmx} contains examples of most of the \PMX commands, and a few
programming tricks, including examples in the last line of beam groups whose
notes vary widely in pitch.  The printed
output displays the \PMX commands near to the resulting typeset characters.  
It is more
useful to look at the printed output rather than the source file, since the
file is littered with in-line \TeX ~needed to output the text strings 
representing the \PMX commands.
{\bfx WARNING:} Do not try to play this music; it could be hazardous.

{\tt barsant.pmx} contains the first movement of a recorder sonata by the
Italian Francesco Barsanti (1705-1765).  It demonstrates many of \PMXX 's
strong points in a ``battlefield'' situation:  figured
bass, complex beaming patterns, xtuplets, and  
automatically adjusted horizontal and vertical spacing in crowded scores.  
In fact, 
this single-page score is at the limit of vertical crowding.
If you added anything that occupied additional vertical space, e.g., by putting
a header on the first system or inserting a title, there would not be enough
vertical space available on the page and the last system would spill over.  
Some vertical space could be freed up by switching to 16-pt staves.

{\tt rtsg.pmx} is a trio sonata by Johan Helmich Roman (1694-1758), 
``the Swedish Handel''.  It demonstrates how to set movement
breaks for the score, and how to use this command and some others to 
control the appearance of the parts independently.

{\tt mwalmnd.pmx} is an Allemand for harpsichord by the German 
Matthias Weckmann 
(1616-1674).  It uses many techniques peculiar to keyboard scores.

\subsection{A Benign Bug} 

	When \TeX 'ing the output of \PMX you will usually get an {\tt Underfull 
\bs vbox} message at the end of each page.  This is due to my using 
\bs{\tt eject} at the end of every page, which automatically spaces the 
systems vertically without having to fiddle with \bs{\tt staffbotmarg}.  As far
as I know, the 
warning is benign, and may be ignored. 

\subsection{Where to Get \PMX} \label{where}

The main home of \PMX on the internet is the GMD server at 
{\tt http://www.gmd.de/Misc/Music/} , 
or if you prefer FTP, 
{\tt /ftp.gmd.de/music/} .
\PMX files on this server will propagate to the CTAN sites at 
{\tt www.ctan.org},  
{\tt ftp.tex.ac.uk}, and {\tt ftp.dante.de}, and their mirrors.

As of the date of this writing, the Macintosh and UNIX ports of this version 
of \PMX are not yet available, but previous ones are, and the new ones may 
appear soon at the following sites or on the GMD server.  

The previous Macintosh port by Eric Petersen 
is available at the GMD server or at Eric's very spiffy web site 
{\tt http://www.aem.umn.edu/people/students/epeterse/PMX/} .

Stefan Evert has translated the previous version of \PMX into C and prepared 
a user-friendly distribution which should be compatible with most UNIX systems.  
It is located at \\
{\tt ftp://ftp.mathematik.uni-stuttgart.de/pub/software/pmx/} .

Dirk Laurie's lyrics pre-preprocessor {\bfx M-Tx} is available from the 
GMD server.  

\subsection{Acknowledgments}

	To Daniel Taupin, Ross Mitchell, and Andreas Egler for creating 
\MusiXTeX{}, to Olivier Clary for suggesting a crucial modification in 
the note-entry scheme, to Robin Fairbairns and Werner Icking for 
including \PMX in their archives, to my colleague John DiPol (a non-
musician!) for the idea of using binary masks to define beam 
groupings, to Dirk Laurie, Eric Petersen, Johan Tufvesson, and Stephan Evert 
for beta-testing and for porting \PMX to other platforms, and to Dirk Laurie
for making \PMX accessible to vocal music by creating {\bfx M-Tx}.  Special 
thanks and credit go to Werner Icking for exhaustive beta testing, 
uncanny bug-finding, and continuing encouragement.

\end{document}