summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pmx/pmxccn/pmxccn.tex
blob: 86e73da87c5a35aca07cf092c84e2f255b90d640 (plain)
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
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
%                                                                      %
%     How to compile pmxccn, using the packed source pmxccn.tex        %
%     =========================================================        %
%                                                                      %
% The following instructions presuppose that you have a modern         %
% (and up-to-date) LaTeX installation (MikTeX or teTeX, say).          %
%                                                                      %
% Then go through the following steps:                                 %
%                                                                      %
%    1. in your working directory (that is the one to which you have   %
%       unzipped pmxccntex.zip, and which now should contain           %
%       pmxccn.tex and this readme), create 2 subdirectories:          %
%                                                                      %
%                          a)     addresses/                           %
%                          b)     eps/                                 %
%                                                                      %
%       (unfortunately, LaTeX is does not do this on its own)          %
%                                                                      %
%    2. latex the soucce file pmxccn, i.e. run                         %
%                                                                      %
%                           latex pmxccn                               %
%                                                                      %
%       two times (to get the references and Table of Contents etc.    %
%       right).                                                        %
%                                                                      %
%       The only LaTeX errors you might encounter would be errors      %
%       regarding missing LaTeX packages. If you are currently         %
%       connected to the Internet, MikTeX/teTeX should download and    %
%       install these missing packages on-the-fly                      %
%                                                                      %
%    3. run                                                            %
%                                                                      %
% LEGAL NOTICE: This software is subject to the usual GNU/LLPL licence %
% conditions.                                                          %
%                                                                      %
%                                          Fri 2005 Jan 14 /23:35 /ccn %
%                                                                      %
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           PMX tutorial by ccn / LaTex header file starts here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ------------------------------------------------------
%
                    % This version dated Sun 2011 May 29 /15:34 /ccn
%
% ------------------------------------------------------

\documentclass[11pt,twoside]{report}
%  \usepackage[ten]{vrsion}
   \usepackage[cp437]{inputenc}
   \usepackage[english]{babel}
   \usepackage{amsmath,index}
   \usepackage[dvips]{graphicx}
   \usepackage[dvips]{hyperref}

   \newfont{\hv}{phvbo at 14pt}

   \textheight 600pt   \textwidth 450pt
   \topmargin -10mm    \headsep 10mm
   \oddsidemargin 4mm  \evensidemargin 0mm
   \marginparwidth 3em
   \fboxrule 2pt             % standard in LaTeX article style is 0.4pt
   \fboxsep  9pt             % standard in LaTeX article style is   3pt
   \hfuzz 2pt

   \setcounter{secnumdepth}{3}
   \setcounter{tocdepth}{3}

\renewcommand{\thechapter}{\Alph{chapter}}
\renewcommand{\thesection}{\thechapter~\arabic{section}}

\newcommand{\MusiXTeX}{MusiX\TeX}
\newcommand{\MiKTeX}{MiK\TeX}
\newcommand{\PMX}{\textbf{PMX}}
\newcommand{\MTX}{\textbf{M-Tx}}
\newcommand{\bs}{\ensuremath\backslash}
\newcommand{\Example}{\noindent {\large \textbf{Example :} }
                     }
\newcommand{\Examples}{\noindent {\large \textbf{Examples :} }
                     }
\newcommand{\Note}[1]{\begin{center} \fbox{\begin{minipage}{370pt}
                      #1 \end{minipage} } \end{center}
                     }

% \newcommand{\Note}[1]{\medskip\noindent\fbox{\begin{minipage}{390pt}
%                       #1 \end{minipage} }
%                      }

\newcommand{\versionline}[1]{[\, Version \quad 2.61
                             \quad May 2011]
                            }
% \keepversion

\makeindex
\newindex{myindex}{idx}{ind}{Index}
\begin{document}
   \shortindexingon

   \pagestyle{headings}
   \pagenumbering{Roman}

\begin{titlepage}
\vspace*{4cm}
\begin{center}
  {\Huge \textbf{Typesetting music with {\PMX} } \\[3ex] }
   by \\[4ex]
  {\LARGE Cornelius C.\ Noack} \\[1ex]
   \hspace*{1em}\raisebox{-0.75ex}{%
                                  \includegraphics{addresses/noack}}

\vspace{2cm}
  {\Large --- Version 2.61 / May 2011} \\
  {\large ({\PMX} features up to version 2.603 included)}
\end{center}

\end{titlepage}

% \newpage
% \vspace*{\fill}
\begin{center}
  {\Large Acknowledgement} \\[3ex]

  \begin{minipage}{360pt}
        This tutorial owes its very existence to the work by \emph{Luigi
        Cataldi}, who a few years ago produced a wonderful manual for
        {\PMX} in Italian. Luigi's manual features many examples which
        help greatly in understanding some of the arguably arcane {\PMX}
        notation.

        \medskip
_{manual!Cataldi's Italian {\PMX} manual} _{Cataldi, Luigi}
        Even though the Cataldi manual is, as Don Simons has aptly
        remarked, ``written in the language of music'', it nevertheless
        seemed useful to have access to it for non-Italian speakers, so
        Don asked around for help on a `retranslation'.

        \medskip
_{manual!Don Simons' manual for {\PMX}, Version 2.40} _{Simons, Don}
        In fact, that is what the present tutorial started out with:
        essentially a retranslation of the {\PMX} part of Luigis manual
        back into English, using, where that seemed feasible, Don's
        original {\PMX} manual. I had been thinking for some time of
        producing some examples (and an index) for the updated ({\PMX}
        2.40) version of that manual, and now, taking Luigis italian
        version as a basis, it seemed an easy thing to do.

        \medskip
        Of course, as such projects go: soon after the first version had
        appeared in 2002, it tended to get out of hand --- Don Simons
        actively produced one new beta version of {\PMX} after the
        other, and I simply could not keep up with his pace.

        \smallskip
        So alas: 5 long years went by before the first update of
        the tutorial -- reflecting all {\PMX} changes from Version 2.40
        to Version 2.514 , in one giant step! -- had become possible.

        But, incessantly, as the development of modern {\TeX} and
        {\LaTeX} has moved on in an accelerating pace, and so have
        {\MusiXTeX} and {\PMX}. This tutorial was also bound to
        follow suite. So now the current status of {\PMX}
        (\texttt{2.603}) and this tutorial are closely synchronized for
        the first time.

        \bigskip
        After thanking Luigi, in particular for his kind permission to
        use his version of the manual and its examples liberally, it
        behooves me to thank Don even more, not only for originating and
        continuously maintaining and improving {\PMX}; his suggestions
        and continuous assistance in my work on this tutorial throughout
        the years were invaluable, as was his conscientious reading and
        improving, from the first draft to the present version. Many
        friends (too numerous to mention all of them) kept me busy
        trying to keep up with their productive suggestions and
        clarifications on the
        \href{mailto:tex-music@tug.org}{{\TeX}-music users' list}
        during the past years.

        \vspace*{\fill}
        \begin{flushright}
           {\hv In memoriam Daniel Taupin}
        \end{flushright}

  \end{minipage}
\end{center}
\vspace*{\fill}

\newpage\tableofcontents
\listoftables
\listoffigures
\cleardoublepage

\pagenumbering{arabic}
\setcounter{page}{1}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           PMX tutorial by ccn / chapter A starts here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Introduction} \label{sec:introduction}
\pagestyle{headings}

\section*{How to use this tutorial}
\addcontentsline{toc}{section}{How to use this tutorial}
_{tutorial}

The purpose and function of this tutorial is, actually, twofold: for the
novice with {\PMX}, it should be a readable guide to finding out what
{\PMX} does (and what it doesn't), how it is sensibly used, and what to
do when you run into difficulties. For the seasoned user, on the other
hand, it should serve as an extended {\PMX} manual,
\begin{enumerate}
   \item giving a reasonably accurate account of \emph{all} the
         available features in an order which should make it not too
         tedious to find an answer to whatever question one might have,
   \item indicating some of the more common uses of straight {\MusiXTeX}
         commands to do things not available in {\PMX} directly.
\end{enumerate}

\medskip
As a consequence of this twofold purpose, the two types of readers
should have two very different approaches:
\begin{description}
   \item[The novice] should, after reading Section~\ref{sec:TeXetc},
        turn right to Section~\ref{sec:concepts} and \ref{sec:notes}.
        After that you should get your fingers dirty as quickly as
        possible: keep your first own {\PMX} file \verb#my_opus.pmx# as
        simple as possible, and proudly produce your first print,
        following the instructions given in Section~\ref{sec:running}.
        From thereon follow your interests!
   \item[The seasoned user] will usually need the tutorial mainly to find
        out the exact usage of some commands he unforgiveably forgot
        about, retrieve some rarely used procedure, or find some clever
        gimmick that he never was aware of. Those people will first scan
        the whole tutorial quickly in a matter of minutes to see what's
        there and gloat about what's missing, and later on rely on the
        index -- or look into authoritative source, the
        \href{http://icking-music-archive.org/software/pmx/pmx260.pdf}{PMX
        manual} by Don Simons.
\end{description}

_{Quick Reference Table}
Of course, once you have gotten acquainted well enough with {\PMX}, all
you'll ever need is Don Simons' ``Quick Reference Table''\,%
\footnote{The Quick Reference Table is found in the software section of
          the \textbf{W}erner \textbf{I}cking \textbf{M}usic
          \textbf{A}rchive as
          \href{http://icking-music-archive.org/software/pmx/ref260.pdf}%
          {\texttt{ref260.pdf}}\,.
         }.
That summarizes the {\PMX} symbols with all their options and always
reflects the latest version. Errors found in the
Quick Reference Table should be reported to Don Simons directly, whereas
all complaints (outright errors, awkward formulations, missed
subtleties) should be sent solely to the author.

\bigskip
_{\PMX}
This tutorial refers to {\PMX} 2.603 , as of Dec 11, 2010. For details
on the differences with previous versions consult the ``list of
changes'' of {\PMX} in the software section of the WIMA
(``\textbf{W}erner \textbf{I}cking \textbf{M}usic \textbf{A}rchive'').

\section{ {\TeX}, {\MusiXTeX}, {\PMX}, {\MTX} } \label{sec:TeXetc}
_{\TeX} _{\MusiXTeX} _{\PMX} _{\MTX}


{\MusiXTeX} is undoubtedly one of the best programs for typesetting
musical scores: it produces ready-to-print output in PostScript and PDF
format, it is stable, is continually updated, and is in the public
domain and thus \emph{totally free}.

Nevertheless its use seems to be limited, with few exceptions, to
musicians coming from the world of science. {\MusiXTeX} does not `look
and feel' very intuitive, and it sometimes requires a familiarity with
terms that may seem elementary to software programmers but are tough
going for straight musicians. Furthermore, it is not WYSIWYG software
(\textbf{W}hat \textbf{Y}ou \textbf{S}ee \textbf{I}s \textbf{W}hat
\textbf{Y}ou \textbf{G}et). This means that while writing the music you
cannot immediately see the score as it will look when printed, because
you do not write the music graphically as you do by hand, but rather in
terms of a list of symbols that represent it. The system is not
interactive; rather, the process of producing a musical score consists
of several steps:           \label{p:intoduction}

\begin{enumerate}
  \item One writes the symbols in a special version of the {\TeX}
        language to a normal text file, using any text editor (such as
        \textbf{Emacs}, \textbf{Edit} or \textbf{Notepad}),
  \item this text file is compiled with {\TeX} to produce a
        \texttt{.dvi} output file. This \texttt{.dvi} file is machine
        readable and usually can be previewed on the screen,
  \item another program, e.g.~\texttt{dvips}, produces a PostScript
        file from the \texttt{.dvi} file, which again can be previewed
        on the screen or sent directly to a suitable printer.
\end{enumerate}

This symbolic and non-graphical nature of the program may discourage
many people, but it is in many ways an advantage. Being
fully aware of the symbolic character of the typesetting process while
working on your input lets you concentrate much better on the final
typographic output and keeps you from being distracted by the temptation
to play games with interactiveness.

{\MusiXTeX} is a collection of `macro's that permits producing musical
scores with the help of {\TeX}, the prestigious electronic typesetting
program written by Donald Knuth, which is mainly used in scientific
typesetting. In providing {\TeX}, Knuth not only put it in the public
domain (to be freely distributed), but stipulated that any application
that uses {\TeX} should also be in the public domain and freely
available, without charge or royalty.
_{Knuth, Donald E.}

_{{\TeX}}
Before {\TeX} can be used, it has to be properly installed on the
computer system at hand. Installing {\TeX} from scratch is not an easy
task; consult Chapter \ref{sec:installation} for the details.

Even after everything is properly installed and running, coding a
musical score in the {\MusiXTeX} language still remains a tedious
process. Fortunately, there exist two preprocessors, {\PMX} and {\MTX},
which dramatically simplify the input process; in fact they provide what
must be among the simplest possible systems of electronically encoding
musical scores.

_{\MusiXTeX} _{\PMX}  _{\MTX}
The first two bars of Mozarts \emph{piano sonata KV 545} illuminate the
difference in coding with either {\MusiXTeX}, {\PMX} or {\MTX}. The
codes given below for the  three systems of software all produce the
(identical) output, shown in figure~\ref{fig:mozart}:

\begin{figure}[!htb]
  \begin{center}
     \raisebox{-0.75ex}{%
                       \includegraphics[scale=.82]{eps/mozart.eps}
                        }
  \end{center}
	\caption{\textbf{W.A.\ Mozart}, \emph{Sonata K545}, bars 1--2}
	\label{fig:mozart}
\end{figure}

\bigskip\bigskip\noindent
_{\MusiXTeX}
{\MusiXTeX} :

{\small
\begin{verbatim}
\input musixtex
\parindent10mm
\setname1{Piano}
\setstaffs12
\generalmeter{\meterfrac44}
\nobarnumbers
\startextract
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\hl j\en
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\ql l\sk\ql n\en
\bar
\Notes\ibu0f0\qb0{dgf}|\qlp i\en
\notes\tbu0\qb0g|\ibbl1j3\qb1j\tbl1\qb1k\en
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\hl j\en
\endextract
\end
\end{verbatim}
}

\bigskip\noindent
_{\PMX}
{\PMX} :

{\small
\begin{verbatim}
2 1 4 4 4 4 0 0
1 1 20 0.12
Piano
tt
./
% Bars 1-2
c8 g+ e g c- g+ e g | d g f g c- g+ e g Rb /
c2+ e4 g | bd4- c1 d c2  /
\end{verbatim}
}


\bigskip\noindent
_{\MTX}
{\MTX} :

{\small
\begin{verbatim}
Style: piano
Piano: Voices MD MS; Clefs G G; Continuo
Name: Piano
Meter: 4/4

%% w120m
c2+        e4    g   | b4d-  c1 d c2        |
c8+ g+ e g c- g+ e g | d g f g    c- g+ e g |
\end{verbatim}
}

\bigskip
Not only is the {\MusiXTeX} much longer, it undoubtedly is less
intuitive and more complicated than the other two.

\bigskip
In the present tutorial we shall describe in detail the usage of {\PMX}
and, in a very cursory way, that of {\MTX}.

_{\MusiXTeX}  _{\PMX} _{\MTX}
In the remaining part of this introduction, we treat questions of
installation of the entire system of {\MusiXTeX} and {\PMX}. The
whole installation procedure may seem a formidable task to non-experts.
But don't despair: your efforts will be rewarded by the best and
simplest system of musical typesetting available. And, to paraphrase a
famous {\TeX} error message: ``If in serious trouble, ask a wizard for
help''. Such wizards are literally at your fingertips; just sign up and
post your problem to the mailing list at ^{WIMA} (the \textbf{W}erner
\textbf{I}cking \textbf{M}usic \textbf{A}rchive):
\raisebox{-0.75ex}{%
                  \includegraphics[scale=0.6]{addresses/texmusiclist}
                  },
and someone is bound to be in the mood to answer.

\section{Installation}  \label{sec:installation}
_{Installation}

Recently, there has been a number of major improvements in the basic
{\MusiXTeX} software (increasing, e.g., the maximum number of
instruments allowed), and subsequently {\PMX} has also undergone major
improvements. As a consequence, {\PMX} now is really tuned
to \texttt{\MusiXTeX-T115}: with {\PMX}\texttt{(2.603)} you can make
full use of all the new features of {\MusiXTeX-T115}.

\medskip
The installation instructions given here refer explicitly to installing
{\MusiXTeX} and {\PMX} under Windows XP; they assume that you have
MiKTeX\,%
\footnote{MikTeX is a {\TeX} data-base system for Microsoft Windows
          users.
         }
installed (version 2.6 or higher).

For Unix, good instructions can be found in the software section of
WIMA: \\ \quad \href{http://icking-music-archive.org%
               /software/musixtex/musixtex-for-unix.html}%
               {\texttt{http://icking-music-archive.org%
               /software/musixtex/musixtex-for-unix.html}}~. \hspace*{\fill}


\pagebreak
\subsection*{Installation of \MusiXTeX\texttt{-T 115}
             and {\PMX} \texttt{2.603} }

\subsubsection*{\MusiXTeX}

A comprehensive -- and very readable -- installation instruction manual
for {\MusiXTeX}\texttt{-T 115} has recently been given by Andre van
Ryckeghem and Don Simons. To obtain it, download the
\href{http://icking-music-archive.org/software/pmxtricks/mxinsuse.pdf}%
     {PDF file} from the WIMA software page.

If you are not really an expert for installing high-level software under
the Windows XP system, you are probably well advised to simply follow
the instructions in the installation manual more or less by the letter,
using the default choices of folders.

But in any case, it is wise to first read this manual (it's only 6
pages) before starting to apply it.

\medskip
One point, pointed out explicitly in the {\MusiXTeX} installation
manual, is of particular importance: when updating your MiKTeX
installation, files that are not standard parts of the MiKTeX data base
tend to get lost or overwritten. In order to avoid this once and for
all, it is convenient have an extra folder for your `private' files in a
subdirectory of the MiKTeX ROOT directory (usually named
\verb#localmiktex#). Explicitly, if your MiKTeX directory is, e.g., \\
\verb#C:programs\miktex 2.7# \;, followed by
\verb#...\miktex\...#,\,
you should have an additional directory structure
\texttt{C:}{\bs}\texttt{programs}{\bs}\texttt{miktex 2.7}%
           {\bs}\texttt{localmiktex}%
           {\bs}\texttt{...}{\bs}\texttt{miktex}{\bs}\texttt{...} \\
and check that in the MiKTeX `settings -- root' window these folders
are listed as

\begin{center}
\begin{tabular}{|ll|}  \hline
path & Descriptions \\ & \\
\texttt{C:}{\bs}\texttt{programs}{\bs}\texttt{miktex 2.7} & Install \\
\texttt{C:}{\bs}\texttt{programs}{\bs}\texttt{miktex 2.7}%
                                 {\bs}\texttt{localmiktex} & \\  \hline
\end{tabular}
\end{center}
Then all files in the \texttt{localmiktex} folder and all its subfolders
will never be updated or purged by MiKTeX .

\medskip
Another way to installing {\MusiXTeX} -- designed specifically to
produce a TDS compliant structure
\footnote{`TDS' stands for a `TeX Directory Structure', which is a
          standard way of organizing all the TeX-related files on a
          computer system.
         }
of the data base in Windows XP -- has been described by Bob Tennent; all
the info is contained in
 \href{http://www.ctan.org/tex-archive/macros/musixtex/musixtex-texmf.zip}%
      {musixtex-texmf}, available at \texttt{CTAN}.

\medskip
At the same link you will also find a README with a terse, but clear
instruction how to proceed. There is just one important item to amend:
in the README it says: "unzip musixtex-texmf.zip at the root of a texmf
tree \dots" ; but, for the reason pointed out above, it is much safer to
unzip it in the \verb#localmiktex# folder of the MiKTeX structure.

\medskip
In all other respects, these 2 ways to installing {\MusiXTeX} will
produce identical results; so which of the two you want to employ is
just a matter of personal taste.

\pagebreak\noindent
To test the {\MusiXTeX} installation, download
\href{http://icking-music-archive.org/software/pmxtricks/sample.zip}{sample.zip}
from WIMA to some temporary folder and unzip it, obtaining the 3 files
\verb#sample.tex#~, \verb#sample.pmx#~, and \verb#pmxrun.bat#~. Then run \\
\hspace*{10ex}
\verb#etex sample.tex# \\
in a command line.

\Note{Make sure that when using basic {\TeX} you \emph{always} run
      \texttt{etex.exe} (`extended {\TeX}') and \emph{not}
      \texttt{tex.exe} !! Although {\MiKTeX} now uses extended {\TeX} by
      default, the 2 commands \texttt{tex.exe} and \texttt{etex.exe}
      still differ; and {\MusiXTeX} 115, as well as {\PMX} 2.6, will not
      run properly under ordinary \texttt{tex.exe} .
     }

\subsubsection*{\PMX}

\noindent
Compared to {\MusiXTeX}, installing {\PMX} 2.603 is a cinch. All you
need to do is
\begin{enumerate}
  \item downkoad
      \href{http://icking-music-archive.org/software/pmx/pmx2603.zip}%
           {pmx 2.603.zip} and unzip it,
  \item copy \verb#pmxab.exe# and \verb#scor2prt.exe# to
             \verb#...\localmixtex\miktex\bin# ,
  \item copy \verb#pmx.tex# to
             \verb#...\localmixtex\tex# ,
  \item run the {\MiKTeX} FNDB
        (`\texttt{F}ile \texttt{N}ame \texttt{D}ata \texttt{B}ase') .
\end{enumerate}

\medskip\noindent
To test the installation, run \\
          \hspace*{10ex} \texttt{runpmx sample.pmx} \\
in a command line.


\section{Authors of the Software} \label{sec:authors}
_{authors}

\begin{description}
  \item[{\MusiXTeX}:] \emph{Daniel Taupin}
_{Taupin, Daniel}

        \href{http://icking-music-archive.org/software/indexmt6.html}%
             {\MusiXTeX} evolved from Music{\TeX} by
        \emph{Daniel Taupin}, a physicist in the Laboratoire de Phisique
        des Solides in Orsay, \emph{Ross Mitchell} (CSIRO Division of
        Atmospheric Research, Private Bag No.1, Mordialloc, Victoria
        3195, Australia) and \emph{Andreas Egler} (Ruhr--Uni--Bochum,
        Ursulastr. 32, D-44793 Bochum).

        {\MusiXTeX} had been maintained actively and conscientiously by
        Daniel Taupin until his untimely death in 2001 --- he died
        accidentally while climbing in the Alps. He is remembered with a
        \href{http://icking-music-archive.org/Memorial/Taupin%
        /Statements.html}{Memorial} on the web page of the Werner Icking
        Music Archive.

        After Taupins death, {\MusiXTeX} seemed quite stable and could
        thus, for all practical purposes, be considered `frozen' for a
        long time.

        However, nothing as lively as {\MusiXTeX} can really remain
        \marginpar{redo after release of T 115 !}
        literally frozen forever. A number of improvements have
        been continuously added by a group of {\MusiXTeX}perts, and,
        finally, Hiroaki Morimoto has kindly provided a new version
        of {\MusiXTeX} which corrects known bugs. Then a new and
        \emph{strongly enhanced version} of the {\MusiXTeX} manual was
        prepared by  a group led by Don Simons, which has now been
        officially released: {\MusiXTeX}-\texttt{T 114} . It is located
        at Werner Icking Music Archive (dubbed `WIMA') as

        \href{http://icking-music-archive.org/software/musixtex/%
             musixtex-t114.zip}{\texttt{musiXtex-t114.zip}}\,.

        \medskip
        Quite recently, Hiroaki Morimoto went even further in enhancing
        {\MusiXTeX}: his newest version, {\MusiXTeX} \texttt{T 115} ,
        now allows up to 24 instruments! While still a beta version as
        of this writing, it is likely to be released officially soon,
        and the present version of {\PMX}, version {\PMX} \texttt{2.603}
        -- and this tutorial -- is already based on {\MusiXTeX} \texttt{T
        115} .


        \bigskip
        Finally, here is a list of the authors of essential parts of
        {\PMX} and related software:

  \item[{\PMX}:]
        \emph{Don Simons}
_{Simons, Don} _{\PMX!author}

        E-mail: \raisebox{-1.0ex}{%
                                 \includegraphics[scale=0.7]{addresses/dsimons}
                                 }

  \item[{\MTX}:]
        \emph{Dirk Laurie}
_{Laurie, Dirk}

        E-mail: \raisebox{-1.0ex}{%
                                 \includegraphics[scale=0.75]{addresses/dlaurie}
                                 }

  \item[Musixlyr and Musixser:]
        \emph{Rainer Dunker}
_{Dunker, Rainer}

        E-mail: \raisebox{-1.0ex}{%
                                  \includegraphics[scale=0.72]{addresses/rdunker}
                                 }

  \item[PostScript slur package K:]
	\emph{Stanislav Kneifl}
_{Kneifl, Stanislav}

        E-mail: \raisebox{-1.0ex}{%
                                  \includegraphics[scale=0.7]{addresses/skneifl}
                                 }

  \item[PostScript slur package M:]
	\emph{Hiroaki Morimoto}
_{Morimoto, Hiroaki}

        E-mail: \raisebox{-1.0ex}{%
                                  \includegraphics[scale=0.7]{addresses/hmorimoto}
                                 }
\end{description}

\section{The Werner Icking Music Archive} \label{sec:Icking}
_{WIMA} _{Werner Icking Music Archive|see{WIMA}} _{Icking, Werner}

\textbf{Werner Icking} (June 25, 1943 -- February 8, 2001) was the
founder of the \emph{GMD Music Archive}, which contained downloadable
scores, various {\MusiXTeX} programs, a discussion list, and various
other musical resources in the public domain. His contributions to the
development and promulgation of this software were peerless. His
editions of music (in particular the edition of the complete `Urtext' of
J.S.\ Bach's pieces for violin and violoncello solo) are examples of
sophisticated technique, artistic sensibilty and philological
meticulousness. Everybody, whether expert programmer or complete novice,
would always find valid and unselfish advice from him, which invariably
ended with the motto ``\emph{hope this hilft}''. In time a small, but
regular group of faithfuls gathered around this site, from all over the
world, who never had met Werner in person, but nevertheless came to see
a friend in him, mainly through frequent email exchanges.

Werner died suddenly on February 8, 2001, while bicycling home from
work, as was his regular habit. That very day he had performed
maintenance work for the site and replied to messages on its discussion
list, of which he had been the main administrator. The community of
users of the archive decided not to disband, but to continue Werner's
work. Starting with the contents of the GMD Archive, a new site was
created, and dedicated to Werner's memory. It's official name is the
\emph{Werner Icking Music Archive}.

After some difficult times, it is now hosted by \quad
  \href{http://www.pait.dk}{\texttt{PALDAM IT}} ;
its URL is \\
\hspace*{\fill}  \href{http://icking-music-archive.org}%
       {\texttt{http://icking-music-archive.org}}\,. \hspace*{\fill} \\
Its chief administrator is Christian Mondrup,
_{Mondrup, Christian}
who more than any other provided reasoned guidance and continuity during
the difficult transition.

\bigskip
The archive houses four main categories of information:

          \label{p:Icking}
\begin{description}
  \item[Archive of sheet music]: Contains hundreds of royalty-free
       scores in PDF, many with their source code in {\MusiXTeX},
       {\PMX}, or {\MTX}. It is maintained by \emph{Christian Mondrup},
       who is also the main administrator of the Werner Icking Music
       Archive \\
       E-mail:
   \raisebox{-1.0ex}{%
                     \includegraphics[scale=0.72]{addresses/cmondrup}
                    } .
_{Mondrup, Christian}
  \item[{\MusiXTeX} and related software]: Contains {\MusiXTeX} and
       related software, as well as user manuals and various add-ons. It
       is maintained by \emph{Don Simons} \\
       E-mail:
   \raisebox{-1.0ex}{%
                     \includegraphics[scale=0.72]{addresses/dsimons}
                    } .
_{Simons, Don}
  \item[{\TeX}-music list]:
_{{\TeX}-music users' list}
       This discussion list is invaluable to novices, advanced users and
       developers. Themes focus on technical problems of typesetting
       using {\MusiXTeX} and related software, but often drift into
       other musical subjects of historic or esthetic interest. It is
       not moderated, but you need to subscribe in order to participate.
       For information on how to subscribe, visit~
       \href{http://icking-music-archive.org/mailman/listinfo/tex-music}%
       {\texttt{http://icking-music-archive.org/mailman/listinfo/tex-music\/}}~.
       Its administrator is \emph{Maurizio Codogno} (E-mail
       \raisebox{-1.2ex}{%
                         \includegraphics[scale=0.80]{addresses/mcodogno}
                        }$\!\!$).
_{Codogno, Maurizio}
  \item [Links to other sources of information regarding music:] There
        are links to search facilities about composers/works/editions, a
        multi-lingual glossary of musical terms, and some lists of
        composers' works. This is maintained by \emph{Jean-Pierre
        Coulon}:

        \hspace*{10em}
        E-mail: \raisebox{-1.0ex}{\includegraphics[scale=0.72]%
                                           {addresses/jpcoulon}
                         }
_{Coulon,Jean-Pierre}
\end{description}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           PMX tutorial by ccn / chapter B starts here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{A {\PMX} Tutorial} \label{sec:GuidePMX}
\section*{Conventions for this tutorial} \label{sec:conventions}
\addcontentsline{toc}{section}{Conventions for this tutorial}
_{tutorial!conventions of this tutorial}

\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\hspace*{\fill}\begin{minipage}[b]{200pt}
                      ``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.''\,%
                        \footnotemark[2]
               \end{minipage}
\footnotetext[2]{Quoted literally from the original introduction to
                 {\PMX} by its author, Don Simons. }
\renewcommand{\thefootnote}{\arabic{footnote}}

\paragraph{Typographical conventions:}
\begin{itemize}
   \item The \texttt{typewriter} typeface always indicates verbatim text
         \emph{exactly as you would input it to the computer}. This
         includes file names, {\MusiXTeX} tokens, and {\PMX} commands,
         e.g., \verb#barsant.pmx, \internote, c44# .
   \item \textbf{bold} typeface is used for two purposes: first, for
         program names (e.g.~\textbf{pmxab}), and second, when applied
         to a single letter within a normal word, to emphasize the
         mnemonics of a {\PMX} command (e.g.~\texttt{lr} signifies a
         ``\textbf{l}eft-\textbf{r}ight repeat'').
   \item When used in commands, \emph{italics}  represent input
         variables for which the user would substitute the appropriate
         actual value. To make this notation quite clear -- and distinct
         from the general use of italics for  emphasis -- , the variable
         will be surrounded by square brackets in such cases (e.g.\
         \texttt{L[}$n$\texttt{]P[}$m$\texttt{]M} ), but \emph{the
         brackets are not to be included with the verbatim text}.
\end{itemize}

\paragraph{Musical terms:} \text{} \\
The language of music is Italian, and so the radical solution of
terminological problems would be to use the Italian names throughout.
This would, however, defeat the whole purpose of this tutorial, so some
compromises need to be made, and some terms, which may be used
differently by different people, need to be clearly defined. So in this
tutorial
\begin{itemize}
   \item
_{staves}
         a \emph{staff} (plural \emph{staves}) means the set of 5
         horizontal lines in which music is usually notated, aptly
         called a \emph{pentagramma} in Italian\,%
         \footnote{Note that one-line staves, used for percussion
                   instruments (drums, triangles etc.), are presently
                   not implemented in {\PMX}.
                  }.
   \item a \emph{system} means a coherent set of staves to be played
         simultaneously.
   \item
_{voice}
         a \emph{voice} means a line of music that is a musical entity
         of its own, such as a melody. In polyphonic music, there is
         often more than one voice to a staff, e.g.~a 4-voice Bach
         choral is often written with the 2 top voices (soprano, alto)
         in one staff, the bottom ones (tenor, basso) in the other\,%
         \footnote{ {\PMX} allows 1 or 2 voices in one staff. }.
\end{itemize}

\paragraph{technical terms:} \text{} \\
\begin{itemize}
   \item a \emph{system} means a coherent set of staves to be played
         simultaneously.
   \item a \emph{block} is the series of PMX commands WITHIN ONE SYSTEM,
         formally >ended be a / (slash), which then must be the LAST
         CHARACTER on this input line\,%
         \footnote{This often precludes even \TeX\ comments (started
                   with a \%) on the same line, after the slash!

                   \PMX\ does not check for compliance with this rule,
                   but nevertheless it is good practice to adhere to it.
                   Otherwise you a liable to encounter weird errors
                   which may be difficult to trace.
                  }.
\end{itemize}


\section{Running {\PMX}} \label{sec:running}
_{\PMX!running {\PMX}}

As stated in the introduction (cf.~Section~\ref{sec:introduction}),
{\PMX} is a \emph{preprocessor} to {\MusiXTeX}. That means that with
{\PMX} the sequence of steps from the input to the printed paper is one
step longer:
\begin{enumerate} \setcounter{enumi}{-1}
  \item The user writes \emph{the symbols of the {\PMX} language} to a
        normal text file, using any text editor. The name of this file,
        ( say, \verb#my_opus.pmx#) \emph{must have the suffix}
        \texttt{pmx},
  \item the file \verb#my_opus.pmx# is run through the {\PMX} processor,
        \textbf{pmxab}.
_{\textbf{pmxab}}
        This produces the output file \verb#my_opus.tex#, \\[2ex]
        \fbox{\begin{minipage}{390pt}
              Note that in {\PMX} (like in Unix, but unlike Windows)
              spaces within a file name are \emph{not allowed}! If in
              the above example, the input file name were \texttt{my
              opus.pmx} instead of \texttt{my\underline{\;}opus.pmx}, an
              unpredictable error, with confusing error messages, would
              occur.
              \end{minipage}
             }

  \item the file \verb#my_opus.tex# is then processed with {\TeX} to
        produce a \texttt{.dvi} output file\,%
        \footnote{This step is a bit more complicated than it sounds
                  because it actually is a 3 pass system: it consists of
                  (i) running {\TeX}, (ii) running ^{\textbf{musixflx}},
                  and (iii) running {\TeX} again (details on the
                  rationale behind this are described in the {\MusiXTeX}
                  manual by Daniel Taupin).
_{Taupin, Daniel}
                 }.
        This \texttt{.dvi} file is machine readable and (usually) can be
        previewed on the screen,
  \item another program, e.g.~\texttt{dvips}, produces a PostScript file
        from the \texttt{.dvi} file, which again can be previewed on the
        screen, or sent directly to a suitable printer.
\end{enumerate}
Usually this whole process is automated to some degree by the use of a
so-called `script' or `batch' file, or with the help of some more
elaborate system of interconnecting software (most of these tuned to the
needs of the general {\TeX} community).
_{\PMX!running {\PMX}}

\medskip
There are too many variants of this kind of supporting software -- public
domain or commercial -- to discuss here, and personal preferences or
dispositions are too varied. If you are at a loss on what to use, send a
message to the {\TeX}-music list (cf.~p.\pageref{p:Icking}), and you
can trust that you get all the individual help you need.
_{{\TeX}-music users' list}

\begin{table}[!htbp]
	\begin{center}
\begin{minipage}{380pt}
\small
\begin{verbatim}
::::::::::::::::::::::::  runpmx.bat  ::::::::::::::::::::::::
Call C:\Programme\MikTeX_2.7\localmiktex\miktex\bin\pmxab %1.pmx
if errorlevel 1 goto pmxerr
if exist %1.pml del %1.pml
if exist %1.mx2 del %1.mx2
if exist %1.mx1 del %1.mx1
if exist pmxaerr.dat del pmxaerr.dat
::
Call C:\Programme\MikTeX_2.7\miktex\bin\etex.exe %1.tex
if errorlevel 1 goto texerr
::
Call C:\Programme\MikTeX_2.7\localmiktex\miktex\bin\musixflx.exe %1.mx1
::
Call C:\Programme\MikTeX_2.7\miktex\bin\etex.exe %1.tex
if errorlevel 1 goto texerr
if exist %1.log del %1.log
::
Call C:\Programme\MikTeX_2.7\miktex\bin\dvips.exe %1.dvi
if errorlevel 1 goto dvierr
if exist %1.log del %1.log
::
Call C:\Programme\GhostScript\Ghostgum\gsview\gsview32.exe %1.ps
::
goto :end
:::::::::::::::::::
:: error exits :
::
:pmxerr
echo.
echo             PMX has found errors when processing %1.pmx !
echo.
pause
goto :end
::
:texerr
echo.
echo             TeX has found errors when processing %1.tex !
echo                       check %1.log for details.
echo.
pause
goto :end
::
:dvierr
echo.
echo                      ***  dvips had errors !  ***
echo.
pause

::
:end
::::::::::::::::::::  end of  runpmx.bat  ::::::::::::::::::::
\end{verbatim}
\end{minipage}
	\end{center}
	\caption{An example of a batch file for running {\PMX}}
	\label{tab:runpmx}
\end{table}

\pagebreak
To illustrate the above process, however, an example for a typical
`batch' file, for a standard \textbf{Windows} system, is given in
Table~\ref{tab:runpmx}. This assumes that you have
installed
\begin{enumerate}
   \item a ^{\MiKTeX} system,
   \item a {\MusiXTeX} system,
   \item a \texttt{dvips} system,
\end{enumerate}
all installed in the standard way, and that you have produced the {\PMX}
input file \verb#my_opus.pmx#, using your favorite ASCII text editor.

You would then run
\begin{center}
   \verb#runpmx my_opus#
\end{center}
on a command line, and would see a Ghostview window opening, from which
you could print your opus (or do with it whatever you like).

\bigskip
You perhaps will want to write your own batch program\,%
\footnote{The \texttt{runpmx.bat} given in Table \ref{tab:runpmx} is
          identical with the \texttt{runpmx.bat} used in the installation
          guide (Section \ref{sec:installation}).

          When adapting this to your needs or writing your own batch
          file altogether, you should make sure that you use
          \texttt{etex.exe} in the 3 calls of {\TeX}.
          {\MusiXTeX}-\texttt{T115} and {\PMX} texttt{2.603} both
          require e{\TeX} (extended {\TeX})!
         }, to suit your personal requirements. Some further remarks on
how \textbf{pmxab}
_{\textbf{pmxab}} operates may prove helpful for that.

\medskip
First, whenever \textbf{pmxab}
_{\textbf{pmxab}}
terminates due to a syntax error, the exit code is set 1 (0 when there
are no errors). There are various ways of detecting this with batch
commands, and then acting accordingly.

\medskip
Second, \textbf{pmxab}
_{\textbf{pmxab}}
always writes a file \texttt{pmxaerr.dat}
_{\texttt{pmxaerr.dat}}
containing a single number: 0 if it exited normally, otherwise the line
number in the \texttt{.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.

\bigskip
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 \textbf{pmxab}
_{\textbf{pmxab}}
will be stored in the log file [\emph{filename}]\texttt{.pml}.

\subsection{Concatenating several files} \label{sec:concatfiles}
_{\PMX!concatenating several files}

Sometimes one wants to split the work on a score into several smaller
parts, not only when otherwise you would exceed some {\PMX} numerical
limit (cf.~Section~\ref{sec:limits}), but simply for practical reasons.
Logically, one should distinguish two separate cases:
\begin{enumerate}
  \item Within \emph{one and the same {\PMX} program}, there might be
        parts that recur identically in several regions of the full code,
        and one would not want to retype these over and over again (both
        for efficiency and for clarity reasons). In such cases, you
        would want to have a command similar to the \verb#\input# of
        {\TeX}, {\LaTeX} and many other programming languages.

        In {\PMX}, such an `\verb#\input#' command has the form
        \verb#AR[#\emph{file name}\verb#]#, where \emph{file name} is
        the name of the (ASCII) file you want to include, and
        \verb#AR[#\emph{file name}\verb#]# will insert this file
        at exactly that point in your {\PMX} program where the
        \verb#AR[#\emph{file name}\verb#]# is.\,%

        \begin{quote}
          A possible use for this procedure, i.e.\ using the \texttt{AR}
          command, could be to save typing when you want to include your
          favorite  option defaults that in fact you use in almost every
          piece of music you write with {\PMX}.

          But a simple ``cut \& paste'' is arguably a quite practical
          and more straightforward way of achieving this goal; moreover,
          if you want to be fancy about it, {\PMX} has a much more
          sophisticated tool to offer for that purpose\,%
          \footnote{In fact, there is yet another fancy tool,
                    i.e.\ including a `global' file with the specific
                    name \texttt{pmx.mod} , useful for special purposes.
                    For details on this, refer to the {\PMX} manual.
                   },
          viz.\ a macro (cf.\ Sec.~\ref{sec:macros}).
        \end{quote}

  \item Sometimes may have reason to make several
        completely independent {\PMX} files, producing their output
        separately. In the end, you would want to concatenate these
        pieces again. This can be easily done:

        \medskip
        Suppose you have coded the three movements of a piano sonata in
        three separate {\PMX} files: \verb#son1.pmx#, \verb#son2.pmx#
        and \verb#son3.pmx#. To create one single file from these,
        proceed as follows:
        \begin{enumerate}
          \item Process the three files \verb#.pmx# separately,
                obtaining the three files \verb#son1.tex#,
                \verb#son2.tex# and \verb#son3.tex# ,
          \item Create a {\TeX} file \texttt{son.tex} consisting of the
                following lines:
                 \begin{verbatim}
                  \input musixtex
                  \startmuflex
                  \let\startmuflex\empty
                  \let\endmuflexsav\endmuflex
                  \let\endmuflex\endinput
                  \input son1
                  \input son2
                  \input son3
                  \endmuflexsav
                  \bye
                 \end{verbatim}
          \item Process the file \verb#son.tex# , in the usual three
                passes ({\TeX}~$\Longrightarrow$ \texttt{musixflx}
                $\Longrightarrow$ {\TeX}). The resulting file
                \verb#son.dvi# then contains the full score of the
                entire sonata.
        \end{enumerate}
\end{enumerate}

\medskip
Alternatively, you can concatenate the files using {\LaTeX}, or more
specifically, the \textbf{mtxlatex} package. For details on this
see Section~\ref{sec:LaTeX}.
_{\LaTeX} _{\textbf{mtxlatex}|see{\LaTeX}} _{\LaTeX!interface with \PMX}

\vfill\begin{figure}[!htbp]
	\begin{center}
           \raisebox{-0.75ex}{%
                             \includegraphics[scale=.82]{eps/Haydn.eps}
                             }
	\end{center}
	\caption{\textbf{F.J.\ Haydn},
	         \emph{quartet Op.76, no.2}, bars 1--4
	        }
	\label{fig:Haydn}
\end{figure}
\label{p:Haydn}

\begin{table}[!htb]
\begin{minipage}{380pt}
\small
\begin{verbatim}
F.J.\ Haydn, Quartet op.76, no.2, bars 1--4
PREAMBLE:
nstaves ninstr mtrnuml mtrdenl mtrnump mtrdenp
     4      4       4       4       0       6
npickup nkeys
     0     -1
npages nsystems musicsize fracindent
     1      1         16 .08
Violoncello
Viola
Violin II
Violin I
batt
./
% BODY:
% HEADER:
Tc
F.J. Haydn
Tt
String Quartet op. 76, No.2
h
Allegro
Abep
w170m
% begin of music input -
% bar 1
d82 Df o. d+ o. d o. d o. r d o. d o. d o. /
f83 Df o. f o. f o. f o.  r f o. f o. f o. /
r8 a83 Df o. a o. a o. r a o. a o. a o.    /
a24 Df d- /

% bar 2
r8 d o. d o. d o. r e o. e o. e o.  /
r8 g o. g o. g o. r g o. g o. g o.  /
r8 b o. b o. b o. r cs o. c o. c o. /
e2 a- /

% bars 3-4
f8 s e f cs s d4 a | b2 s a4 s o. r Rb /
a2 t a4 t .cs- | d8 s e f d s e4 o. r /
d8 s cs d e s e s d c s a1+ s g s | f s g f e s d8 o. d o. cs4 r /
d8 s cs d e s g s f e s a | d4- zd+ cn1 s b a gs s a4 o. r /
% end of PMX source file
\end{verbatim}
\end{minipage}
	\caption{{\PMX} source for excerpt of F.J.\ Haydn quartet}
	\label{tab:Haydn}
\end{table}

\section{Preliminary Concepts} \label{sec:concepts}

_{comments}
The {\PMX} code of a musical score consists of two parts, the
\emph{preamble} and the \emph{body}. Lines with a \% in column 1 are
comment lines (as in {\TeX}); they are disregarded by the program\,%
\footnote{Note, however, the additional conventions of
          the \textbf{scor2prt} program (see Chapter \ref{sec:scor2prt},
          pp.\ \pageref{p:scor2prt}).
         }.

\medskip
The \emph{preamble} contains the general specifications for a score,
some musical (e.g., number of instruments, meter, key signature), and
some typographical (e.g., number of pages, number of staves per page).

\medskip
The coding for the music itself is given in the \emph{body}, which in
turn usually has a \emph{header}. As an example, consider the first few
bars of Haydns \emph{quartet Op.76, no.2} . The music shown in
Fig.~\ref{fig:Haydn} is obtained from the {\PMX} source code given in
Table~\pageref{tab:Haydn}.

\section{Preamble} \label{sec:preamble}
_{preamble}

The \emph{preamble} consists of one or several lines of numbers,
followed by lines with typographical data relevant for the whole score.
The preamble ends with a line giving the name of the directory to which
_{\textbf{pmxab}}
\textbf{pmxab} is to write its output \texttt{.tex} file.

\subsection{Numerical input}  \label{sec:numinput}

The first line(s) of the preamble must contain 12 numerical
parameters, separated by one or more spaces (`white space'). In {\PMX},
as in {\TeX}, a line feed is equivalent to a white space, so the
following 3 forms of the beginning numerical input are all equivalent:

{\small
\begin{verbatim}
4	4	4	4	0	6 0	-1
1	1	16 .08
\end{verbatim}
}

\vspace*{-1.5ex}
\qquad  --- or ---

\vspace*{-1.5ex}
{\small
\begin{verbatim}
4	4	4	4	0	6 0	-1 1	1	16 .08
\end{verbatim}
}

\vspace*{-1.5ex}
\qquad  --- or ---

\vspace*{-1.5ex}
{\small
\begin{verbatim}
4
4
4
4
0
6
0
-1
1
1
16
.08
\end{verbatim}
}

\medskip\noindent
For the purpose of this tutorial, the 12 s are named\,%
\footnote{Their names are written in typewriter typeface here because in
          a way they \emph{are} input and, as some of the examples show,
          used as such, albeit only in comment lines. But these names
          themselves never occur in {\PMX} commands. (See, however,
          the footnote on p.\pageref{p:errormsg}).
         }.
\begin{center}
   \parbox{6cm}{\texttt{nstaves}, \texttt{ninstr},             \\[1ex]
                \texttt{mtrnuml}, \texttt{mtrdenl},  \\
                \texttt{mtrnump}, \texttt{mtrdenp},  \\[1ex]
                \texttt{npickup},                              \\
                \texttt{nkeys},                                \\[1ex]
                \texttt{npages}, \texttt{nsystems},            \\
                \texttt{musicsize}, \texttt{fracindent}
               }
\end{center}

Their significance is as follows:

\begin{itemize}
\item
_{voice!several voices in one staff} _{\texttt{nstaves}}
      \texttt{nstaves}, an integer $\leq 24$, is the total number of
      staves per system. Each staff may contain either one or two voices
      (lines of music). The number of voices in a staff may change as
      the piece progresses, but the total number of voices at any one
      time cannot exceed 24. So if, e.g., there are 24 staves, there can
      only be one voice per staff.

_{\texttt{ninstr}}
      \texttt{ninstr}, an integer $\leq$
      \texttt{nstaves}, is the number of \emph{instruments}.  Each
      instrument has a unique name (cf.\ p.~\pageref{p:names}), and any
      instrument with more than one staff will have its staves joined
      with a curly bracket. Often there is only one staff per
      instrument, and \texttt{ninstr $=$ nstaves} in that case. There
      are two ways to assign more than one staff to one or more
      instruments:

      \begin{itemize}
      \item if only the first, i.e.\ the \emph{lowest}, instrument has
            more than one staff, such as in a score for piano and a
            one-staff solo instrument, simply make \texttt{ninstr $<$
            nstaves}, and any difference will show up in instrument 1,
            the bottom one in each system,
      \item When you need a more general assignment of staves to
            instruments, put a minus sign in front of \texttt{ninstr},
            and follow \texttt{ninstr} with the number of staves in each
            instrument in succession, in sequence from the bottom one up
            (the same order as the instrument names,
            cf.~p.\pageref{p:names}), separated by spaces. These numbers
            \emph{must} add up to \texttt{nstaves}: in a way, they are
            simply a partition of the numerical parameter
            \texttt{ninstr} .
      \end{itemize}

      \Example
      The preamble of the first example (Fig.~\ref{fig:diabolica})
      simply has \texttt{nstaves} $=3$ and \texttt{noinst}
      $=2$ : \begin{figure}[!htb]
         \begin{center}
            \raisebox{-0.75ex}{%
                              \includegraphics[scale=.82]{eps/diabolica.eps}
                              }
         \end{center}
         \caption{\textbf{C.C.\ Noack}, \emph{sonata diabolica, first
                  movement}, bars 12--17
                 }   \label{fig:diabolica}
      \end{figure}
      while the Stravinsky excerpt of Fig.~\ref{fig:agon} was obtained\,%
      \footnote{In the \PMX\ text with which Fig.~\ref{fig:agon} was
                produced, an additional \MusiXTeX\ command was used to
                gather the strings in a group in the usual way. This
                ``inline use'' of \TeX\ commands will be explained in
                detail in Section~\ref{sec:inlineTeX} .
               }
      with \texttt{nstaves} $=9$ and \texttt{noinst} replaced by
      \[   -7 \; 1 \; 1 \; 1 \; 1 \; 2 \; 2 \; 1 \;\;\; .  \]
      This tells \PMX\ that there are 7 instruments in all, with 1 staff
      each for the four strings, 2 each for the piano and the harp, and
      1 for the trombone. Note that these numbers -- 8 in all in this
      case -- count as \emph{one parameter}, i.e.\ the 12 numerical
      parameters of the preamble are made up of 19 numbers in this case:
      \begin{center}
         \begin{tabular}{l@{\quad:\quad}l}
9                          & (\texttt{nstaves})                    \\
-7 1 1 1 1 2 2 1           & (\texttt{ninst})                      \\
4 \quad 8                 & (\texttt{mtrnuml, mtrdenl}   \\
4 \quad 8                 & (\texttt{mtrnump, mtrdenp})  \\
2 \quad 0                 &  (\texttt{npickup}, \texttt{nkeys})    \\
0 \quad 2 \qquad 16 \qquad 0.14
& (\texttt{npages, nsystems, musicsize, fracindent})
         \end{tabular}
      \end{center}
\end{itemize}

\begin{itemize}
\item  _{meter}
      The following 4 numbers serve to define the meter of the piece.
      The first pair,
_{\texttt{mtrnuml}}
      \texttt{mtrnuml} and
_{\texttt{mtrdenl}}
      \texttt{mtrdenl}, are the \emph{logical} values which {\PMX} uses
      to calculate the length of a bar: \texttt{mtrnuml} is the logical
      numerator of the meter, i.e.\ the number of beats per measure,
      \texttt{mtrdenl} the denominator. \label{p:meterdefs}

_{meter!printed}
      The second pair,
_{\texttt{mtrnump}}
      \texttt{mtrnump} and
_{\texttt{mtrdenp}}
      \texttt{mtrdenp}, determines the appearance of
      the meter in the printed output, but has no effect on the internal
      timing analysis of {\PMX}:
      \begin{itemize}
      \item if \texttt{mtrnump} $>0$, then it and
            \texttt{mtrdenp} are printed literally as the
            numerator and denominator of the time signature. For
            example, \texttt{4 4 4 4} prints a standard
            4 quarters meter,
      \item if \texttt{mtrnump} $<0$, then the numerator actually
            used by \PMX\ will still be the positive value of
            \texttt{mtrnump}, but the entire time signature will be
            printed with a vertical slash through it,
      \item if \texttt{mtrnump}=0, then \texttt{mtrdenp}
            determines the printed meter as given in
            Table~\ref{tab:meter} and shown in Fig.~\ref{fig:meter}.
      \end{itemize}

\medskip
There are special rules for n/16 and n/1 time signatures (where the
latter "1" normally means a semibreve or whole note).  To get n/1 time,
\label{p:meterdefs0}
use \texttt{mtrdenl} $=0$ (zero) and \texttt{mtrdenp} $=1$\,%
\footnote{To remember this rule, recall that the printed denominator
          is taken literally, while the logical denominator represents
          the same time value that is denoted when entering ordinary
          notes (see section~\ref{sec:notes} below): there \texttt{0}
          stands for a whole note.
          The special rule for n/16 time is due to programming
          convenience.
         }.
For n/16 time, it is \texttt{mtrdenl} $=1$ and \texttt{mtrdenp}
$=16$. So the choice [\texttt{3 0 3 1}] for the 4 meter
parameters, for example, will give a 3/1 time, both in the {\PMX}
internal computations and in the printed output, while a 5/16 time is
indicated by [\texttt{5 1 5 16}].
\end{itemize}

\medskip
\begin{figure}[!htbp]
   \begin{center}
      \raisebox{-0.75ex}{%
                        \includegraphics[scale=.82]{eps/agon.eps}
                        }
   \end{center}

           \vspace*{-4ex}
   \caption{\textbf{I.\ Stravinsky}, \emph{agon, first movement},
            bars 1--2 }   \label{fig:agon}
\end{figure}

\begin{table}[!htb]
\noindent
-------------------------------------------------
  \begin{center}
_{\PMX!options!meter options}
_{meter!blind}
     \begin{tabular}{|l|l|}
       \hline
       \texttt{0}            & no meter is printed (`blind' meter) \\
       \texttt{1, 2, 3 or 4} & a single digit, between
                               the 2nd and 4th lines of each staff\\
       \texttt{5}            & cut time (alla breve)          \\
       \texttt{6}            & common time                    \\
       \texttt{7}            & numeral 3 with a vertical slash
                                                              \\ \hline
     \end{tabular}
     \caption{Meter options for \texttt{mtrdenp} $=0$ }
              \label{tab:meter}
  \end{center}
\end{table}

\begin{figure}[!htb]
	\begin{center}
           \raisebox{-0.75ex}{%
                             \includegraphics[scale=.82]{eps/meter.eps}
                             }

           \vspace*{-4ex}
	\end{center}
	\caption{Result of meter options for \texttt{mtrdenp} $=0$
                } \label{fig:meter}
\end{figure}

\begin{itemize}
\item
_{pickup bar}
The $7^{\text{th}}$ parameter,
_{\texttt{npickup}}
\texttt{npickup}, is the number of beats in a pickup bar if one is
present. If there is no pickup bar, set \texttt{npickup} $=0$.
\texttt{npickup} need not be an integer. Cf.~Fig.~\ref{fig:pickups} for
examples of pickup bars.
_{pickup bar}

A pickup bar is the \emph{only} bar that can have a different number of
beats than the current value of \texttt{mtrnuml}. It must be followed
with the first regular bar \emph{in the same block}, i.e.\ the pickup
note(s) \emph{must not be followed} by a \texttt{|}, \texttt{/} or
\texttt{//}.
_{pickup bar}

We shall later describe a {\PMX} command to change the meter, and
explain how to use it for pickups to later sections or movements
(cf.~section~\ref{sec:meterchg}).
\end{itemize}

\begin{figure}[!htb]
   \begin{center}
      \raisebox{-0.75ex}{%
                        \includegraphics[scale=.82]{eps/pickups.eps}
                        }
   \end{center}
   \caption[Examples of pickups in 4/4]%
           {Examples of pickups in 4/4  (the values of \texttt{npickup}
            are given under the staff).
           } \label{fig:pickups}

\end{figure}

\begin{itemize}
\item
_{key signature} _{signature|see{key signature}} _{\texttt{nkeys}}
      \texttt{nkeys} is the key signature, positive integer for sharps,
      negative for flats.
\end{itemize}

\medskip
The last four numerical parameters concern the layout:
\begin{itemize}
\item If
_{\texttt{npages}}
      \texttt{npages} $>0$, it is the number of
      pages, and
_{\texttt{nsystems}}
      \texttt{nsystems} is then the
      total number of systems in the entire piece.  {\PMX} will spread
      the entire piece horizontally over this number of systems, and
      vertically over \texttt{npages} pages. For proper vertical spacing
      there should be from about 9 to 16 staves per page. If you specify
      too many staves for a given number of pages, one or more staves
      may spill over onto an extra page, but you will not see this until
      you preview the \texttt{.dvi} file. Possible remedies are to
      increase \texttt{npages}, decrease \texttt{nsystems}, or use the
      \texttt{Ae} command, to be described later (cf.~section
      \ref{sec:A}).

       \label{p:preamble}
\item If \texttt{npages} $=0$, \texttt{nsystems} is interpreted as the
      average number of bars per system. This is useful while building
      up a file a little at a time. {\PMX} will decide how many pages to
      use.
\item
_{staves!size} _{\texttt{musicsize}}
      \texttt{musicsize} is the height of a staff,
      in points. The only values allowed are: 16, 20, 24 or 29 .
\item
_{indenting first system}
      Finally,
_{\texttt{fracindent}}
      \texttt{fracindent} is the
      indentation of the first system from the left margin, expressed as
      a decimal fraction of the total line width.

      \smallskip
      Note that although logically \texttt{fracindent} could have any
      value between $0$ and $1$ , you should never use a value
      seriously over $.5$. It is not only  esthetically rather
      unpleasing, but may cause some unexpected havoc for {\MusiXTeX}.
\end{itemize}

\begin{table}[!htb]
	\begin{center}
_{preamble!numerical parameters}
\begin{tabular}{|l@{ : \quad}r@{\qquad\qquad}l|}
\hline
\texttt{nstaves}       &  4   & (4 staves)                  \\
\texttt{ninstr}        &  4   & (4 instruments)             \\
\texttt{mtrnuml}       &  4   & (4 beats \dots              \\
\texttt{mtrdenl}       &  4   & \quad \dots of quarters)    \\
\texttt{mtrnump}       &  0   & (option for \dots           \\
\texttt{nmtrdenp}      &  6   & \quad \dots common time)    \\
\texttt{npickup}       &  0   & (no pickup bar)             \\
\texttt{nkeys}         & -1   & (key: d minor)              \\
\texttt{npages}        &  1   & (1 page)                    \\
\texttt{nsystems}      &  1   & (1 system)                  \\
\texttt{musicsize}     & 16   & (16 pt staff)               \\
\texttt{fracindent}    & .085 & (indentation of 1st system) \\ \hline
\end{tabular}
\caption{Example of preamble parameters for the F.J.\ Haydn
         quartet in Fig.~\ref{fig:Haydn}, p.~\pageref{p:Haydn}
        } \label{tab:Haydnparams}
\end{center}
\end{table}

\medskip   \label{p:names}
_{instruments} _{instruments!names}
In the next part of the preamble the names of the \emph{ninstr}
intruments are given, as you want them to appear within the indentation
in the first system, one per line, \emph{starting with the bottom}
instrument. If you don't want instrument names to appear, you must still
leave \texttt{ninstr} blank lines here.

\label{p:clefs}
_{clefs} _{clefs!exotic}
Next, on a new line, comes a single string of \emph{nstaves} letters or
numbers for the clefs, again starting with the bottom staff. The choices
are\,%
\footnote{There are several more exotic clefs, available only in
          straight {\MusiXTeX} (cf.~Section \ref{sec:inlineTeX} on
          ``Inline {\TeX}'', and the {\MusiXTeX} manual, Section~2.21).
         }:
\verb|b, r, n, a, m, s, t, f| , which stand for
\textbf{b}ass, ba\textbf{r}itone, te\textbf{n}or, \textbf{a}lto,
\textbf{m}ezzosoprano, \textbf{s}oprano, \textbf{t}reble, or
\textbf{f}rench violin clef, respectively. Instead of these mnemonic
abbreviations, you can use the digits 0--7, according to the notation
\texttt{0} (treble), \texttt{1} (soprano), \texttt{2} (mezzosoprano),
\texttt{3} (alto), \texttt{4} (tenor), \texttt{5} (bariton), \texttt{6}
(bass) and  \texttt{7} (french violin)\,%
\footnote{This rather unmnemonic notation has been retained in {\PMX}
          for compatibility with {\MusiXTeX}.
         }.
These two clef codes are summarized in Fig.~\ref{fig:clefnot}.
\begin{figure}[!htb] \begin{center}
_{clefs!symbols}  _{clef codes|see{clefs, symbols}}
        \raisebox{-0.75ex}{%
                          \includegraphics[scale=.82]{eps/clefnot.eps}
                          }
        \end{center}
	\caption{Notation of the clefs}
	\label{fig:clefnot}
\end{figure}

\bigskip
_{preamble!end of} _{working directory|see{directory}}
_{current directory|see{directory}} _{path name|see{directory}}
The preamble ends with a line that contains the path name of the
^{directory} to which you want the files (the \verb#.tex# file, in
particular) to be written when
_{\textbf{pmxab}}
\textbf{pmxab} processes your source text. Usually you will want that to
be the current directory: in UNIX this is denoted by \verb#./#~, in DOS
(most versions, including Windows) it is \verb#.\#\qquad. In any case,
the path -- and thus the whole preamble -- must terminate with \verb#/#
or \verb#\#~~.

\addcontentsline{toc}{section}{Body of the Input File}
_{body of Input File}

\bigskip
The rest of the {\PMX} input file is called the \emph{body}. It usually
begins with a number of global options, each on a line by itself,
called the \emph{header} (which can be empty).
\label{p:header}
_{header} _{\PMX!options!general}

\medskip
_{input block}  _{block|see{input block}}
Following the header, the input of the actual music begins.  The basic
unit is called a \emph{block}, each one consisting of from 1 to 15
complete bars. The input data for all bars in a block are entered for
each staff in turn, starting with the first (i.e.\ the \emph{lowest})
staff. The sequence of staves (and thus of the instruments) corresponds
to that in the preamble: the first is the bottom one of the system as it
appears in the final score, and the last is the top one. The input for
each staff ends with a \verb#/# (slash). The data for one staff need not
be contained on a single input line, but may spread over as many as
needed, with any number of blank lines and comment lines between them\,%
\footnote{Remember that in {\PMX}, as in {\TeX}, a line feed is
          equivalent to a space, and a sequence of many spaces is
          equivalent to one space.
         },
but after the end of one staff (i.e.\ after the slash), you \emph{must}
start the coding for the next staff on a new input line. A \emph{block}
ends with the slash of the last staff of the last instrument (the top
staff in the score).
_{input block!ending}

\medskip
Though you can put up to 15 bars in one block, many users of {\PMX} have
the habit of systematically writing one bar per block only. Sometimes,
however, for reasons of context, {\PMX} \emph{requires} a set of bars to
be in one and the same block (cf.~Section~\ref{sec:dynamics}). If you
do put more that one bar in a block, it is advisable (although not
required) to separate the bars with a \verb#|# (`vertical stroke'). The
main function of this is to provide visual separation in the input file,
and to help isolate input errors: if you put a \verb#|# anywhere except
at a bar end, the {\PMX} processor will stop and show you where it
detected the timing error. Otherwise (with a few minor
exceptions%
\footnote{For such an exception cf.\ the note on p.\pageref{p:repeats}.
         })
\verb#|# has no effect.
_{bar lines!in source}

It is also good practice to separate the blocks with comment lines that
state which bars are represented, as has been done in the input source
for Fig.~\ref{fig:Haydn} (p.\pageref{p:Haydn}).

_{pickup bar}
If there is a pickup bar (\verb#npickup# $>0$), it must be in a block
with the first full bar\,%
\footnote{If, for some reason, you do need to put the pickup in a
          separate block, set the initial logical meter to fit the
          pickup bar, then after the pickup bar do a blind meter change,
          as described in section~\ref{sec:meterchg}.
         }.

_{voice!several voices in one staff}
When there are 2 voices in a staff (e.g.~for an organ or other
polyphonic instrument, or in a choir or symphonic score), these are
entered consecutively in the coding for that staff, again starting with
the lower voice, and this voice is ended with a \verb#//# (`double
slash'). Here again, after the double slash, you \emph{must} start the
second voice on a separate input line. The coding for this staff is then
again concluded by a single slash.

\medskip
The two bars from \emph{Pellas et Melisande} by Debussy in
Fig.~\ref{fig:debussy} are an example. The bottom staff, that for the
trumpet, has only one voice, while the top staff (for the flutes) has 2,
thus giving a total of 3 voices.

\begin{figure}[!htbp]
   \begin{center}
    \raisebox{-0.75ex}{%
                      \includegraphics[scale=.82]{eps/debussy.eps}
                      } \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
%----------------%
% C. Debussy, Pell‚as et Melisande, p.149
%----------------%
%
2     2
12    8      12    8
0     6
1     1      16   .07
%
Trumpet
Flutes
tt
./
It60itrfl
h-4
Lento
Abepl
\\nobarnumbers\
%
% %%%%%%%%%%%%%%%%%%%%%%%%%  Bar 1  %%%%%%%%%%%%%%%%%%%%%%%%%
cd4 D"con sord."+17 sf dd fd dd sf /
r8+0 fr sfu+0+1 e sf+0 t ed4 t r8+0
br+ sfu+0+1 a sf+0 r+0 gr sfu+0+1 f sf+0 //
rb8 g4+ t gd t rb8 c4 rb8 a4 /

% %%%%%%%%%%%%%%%%%%%%%%%%%  Bar 2  %%%%%%%%%%%%%%%%%%%%%%%%%
cd4 sf dd fd ad sf Rb /
r8+0 fr sfu+0+1 e sf+0 t ed4 t r8+0 br+ sfu+0+1 a sf+0 t ad4 t //
rb8 g4 t gd t rb8 c4 t cd t /

% %%%%%%%%%%%%%%%%%%%%%%%%%  end of file  %%%%%%%%%%%%%%%%%%%
\end{verbatim}
\end{minipage}
    \end{center}


   \caption{\textbf{C.\ Debussy}, \emph{Pellas et Melisande} (excerpt) }
            \label{fig:debussy}
\end{figure}

\medskip
_{voice!several voices in one staff}
The number of voices in a staff (1 or 2) is determined solely by whether
the first sequence of symbols for that staff ends with \verb#/# or
\verb#//#. Therefore the number of voices in any given staff can vary
from block to block, but not within a block. In other words, if you need
to change the number of voices in a staff, you must start a new block.

\medskip
_{\PMX!symbols}
Finally, a general characteristic of {\PMX} coding should be noted: all
data comprises sequences of \emph{symbols}, each one containing one or
more adjacent characters. These symbols -- including the
voice-terminating symbols \verb#/# and \verb#//# -- are \emph{always}
separated from each other by at least one space or line feed. Whenever
there are several characters strung together without spaces, they are
considered \emph{one single} {\PMX} symbol. This concept has already
been illustrated in prior examples. The construction of the symbols will
be explained in much more detail in the remainder of this chapter.

\section{Commands for the Individual Staves}
                 \label{sec:body}
_{\PMX!commands for individual staves}

\subsection{Notes} \label{sec:notes}
_{notes}

The most important input item is of course a single note. Its two
main features are its \emph{pitch} and its \emph{duration}.

\emph{The pitch} is primarily -- i.e.\ up to octaviation --indicated by
_{notes!pitch}
the note \emph{name} in \emph{lower case} letters: \texttt{c, d, e, f,
g, a, b} (do, re, mi, fa, sol, la, si). If the note is to have an
accidental, the note name is followed \emph{without a space} by
\texttt{s, f} or \texttt{n} for a \textbf{s}harp, \textbf{f}lat or
\textbf{n}atural; \texttt{ss}/\texttt{ff} for a double sharp/double
flat.

_{accidentals} _{notes!duration}

The \emph{basic duration}, i.e.\ the duration exclusive of a possible
dot, is indicated by the first unsigned digit following the note name,
again with no space: \texttt{9, 0, 2, 4, 8, 1, 3, 6} respectively for
double-whole (^{breve}), whole (^{semibreve}), half, quarter, eighth
(quaver), sixteenth (semiquaver), thirty-second, and sixty-fourth notes.
For a consecutive sequence of notes of equal duration, this needs to be
given explicitly only for the first note of the sequence. Subsequent,
consecutive notes with no explicit duration will `\emph{inherit}' their
basic durations from the most recent note with an explicit duration.
_{eighths} _{sixteenths}

A \emph{dotted/doubly dotted note} is indicated by the letter
\texttt{d}/\texttt{dd} just about anywhere\,%
\footnote{The only restriction on the position of \texttt{d} within the
          note symbol occurs if the dot is to be shifted
          (cf.~p.\pageref{p:dotshift}).
         }
in the note symbol, after the note name, of course.

It is important to note that, in contrast to the basic duration, a
dot is never inherited by a subsequent note.
_{notes!duration!not inherited for dotted note} _{dotted notes|see{notes}}

\medskip
The \emph{pitch} of a note is, of course, not determined by the note
name alone; the actual octave needs to be specified as well. For this,
there are three possibilities:
\begin{description}
   \item[explicit octaves:] \text{} \\
_{notes!pitch!explicit octave}
         A second unsigned digit\,%
         \footnote{In contrast to the letters for accidentals and dots
                   and other letters to be explained in
                   Section~\ref{sec:otherparams}, the 2 digits for
                   duration and pitch, if present,  must always be given
                   in this order. Specifically, if by omitting the
                   duration digit you use the inherited duration, you
                   can no longer specify the octave explicitly by an
                   unsigned digit.
                  }
         indicates the octave to which the note belongs. For reference,
         octave 4 runs from middle C to the B above. The lowest note on
         an 88-key piano is the A in octave~0, while its highest note is
         the C in octave~8 (cf.~also Fig.~\ref{fig:pitch}).

         \begin{figure}[!htb] \begin{center}
                                 \includegraphics[scale=.82]{eps/pitch.eps}
                              \end{center}
         \caption{{\PMX} notation for pitch
                         (second digit of note symbol)}
                  \label{fig:pitch}
         \end{figure}

   \item[inherited pitch:] \text{} \\
_{notes!pitch!inherited}
         For a note without any explicit octave or relative pitch
         indication, the octave is assigned by {\PMX} such that the note
         is placed in the octave that makes it nearest to the most
         recent note \emph{in the same voice}, i.e. the pitch is
         `inherited'. Thus for jumps of less than a fourth up or down,
         you only need to enter the note name to fully specify the
         pitch. This feature often lets you go for long stretches in a
         voice before needing to enter the octave. For jumps of a fifth
         or more, you need to specify the octave either explicitly as
         described above, or relatively as described below.

   \item[relative pitch:]
_{notes!pitch!relative}
         \text{} \label{p:relativepitch} \\
         A \texttt{+} or \texttt{-} (if not part of one of the signed
         numerical suboptions to be discussed later) indicates that a
         note is to be an octave higher or lower than it would otherwise
         be. Two consecutive \texttt{+}'s will raise the pitch two
         octaves, and so forth\,%
         \footnote{Two consecutive \texttt{+}'s can be abbreviated by
                   one \texttt{++} .
                  }.

    As an example of all this, compare Fig.~\ref{fig:reloctav} with the
    {\PMX} notations given under the staff\,%
    \footnote{The same result would be obtained with the full, absolute
              notation \texttt{c84 d84 e84 c85 b84 a84 g84 g83 | c26 g23
              | c04}; but this is obviously much more verbose.

_{notes!pitch!explicit octave}
              Explicit octave numbers can be combined with one or more
              \texttt{+} or \texttt{-}, although this is not
              recommended.
             }.

    \begin{figure}[!htb]
       \begin{center} \includegraphics[scale=.82]{eps/reloctav.eps}
       \end{center} \caption{Relative Octave Notations}
       \label{fig:reloctav}
    \end{figure}
\end{description}

_{notes!pitch!explicit octave}
The first note of each line of music in a block must contain at a
minimum the note name and a basic duration value. It is good
practice and can simplify editing if in addition an explicit octave is
set there.  However if it is not, {\PMX} will make some assumptions:  at
the start of the first input block the pitch will be set as if there
were a prior note of middle C. In later blocks {\PMX} will use the
obvious inheritance rules from the end of the prior block\,%
\footnote{However, if the number of voices 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 across block ends,
          and thus must be reset at the start of each input block.
_{notes!duration!not inherited across blocks} _{voice!several voices in one staff}
         }.

\subsection{Dotted Notes}  \label{sec:dotnotes}
_{notes!dotted note}

Inheritance of dotted notes is a little tricky. As was noted above, the
dot itself is never inherited; you always have to use a \texttt{d}  in
the note symbol, even if the actual duration and octave are the same as
the prior note.  But the \emph{basic} digit of duration need not be
reentered if it hasn't changed\,%
\footnote{There is an exception to this: if you decide to indicate the
          octave with an explicit digit (`absolute octave'), you must
          then enter the duration explicitly as well.
         }.
So for example, consecutive dotted half notes, each within a fourth of
the previous one, could be most cleanly entered as \texttt{cd24 ed gd
ed}, whereas \texttt{cd24 e} would represent a dotted half note followed
by a plain half note, since the basic digit of duration was for a half
note all along.

\subsection{Stems}  \label{sec:stems}
_{stems} _{stems!direction forced}  _{stems!length}

{\PMX} usually determines the correct stem length and direction
(\emph{up} or \emph{down}) of a note  automatically. This can, however,
be changed by the user, as needed:
\begin{itemize}
_{stems!options}
   \item the stem direction is forced to go \emph{up} with the letter
         \texttt{u} (`\textbf{u}p') anywhere after the note name, or
         \emph{down} with \texttt{l} (`\textbf{l}ower'),
   \item the stem length of non-beamed notes can be shortened by adding
         the option \texttt{S}, followed by a decimal number between .5
         and 4.0 , representing the shortening in units of
         \texttt{\bs{}internote}\,%
         \footnote{1 unit of \texttt{\bs{}internote} is roughly half the
                   distance between staff lines.
                  }.
         The shortening can be made ``sticky'', i.e.\ applied to all
         following notes by adding a colon (\texttt{:}) after the
         number. Stickiness is terminated by \texttt{S:} .

\end{itemize}

\subsection{Other Note Parameters}   \label{sec:otherparams}
_{\PMX!options} _{\PMX!options!notes}
Here are some more options that can be appended to a note symbol (as usual
without spaces):

\begin{description}
  \item[Inhibited beaming (\textbf{a})] \text{} \\
_{beaming!inhibited}
     Joining the note stems with beams is usually done automatically by
     {\PMX}\,%
     \footnote{For details of this cf.\ Section~\ref{sec:beams}.
              }.
     Sometimes, however, you may want to inhibit this explicitly for a
     single note; this is achieved by the letter \texttt{a} (for
     \texttt{a}lone).
  \item[Horizontal shift (\textbf{e,r})] \text{} \\
_{notes!horizontal shift}
     Sometimes you want to shift the horizontal position of a note, for
     example to avoid overlap with a note in another voice of the same
     staff.  The letters \texttt{e} and \texttt{r} do that: \texttt{e}
     shifts the note to the l\texttt{e}ft by its own width (a `notehead
     width'), while \texttt{r} shifts it to the \texttt{r}ight. An
     example of this can be seen in Fig.~\ref{fig:debussy}.
  \item[Shift of accidentals (\texttt{<} / \texttt{>})]
     \text{} \label{p:accidentals} \\
_{accidentals!position shift}
     Accidentals can be shifted too.  One way is to enter \texttt{+} or
     \texttt{-} immediately after the accidental character, then an
     \emph{integer} for the vertical shift in units of
     \texttt{\bs{}internote}, then another \texttt{+} or \texttt{-} ,
     followed by the horizontal shift, given as a decimal fraction of a
     notehead width. If you use this method, you \emph{must enter both
     numbers}. Alternatively -- if you need only an horizontal shift --,
     you can simply use \texttt{<} or \texttt{>}, 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.
     \label{shifts}
  \item[Shift of the dot in dotted notes] \text{} \label{p:dotshift} \\
     The dot in dotted notes can be shifted analogously to the first
     method for accidentals, using signed numbers, except that the first
     (vertical) shift may be a decimal fraction.
  \item[Shorthand for dotted notes]
_{dotted notes!shorthand} _{shorthand!for dotted notes}
     \text{} \\ There are two special shorthand notations for dotted
     rhythms.  For normal dotted rhythms ($3:1$ ratio), if you include a
     period (\texttt{.}) in the note symbol, {\PMX} will
     \begin{itemize}
        \item assign a dot to the note just entered,
        \item terminate that note,
        \item prepare to receive the next note name \emph{without any
              space}, and
        \item automatically assign a time value to the second note equal
              to one-third of the first one.
     \end{itemize}
     No time value may be entered for the second note, but octave and
     accidental parameters may. Ornaments and slurs
     (cf.~Sections~\ref{sec:ornaments} and \ref{sec:psslurs}) following
     this symbol will apply to the second member. If you need to follow
     the main note with some modifying command, you can still use the
     shorthand (\texttt{.}) after that command and a space. The main
     advantage of this shorthand comes if you want to follow one dotted
     pair with another of the same rhythm; then you needn't enter any
     explicit duration value for \emph{either} member of the second
     pair. This is because after using the shorthand, the basic
     inherited duration value is set to that of the \emph{first} note in
     the pair; remember that the basic duration does not include the
     dot!

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

     \Note{If you use this shorthand for dotted pairs, either embedded
           in a single symbol or to start a separate symbol for the
           second member, then you \emph{cannot shift the dot position}.
           If you do need to shift the dot, you should not use the
           shorthand notation.
_{dotted notes!shorthand}
          }
\end{description}
\bigskip
For reference, all the letter-type note parameters are listed in
Table~\ref{tab:noteparameters}. Examples demonstrating the
use of most of them are given in Fig.~\ref{fig:notepars} .

\begin{table}[!htb]
  \begin{center}
_{\PMX!options!notes} _{accidentals} _{accidentals!cautionary}
_{notes!parameters}   _{accidentals!MIDI}
     \begin{tabular}{|l@{\hbox{\quad}}c@{\quad --- }l|}
        \hline
        \multicolumn{3}{|l|}{\textbf{Accidentals:}} \\
          & s  & \textbf{s}harp        \\
          & f  & \textbf{f}lat         \\
          & n  & \textbf{n}atural      \\
          & ss & double \textbf{s}harp \\
          & ff & double \textbf{f}lat  \\
          & sc, ssc, fc, ffc, nc
               & cautionary accidental (accidental in parenthesis) \\
          & si, fi, ni & \parbox[t]{300pt}{M\textbf{i}DI accidental {\\}
                           [\,does do not appear in the printed score
                           ---
                           cf.~Section~\ref{sec:MIDIaccidentals}\,]
                                   }     \\[1ex]
        \multicolumn{3}{|l|}{\textbf{Dotted Notes:}} \\
          & d  & single \textbf{d}ot                 \\
          & dd & \textbf{d}ouble \textbf{d}ot        \\
          & .  & shorthand for $3:1$ rythm   \\
          & ,  & shorthand for $2:1$ rythm   \\
        \multicolumn{3}{|l|}{\textbf{Stems:}} \\
          & u  & force the stem \textbf{u}p                \\
          & l  & force the stem down (\textbf{l}ower)      \\
        \multicolumn{3}{|l|}{\textbf{Shifts of Position:}} \\
          & e  & shift the notehead l\textbf{e}ft
                 by the notehead width             \\
          & r  & shift the notehead \textbf{r}ight
                 by the notehead width             \\
          & \texttt{<} & left shift of accidental          \\
          & \texttt{>} & right shift of accidental         \\
          & +, -       & general shift of accidental       \\
        \multicolumn{3}{|l|}{\textbf{Beam Inhibit:}} \\
          & a  & \textbf{a}lone (cf.~Section~\ref{sec:beams})   \\
        \multicolumn{3}{|l|}{\textbf{Xtuplets:}} \\
          & x  & (\textbf{x}tuplet) (cf.Section~\ref{sec:xtuplets}) \\
                 \hline
     \end{tabular}
  \end{center}
  \caption{Use of Note Parameters as shown in Fig.~\ref{fig:notepars} .}
  \label{tab:noteparameters}
\end{table}

\begin{figure}[!htb]
   \begin{center}

       \includegraphics[scale=.82]{eps/notepara.eps}  \\[2ex]
       \includegraphics[scale=.82]{eps/noteparb.eps}  \\
       \small{ (Notations for Dotted Notes) }  \\[2ex]
       \includegraphics[scale=.82]{eps/noteparc.eps} \\
       \small{ (Position Shifts of Accidentals) }  \\[2ex]
   \end{center}
   \caption{Use of Note Parameters} \label{fig:notepars}
\end{figure}

\pagebreak
\subsection{Rests} \label{sec:rests}
_{rest} _{pause|see{rest}}

Rests are denoted by the letter \texttt{r} in place of a note name.
Rests have duration digits just like notes, but obviously no second
digit for giving an octave. As inheritance goes, an \texttt{r} behaves
just like a note: it can inherit its duration from the prior note or
rest, and notes as well as rests can inherit their duration from prior
rests.

\medskip
Any rest or sequence of rests that occupies a full bar will by default
be horizontally centered in the bar.

\medskip
There are a few special notations for rests:
\begin{itemize}
   \item \texttt{rp} (`\textbf{r}est \textbf{p}ause') denotes a full-bar
         rest (whole rest), regardless of what the meter signature for
         the bar may be,
   \item \texttt{rpo} (`\textbf{r}est \textbf{p}ause
         \textbf{o}ff-center'). The option \textbf{o} suppresses the
         centering of a pause,
   \item
_{rest!blank rest}
         \texttt{b} (`\textbf{b}lank') denotes a blank rest, i.e. one
         that \emph{does not appear in print}. Logically, it has a
         duration that is determined, as usual, either by an explicit
         duration specifier or by inheritance. Blank rests are most
         commonly used when there are two voices in a staff,
         and one drops out for some part of the current input bar\,%
         \footnote{Another interesting application is when you have two
                   homophonic voices in one staff and, for simplicity's
                   sake you want to write only one rest for both voices
                   (cf.~the last 2 bars in Fig.~\ref{fig:rests}) .
                  },
   \item
_{rest!multibar rest} _{\textbf{scor2prt}!multibar rest}
         \texttt{rm} (`rest \texttt{m}ulti-bar') followed -- without
         space! -- by an integer $n$ generates the multi-bar rest symbol
         with the number $n$ above it, signifying a rest for $n$ full
         bars\,%
         \footnote{This is used in particular when the parts for
                   individual instruments are generated from a full
                   score, as is done automatically by \textbf{scor2prt};
                   cf.\ Section~\ref{sec:scor2prt}).
                  }.
\end{itemize}
\noindent
\hspace*{2em}\fbox{\begin{minipage}{390pt}
     Note that that there can be \emph{only one instance} of a multibar
     rest in a given input block!
                   \end{minipage}
                  }

\medskip\noindent
The default vertical position of a rest depends on whether there are one
or two voices in the staff. For one voice it is just the {\MusiXTeX}
default: approximately centered on the middle line. On the other hand,
in the lower voice in a two-voice staff, the rest is lowered
by \verb#4\internote#, while in the upper line it is raised
by \verb#2\internote#. The default can be manually overridden by appending
\verb#+# or \verb#-# and an integer for the offset (in
\verb#\internotes#) from the \emph{middle} line of the staff. Note that
this means that, if in the case of 2 voices in a staff you want to have
the rest centered on the middle line, you need to code it as \verb#r+0#
--- see the last bar in Fig.~\ref{fig:rests}~.

\medskip
Some samples of rests are given in Fig.~\ref{fig:rests}.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/rests.eps}
        \end{center}
\caption{Rests}
\label{fig:rests}
\end{figure}

\pagebreak
\subsection{Xtuplets} \label{sec:xtuplets}
_{xtuplet}

{\PMX} insists very strictly on checking that the sum of durations of
all notes or rests in a bar add up to the total required by the bar's
meter. Thus, it cannot deal easily with modern extensively\,%
^{polyrhythmic scores}, percussion in particular \label{p:polyrhythms}
\footnote{But such problems occur occasionally even in classical music.
          Thus, a real challenge to any {\PMX} expert is to code the
          (in)famous third movement of Mozart's Oboe Quartet KV 370,
          where suddenly the oboe changes to an alla breve (4/4), while
          the strings continue on in a 6/8 meter!
         }.
The only polyrhythmic feature built into {\PMX} are the traditional
xtuplets: doublets, triplets etc.\ , together with their usual notation.

\medskip
Xtuplets (duplets, triplets, etc.) can have from 2 to 24 notes or
rests\,%
\footnote{The default maximum of $24$ can be changed.
          Cf.~\ref{sec:limits} .
         }.
By default all notes in an xtuplet have the same duration; but some can
be dotted or have twice the basic duration
(cf.\ p.~\pageref{p:xtupletdoubling}). The notation is as follows:
\begin{enumerate}
  \item The symbol for the first note of an xtuplet begins exactly like
        a note symbol, with the name of the first note in the xtuplet,
        or an \texttt{r} if the xtuplet starts with a \textbf{r}est --,
        followed, as the case may be, by an accidental, a \texttt{d} or
        \texttt{dd}, a \texttt{+},\texttt{-} or explicit octave, and an
        optional duration digit. However, this duration, whether given
        explicitly or inherited from a previous note or augmented by a
        dot, is not the duration of the first note, but represents the
        \emph{total} duration of the \emph{whole xtuplet}.

  \item If the xtuplet is to be \emph{unbeamed}, add an
        `\texttt{a}' (`alone') right after the first note.
  \item Next -- with no space, as usual -- comes \texttt{x} (for
        `\textbf{x}tuplet'), followed by a one- or two-digit integer,
        for the number of notes in the xtuplet . If the first note is to
        be dotted, add the usual \texttt{d}, if it is to have twice the
        basic duration, add a \texttt{D} or \texttt{F} (cf.\
        page~\pageref{p:xtupletdoubling} for more detail on this). The
        only options allowed after this begin with the letter \texttt{n}
        and control the printed appearance of the xtuplet:
        \begin{itemize}
          \item If \texttt{n} is omitted, the xtuplet is printed in the
                standard way, i.e.\ with the xtuplet $3$ printed over (or
                under, as the stemming may dictate) for, say, a triplet.
                Note also that by default {\PMX} prints a bracket only
                if the xtuplet notes are unbeamed; otherwise just the
                xtuplet number is printed.
          \item If \texttt{n} is followed by an \emph{unsigned} integer,
                this integer is taken as the number to be printed
                instead of the natural (default) one.
          \item If \texttt{n} is followed by the letter \texttt{f}
                (\textbf{f}lip), the xtuplet number is \textbf{f}lippped
                vertically from its default position. \item The position
                of the xtuplet number can be adjusted in the usual way
                with one or two \emph{signed decimal numbers} following
                \texttt{n}: the first is a vertical shift in units of
                \texttt{\bs{}internote}, the (optional) second a
                horizontal shift, in notehead widths.
          \item If \texttt{n} is given, but followed by a space, thus
                ending the first-note symbol, \emph{no number} at all
                will be printed.
          \item
_{xtuplet!tweaking the bracket slope}
                For a \emph{non-beamed xtuplet only} a suboption
                \texttt{s} can be added to the \texttt{n} option by
                which the slope of the bracket can be adjusted ; i.e.\
                you can use \texttt{ns}[\emph{n}], where \emph{n} is
                an \emph{signed} integer (except zero): a positive
                integer will lift the end of the bracket upwards, while
                a negative one will move it downwards.

                Note that this suboption will operate in a more
                elegant way for Sicherman-type xtuplets\,%
_{Sicherman-type xtuplets!see xtuplets}
_{xtuplets!ajusting slope with Sicherman xtuplets}
                \footnote{For Sichermann xtuplets cf.\ the next page.
                         }
                only: when the Sichermann option \textbf{AT} is
                \emph{not in effect}, the bracket number (the 3 in a
                triplet, e.g.) will \emph{not} follow the slope
                adjustment and might have to be tweaked separately.
        \end{itemize}
  \item The second through last notes of the xtuplet are then each
        given by a separate note symbol, containing the meaningful
        subset of the parameters permitted for notes or rests:
        \begin{enumerate}
           \item the note name as the first character. This is the only
                 required character. It can be an \texttt{r} (for a
_{xtuplet!rest in xtuplet}  _{rest!in xtuplet}
                 rest), except that the \emph{last note of an xtuplet
                 cannot be a rest}\,%
                 \footnote{Cf.\ however, Sec.\
                           \ref{sec:Xtuplets ending with a rest}
                          },
           \item an accidental,
           \item an octave change (\texttt{+} or \texttt{-}). The octave
                 may also given explicitly; this is the only digit
                 allowed,
           \item a \texttt{d} (\textbf{d}ot). The next note after the
                 dotted one is automatically shortened to half the
                 normal value,
           \item
_{xtuplet!doubled note}
                 \label{p:xtupletdoubling}
                 the character \texttt{D} in the note symbol for any
                 note in an xtuplet doubles the duration of this note.
                 As this accounts for two notes of the xtuplet, it will
                 decrease the expected number of notes in the xtuplet by
                 one. If used for the first note of an xtuplet,
                 \texttt{D} goes \emph{before} an optional \texttt{n}
                 parameter, \item
_{xtuplet!doubled note in Bach notation}
                 the character \texttt{F} is the same as \texttt{D},
                 except that in the printed output the doubled note will
                 appear dotted (a notation Bach sometimes used). As with
                 \texttt{D}, an \texttt{F} for the first note goes
                 \emph{before} an optional \texttt{n} .
           \item grace notes are allowed in xtuplets.
_{grace notes!in xtuplet}
                 \end{enumerate}
                 No explicit duration is allowed in symbols for the
                 second through last members of the xtuplet, the
                 duration having been determined by the first note.
\end{enumerate}

\medskip
_{xtuplet!inhibited beaming} _{beaming!in xtuplet}
Beaming of xtuplets is done automatically. If it is to be inhibited, add
the \textbf{a}lone option to the first-note symbol
(cf.~Section~\ref{sec:otherparams}).

\medskip
Fig.~\ref{fig:xtuplets} displays some examples of xtuplets, with the {\PMX}
coding given below the staff:

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]%
           {eps/xtuplets.eps}  \\[2ex]
	\end{center}
	\caption{Xtuplets}
	\label{fig:xtuplets}
\end{figure}

\bigskip
As was remarked at the end of Section~\ref{sec:preamble}, the
individual symbols of {\PMX} generally consist of one or several
characters strung together without spaces. In that sense, each note of
an xtuplet is considered to be \emph{a separate} {\PMX} symbol; so these
are separated by spaces as usual.

\bigskip\bigskip
_{xtuplet!non-standard bracket}
\label{p:sicherman}
A special, non-standard bracket can be printed for \emph{non-beamed xtuplets
only} with an addition to {\PMX} designed by Col.\ G.L.\ Sicherman. This
prints the xtuplet number not above or below the bracket, but in line
with it, as shown in Fig.~\ref{fig:xtupletsSich}. To invoke this, simply
add the option \texttt{AT} as a separate {\PMX} symbol anywhere in the
body of the source file: this will switch from standard to Sicherman
brackets \emph{for all xtuplets in the score}.
_{Sicherman, Col.\ G.L.}

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/xtupletsSich.eps}  \\[2ex]
	\end{center}
	\caption{Xtuplets with Sicherman brackets}
	\label{fig:xtupletsSich}
\end{figure}

\medskip
If you want to use this for specific xtuplets only or otherwise
customize your use of the option, you will have to use inline {\TeX}
commands, following instructions given in \verb#tuplet.tex# as comments.

\Note{To use the Sichermann option, the file
      \href{http://icking-music-archive.org/software/musixtex/%
            add-ons/tuplet.tex}{\texttt{tuplet.tex} }
      (available from the software section of the WIMA) must be
      installed in your {\TeX} system!
     }

\subsection{Chords}
\label{sec:chords}

_{notes!chordal} _{chords}
\emph{Chordal notes} are notes that share a common stem and have the
same duration. They are coded in {\PMX} as follows:
\begin{itemize}
   \item
_{chords!main note}
         One of the notes in the chord  is chosen to be the first note,
         the ``main'' note, of the chord. It can be any note in the
         chord; usually it is simplest
         \footnote{Sometimes, however, careful choice of the main note
                   can make an important difference. For example, if the
                   chord is beamed with other notes, the default height
                   and angle of the beam will be determined by the main
                   note of each chord. If a beam joining chords looks
                   bad, you can often fix it by changing which note acts
                   as the main one [\,of course there are other ways to
                   fine-tune beam parameters, as will be described in
                   detail in Section~\ref{sec:beams}\,].

                   So wise use of this freedom of choice is definitely
                   called for! For further details, consult
                   Section~\ref{sec:arpeggio} .
                  }
         to start either from the bottom up or the top down.

         The main note is written as usual and as described in
         Section~\ref{sec:notes} .
   \item All other chordal notes are denoted by separate symbols
         starting with \texttt{z} followed by a note name. The note name
         can optionally be followed by an accidental and an octave
         indicator (\texttt{+} or \texttt{-}), but no absolute octave is
         allowed. And no duration value is allowed either, as this is
         logically determined by the first note.

         If the main note is dotted, the dot is obviously `inherited'
         for all other notes as well, so writing another \texttt{d}
         would be redundant. But if you want to shift the dot of a
         chordal note, you \emph{must add} a \texttt{d}, followed by the
         shift parameters, as described on p.\pageref{shifts}.
   \item Normally {\PMX} will automatically set notes in a chord so that
         collisions are avoided (in a second, e.g.). If you don't like
         the result, you can shift the note by one notehead width to the
         \textbf{r}ight with \texttt{r}, or to the l\textbf{e}ft
         with \texttt{e} .
   \item The position of accidentals will also be adjusted automatically
         by {\PMX} so as to avoid collisions. But, as with single notes,
         you can shift accidentals of chord notes manually\,%
         \footnote{Note that if, in addition, you use a \texttt{+} or
                   \texttt{-} to denote a relative octave
                   (cf.~p.\pageref{p:relativepitch}), this sign must
                   come \emph{after} the shift parameter for the
                   accidental.
                  },
         using the parameters described on p.\pageref{p:accidentals}.

         If you manually shift \emph{any}\ accidental in a chord, then
         automatic shifting will be disabled for \emph{all}\ the
         accidentals in a chord, \emph{unless}\ you preface the shift
         parameter with \textbf{A} (e.g.~\texttt{zcsA<.5}), in which
         case the manual shift will be \textbf{a}dded to that applied
         automatically by {\PMX}.
   \item
_{chords!position of accidentals}
         \label{p:chordsoption}
         Another option that affects accidental positioning in chords is
         \texttt{Ao}~, entered in the main note symbol of a chord. It will
         force the accidentals in that chord to be posted in the order they
         come in the source (starting with the main note), each one as
         far to the right as it will go without crashing into a notehead,
         stem, or another accidental.
\end{itemize}

_{chords!stem length and direction} _{stems!direction forced}
The stem length and direction of a chord are controlled by the first
note, but may be manually overridden with \text{u} (\textbf{u}p) or
\texttt{l} (\textbf{l}ower) in the first note symbol.

\medskip
As decribed above, every chord note has its own note symbol. This means,
as always: no space within a note symbol, but at least one space
between the note symbols of a chord.

\subsubsection{Arpeggio} \label{sec:arpeggio}
_{chords!arpeggio}  _{arpeggio|see{chords}}

An \textbf{arpeggio} is, of course, simply a special form of a chord,
denoted by a vertical wavy line in front of the chord proper. To write
that in {\PMX}, place the symbol \texttt{?} after the symbols, with a
space as usual, for both the first and last note of the chord.

When doing that, you should remain aware of the fact that the wavy line
is generally understood as being played from the bottom up: lowest note
first, highest last.

\medskip
So far, so easy. There are, however, a few special cases to note:
\begin{enumerate}
  \item In an arpeggio, the wavy line often turns out to be crowded to
        the chord itself; this happens in particular when some of the
        chord notes have accidentals. In such cases one would want to
        move the arpeggio line away from the chord itself a bit, i.e.\
        to the left.
_{arpeggio!moving arpeggio line to the left}

        This is easily achieved by adding a \texttt{-} and an (unsigned)
        decimal number, without spaces, to one of the \texttt{?}
        designating the arpeggio --- it doesn't matter which one.
  \item Sometimes the composer may want to have the arpeggio played in a
        more virtuose way (on string instruments, in particular): the
        first 2 -- or even 3! -- of the chord notes simultaneously, as a
        double (or triple) stop, then the other chord notes as a true
        arpeggio.

        \medskip
        This can be done easily in {\PMX}: simply place the first
        \texttt{?} not after the starting chord note, but later, after
        one of the \verb#z...# notes.

        In this case is is even more important to remember the standard meaning
        of the wavy line in musical language that was just
        pointed out! So in general, it is best to stick with the order of
        the chord notes ``bottom to top'' unless you really know what
        you are doing.
  \item In piano music, it is quite common that an arpeggio is meant to
        go across the chords of both hands. This also is easily
_{arpeggio!across staves}
        implemented in {\PMX}\,%
        \footnote{To my knowledge, this feature of {\PMX} (available
                  from Version 2.503 on) has not been explicitly
                  documented in the official {\PMX} documentation.
                  I am very grateful to Andr‚ van Ryckeghem for drawing
                  our attention to this feature in one of his
                  contibutions to the WIMA ``Tips \& Tricks'' WEB page.
                 }:
        simply place the first \texttt{?} at the start of the left-hand
        chord and the second one \emph{at the end of the
        right-hand chord} --- as common sense would suggest!
\end{enumerate}

\bigskip\noindent
To see all this in examples, look at how the chords in
Fig.~\ref{fig:chords} were coded. When comparing this figure with its
code it should become obvious that care is called for when
producing chords with accidentals, and arpeggios in particular: some of
the chords in bars 1 and 2 look ugly, to say the least, and the arpeggio
line in bar 3 as well as the first one in bar 4 seem to be downright
violations of the standards of good typesetting practice.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/chords.eps}   \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
% bars 1-3:
e22f zgn zb  zef |
dn2- zbn+ zen    |
dn4- zbn<1.5+ zen dn- zbnA<1.5+ zen X4 /
b24  zdf zef zgn |
bn2- ? zen  zgs    |
bn4- zen<1.5  zgs ? bn- zen<1.5   zgs X4 /

% bar 4:
f8- ? za  zc zf gd4f- zb zdf zgfd+0.5+2 /
cd4-  zef zf za ? d8f- zgf zb zdf /

% bar 5:
c4sAo ? zgs zes zbn ? X2 bn4 zes ? zgs zcs ?-2.9 Rb /
es2-u zgs zcs /
\end{verbatim}
\end{minipage}
	\end{center}
	\caption{Chords}
	\label{fig:chords}
\end{figure}

\subsection{Grace notes}  \label{sec:graces}
_{grace notes} _{notes!grace notes}

A grace note symbol starts with a \texttt{G}.  It is entered in its
natural order, i.e.\ before the main note symbol for a normal grace,
behind the main note symbol for an after-grace . After
\texttt{G} comes any combination of the following options:

\begin{itemize}
   \item A single digit representing the number of notes\,%
         \footnote{The \emph{maximum} number of notes in a grace is not
                   fixed, but depends on circumstances
                   (cf.~Section~\ref{sec:limits}); but up to 16 is
                   usually safe.
                  }
         in the grace. The default is 1 .
   \item \texttt{m} (for \texttt{m}ultiplicity) and a digit,
         representing the number of flags or beams. The default is 1; 0 is
         allowed.
   \item
_{slurs!in grace notes} _{grace notes!slurs|see{slurs, in grace notes}}
         \texttt{s} (for \texttt{s}lur): this joins all notes of the
         grace to the main note. No \texttt{s} is needed in the main
         note symbol.
   \item \texttt{x} for a slash (only for single graces),
   \item \texttt{l} or \texttt{u} to force the direction of the stem(s)
         as desired.
\end{itemize}
Next comes the only required character, the first grace-note name.  No
time value must be entered, but, if needed, an octave (relative or
explicit) 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.

\medskip
_{grace notes!`after'-grace}
`After'-graces (graces coming \emph{after} a main note) are entered
similarily to normal graces, with the same parameters as above; but in
addtion to the other parameters either an \texttt{A} (for
\textbf{A}fter) or \texttt{W} (for \textbf{W}ay-after) is entered,
before the grace note(s).

After-grace symbols associate the grace note(s) with the \emph{prior}
main note and are therefore entered \emph{after} the main note symbol.

\medskip
By default, {\PMX} will place graces or after-graces \emph{immediately}
before or after the main note, way-afters as far to the 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.

_{grace notes!added space}
For a grace (\emph{not for an `after'-grace}), you can, if necessary,
add some space between the grace and the main note by inserting an
\texttt{X} followed by a unsigned decimal in the grace symbol\,%
\footnote{It doesn't matter where you insert this shift symbol, as long
          as it makes syntactical sense; to state this more simply: the
          \texttt{X}[\emph{n}] may \emph{not be inserted before a
          number} and \emph{not after the leading note} of the grace.

          \noindent
          This added space for a grace is indeed essentially a hard
          space, so that
_{spacing!hard space in grace}
          its name,
          \texttt{X} , is quite appropriate. And, as with almost all
          such cases, it is wise to keep in mind that `hard spaces' are
          what their name implies: a hard -- or brutal, if you will --
          last resort if nothing else seems to help. Used unwisely,
          adding a hard space to a grace is liable to produce rather
          ugly results, as is exemplified in Fig.~\ref{fig:grace}.
         }.

\medskip
Examples for grace notes are displayed in Fig.~\ref{fig:grace}.

\begin{figure}[!htb]
   \begin{center}
      \includegraphics[scale=.82]{eps/grace.eps}    \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
w150m
Abepl
\\nobarnumbers\
%
% Bar 1
G3sm2g++ a b c4 f- G2slAe d c GsX1xb+ c /
% Bar 2
Ga- g4 Gfs- g c G13sm3X3d e f g a b c d e f g a b c /
% Bar 3
c2- G3slWb a b c2 of Rb /
%
\end{verbatim}
\end{minipage}
   \end{center}
   \caption{Grace Notes}    \label{fig:grace}
\noindent
------------------------------------------------------------------------------------
\end{figure}

\subsection{Ornaments}  \label{sec:ornaments}
_{ornaments}

Symbols for ornaments are entered \emph{after} their associated note
symbol, separated, as usual, by a space\,%
\footnote{The ornament, although associated with a specific note, is
          considered a separate \PMX\ symbol.
         }.

The ornaments available in \PMX\ are listed in Table~\ref{tab:Ornamenti}
and are illustrated in Fig.~\ref{fig:ornament}.

\begin{table}[htbp]
_{breath} _{caesura} _{fermata} _{mordent} _{ornaments} _{pizzicato}
_{segno} _{shake} _{staccato} _{trill} _{accidentals!editorial}
_{accidentals!dubious} _{notes!dubious}
\begin{center}
\begin{tabular}{|p{5.0cm}|p{4.0cm\tt}|}
 \hline
   staccato                  & o.          \\ \hline
   tenuto                    & o\_         \\ \hline
   accent                    & o>          \\ \hline
   sforzando                 & o\^\        \\ \hline
   pizzicato                 & ou          \\ \hline
   spiccato                  & op          \\ \hline
   $\times$                  & ox          \\ \hline
   $+$                       & o+          \\ \hline
   caesura${\,}^\dag$        & oc          \\ \hline
   breath${\,}^\dag$         & ob          \\ \hline
   upper fermata             & of          \\ \hline
   lower fermata             & ofd         \\ \hline
   shake                     & ot          \\ \hline
   mordent                   & om          \\ \hline
   mordent [right parenthesis before notehead]
                             & o)          \\ \hline
   appogiatura [left parenthesis before notehead]
                             & o(          \\ \hline
   trill${\,}^\dag$          & oT\emph{x}  \\ \hline
   implicit trill${\,}^\dag$ & oTt\emph{x} \\ \hline
   segno${\,}^\dag$          & og\emph{x}  \\ \hline
\end{tabular}

   \smallskip
   \begin{tabular}{|p{5.0cm}|p{4.0cm\tt}|}
   \multicolumn{2}{c}{editorial marks:}                   \\ \hline
   editorial accidentals     & oes oef oen                \\ \hline
   dubious accidental        & oes? oef? oen?             \\ \hline
   dubious note              & oe?                        \\ \hline
   \end{tabular}

   \smallskip
   \begin{tabular}{p{5.0cm}p{4.0cm\tt}}
   ornament repetition${\,}^\dag$
                             & :                          \\
   \end{tabular}
   \end{center}
   ${}^\dag$  See explanation in main text
   \caption{Ornaments} \label{tab:Ornamenti}
   \end{table}

\begin{figure}[!htb]
   \begin{center}
      \includegraphics[scale=.82]{eps/ornament.eps}
    \end{center}
    \caption{Ornaments}
    \label{fig:ornament}
\end{figure}

All except the staccato, tenuto, down fermata and parentheses will
appear above the staff; staccato\,%
\footnote{In fact, the only difference between staccato and pizzicato is
          the vertical positioning of the dot.
         }
and tenuto appear just above or below the note head, depending on the
stem direction, the parentheses at the level of the note head, of
course.

\medskip
The trill and segno symbol are special in that they may have additional
optional characters. Either trill symbol may include a decimal number to
specify the length of the wavy line indicating the duration of trilling,
in \verb#\noteskip#s . The default is 1 . Thus \texttt{oT0} will be a
\emph{tr} without any wavy line, and \texttt{oTt2} is a wavy line
of 2 \verb#\noteskip#s without any \emph{tr} symbol starting the wavy
line.

\medskip
A segno may only be entered 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 staff of the system.

\bigskip
_{ornaments!repeated}
Once the ornament type has been specified, most ornaments can be raised
or lowered from their default position by appending a signed integer to
the symbol, giving the vertical offset in \verb#\internote#s. Caesura
and breath may in addition have a signed number, giving the horizontal
shift from default in notehead widths. These two ornaments also differ
from the others in their default horizontal position, which is $0.5$
\verb#noteskip# past the note.

\medskip
An ornament can be automatically repeated on a series of consecutive
notes, provided the notes are all in the same input block. To activate
this feature, terminate the first ornament symbol with \texttt{:} . Then
every note in that voice will have the same ornament until a
note is followed by the repeat terminator \texttt{o:} .

\subsection{Beams}    \label{sec:beams}
_{beaming}

_{beaming!forced}  _{beaming!inhibited}
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 \emph{multiplicity} (the number of
bars along the top or bottom). However, one may define a \emph{forced}
beam -- which overrides {\PMX}'s selection of which notes are beamed
together -- by surrounding the included notes with \texttt{[} and
\texttt{]}, being certain to separate these beam symbols: \texttt{[} and
\texttt{]} and their options, from the included note symbols with
spaces. Conversely, if {\PMX}'s selection is to beam notes, and you want
to inhibit this for a single note, add the option \texttt{a} to the note
symbol (cf.~Section~\ref{sec:otherparams}).

\bigskip
One may also wish to edit certain features of a beam even when {\PMX}'s
grouping decision would otherwise be acceptable; this is done by adding
some parameters to \texttt{[} and \texttt{]} :

_{beaming!parameters}
\medskip
The \texttt{[} can be followed, without space, by one or several of the
following options:

\begin{itemize}
  \item \texttt{u}, \texttt{l} or \texttt{f} will override {\PMX}'s
        selection of the direction of the beam:
        \begin{itemize}
          \item \texttt{u} makes the beam go \emph{above} the noteheads
                (\textbf{u}pper beam),
          \item \texttt{l} makes the beam go \emph{below} the noteheads
                (\textbf{l}ower beam), while
          \item \texttt{f} will \textbf{f}lip the beam from whatever
                \PMX\ would do automatically;
         \end{itemize}
   \item \texttt{h} forces the beam to be \textbf{h}orizontal;
   \item \texttt{m} followed by a single digit (1, 2, 3 or 4) forces the
         \textbf{m}ultiplicity of the beam;
   \item\texttt{j} \textbf{j}oins a beam grouping to a prior one started
         in another staff (cf.\ p.~\pageref{p:jumpbeam}).
\end{itemize}

The beam symbol constructed so far can be followed, without space, by
one, two or three consecutive integers, each preceded with \texttt{+} or
\texttt{-} :

\vspace*{-2ex}
   \begin{enumerate}
     \item first is an adjustment of the starting height, which
           thus determines the stem length of the first beamed
           note. It is given in \verb#\internote#s and may range
           from -30 to 30,
     \item the second is a slope adjustment (again in the range
           from -30 to 30),
     \item The third is an additional adjustment to the starting
           height, given in units of the beam thickness. It may
           range from 1 to 3 only. It always acts to
           \emph{increases} the stem length. This would only be
           used in rare cases, e.g.~to align consecutive
           horizontal beams which have internal multiplicity
           changes. An example is shown in Fig.~\ref{fig:beams}, bar
           \emph{f}.
     \end{enumerate}
Note that for technical reasons all three integers must always be given
\emph{with a sign} (even the last one, although it always is positive).
Note also that, since the meaning of these numbers is interpreted by
\PMX\ in their sequence, if you need only the second or only the third
number you \emph{must not omit} the preceding number(s), but rather give
explicit \texttt{0}'s for them.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/beams.eps}  \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
% Bar a:
f1s c f a c fs a c- b g+ b g [l+12-8 b-- g1++ b g ] Rd /
% Bar b:
[l f1s- c f a ] [u c fs a c- ] [f b g+ b g ] [ b-- g1++ b g ] Rd /
% Bar c:
[m4 f1s- c f a ] [m1 c fs a c- ] b g+ b g [h b-- g1++ b g ] Rd /
% Bar d:
[ f1s- c f a ][ c fs a c- ] [ b g+ b g ]-[ b-- g1++ b g ] Rd /
% Bar e:
[ fs-4x3nf c a+ c1 fs a c- ] b g+ b g b-- g1++ b g Rd /
% Bar f:
m3434
cd84 c3 c6 c [+0+0+3 cd8 c3 c6 c ] [-1+0+3 cd8 c3 c6 c ] Rd /
%
\end{verbatim}
\end{minipage}
	\end{center}

        \vspace*{-4ex}
	\caption{Beams}
	\label{fig:beams}
\end{figure}

\bigskip
Here are some further possibilities regarding beaming:
\begin{itemize}
  \item
_{xtuplet!beamed with other notes} _{beaming!in xtuplet}
        By default, xtuplets (cf.~Section~\ref{sec: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.
  \item
_{beaming!rest within beamed notes} _{rest!in beam}
        Rests may also be included within forced beams, provided they
        are shorter than quarter rests, and of course that they come
        \emph{between} the first and last notes under the beam.
  \item
_{beaming!beamed groupings}
        Sometimes one may wish to define beamed groupings with subgroups
        joined by a single beam. The symbol \texttt{][} , standing alone
        between two note symbols inside a forced beam, causes the
        multiplicity to decrease to unity and immediately increase to
        its natural value for the next note. An example of this, as well
        as the beaming together with an xtuplet, can be seen in bar 2 of
        the trombone voice of Fig.~\ref{fig:agon}~: the two
        doubly-beamed groups connected by a single beam are generated by
        \texttt{[ c15 c c ][ c c cx3 c c ]} .
  \item
_{beaming!single-slope beam}
        Related to this is a
        \emph{single-slope beam group}, which is the same as described
        in the previous item except that there is no connecting  beam
        between the beamed subgroups. For this option, the beamed
        subgroups are separated by \texttt{]-[} standing alone between
        two notes inside the forced beam.
  \item
_{beaming!large jumps} _{beaming!up/down beams}
        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:
        \begin{enumerate}
           \item 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\,%
                 \footnote{This is due to a fundamental technical
                           limitation of \MusiXTeX.
                          },
           \item for proper appearance in crowded scores you may wish to
                 insert hardspace or shifts as described in
                 Section~\ref{sec:spacing}.
        \end{enumerate}
        \pagebreak
  \item
_{beaming!staff-jumping}  \label{p:jumpbeam}
        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 \texttt{]j} . Then resume the beam in
        the other voice on a neighboring staff with \texttt{[j}, ending
        that part with the normal \texttt{]} . For staff-jumping beams,
        it's OK to have just a single note inside one or both of the
        partial beams. Each voice must, however, still have the right
        number of beats, so you will probably need to adjust the
        durations with blank rests after the first members of the beam
        and before the second.

        \smallskip
        With staff-jumping beams, some adjustment of the beam height and
        slope will usually be required. Also, sometimes the up/down-ness
        of the ending section must be overridden; you will know that
        this is necessary if on your first try the ending is shifted
        horizontally from the desired position. These editing commands
        may sometimes produce unexpected results, and some iteration may
        be required to get exactly what you want.

        \medskip
        An example of a staff-jumping beam is seen in
        Fig.~\ref{fig:jumpbeam}.

  \item
_{beaming!automatic forced beams}  \label{p:autoforcedbeam}
        If the option : (colon) is appended to the starting symbol
        \texttt{[} for a forced beam, then henceforth beams of the same
        length will be force-beamed similarly in that line of music
        until the end of the input block. Within an input block, the
        automatic forced beaming can also be stopped explicitly by
        starting a new regular forced beam.

        \begin{quote} But remember that {\PMX} is actually quite good at
          beaming notes in the manner a human musician would normally
          expect; so it will be necessary to use this facility only in
          the special cases when you want (or need) beaming different
          from what {\PMX} provides on its own. In such cases, consider
          this beaming automatism  as a kind of shorthand; as such, it
          will be really worth your while only when you want to repeat
          the same `non-orthodox' beaming an appreciable number of
          times. \end{quote} Regarding automatic forced beaming, you
          should also be aware of the following features:

          \begin{enumerate} \item As with regular beams, you can have
             notes of different durations beamed together in an
             automatic forced beam. The rule in that case is: in th e
             beams following the initial one, the next sequence(s) of
             notes with the \emph{same total duration time} as that of
             the notes beamed together initially will then be beamed
             together automatically. As usual, notes given without
             duration will `inherit' their durations from the most
             recent note with an explicit duration. All this is best
             seen in the following example:
             \begin{center}
             \includegraphics[scale=.82]{eps/autobeam} \qquad ,
             \end{center} which is coded as follows:
             \begin{verbatim}
                 d85 e   b a1 b c1 b a8
              [  d85 e ] b a1 b c1 b a8
              [: d85 e ] b a1 b c1 b a8
                 d85 e   b a1 b c1 b a8 /
                 g2d /
             \end{verbatim}

                Note how the automatic beaming ends at the end of the
                first input block. Leaving out the slash at the end of
                the fourth line would create havoc, because a full note
                cannot be beamed. But no slash is needed
                between the code for the first three bars.

          \item {\PMX} will never produce beams across bar
_{beams!forced across bar lines}
                lines. However, a somewhat fortuitous exception of this
                general feature of {\PMX} are staff-jumping beams, and a
                specific example of this can be seen in
                Fig.~\ref{fig:jumpbeam}. This is \emph{not an intended
                feature}, and its intentional use is not encouraged.

                \medskip
                A fortiori {\PMX} does not allow automatic
                \emph{forced-beaming} across bar lines. Any attempt to
                try that will always result in a {\PMX} error stop.
                Thus, if your automatic forced-beam pattern would cause
                a beam to cross a bar line, you have to terminate the
                automatic beaming properly before the end of the bar, or
                {\PMX} will stop with an error.
        \end{enumerate}
\end{itemize}

\begin{figure}[!htb]
\begin{center}
   \includegraphics[scale=.82]{eps/jumpbeam.eps}   \\[2ex]
        ------------------------------------------
\begin{minipage}{360pt}
\small
\begin{verbatim}
r4 | [ c8-- e c+ e c+ e- c a+ ]j stl | ald2 st ze ze+ r4 Rb /
c4+ zc+ su | bdf2 zbf- a4+ s za- | [ju c8- a+ c e ] c+ r+0 c4 zc- //
rb4 | er0+ | rb0 /
%
\end{verbatim}
\end{minipage}
\end{center}
\caption{An extraordinary staff-jumping beam} \label{fig:jumpbeam}
\end{figure}

\bigskip
Some further examples of beaming and their {\PMX} coding are given in
Fig.~\ref{fig:beams}.

\subsection{Slurs and Ties} \label{sec:psslurs}
_{slurs} _{ties|see{psslurs}}

\subsubsection*{Pick a package} \label{sec:postscriptpackages}
\addcontentsline{toc}{subsubsection}{Pick a package}
_{dynamic marks!hairpin!length limit} _{hairpins|see{dynamic marks}}

By default \PMX\ will use \MusiXTeX's built-in, font-based slurs and
hairpins (crescendi and diminuendi, see Section~\ref{sec:dynamics},
p.~\pageref{p:dynamics} ff). To use these, you don't have to install any
more software. But they do have drawbacks: the fonts used by {MusixTeX}
for font-based slurs  come in fixed sizes and shapes and are therefore
often not flexible enough in complicated situations. In contrast, slurs
and hairpins produced with the help of the PostScript language overcome
many of the shortcomings of their font-based counterparts.

_{slurs!PostScript} _{PostScript!slurs, ties and hairpins}
There are two independent ``third-party'' packages that provide
{\MusiXTeX} and {\PMX} users with PostScript-based slurs, ties, and
hairpins:
\begin{description}
   \item[\emph{Type K} --] \label{sec:pss-K}
_{Kneifl, Stanislav}
         This package was written by \textbf{Stanislav Kneifl}. It is
         directly supported by \PMX\ and will be the focus of any future
         \PMX\ enhancements. Detailed instructions for its use are given
         in the corresponding paragraph below.
   \item[\emph{Type M} --]
_{Morimoto, Hiroaki}
         This package, by \textbf{Hiroaki Morimoto}, is somewhat more
         flexible when used directly in {\MusiXTeX}, but it requires
         the \textbf{Metapost} package to be installed in the {\TeX}
         installation. These are not directly supported by {\PMX}, but
         are advertised to be fully compatible with {\MusiXTeX}'s
         default font-based slurs. From {\PMX}'s standpoint they are not
         different from font-based slurs, and the same options and
         features that apply to font-based slurs should apply as well to
         these.
\end{description}

Both PostScript slur packages provide excellent slurs, ties and
crescendi. \label{p:usepsslurs} In fact, for simple slurs, you can
hardly discern the differences between the three possibilities, as can
be seen in Fig.~\ref{fig:psslurs1} --- although type M slurs are generally
somewhat flatter, indeed. On the other hand, for steep and long slurs,
the difference is appreciable, as can be seen in the example of
Fig.~\ref{fig:psslurs2}.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/cslurs1n.eps}

           \includegraphics[scale=.82]{eps/cslurs1k.eps}

           \includegraphics[scale=.82]{eps/cslurs1m.eps}
	\end{center}
	\caption{Three realizations of simple slurs}
	\label{fig:psslurs1}
\end{figure}

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/cslurs2n.eps}

           \includegraphics[scale=.82]{eps/cslurs2k.eps}

           \includegraphics[scale=.82]{eps/cslurs2m.eps}
	\end{center}
	\caption{Three realizations of exotic slurs}
	\label{fig:psslurs2}
\end{figure}

\bigskip
Here are some additional factors to consider when deciding which type of
slurs and hairpins to use with {\PMX}:
\begin{itemize}
  \item True ties, which are shaped differently from slurs, are only
        available with Type K\,%
        \footnote{In {\MusiXTeX}, font-based
                  true ties are actually available; but they were never
                  incorporated in {\PMX}, now being superceded by type K
                  slurs.
                 }. In all cases, the starting and ending
        positions are different for ties and slurs\,%
        \footnote{The ends of an ordinary slur are centered horizontally
                  above or below the notehead, while tie ends are
                  shifted inboard and closer to the midheight of the
                  notehead.
                 }.
  \item Font-based hairpins cannot wrap over a line break, but the
        PostScript ones can.
  \item Font-based hairpins cannot be longer than 68 mm.
  \item With either postscript package, the resulting markings do not
        show up on the screen if you view the score with one of the
        commonly used DVI viewers such as \textbf{XDVI} or \textbf{YAP}.
        To see them, you have to first produce a PostScript file from
        the \texttt{dvi} file (using, for example, \textbf{dvips}), which
        you can then view on the screen and print on your printer using
        \textbf{Ghostview} or some other such program. But if you use
        Type 1 PostScript fonts, as was recommended in
        Section~\ref{sec:psslurs}, you will have all this software at
        hand anyway!
_{PostScript!fonts}
\end{itemize}

Detailed instructions for installing the Type K or Type M packages are
given in Section~\ref{sec:pss-K} .

\subsubsection{General slur usage}
_{slurs!general usage}

This subsection explains commands that apply to all types of slurs,
followed by separate subsections describing operational features
specific to either font-based or Type K slurs, and finally a subsection
on the use of Type M slurs.

\medskip
Here are the {\PMX} symbols that normally define slurs or ties, except
for slurs to or from graces\,%
\footnote{Recall that the slurring of grace notes is defined
          entirely within the the grace symbol, as described in
          Section~\ref{sec:graces}.
         }:
\begin{itemize}
   \item An opening parenthesis, `\texttt{(}', begins a slur, and a
         closing parenthesis, `\texttt{)}', ends it; similarly, an
         opening brace, `\verb#{#', begins a tie, and a closing brace,
         `\verb#}#', ends it.   The opening parenthesis/brace is placed
         \emph{before} the first note, and the closing parenthesis/brace
         \emph{after} the last note of the slur or tie. As always, these
         symbols (including options, see below) are separated from notes
         and other symbols by spaces.
         \footnote{Braces -- and similarly the tie toggles described
                   subsequently -- , although legal with all types of
                   slur, are really useful only with Type-K slurs, since
                   only with these they will produce a true tie.
                  }
         \item Alternatively to parentheses, you can use the letter
               \texttt{s} (for \textbf{s}lur) both to begin \emph{and}
               end a slur; but these come \emph{after} both the
               beginning \emph{and} ending note. This is thus a
               \emph{toggle}, turning a slur off if it's on, and
               starting a new one otherwise.

               For ties (instead of slurs), use the letter
               \texttt{t} (for \textbf{t}ie), also a toggle.
               \label{p:tslur}
\end{itemize}

Note that slurs or ties may end on a rest\,%
\footnote{If you happen to think that this would be musically
          meaningless, you are wrong. Just watch a really good pianist
          (or conductor, for that matter) ending a piece, say in pp. It
          ain't over until the fat lady has really finished singing:
          until she is really \emph{completely} \emph{done} with taking
          her hands off the keyboard! In other words: she visibly (and
          audibly!!) plays the slur over the final rest.
         },
but they may \emph{not start} on one.
_{slur!ending on rest} _{tie!ending on rest}
The default ending height of the
tie (or slur) in that case will be that of the note on which it started
(in other words, it will be horizontal); but you can vary that
explicitly in the usual way.

\bigskip
Often you need to open a slur or tie while another one is already open
\emph{in the same voice}, e.g., with tied chords, or if a second slur
connects a subgroup of notes within a longer slur. In such cases, {\PMX}
needs to be told which slur is which. For this purpose, the slur opening
character [ \texttt{s}, \texttt{t}, \texttt{(} ] can
optionally be followed by a single-character ID code [ \texttt{0-9},
\texttt{A-Z} ] to identify that particular slur. To close that slur,
insert the ID code right after the corresponding \emph{closing}
character [ \texttt{s}, \texttt{t}, \texttt{)} ]. If an ID code is
used, it \emph{must} be the second character in the symbol. You cannot
use any ID that is already in use on a slur or tie for a new slur or
tie. See Fig.~\ref{fig:bloch} for an example\,%
\footnote{The example uses Type K slurs.
         }.

\begin{figure}[!htb]
\begin{center}
   \includegraphics[scale=.82]{eps/bloch.eps}  \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
Ap
% Bar 25:
(A e4x3n g bff cf4x3n b g )A (B e4x3n bf e /
f8+ (C zf+ e- ze+ c4nc- zcnc+ (Dtl b- D< (Et zb+ /
% Bar 26:
g4x3n an g e4x3n b e g4x3n a g )Bh Rb /
b4- )Dt D< zb+ )Et )C dd4- D< (F+1 zd+ o_ e8- D< ze+ )F /
%
\end{verbatim}
\end{minipage}
\end{center}

  \vspace*{-3ex}
\caption{\textbf{E.\ Bloch}, \emph{Waves} (\emph{Poems of the Sea} I),
         bars 25,26
        }    \label{fig:bloch}
\end{figure}

\bigskip
Normally, you can leave further details of slur appearance to {\PMX};
the result will usually satisfy. If not, you can change some features
manually by additional options which go right after the initial character
and any ID code, as usual \emph{without} a space,:

\begin{itemize}
_{slurs!additional options}
   \item The default vertical position above or below the note heads
         can be overridden with
         \begin{itemize}
            \item \texttt{u} (\textbf{u}pper),
            \item \texttt{l} (\textbf{l}ower) or, equivalently,
                  \texttt{d} (\textbf{d}own).
         \end{itemize}
   \item The starting or ending point can be shifted from its
         default by entering one or two explicitly signed numbers: the
         first, which must be an integer, gives the vertical shift, in
         \verb#\internote#s; the second, which may be decimal, the
         horizontal offset, in notehead widths.
   \item A dotted slur is obtained by adding the option \texttt{b} (for
         \textbf{b}roken) in the symbol that starts the slur
         (cf.~Fig.~\ref{fig:dottedslur}).
\end{itemize}
\begin{figure}[!htb]
\begin{center}
   \includegraphics[scale=.82]{eps/dottedslur.eps}  \\[2ex]
\begin{minipage}{380pt}
       \small
       \begin{verbatim}
        ( g44 c ) (b [ e8 d c b ] ) | (u a4 f ) g2 Rb /
       \end{verbatim}
\end{minipage}
\end{center}

  \vspace*{-3ex}
  \caption{A dotted slur}   \label{fig:dottedslur}
\end{figure}

\paragraph{Slurs for staff-jumping beams} \text{} \\[-2ex]
_{slurs!with staff-jumping beam}

Often -- in piano music in particular -- when you have a staff-jumping beam
(cf.~p.\pageref{p:jumpbeam}), you may want to join the two parts by a
slur as well. {\PMX} will, however, get very confused if you try to put
the beginning slur symbol in one staff and the corresponding ending
symbol in a different staff; both slur symbols \emph{must always be in
the same staff}. The solution is to put the ending slur symbol after
the invisible rest; but do so carefully: even though the invisible rests are
indeed invisible, {\PMX} accounts for the horizontal space it would need
for visible rests, and that determines the length of the slur. So if you
want to avoid awkwardly adjusting the length of the slur by hand, you
should subdivide the invisible rest appropriately so that one part of it
will be at the note of the other staff where you want the slur to end.
The vertical position of the slur end will have to be done manually.
Fig.~\ref{fig:jumpslur} shows an example.

\begin{figure}[!htb]
\begin{center}
   \includegraphics[scale=.82]{eps/jumpslur.eps}  \\[2ex]
\begin{minipage}{380pt}
       \small
       \begin{verbatim}
r4b  [j b1 a g f ] r4b  [j c14 b a g ]                     | Rb /
( [ f1 e d D"what you want"-22 c ]j r1b r1b r1b r1b )-15
( [ g14 f e D"what you don't want"-22 d ]j r4b      )-15   |    /
       \end{verbatim}
\end{minipage}
\end{center}
  \caption{Placing the slur ending with a staff-jumping beam}
            \label{fig:jumpslur}
\end{figure}

\subsubsection{Invoking and using Type K slurs}  \label{sec:pss-typeK}
_{slurs!Type K usage} _{PostScript!slurs, ties and hairpins}

To activate the Type K package, all you need to do is to add a line in
the header of the {\PMX} source after the preamble, containing the
symbol \texttt{Ap}\,%
\footnote{For further details on the use of \texttt{A} see
          Section~\ref{sec:A} .
         }.

\bigskip
For type K slurs, some optional parameters can be used in the slur
symbol to change the shape of the slur:
\begin{itemize}
_{slurs!additional options}
   \item an \texttt{f} (for \textbf{f}latter) will flatten the slur a
         bit, while
   \item \texttt{h, H} or \texttt{HH} (for \textbf{h}igher) will
         increase the slur's curvature by increasing degrees, thereby
         raising (or lowering) its middle.
\end{itemize}
These parameters can be used in either the starting or the ending slur
symbol. They \emph{do not work with ties}, i.e.\ with symbol \texttt{t},
and {\PMX} will complain if you try that. Examples are given in
Fig.~\ref{fig:kslurs}.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/kslurs1.eps}

           \includegraphics[scale=.82]{eps/kslurs2.eps}
	\end{center}
	\caption{Shape variations in type K slurs}
	\label{fig:kslurs}
\end{figure}

\medskip
The Type K package contains {\TeX} macros that activate or deactivate an
automatic vertical adjustment of slurs or ties to avoid tangencies with
staff lines. In {\PMX} these adjustments are switched off by default,
because they may alter the endpoint positions from what you would
normally expect. However, if you wish to use them, they may be switched
on or off globally at the start of any input block, and locally with
options to individual slur or tie commands.

To activate these adjustments globally (or deactivate, if previously
activated), at the beginning of any input block enter \texttt{Ap+s} (or
\texttt{Ap-s}) for slurs, and \texttt{Ap+t} or (\texttt{Ap-t}) for ties.
To activate them for one-time use only, simply include \texttt{p+t} or
\texttt{p+s} as an option in the symbol for the affected slur or tie. No
deactivation is then needed.

You can also sequentially increase (\texttt{Ap+c}) or decrease
(\texttt{Ap-c}) the default curvature of slurs or ties (again at the
beginning of any input block), so that the result is cumulative. But
after the cumulative change has reached ``HH'' or ``ff'', it will remain
there, and nothing more will happen.

An example is given in Fig.~\ref{fig:kslurtweaks}. The distinctions are
fairly subtle; but some would see the adjusted markings as more pleasing
since on close inspection they clearly avoid tangencies with staff
lines.

\begin{figure}[!htb]
\begin{center}
   \includegraphics[scale=1.0]{eps/kslurtweaks.eps}  \\[2ex]
\begin{minipage}{380pt}
       \small
       \begin{verbatim}
              Ap
              a44 s bu s | b s c s /
              Ap+s
              a4 s bu s | b s c s /
              %
              a4 t a t | b t b t /
              Ap+t
              a4 t a t | b t b t /
       \end{verbatim}
\end{minipage}
\end{center}
  \caption{Vertical tweaks of slurs and ties}   \label{fig:kslurtweaks}
\end{figure}

\paragraph{Line-break tie options} \text{} \\
_{line break!tie options} _{slurs!across line break}
There are two options that only affect ties that span line breaks:
\begin{enumerate}
   \item by default a full tie is drawn at the beginning of the second
         line in such cases. There is a global option, \texttt{Ap+h},
         which tells {\PMX} to use \emph{half ties} -- which are
         flattened at their left-hand ends -- on the second line, but
         \emph{only} in cases where the second tie segment is shorter
         than 15 pt. This option may be cancelled with \texttt{Ap-h} ,
   \item the second option -- which should not be used together with the
         first one! -- affects \emph{both} the first and second segments
         of linebreak slurs and ties. It is the global option
         ~\texttt{Apl}. It alters two defaults to give what some might
         consider an improved appearance: first, it causes the first
         segment to be drawn as a normal tie, whereas by default it has
         a different shape than a normal tie; second, it moves the
         starting point of the second segment a bit to the left.

         \medskip
         The \texttt{Apl} option has been enhanced since {\PMX}
                   version 2.411; the main new feature is that it now
                   works for slurs as well as for ties. Other
                   enhancements are more subtle; read the description of
                   these in the announcement text for version 2.411, given
                   here:
                   \begin{quotation}
                      ``\texttt{Apl} in the preamble now activates
                        special treatment of line-break slurs and ties
                        (before, \texttt{Apl} only affected ties.).

                      ``Specifically, it enables tweaking the ending
                        position of the first segment (seg 1), the
                        starting position of the second (seg 2), and the
                        curvature of either, or both. [You must have
                        musixps.tex available to {\TeX}!] With
                        \texttt{Apl} every slur/tie at a line break is
                        automagically broken into two separate ones (no
                        additional PMX slur start or ending commands are
                        required). Vertical/horizontal tweaks to the
                        start of the seg 1 and the end of seg 2 are
                        handled as before. Vertical/horizontal tweaks
                        for the end of the seg 1 and start of seg 2 are
                        entered as options in the otherwise normal
                        command that starts the slur/tie. The option for
                        the end of seg 1 starts with "s" (for sever or
                        split), then the usual one or two signed
                        numbers, then a second "s" and one or two more
                        signed numbers for the start of seg 2.

                      ``The usual curvature options \texttt{h},
                        \texttt{H}, \texttt{HH}, \texttt{f}, if included
                        in the starting command for a linebreak slur,
                        will apply to seg~1, and if in the closing
                        command, to seg~2. Of course, if the slur/tie
                        does not come at a linebreak, the special
                        position tweaks (those after the "s" option)
                        will all be ignored, and the curvature tweaks on
                        the closing note take precedence (as before).''
                   \end{quotation}
\end{enumerate}
\Note{Without either of these options, the second segment sometimes
      becomes too short to be clearly visible.
     }

\bigskip
The global options mentioned (and in fact any of the other global
options to be described later) can be combined into a single symbol,
e.g., \texttt{Ap+sl}.

\subsubsection{Use of Type M Slurs and Ties} \label{p:useMslurs}
_{slurs!Type M usage}  _{PostScript!slurs, ties and hairpins}

In contrast to the type K slurs, type M slurs are not explicitly
supported by {\PMX}; as a consequence, you have to do some things
manually. But it's not difficult:
\begin{itemize}
   \item
_{\textbf{musixpss}}
         The first step is to insert into the header of your {\PMX}
         source file the following line \\
         \text{\hspace*{10em}} \verb#\\input musixpss\relax\# \qquad .
    \item
To process a {\PMX} file with type M slurs, three extra steps are
needed to produce a printed musical score. Here is the full sequence of
processing steps, for a file named \verb#my_opus#:

\begin{center}
\begin{tabular}{r@{\qquad}ll@{\qquad\qquad}l}
       & command         &                & resulting new file(s)   \\  \hline
       &                 &                &                         \\
   0.  & text editor     &                & \verb#my_opus.pmx#      \\
   1.  & \verb#pmx#      & \verb#my_opus# & \verb#my_opus.tex#      \\
   2a. & \verb#tex#      & \verb#my_opus#
       & \verb#my_opus.mx1, my_opus.slu#                            \\
   2b. & \verb#musixflx# & \verb#my_opus# & \verb#my_opus.mx2#      \\
   2c. & \verb#tex#      & \verb#my_opus# & \verb#my_opus.dvi#      \\
   $\to$ 3a.
       & \verb#musixpss# & \verb#my_opus# &                         \\
   $\to$ 3b.
       & \verb#mpost#    & \verb#my_opus#
       & \verb#my_opus.mp, my_opus.1, #\dots                        \\
   $\to$ 3c.
       & \verb#tex#      & \verb#my_opus# & \verb#my_opus.dvi#      \\
   4a. & \verb#dvips#    & \verb#my_opus# & \verb#my_opus.ps#       \\
   4b. & \verb#gsview#   & \verb#my_opus#
       & \emph{screen view and printed output} \qquad .             \\
\end{tabular} \end{center}
\end{itemize}

\subsubsection{Special considerations for font-based slurs}
_{slurs!font-based}

You should study this section if you choose not to use Type K PostScript
slurs.

\medskip
The slur command \texttt{t} (cf.~p.\pageref{p:tslur}) has been retained
for backward compatibility with earlier {\PMX} versions. As already
mentioned, with font-based slurs it does \emph{not} provide a true tie
at all, and it doesn't alter the positions of the endpoints either; in
fact, it differs from \texttt{s} or \texttt{(} only in the following
ways:
\begin{itemize}
  \item ID codes cannot be used with font-based \texttt{t}-slurs.
  \item If a \texttt{t}-slur starts or ends on the same note as an
           \texttt{s}-slur, the former will be moved away from the
           notehead to avoid a collision. This only works if neither
           slur has an ID code.
\end{itemize}
The shape of font-based slurs can be changed with options to the
\texttt{s} or \texttt{)} command as follows:
\begin{itemize}
  \item at the slur termination only, you must first enter two signed
        numbers that define a position shift as described earlier. Enter
        a zero for either or both if you don't want the shift,
  \item next, enter a signed, nonzero integer which specifies a vertical
        adjustment to the mid-height of the slur in \verb#\internote#s,
  \item if you want to alter the starting or ending slope, enter a
        \texttt{:} (colon), then
        \begin{enumerate}
           \item a signed integer for the alteration to the starting
                 slope, then
           \item a signed integer for the alteration to the ending
                 slope.
        \end{enumerate}
\end{itemize}
These numbers are passed directly as arguments of the {\MusiXTeX} macros
\verb#\midslur# (if only one is given) or \verb#\curve# (if there are
three).

\bigskip
If you want to \emph{simulate a tie} with font-based slurs -- {PMX} does
not proved true ties with font-based slurs! -- include the option
\texttt{t} in both the starting and ending command for the slur\,%
\footnote{For reasons of backward compatibility, it is legal
          to specify a tie with the symbol \texttt{st} or \texttt{(t}
          even when PostScript ties are activated. In that case, these
          symbols are fully equivalent to simply using \texttt{t} .
         }.
This will draw a slur with altered endpoint positions.

\subsection{Dynamic Marks}     \label{sec:dynamics}
_{dynamic marks} _{D symbol@\texttt{D} symbol}

{\PMX} has a very simple tool for inserting virtually any dynamic mark
in a score. Its \texttt{D}ynamics symbol is a \texttt{D}, followed one
of 3 types of parameters, optionally followed by position shifts:
\begin{enumerate}
   \item \textbf{A standard dynamic mark :} this can be any one of the
         following:
         \texttt{pppp, ppp, pp, p, mp, mf, f, ff, fff, ffff, sfz, fp}.
   \item
_{dynamic marks!hairpin} _{crescendo|see{dynamic marks}}
_{decrescendo|see{dynamic marks}}
         \textbf{A crescendo/diminuendo :} \texttt{<} or \texttt{>}.
         These crescendo/decrescendo marks -- aptly named ``hairpins''--
         are \emph{toggles}, i.e.\ the first \texttt{D<} starts the
         crescendo, and the next \texttt{D<} ends it; similarily for
         \texttt{D>}.
   \item
_{dynamic marks!textual}
         \textbf{Arbitrary text :} \texttt{"\dots\"}, where \, \dots \,
         stands for any text string, e.g.~\texttt{D"}molto
         espressivo\texttt{"}.The text will be set in italics unless
         another \TeX-style font specification is included.
\end{enumerate}

All dynamics symbols go \emph{after} the note to which they refer (so
e.g.~\texttt{g Dpp} will write a pianissimo g). Hairpin marks
must be contained \emph{completely within the same input block}\,%
      \footnote{If need be (e.g.\ for crescendi/decrescendi across bar
                lines), you can adjust the position and length of a
                crescendo/decrescendo by adding position shifts as
                described.
               }

\Note{Since all dynamic marks go \emph{after} a note, a fortiori they
      should \emph{never come at the very beginning of an input block}.
      This is important to keep in mind because \PMX\ does not
      necessarily give an error message, but can produce rather strange
      results, often at remote places in your score (what Knuth calls `a
      weird error'), so the true source of the error may be hard to
      detect. You can usually get a hint that something went wrong if
      \PMX\ has produced a backup file of your source --- without any
      apparent reason!
     }

\medskip
The default position of any dynamic mark or text entered with the
\texttt{D} symbol is just below the notehead, stem end, or bottom staff
line, whichever of these is lowest. There are numerous context-sensitive
automagic adjustments to the positions of all the dynamics symbols. If
you don't like the result you can add position shifts to the dynamics
symbol: a signed integer for a vertical shift (in \verb#\internote#s),
then -- optionally -- another signed number for a horizontal shift (in
notehead widths).

\medskip

There can be a combination of dynamic marks at a single note\,%
\footnote{It doesn't make sense, of course, to have 2 different standard
          dynamic marks on the same note, and {\PMX} will complain if
          you try that.
         }.
Since these are distinct {\PMX} symbols, they must be separated by
spaces and must come in the right order, e.g.\
\begin{center}
[\emph{some notes}] \texttt{D<} [\emph{more notes}] \texttt{D< Dffff D>}
[\emph{more notes}] \texttt{D>}
\end{center}

\bigskip
If you aren't using PostScript slurs, there are some restrictions on
hairpins which are due to {\MusiXTeX}'s use of font-based hairpins: they
cannot be longer than 68mm, they cannot wrap over a system break, and
they must be horizontal. Finally, only certain specific lengths are
available, so some horizontal position tweaking may be needed,
especially when standard dynamic marks and hairpins are combined.
These restrictions don't apply when using one of the PostScript slur
packages; PostScript hairpins will then be used without any further
 \label{p:dynamics}
intervention\,%
\footnote{For details on invoking PostScript slurs, ties and hairpins
          cf.\ Section~\ref{sec:psslurs} ff.
         }.
Fig.~\ref{fig:dynamics} (a fragment from the \emph{Pathetique} by
Tschaikowsky) shows some examples\,%
\footnote{Fig.~\ref{fig:dynamics} was obtained using the PostScript slur
          package type K.
_{PostScript}
         }.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/pathetique.eps}  \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
% Bar 1
r2 D"Adagio"+16 r4 e8-- Dpp-1 D< s f D< D>-1 s /
% Bar 2
g4 D>-1 s f2 s D<-1 f8 s D<-1 Dp-1 g s D>-2 /
% Bar 3
a4 s D>-2 D<-2 g2 s D<-2 g8 s Dmp-1 D<-1 a s /
% Bars 3-4
b4 D<-1 D>-1 asd2 D>-1 D<-1 /
% Bars 5-6
b0 st D<-1 Dsfz-1 D>-1 | b8 st D>-1 Dp-1 r r4 r2 Rb /
%
\end{verbatim}
\end{minipage}
	\end{center}
	\caption{Dynamic marks}  \label{fig:dynamics}
\end{figure}

\subsection{Clef Changes}     \label{sec:clefs}
_{clefs!change} _{C symbol@\texttt{C} symbol}

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/clefchg.eps}  \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
2 1 4 4 0 6 0 3
1 1 20 0

bt
./
Ap
w180m
%
a12 sh c e  a e a c e sh
Ct f s g a f g a b g s   Rd /
a25 sh f4 d sh              /
%
\end{verbatim}
\end{minipage}
	\end{center}
	\caption{A clef change}  \label{fig:clefchange}
\end{figure}

As was noted in Section~\ref{sec:preamble}, the clef for each instrument
is given in the preamble (cf.~p.~\pageref{p:clefs}). A clef change in
mid-stream, however -- frequently occurring in piano music --, is
signaled by a \texttt{C} followed by a single lower-case letter, as
illustrated in Fig.~\ref{fig:clefchange}.

\bigskip
_{clefs!change with two voices in a staff}
When there are two voices in a staff, the clef change command must be
given in the \emph{first (lower) voice}; if it is entered in the second
voice, {PMX} will \emph{silently disregard} the clef change completely.
The clef change holds for all voices in a staff, of course.

\medskip
A logical effect is worth mentioning: when, before the clef
change, there is a note the duration of which extends beyond
the point of the clef change, its clef does not change.
Fig.~\ref{fig:clefchgtwo} shows an example of such a situation.
\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/clefchg2.eps}  \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
c43u Ct a44u cu au  //
f02 /
Cb rb4 Ct e4u au eu //
c23l r2-6 /
%
\end{verbatim}
\end{minipage}
	\end{center}
	\caption{A clef change in a staff with 2 voices}
	      \label{fig:clefchgtwo}
\end{figure}


\subsection{Octaviation} \label{sec:octaviation}
_{octaviation}

When in a voice the pitch of a number of notes extends far beyond the
staff, resulting in an excessive number of ledger lines, readability is
usually improved by using an `octaviation' notation: an
horizontal line above the staff, starting with an ``\emph{8}'' or
``\emph{8va}'', indicates that the notes under this line are to be
played an octave higher than printed, and similarily ``\emph{8 bassa}''
or ``\emph{8va bassa}'' indicate an octave lower.

\medskip
In the present version, {\PMX} does not provide a notation for this, so
you will have to take recourse to inline {\TeX} coding. For an example
see Section~\ref{sec:tricks}.


\subsection{Figured bass (basso continuo)}  \label{sec:bassocontinuo}
_{figured bass} _{basso continuo|see{figured bass}}

{\PMX} lets you introduce the basso continuo notation (`figured bass')
very simply, as illustrated in the example of Fig.~\ref{fig:poppea}, which
is the basso continuo of an excerpt of the famous aria ``\emph{Pur ti
miro}'' that concludes the Monteverdi opera \emph{L'Incoronazione di
Poppea}. Here are the rules:

\begin{itemize}
   \item Figure symbols are entered -- as plain numbers\,%
         \footnote{As of {\PMX} version 2.520, the numbers usually
                   needed in figured notation, namely 2, 4, 5, 6 and 9,
                   are available in a different graphic design with
                   perhaps a more baroque-like look.

                   If you want to use these, add an `\texttt{s}' after
                   the {\PMX} string of every figure which you want to
                   appear in that form.

                   Note that for this to work properly, you must have
                   the special fonts for these numbers installed. You
                   will find \texttt{figbas.zip}, which provides these
                   fonts, in the
                   \href{http://icking-music-archive.org/software/%
                   musixtex/add-ons/figbas.zip}{WIMA} software page.
                   \texttt{figbas.zip} contains 2 files that can be of
                   help with the installation: \texttt{README} and
                   \texttt{test.tex} .
                  } --
         \emph{after} their associated note symbols, with
         a space, as usual. As of {\PMX} version 2.517, they are allowed
         in two staves, the first (lowest) staff and any other one.
         Enter the characters as they would appear from \emph{top to
         bottom}, e.g.\ \verb%64% [\,6 over 4\,], or \verb%642% [\,6
         over 4 over 2\,].
   \item Accidentals that modify a number \emph{must} be entered
         \emph{before} the number. Note that the characters that
         signify accidentals are different here than for notes: flats
         are written as `\verb#-#' (minus), sharps as \verb&#& , and
         naturals as \verb%n% . For example, \emph{sharp third} is
         \verb&#3& (or simply \verb&#&, in the standard shorthand),
         \emph{six} (over) \emph{flat five} is \verb%6-5%, and
         \emph{sharp six} (over) \emph{4} is \verb&#64& .
   \item For each staff with figures, {\PMX} positions all the figures
         within each system below the staff with their tops at the same
         level. If you want to change this vertical position default,
         you have two possibilities:
     \begin{description}
         \item[to lower a figure symbol:] prefix the figure symbol
              -- \emph{no space!} -- with one or several `\verb#_#'
              (underscore). Each underscore will lower the figure symbol
              by 4 lengths of \verb#\internote# ,
         \item[to raise a figure symbol :] \emph{append} the figure
              symbol -- \emph{again no space} -- with a `\verb#+#' (plus)
              followed by an integral number for the number of
              \verb#\internote# lengths by which to raise the figure.
     \end{description}
         The two options can be combined to provide full control over
         the vertical position of the figure symbol.
   \item If you want a figure symbol to align horizontally in
         the second tier, insert a `\verb&_&' (underscore) as placeholder
         for the top tier, before the one you want to go on the second
         tier (cf\ the sharp in bar 16 of Fig.~\ref{fig:poppea}).
   \item Sometimes you may need to enter a figure when there's no bass
         note sounding. To do this, \emph{precede} the figure symbol
         with three additional characters, \verb%x%[\emph{n}][\emph{m}].
         Here \emph{n} is a single-digit repeat count, and \emph{m} is a
         single-digit duration time value, i.e., \verb#0,2,4,8,1# or
         \verb#3# . This will offset the figure from the associated note
         by the specified duration value. For example, if the lowest
         voice contained \verb%c03 x3465%, there would be a whole-note
         c, and 3 quarter notes later a figure 65 below the staff
         (cf.~Fig.~\ref{fig:poppea}, bars 2, 4, 6, 8, 10 and 14).
   \item
_{figured bass!continuation}
         There is also a \emph{continuation} symbol, viz.\ a \verb&0&
         (zero) followed immediately by an unsigned number.  This
         produces a horizontal line under the bass note, starting just
         to the left and extending to the right by the given number of
         \verb&\noteskip&'s (cf.~Fig.~\ref{fig:poppea}, bars
         9, 11, 16 and 17). The height and length of the line are set by
         the current note's level and \bs\texttt{noteskip}
         respectively\,%
         \footnote{If \bs\texttt{noteskip} changes, or if an unfigured
                   note drops below the starting level before the line
                   ends, it is possible to trick {\PMX} by entering
                   separate \texttt{0}[\emph{n}] symbols under each
                   consecutive note: {\PMX} will automagically join them
                   together at the lower height (thanks to Werner Icking
                   for this idea).

                   For an explanation of the special {\PMX} coding in
                   Bar 16 of Fig.~\ref{fig:poppea} see
                   Section~\ref{sec:tricks} .
                  }.
         These can be mixed in with other figures to produce vertical
         stacks.  If another figure follows in the same symbol, use
         {\tt:} as a separator. For example, a continuation line over a
         3 would be coded as \texttt{01:3} .
\end{itemize}
\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/poppea.eps} \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
% bars 1-4
gd2 fd 6 | ed 5 x126 dd 4 x123 | gd fd 6 | ed 6 dd 4 x123 | /

% bars 5-8
gd2 fd 6 | ed 64 x123 dd | gd fd 6 | ed 64 x123 dd | /

% bars 9-12
gd2 02 fd | ed 6 dd 7 | gd fd 6 | gd ad 4 x12# |  /

% bars 13-15
dd- gd | gd 03 fd | ed dd 4 x12# | /

% batt. 16-17
cd- dd 64 x145 x12_00.2 x12_# | gd fd 01  Rd /
%
\end{verbatim}
\end{minipage}
	\end{center}
	\caption{Figured bass in \textbf{C.\  Monteverdi},
                 \emph{L'Incoronazione di Poppea},
                 aria ``\emph{Pur ti miro}''
                }          	\label{fig:poppea}
\end{figure}


_{F symbol@\texttt{F} symbol} _{\textbf{scor2prt}}
If there are figured bass commands in a {\PMX} file, but you want them
all to be ignored, then enter the symbol \texttt{F} in the header. This
feature is most useful in the form \texttt{\%1F}
(cf.~Sec.~\ref{sec:scor2prt}, which makes a separate bass part with
no figures, e.g.~for a violoncello part.

\bigskip
Figured bass symbols will not be altered in any way under transposition
by {\PMX} (cf.~Sect. \ref{sec:transpositions}). There is no universal
set of interpretations of figured bass symbols, so no automatic
transposition is possible.
_{transposition!not with figured bass}

\medskip
_{figured bass!2-digit figures}
{\PMX} does not admit 2-digit basso continuo figures. This is the
notation of some old editions; if you want to use it, you will have to
resort to inline {\TeX} coding (cf.~Section~\ref{sec:inlineTeX}).
There is an example for this in the Caccini aria in the Appendix
(Sec.~\ref{sec:Caccini}).

\section{Commands That Affect All Voices}   \label{sec:pmxcmds}
_{\PMX!commands for all voices}

Unless indicated otherwise, the commands dealt with in this section
affect all staves in a score. They must be entered only \emph{in the
first (lowest) voice in the first (lowest) staff}.

\medskip
_{\textbf{scor2prt}}
Such commands will automatically be transferred from score to parts when
separate parts are generated by \textbf{scor2prt}
(cf.~Section~\ref{sec:scor2prt}).

\subsection{Single bars, Double bars, Repeats etc.}  \label{sec:bars}
_{bar lines} _{bar lines!single, double, repeat} _{repeats|see{bars}}
_{R symbol@\texttt{R} symbol}

In keeping with general typesetting practice, {\PMX} will by default
produce
\begin{itemize}
   \item a single bar line at the beginning of each system after the
         first, unless there is only one staff per system,
   \item a single bar line at the end of each bar except the last one in
         a movement or the entire score,
   \item the common ending bar line (thin-thick double bar line) as the
         last bar line of a movement or the entire score.
\end{itemize}

_{\textbf{scor2prt}} _{\textbf{scor2prt}!placement of bar symbols}
The user can, however, override these defaults -- except the first one
-- by a bar symbol, viz.\ an \texttt{R} followed by one of the
parameters given in Table~\ref{tab:bars}. If you are going to make parts
from your score (cf.~Section~\ref{sec:scor2prt}), you \emph{must} place
bar symbols either before the first note in an input block or after the
last one; otherwise \textbf{scor2prt} may behave erratically. Using two
bar symbols in succession doesn't make sense and will produce
unpredictable results.
\footnote{If you are using \texttt{|} marks at the end of bars, a repeat
          must always go \emph{before} the \texttt{|}, or the next line
          must follow in the same input block. In other words: while
          \texttt{Rr | /} will not result in an error, it will produce a
          thin bar line only.            \label{p:repeats}

          \smallskip
          There is a simple consequence: avoid using \texttt{|}
          altogether, at least in connection with \texttt{R} symbols.
         }


\begin{table}
\begin{center}
\begin{tabular}{|c|@{\quad}p{250pt}|}
                                             \hline
\texttt{b}  & thin (single \texttt{b}ar) line \\
\texttt{d}  & thin-thin \textbf{d}ouble bar line \\
\texttt{D}  & thin-thick \textbf{D}ouble bar line \\
\texttt{z}  & invisible bar                    \\  \hline
\texttt{l}  & \textbf{l}eft repeat \\
\texttt{r}  & \textbf{r}ight repeat \\
\texttt{lr} & \textbf{l}eft-\textbf{r}ight repeat \\
\texttt{dl} & thin-thin \textbf{d}ouble bar
              followed by \textbf{l}eft repeat \\  \hline
\end{tabular}
\end{center}
\caption{Parameters of the bar symbol \texttt{R}} \label{tab:bars}
\end{table}

\medskip
Here are further comments on some particular bar symbols:
\begin{itemize}
   \item \texttt{Rb} forces a single bar before a movement break, where
         the default would be a double bar. This can be useful, for
         example if you change the number of instruments, which {\PMX}
         will allow only at a movement break, but you don't want it to
         \emph{look} like a movement break.
   \item \texttt{Rz} will cause an invisible bar line at the end of the
         current system. It can be used together with blind meter
         changes (cf.~Section~\ref{sec:meterchg}) when you want to split a
         bar across a system break.
   \item if a left-right repeat (\texttt{Rlr}) comes at a system break,
         {\PMX} will automatically split it in two.
   \item \texttt{Rdl} is the same as a left repeat
         (\texttt{Rl}) except at a system break: there the first system
         is ended with two thin lines, and the left repeat sign goes to
         the beginning of the next system.

         \medskip
   \item Finally, a general remark is in order regarding the \texttt{R}
_{R symbol!placement at begin of block}
         symbols that designate repeats, double bars etc.\
         (\texttt{Rl,Rr,Rlr,Rd, RD,Rdl,Rb,Rz}). To avoid conflicts with
         \textbf{scor2part}, you should \emph{always}
         place any \texttt{R} command before the first note in an
         input block. This is always possible except at the very end of
         the whole piece. Otherwise, there is always a following input
         block where the command can (and should) be placed.
\end{itemize}

\medskip\noindent
Fig.~\ref{fig:bars} gives some examples.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/bars.eps}
	\end{center}
	\caption{Single bars, double bars, repeats}
	\label{fig:bars}
\end{figure}

\Note{On some special occasions, you may want dashed or dotted barlines
      instead of the regular ones. For this and similar purposes, there
      is a very good and easy-to-use package by Rainer Dunker:
      \texttt{musixdbr.tex}, included in the {\MusiXTeX} distribution.
_{Dunker, Rainer} _{bar lines!dotted, dashed}
     }

\subsection{Volta}  \label{sec:volta}
_{volte} _{dacapo|see{volte}} _{repeats|see{volte}}  _{V
symbol@\texttt{V} symbol}

The two versions of the ending of a repeated section of music, called
`volte' in musical parlance\,%
\footnote{The term `volta' is, of course, Italian, and `volte' is the
          Italian plural  of `volta'.
         },
are denoted by a symbol starting with a \texttt{V} (for \textbf{V}olta)
in {\PMX}. {\PMX} needs to know where each volta starts and ends, how
the ends are shaped, and what text is to be included under each volta. A
string parameter to the \texttt{V} is used to convey this information:
\begin{itemize}
   \item to signal the \emph{start} of the first volta, add a text
         string (usually just a \texttt{1}) that doesn't start with
         one of the characters \texttt{b}~, \texttt{x}~, or any literal
         spaces\,%
         \footnote{Actually you can include a space by using the {\TeX}
                   space symbol \~\ instead of a blank.
                   _{\TeX!space symbol}
                  }.
         {\PMX} will print append a period to the text string,
   \item to signal the \emph{end} of a volta and the start of the
         second volta, use a \texttt{V} with a text string that
         \emph{does} start with either the character \texttt{b}~ or
         \texttt{x}~. If \texttt{b}~ is present, a volta symbol ending
         with a vertical stroke will be printed (\textbf{b}ox), while
         \texttt{x}~ will print the ending \emph{without} a vertical
         stroke (no bo\textbf{x})\,%
         \footnote{Note that the characters \texttt{b}~ or \texttt{x}~
                   can appear anywhere in the text string and will
                   \emph{not appear in print}.
                  }.

         Often composers will write out only the first ending of a
         repeated section of music, and simply continue play, dropping
         the first ending after the repeat. With {\PMX}, the notation is
         analogous: simply end the first volta, with either \texttt{Vb}
         or \texttt{Vx}, without adding a second volta.

         On the other hand, if one volta starts where another one ends,
         the symbols ending the first and starting the second volta can
         be combined into one, e.g.~\texttt{Vb2}~.
\end{itemize}

\medskip
Other rules governing volte are:
\begin{itemize}
   \item Volte should be placed at the beginnimg of an input block, in
         the first (lowest) voice of the first (lowest) staff, before
         the first note if it's the start of a volta, or after the last
         note if it's the end of a volta.
   \item
_{volte!with \textbf{scor2prt}}
         If you will be making parts from the score using
         \textbf{scor2prt}, then to ensure that the volte are properly
         transferred to the parts, you must only include one volta
         symbol \texttt{V} in each input block, and it must come at the
         beginning of the block.
   \item If a score ends while a volta is still open, {\PMX} will close
         it with a box.
\end{itemize}

\bigskip
Examples of volta usage can be seen in Fig.~\ref{fig:volta}.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/volta.eps}
	\end{center}
	\caption{Volte}
	\label{fig:volta}
\end{figure}

\subsection{Meter Changes}   \label{sec:meterchg}
_{meter!change}  _{polyrhythmic scores}

The meter of a piece can only be changed at the beginning of an input
block, and thus naturally only at the beginning of a new bar, just
before the beginning of the first (lowest) voice of the first (lowest)
staff. As with the initial meter specified in the preamble, any new
meter applies to all instruments and voices\,%
\footnote{As was pointed out before (cf.~p.\pageref{p:polyrhythms}),
          this limits the use of {\PMX} for modern polyrhythmic music.
          But you can always try to play with tricks \dots
         }.

A \texttt{m}eter change symbol starts with the letter \texttt{m}. There
are two different ways to complete the symbol:
\begin{itemize}
   \item enter the 4 meter-defining numbers \texttt{mtrnuml},
         \texttt{mtrdenl}, \texttt{mtrnump}, \texttt{mtrdenp} for the
         new meter\,%
         \footnote{For the meaning of these numbers
                   cf.~p.\pageref{p:meterdefs} .
                  },
         \emph{separated by slashes} \texttt{/} .
   \item same as above, but enter the 4 numbers consecutively
         \emph{without spaces}. In this case, it is necessary to
         distinguish between one single 2-digit number and two
         consecutive 1-digit numbers. For this -- and for this case only
         -- the following convention is adopted:

         \vspace{-1.5ex}\noindent
         \begin{itemize}
           \item the number 1 is represented by the letter \texttt{o},
           \item consecutive digits \texttt{10},\dots \texttt{19} stand
                 for exactly that: the 2-digit numbers 10 through 19.
         \end{itemize}

         \vspace{-1.5ex}\noindent
         Thus, 19 is the largest number that can be entered with this
         method.
\end{itemize}
_{meter!blind change}
Note that \texttt{mtrdenl=0} still represents a whole note
(semibreve), as explained on p.\pageref{p:meterdefs0}, and a `blind'
meter is given by \texttt{mtrnump=mtrdenp=0}, as explained in
Table~\ref{tab:meter}.

\medskip  _{pickup bar}
The most common application of a `blind' meter change occurs when a
piece --- often one starting with a pickup --- has an incomplete final
bar. In such cases place the last bar in an input block by itself,
headed by a `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 \verb#m3400 cd24 of /#.

Another useful application is for the pickup bar in the second or later
movements, following a {\PMX} movement break symbol. Since there is
no special provision for pickups in this case like there is at the
beginning of a piece,   _{movement breaks}
\begin{enumerate}
   \item the pickup bar should be in a block by itself, starting with a
         meter change symbol with a logical meter representing the
         pickup bar and a printed meter as appropriate, and
   \item the next bar should start a new block and begin with a blind
         meter change symbol with a logical meter representing the true
         meter.
\end{enumerate}


\subsection{Key Changes} \label{sec:keychg}
_{key change}   _{K symbol@\texttt{K} symbol}

A key change can be signalled at any time\,%.
\footnote{Only one key change is allowed in each input block.
         }.
It must be entered in the first voice, but will affect all voices. Use
the command \texttt{K+0}, followed by the new key signature: positive
integer for sharps, negative for flats (cf.~Section~\ref{sec:numinput})
.

\medskip
Some examples are given in Fig.~\ref{fig:keychg}.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/keychg.eps}
	\end{center}
	\caption{Some key changes}
	\label{fig:keychg}
\end{figure}

\subsection{Transpositions}        \label{sec:transpositions}
_{transposition}   _{K symbol@\texttt{K} symbol}

\begin{figure}[!htb]
	\begin{center}
         no transposition:  \\
         \begin{small}
         \verb#d8 e1 f g a bs cs d8 cn1 bn a g f e | d0 Rb /#
         \end{small}  \\
         \includegraphics[scale=.82]{eps/transpose.eps} \\
         transposition by one tone up: \\
         \begin{small}
         \verb#K+1+1 d8 e1 f g a bs cs d8 cn1 bn a g f e | d0 Rb /#
         \end{small}  \\
         \includegraphics[scale=.82]{eps/transpose1.eps} \\
         transposition by a half tone up: \\
         \begin{small}
         \verb#K-0+6 d8 e1 f g a bs cs d8 cn1 bn a g f e | d0 Rb /#
         \end{small}  \\
         \includegraphics[scale=.82]{eps/transpose2.eps} \\
         transposition by a half tone down: \\
         \begin{small}
         \verb#K-1+4 d8 e1 f g a bs cs d8 cn1 bn a g f e | d0 Rb /#
         \end{small}  \\
         \includegraphics[scale=.82]{eps/transpose3.eps} \\
	\end{center}
	\caption{Some transpositions of a d minor scale}
	\label{fig:transpose}
\end{figure}

To transpose an entire score to a different key from the one in which
the data have been entered, use the symbol \texttt{K} (for
\textbf{K}ey), followed by two explicitly signed digits: (1) the
distance to transpose by, in units of \verb#\internote# (i.e.\ the
vertical offset on the staff), and (2) the new key signature. This
symbol must be entered at the beginning of the piece, in the header
(cf.~p.\pageref{p:header}).

There is one case that requires special handling, viz., when transposing
by a half step, but the vertical position doesn't change, e.g.\ from D
flat to D. In this case the shift parameter (the first parameter of
\texttt{K}) is \emph{always} \texttt{-0} \emph{regardless} of whether
the transposition is up or down a half step\,%
\footnote{This artifact is needed to differentiate a half-note
          transposition from a mere key change  without
          transposition (cf.~Section~\ref{sec:keychg}) .
         };
the direction of the transposition will be determined by the new key
signature, the second parameter. An example is given in
Fig.~\ref{fig:transpose}.

\medskip
_{accidentals!relative}
When transposing, one should always use relative accidentals, activated
by the symbol \texttt{Ar} in the header (cf.~Section~\ref{sec:A} for a
detailed explanation of this notation).

Of course, if you have just one transposing instrument, or a choir of
same-type instruments, you can use the transposition mechanism effected
by the \texttt{K}ey symbol to easily obtain both the original score and
its actual sound. For an example of this use of the transposition
mechanism see Fig.~\ref{fig:tristan}.

\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/tristano.eps} \\
           Standard notation in the original score \\[3ex]
           \includegraphics[scale=.82]{eps/tristans.eps} \\
           Actual sound (transposed with \texttt{K-4-4})
	\end{center}
	\caption{\textbf{R.\ Wagner}, \emph{Tristan und Isolde},
                 beginning of third act}
	\label{fig:tristan}
\end{figure}

_{wind instruments|see{instruments,transposing}}
\Note{The transposition of an an entire score must not be confused with
      the standard notation for `transposing' instruments, such as
      clarinets (in B, A etc.), oboe d'amore (which is in A), oboe da
      caccia (in F), or horns. {\PMX} does not provide a notation for
      this directly if transposing instruments appear together with
      non-transposing instruments in the same score, but it is easy to
      do it with some inline {\MusiXTeX}\,\footnotemark\
      (for details on this particular problem see the example of
      Mozart's \emph{Mauerische Trauermusik} in
      Section~\ref{sec:mtrauer}).
     }
\footnotetext{_{Vogel, Olivier} I am grateful to Olivier Vogel for
              pointing this out to me.
             }

\subsection{Titles, and text above and below a system}
              \label{sec:titles} _{titles}
_{text!above/below system} _{T symbol@\texttt{T} symbol}

A \emph{title block} with up to three elements can be defined in the
header (cf.~p.\pageref{p:header}):
\begin{itemize}
\item \texttt{Ti}: an \textbf{i}nstrument name. It is set \emph{above}
                   the title, and left-justified,
\item \texttt{Tc}: the \textbf{c}omposer's name. It is set \emph{below}
                   the title and right-justified,
\item \texttt{Tt}: a \textbf{t}itle for the whole piece. It is centered
                   on the page.
\end{itemize}

Each of these commands is to be followed by a text string, \emph{on a
separate line}. This text must be fully contained in one line of {\PMX}
coding; but the text for the \textbf{t}itle can be spread out over
several lines in print by using the standard {\TeX} line break symbol
\verb#\\# .  _{\TeX!line break symbol}

\medskip
Extra vertical space can be added between the whole title block and the
top system by appending to \texttt{Tt} (without space) a one- or
two-digit number representing this space, in units of
\verb#\internote#\,%
\footnote{{\PMX} does this together with the adjustment of other
          vertical spaces when fixing the general page layout. In some
          rare cases, the result may not be quite what you expect, in
          particular when you haven't used the \texttt{Ae} option to
          equalize inter-system spacing
          (cf.~section~\ref{sec:options}). In such cases you might want
          to use inline {\TeX} --- take a look at the example in
          Section~\ref{sec:shiftname} for how this can be done.
         }.
This works only if \texttt{Tt} is the \emph{final} title block element
entered. Thus, although the 3 parts of a title block can be given in any
order, it is good practice to use the sequence \texttt{Ti} ---
\texttt{Tc} --- \texttt{Tt}.

_{titles!with \textbf{scor2prt}} _{\textbf{scor2prt}!use of Ti}
\Note{When you want to generate parts from a score with
      \textbf{scor2prt} (cf.~Section~\ref{sec:scor2prt}), you should
      \emph{omit} \texttt{Ti} with an associated \textbf{i}nstrument
      name, because each separate instrument usually has a different
      name. Rather, \textbf{scor2prt} will automatically supply the
      appropriate instrument names, printing the name of each instrument
      at the upper left of the first page of each part; the names used
      here are the ones specified in the preamble of the {\PMX} file for
      the score\,%
      {\footnotemark}.

      If you do have \texttt{Ti} together with an \textbf{i}nstrument
      name in the main score, \textbf{scor2prt} will print that name
      identically to all the parts --- which is usually not what you
      want!
     }
\footnotetext{\textbf{scor2prt} does this by inserting into the part
              \texttt{.pmx} file a \texttt{Ti} and the appropriate
              instrument name as taken from the preamble of the main
              score. Knowing this may be useful if you want to
              manipulate this process, e.g.~to change the vertical
              shifting of a particular instrument name
              (cf.~Section~\ref{sec:shiftname} for details).
              _{\textbf{scor2prt}!adjusting instrument name}
             }

\bigskip   _{h symbol@\texttt{h} symbol}  _{l symbol@\texttt{l} symbol}
The symbols \texttt{h} (for \textbf{h}eader)\,%
\footnote{This usage of the \textbf{h} symbol is not to be confused with
          that for the page size (see Section~\ref{sec:pagesize})!
          Although both can occur together in the header, they are in
          fact, different {\PMX} symbols, distinguished by their
          differing syntax.
         }
and  \texttt{l} (for \textbf{l}ower) can be used to introduce text
either above or below a system. These symbols must be placed in the
first column of an input line (not necessarily the beginning of a
block), and followed by a blank or -- for \texttt{h} only -- a signed
integer. In the latter case, this integer is a vertical shift, in units
of \verb#\internote#.

The text string, which again must lie on a line of its own immediately
following the symbol, will be printed above or below the \emph{top}
staff in the \emph{first} bar of the block where it is entered.
Figs.~\ref{fig:vivaldi1} and \ref{fig:Haydn} show examples.

\subsection{Page numbering and page headers}   \label{sec:pagenumbers}

\subsubsection{Page numbering}
_{page!numbering}   _{P symbol@\texttt{P} symbol}

By default, {\PMX} does \emph{not} number the pages of a score, even
when it has more than one page. You can, however, switch on page
numbering by using the symbol \texttt{P} (for \textbf{P}age). Placed at
the beginning of an input block anywhere within the {\PMX} body of
input, and followed optionally by a page number and/or by \texttt{l}
(for \textbf{l}eft) or \texttt{r} (for \textbf{r}ight), this will
\begin{enumerate}
   \item start page numbering at the current page\,%
         \footnote{The `current page' is the page where {\PMX} puts
                   the music currently processed at the point where it
                   encounters the symbol \texttt{P}.
                  }
         with the number given as optional argument. Further page
         numbers are then incremented automatically starting with this
         number. If \texttt{P} has no number argument, the default is
         page 1 . Thus, \texttt{P} and \texttt{P1} are equivalent),
   \item put the page numbers to the top \textbf{l}eft or \texttt{r}ight
         of the first of the pages to be numbered, after which the
         number positions will alternate. If no \textbf{l} or \textbf{r}
         is given, {\PMX} puts the page numbers on the right on
         odd-numbered pages, on the left of even pages.
\end{enumerate}
You can have as many \texttt{P} symbols in a score as you like; but
there is no command to switch off page numbering again once it has been
switched on.

\subsubsection{page headers}
_{page!headers}

There is one more option, \texttt{c} (for \textbf{c}entered header),
available with the \texttt{P} symbol. This option defines a text string
to be printed at the top of every page \emph{after the first}. The
notation is as follows:
\begin{itemize}
   \item The normal usage is \texttt{Pc"}$[$\emph{text
         string}$]$\verb#"#. The text string enclosed in the quotation
         marks must be a single line of text. It may contain blanks, but
         \emph{no} \verb#\\#). If the string consists of blanks only,
         that is what will be printed: a blank page header.
   \item If the text string does not contain any blanks, you may omit
         the quotation marks, but you must then start the text
         immediately after the \texttt{c} \emph{with no space}.
   \item If there is a blank after \texttt{Pc}, \emph{no quotation marks,
         and no further text}, the text printed as the header will be
         the instrument name entered with the symbol \texttt{Ti}, as
         described on p.\ref{sec:titles}.
\end{itemize}
\texttt{c} must be the \emph{last} option in the \texttt{P} symbol.

_{P symbol@\texttt{P} symbol} _{\textbf{scor2prt}}
\Note{The \texttt{P} symbol and all its options will be ignored when
      making parts from a score using \textbf{scor2prt}, since page
      numbering will usually be different in the score from that in the
      parts. Page numbering -- and centered headers -- for parts can,
      however, be initiated independently with another mechanism. For
      the details on this, refer to Section~\ref{sec:scor2prt}.
     }

\clearpage
\begin{figure}[!htb]
	\begin{center}

           \vspace*{20ex}
           \includegraphics[scale=.82]{eps/vivaldi1.eps} \\[2ex]
           ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
   1     1       3       4       0      3      0     -1
   1     1   16   0.0

t
./
% begin header:
Ti11
Oboe I
Tc
Antonio Vivaldi (1678-1741)
Tt
Concerto in d minor \\ RV535
w150m
% end header.
% Bar 1-4
h-2
~~~Largo

d45 a44 r4 | g44 f44 r4 | g45 a45 b45 | cs45 d45 r4 /
% Bar 5-7
fs45 g45 a45 | b45 r4 r4 | cs45 d45 e45 /
% Bar 8
l
(continued)
f45 r4 r4 Rb /
%
\end{verbatim}
\end{minipage}
        \end{center}
	\caption{Titles, and text above and below a system}
	\label{fig:vivaldi1}
\end{figure}

\clearpage
\subsection{Layout: line, page, and movement breaks}
    \label{sec:breaks}
_{layout} _{layout!manual line/page breaks}
_{\texttt{npages}} _{\texttt{nsystems}}

The parameters \verb#npages# and \verb#nsystems# of the preamble
(cf.~Section~\ref{sec:preamble}) determine the layout of the score,
either by fixing the total number of pages and systems, or by setting
the average number of bars per system. With no further instructions,
{\PMX} will attempt to distribute all the music evenly over the total
number of systems, and then spread the systems evenly over the specified
number of pages, either specified or determined by default (with
\verb#npages=0#).

You can change the average `crowdedness' by changing the preamble
parameters. Once this is satisfactory, you can exercise finer, more
local control by forcing, i.e.\ manually inserting, line or page breaks
at exactly the places you want them to be. You may also want movement
breaks, and {\PMX} has a convenient way of doing that, in the process
dealing easily with such `housecleaning' chores as indenting the first
system of the new movement, reprinting the time signature, resetting the
bar number counter, and other details to be discussed below.
_{bar numbering} _{indenting first system}

\medskip
It is worthwhile, however, to quote Leslie Lamport at this point:
_{Lamport, Leslie}
\begin{quote}
   ``Don't worry about line and page breaks until you prepare the
      absolutely final version'' \\
      From: Leslie Lamport, {\LaTeX}, \emph{user's Guide and Reference
      Manual} .
\end{quote}

This is especially true for a {\PMX}-generated score. Until the final
edit, you should always use \texttt{npages=0}. Once you specify any
forced line break, you can no longer use \texttt{npages=0}, and you will
have to specify values for \texttt{npages} \emph{and}
\texttt{nsystems}~. And because --- as we'll soon explain --- a movement
break is a sub-option of the linebreak command, you cannot set movement
breaks either until the final edit.

But unless your score is just a few pages long, you probably will want
to set some line, page, or movement breaks in the end. When you are
ready, always first pick some reasonable values for \texttt{npages} and
\texttt{nsystems}---perhaps the numbers that finally came out when you
used \texttt{npages=0} during the main input process. Then one way to
proceed is to start at the beginning, forcing breaks where desired. The
most common places would be at movement breaks, and at places associated
with volte or repeats. Recompile and view the result after each new
line break is inserted. You may need to adjust the total number of
systems or even pages depending on how crowded is the remainder of the
score, after the last forced line break.

The other way to proceed is to begin by inserting any obvious page
breaks, especially if you are laying out a booklet with facing pages and
want page turns to come in musically convenient places.

\bigskip\noindent
Here are the rules for inserting forced line, page, and movement breaks:
\begin{itemize}
\item _{line break}
      Line breaks can only come at the start of an input block. To force
      a line break at the start of the $n^\text{th}$ system, enter
      \texttt{L}$[n]$~. $n$ must obviously be greater than 1 and less
      than or equal to the value of \texttt{nsystems} as specified in
      the preamble.
\item _{page!breaks}
      Page breaks can only come where there is already a line break. To
      force a page break at the start of the $m^\text{th}$ page and the
      $n^\text{th}$ system, enter \texttt{L[}$n$\texttt{]P}$m$~. $m$
      must obviously be greater than 1 and less than or equal to the
      total number of pages.

\item _{movement breaks}
      Movement breaks can only come where there is already a line break.
      To force a movement break at the start of the $n^\text{th}$
      system, enter \texttt{L[}\emph{n}\texttt{]M}~. If in addition you
      want a page break at that point, use
      \texttt{L[}$n$\texttt{]P[}$m$\texttt{]M}~.

      \medskip
      The movement break symbol \texttt{M} has several optional
      parameters. They can be used in any combination and should follow
      with no spaces.

      \begin{itemize}
         \item \texttt{M+[}$k$\texttt{]} adds $k$ \verb#\internote#
               units of vertical space between movements. \item
               \texttt{Mi[}$.x$\texttt{]} resets the first-line
               indentation of the new movement to
               \texttt{fracindent=}\,$.x$~, where $.x$ is some
               decimal number (cf.~Sec. \ref{sec:preamble}).

               \Note{You must write the fracindent number exactly in
                     the form $.x$ , i.e.\ \emph{without} the leading
                     $0$~. If, e.g.\ , you write $0.2$ instead of
                     $.2$~, {\PMX} will complain with an error message,
                     asking for a decimal number!
                    }

         \item Beginning a new movement break, the bar number is reset
               to zero by default, whereas \\
               \texttt{Mc} \textbf{c}ontinues bar numbering.
         \item \texttt{M[}$n$\texttt{]} changes the \textbf{n}umber of
               instruments to $n$~. $n$ must not exceed \texttt{ninstr}
               as set in the preamble. If $n$ exceeds 9, it must be
               \emph{preceded} with \texttt{:} (colon). This should be
               followed (without blanks) by a sequence of $n$ instrument
               numbers in bottom-up order, again preceded with
               \texttt{:} if bigger than 9, then a sequence of clef
               symbols, one for each staff of each instrument starting
               from the bottom. An instrument's numeral is simply its
               position in the original sequence (in the preamble);
               these numerals can be permuted as desired, but the
               sequence of clef symbols should, of course, match the new
               sequence of instruments.
         \item \texttt{Mr+}/\texttt{Mr-} \textbf{r}eprints/suppresses
               reprinting the instrument names at the beginning of the
               new movement. The default is to print them only if the
               number of instruments changes.
      \end{itemize}
\end{itemize}

_{instruments!numbers increased/decreased}
It should be emphasized here that the number of instruments in a new
movement can never exceed the original number of instruments, although
it is permissible to increase it after it has been decreased, as long as
it doesn't exceed the original number; in other words, and to give an
example: a sequence {quartet --- solo --- duet, e.g.,  is possible,
while the reverse sequence is not. There are two ways to circumvent this
restriction:
\begin{enumerate}
\item  start the score with a dummy page --- to be discarded
       later --- containing the maximum number of instruments. On the
       second page, start a new movement with the desired number and
       sequence of instruments for the first movement,
\item  _{\PMX!concatenating several files}
       make separate {\PMX} files and concatenate them afterwards
       (cf.~Section~\ref{sec:concatfiles} or \ref{sec:LaTeX} on how to
       do this).
\end{enumerate}

\medskip
Immediately after a movement break, any desired meter changes, key
changes, or text can be entered as already described in
Sections \ref{sec:meterchg}, \ref{sec:keychg} and \ref{sec:titles}
(p.\pageref{sec:meterchg} ff.).

\bigskip
The effect of movement breaks is illustrated in the
example~\ref{sec:Dufay} in the appendix.

\subsection{Bar Numbering} \label{sec:barnumbers}
_{bar numbering} _{inline \TeX!bar numbering}

By default {\PMX} places a bar number above the first bar of the top
staff in every system, and there is no provision in {\PMX} to change
this default. But it is easy to change this by using a straight
{\MusiXTeX} command:
\begin{itemize}
   \item if you want no printed bar numbers at all, add a line in the
         header containing \\ \verb#\\nobarnumbers\#
   \item if you want bar numbers printed over every bar,  add a line
         containing \\ \verb#\\barnumbers\#
\end{itemize}
in the header or at the beginning of an input block.

This is an example of a \textbf{type 2} inline {\TeX} command,
cf.~Section~\ref{sec:inlineTeX}. As is explained there in detail, {\PMX}
will place a \textbf{type 2} inline {\TeX} command at the beginning of
the \verb#.tex# file produced, regardless of where in the \verb#.pmx#
file the command appears. This means that you cannot change this type of
bar numbering in mid-stream.

If you do want to change the bar numbering somewhere in the middle of a
score, use a \textbf{type 3} inline {\TeX} command: if, from the
current point in the score, you want
\begin{itemize}
   \item no printed bar numbers, add a line with \\
         \verb#\\\nobarnumbers\#
   \item bar numbers printed over every bar,  add \\
         \verb#\\\barnumbers\#
   \item bar numbers above the first bar of every system (the {\PMX}
         default), add \\ \verb#\\\systemnumbers\#
\end{itemize}
at the beginning of the current input block.

\medskip
_{Bar number count adjustment}
Furthermore, you might want to change the number itself. This occurs most
frequently when you have a pickup bar at the beginning of a repeat; some
-- including some commercial publishers -- do not include this pickup
bar in the number count, wheras {\PMX} does so by default. To adjust
this, use the \textbf{type 3} inline {\TeX} command
\verb#\\\advance\barno-1\relax\# .

\bigskip
{\MusiXTeX} provides still more elaborate bar numbering schemes, such as
a number over every $n^{\text{th}}$ bar. For details refer to the
{\MusiXTeX} manual.

\section{Some general options and technical adjustments}
         \label{sec:options}  _{\PMX!options!general}
         _{layout!general options}

\subsection{Global options}  \label{sec:A}
_{\PMX!options!global}_{A symbol@\texttt{A} symbol}

{\PMX} has many layout parameters with default settings. Some of these
can be changed by the user; for that purpose there are several symbols,
all beginning with \texttt{A}. Many of these are usually included in the
^{header}, but some may be entered at the beginning of any input block.
Table~\ref{tab:A} lists these options alphabetically; the following
subsections, grouped by types of settings, describe them in detail. When
using several of these commands, it is not necessary to enter them all
on separate lines; rather, you can concatenate them, in any order, with
just a single \texttt{A}, e.g.~\texttt{AdI2.3p+hlbr} .

\begin{table}[!ht]
\begin{center}
_{\PMX!options!global}  _{A symbol} _{global options |see{@\texttt{A} symbol}}
\begin{tabular}{|l|l|}
\hline
\texttt{Aa}$[x]$ & sets space before first note in a bar          \\
\texttt{Ab}      & makes accidentals \textbf{b}ig                 \\
\texttt{Ad}      & puts \textbf{d}ots in lower voices
                   \emph{below} the line                          \\
\texttt{Ae}      & \textbf{e}qualizes inter-system spacing        \\
\texttt{AI}$[x]$ & changes default \textbf{I}nterstaff spacing
                   \emph{for the whole score}                     \\
\texttt{Ai}$[x]$ & changes default \textbf{i}nterstaff spacing
                   \emph{for the current page only}               \\
\texttt{AK}      & adjusts rest heights in 2-voice staves
                   depending on context                           \\
\texttt{AN}$[i]$``\emph{name}''
                 & sets filenames generated by \textbf{scor2prt}
                   (cf.~Section~\ref{sec:scor2prt})               \\
\texttt{Ap}[\emph{further suboptions}]
                 & enables PostScript type K slurs                \\
                   (cf.~Section~\ref{sec:chords})                 \\
\texttt{Ar}      & switches accidentals to
                   \textbf{r}\emph{elative}                       \\
\verb#AR[#\emph{file}\verb#]#
                 & inserts a text file in the {\PMX} source file
                   (cf.\ Secion \ref{sec:concatfiles})            \\
\texttt{AS}[\emph{ns}]
                 & enables {\PMX} \textbf{S}pacing algorithms
                   to small-font staves                           \\
\texttt{As}      & makes accidentals \textbf{s}mall               \\
\texttt{AT}      & activates special xtuplet brackets
                   (cf.~Section~\ref{sec:xtuplets})               \\
\texttt{Av}      & spreads systems \textbf{v}ertically over all
                   of an unfilled page when `on'                  \\
\hline
\end{tabular}
\end{center}
         \caption{Symbols beginning with an \texttt{A} (global options)}
         \label{tab:A}
\end{table}

\subsubsection{Accidentals}
By default, big accidentals are used unless regular spacing doesn't
provide enough room. Thus the default behavior may cause a mixture
of big and small accidentals, and in fact is not recommended. Rather,
the user is advised to make his choice:
\begin{itemize}
  \item _{accidentals!big}
        \texttt{Ab} makes all accidentals \textbf{b}ig; this is
        usually preferred,
  \item _{accidentals!small}
        \texttt{As} makes all accidentals \textbf{s}mall.
\end{itemize}

\medskip   _{accidentals!absolute}
As was mentioned earlier (cf.~Section~\ref{sec:transpositions}), {\PMX}
by default uses the so-called `absolute' notation for inputting
accidentals, i.e.\ the notation explained in
Table~\ref{tab:noteparameters}.
In this notation, there is an obvious one-to-one correspondence between
accented characters in the {\PMX} source file (\texttt{s, f, n, ss, ff})
and the printed characters. This has a disadvantage, but it only
surfaces if you write the {\PMX} file in one key and later transpose it
using the \texttt{K} option described in
Section~\ref{sec:transpositions}. For example, suppose the original key
is F, with 1 $\flat$ in the signature, and you enter \texttt{bn}. Now if
you transpose to the key of C with \texttt{K-3+0}~, that note will be
printed explicitly as F natural, while it should be F sharp.

\medskip       _{accidentals!relative}  _{key signature}
The remedy for such problems is to use another notation, aptly named
`relative' accidental notation, used by some musicians and some
publishers in some countries. In this notation, a sharp, flat, or
natural sign denotes an alteration by a half-tone up, down, or none
\emph{relative to the note which would otherwise be indicated based
on the signature of the piece}. For example, in D~major, with 2
$\sharp$s in the signature, an F natural would be denoted not as
\texttt{fn} but rather as \texttt{ff}, while in d~minor, with one
$\flat$ in the signature, a B natural would be input not as
\texttt{bn} but rather as \texttt{bs}. Similarly, $\natural$s
accidentals refer to the notes prescribed by the signature; e.g., in
G~Major (1 $\sharp$ in the key) a \texttt{gn} sounds as a \emph{g},
while \texttt{fn} sounds as an F sharp.

\medskip     _{transposition}
For automatic transpositions to function properly, it is necessary
that the {\PMX} source for the score to be transposed use the
\emph{relative accidental notation}. This is effected by \texttt{Ar}
:
\begin{itemize}
  \item \texttt{Ar} directs {\PMX} to interpret accidentals
        in \textbf{r}\emph{elative} notation\,%
        \footnote{Note that this makes logical sense only if used in
                  the header, and accordingly there is no way to
                  `undo' this decision further down in a score.
                 }.
\end{itemize}

\subsubsection{Layout details}  _{layout}
When the note head of a dotted note is \emph{on} the line (e.g.\
for a \emph{g} in a violin clef), it is customary to place the
dot slightly \emph{above} the line. In staves with two voices,
there is an alternate custom, viz., to place the dot \emph{above}
the line in the \emph{upper} voice and \emph{below} the line in
the \emph{lower} voice. {\PMX}'s default is the first possiblity;
dots for both voices \emph{above} the line, but it can be
overridden:

\begin{itemize}
_{layout!dotted note in 2-voice staff}
_{notes!dotted note!dots in 2-voice staff}
_{voice!several voices in one staff}

   \item \texttt{Ad} causes the \textbf{d}ot -- for notes that are
         \emph{on} a line -- in the lower voice
         of any two-voice staff to be placed \emph{below} the
         line.
\end{itemize}

\noindent
By default {\PMX} inserts a horizontal gap of \verb#1\elemskip#
between a bar line and the first note in the bar. This can be
changed globally:
\begin{itemize}
  \item \texttt{Aa}$[x]$  sets the space before the first note in
        every bar to to $x$ units of \verb#\elemskip# .
\end{itemize}

\noindent
In {\PMX} it's not yet possible to specify a smaller font for selected
staves. But it can be done using an inline {\TeX} command (For details,
cf.~Section~\ref{sec:inlineTeX} and Section~\ref{sec:varstaves}). If you
do this, then you ought to use the \texttt{AS} option:

\begin{itemize}   _{staves!varying size}  _{\texttt{musicsize}}
   \item \texttt{AS}[\emph{ns}] . The additional sequence of
         \emph{ns} is mandatory here. It consists of exactly as
         many characters \texttt{-} (minus) or \texttt{0} (zero)
         as there  are staves in the score (\texttt{nstaves},
         cf.~Section~\ref{sec:preamble}): \texttt{0} if the font
         size of this staff is normal, \texttt{-} if it is
         small\,%
         \footnote{The sequence of staves is from bottom to top, as
                   described in the preamble. Cf.~p.\pageref{p:header}.
                  }.
         This tells {\PMX} to modify some horizontal spacing decisions
         to account for the smaller font size.
\end{itemize}

\subsubsection{Vertical spacing} _{spacing}  _{spacing!vertical}
\begin{enumerate}
  \item[a)] Spacing of staves within a system: \text{} \\
   If there is more than one staff in a system, {\PMX} computes the
   vertical spacing between the staves automatically. However, the
   algorithm isn't fully robust, and the result may not be pleasing.
   To change the spacing between the staves within a system, you can
   apply a scale factor $x$ to the default, either for the entire
   score, or for the current page only:
   \begin{itemize}
      \item \texttt{AI}$[x]$ multiplies the default
            \textbf{I}nterstaff spacing, \verb#\interstaff#, by the
            decimal number $x$ \emph{for the entire score}. This
            option should be placed in the header.
      \item \texttt{Ai}$[x]$ multiplies the default
            \textbf{i}nterstaff spacing by the
            decimal number $x$ \emph{for the current page only}.
            This option can be placed at the beginning of any input
            block (including the first), and overrides
            \texttt{AI}$[x]$ .
   \end{itemize}
   Note that if there is more than one system on a page, decreasing
   the interstaff spacing will increase the space between systems,
   and vice-versa.

  \item[b)] Spacing of systems on a page: \text{} \\
   {\MusiXTeX} normally draws a virtual box around each system and
   inserts equal vertical space between these boxes. When objects
   protrude above the top staff in a system -- such as the note
   \texttt{c46} in the violin clef -- or below the bottom one, this
   can lead to unequal spacing between the bottom staff line of one
   system and the top staff line of the next. You may prefer that
   this vertical spacing be constant for the whole page:
   \begin{itemize}
      \item \texttt{Ae} ensures that the spacing between the bottom
            staff line of one system and the top staff line of the
            next is constant for any one page\,%
            \footnote{It is generally advised to use the \texttt{Ae}
                      option by default, unless one has a specific
                      reason not to. When using this option, you may
                      Nevertheless, in certain cases you may want to
                      force more vertical space between certain systems.
                      There is a {\TeX} macro, called
                      _{\bs\texttt{spread}$[x]$}
                      \bs\texttt{spread}$[x]$, that can be inserted
                      anywhere in the system before the desired wider
                      gap. Its argument $x$ is the desired extra space,
                      in units of \bs\texttt{internote}
                      (cf.~Section~\ref{sec:inlineTeX}).
                      _{layout!\bs\texttt{spread}$[x]$}
                      _{\MusiXTeX!\bs\texttt{spread}$[x]$}
                     }.
   \end{itemize}

  \item[c)] Sparsely filled pages: \text{} \\
   Sometimes it may happen that a page contains just a few staves
   altogether, and then the white space between staves on such a
   page becomes excessive. In such cases -- specifically, if
   \verb#\interstaff# $>$ \verb#20\internote# -- {\PMX} will, instead
   of the equal spacing described above, group all systems near the
   top of the page. This can, however, be changed by the user:
   \begin{itemize}
      \item \texttt{Av} will suppress the grouping near the top,
            and ensure that systems will always be spread vertically
            regardless of how much white space is left between systems.
   \end{itemize}
   Note that \texttt{Av} acts as a toggle; the second time it is
   issued, the behavior will revert to the default.
  \item[d)] Vertical position of rests in 2-voice staves:
   \begin{itemize}
      \item \texttt{AK} activates special rules for vertical positioning
            of rests in two-voice staves.

            This general option is rather subtle; its explanation by Don
            Simons follows:
            \begin{quote}
             ``Without this option, rests in two-voice staves have
               default positions based on a simple rule that is not
               context-sensitive: those in the lower voice (the one
               before //\,) are 4 \verb#\internote# heights below their
               single-voice default positions, and those in the upper
               voice are 2 \verb#\internote# heights  above the
               single-voice default.

             ``The \texttt{AK} option invokes a set of context-sensitive
               _{rest!alignment in 2-voice staves}
               rules to set the default position. The baseline rule is
               to align the rest in a horizontal line with the next
               following note in the same bar. If there is no following
               note in the bar, then the rest is aligned with the last
               note before the rest.

               \medskip
             ``If there are simultaneous rests in both voices, the old
               rule is applied.

               \medskip
             ``The \texttt{AK} option is a toggle: it may be used at the
               start of any input block to turn these special rules on
               (if previously off) or off (if previously on).

               \medskip
             ``When the \texttt{AK} option is on, it only affects
               places where there are two voices in a staff.

               \medskip
             ``Any user-defined tweaks on the height of a rest will
               supersede the option for that particular rest, i.e.\ the
               tweak will be applied relative to the single-voice
               default position.''
            \end{quote}

            Sometimes you may want the rest to be aligned with the
            \emph{previous} note (the one \emph{to the left} of the
            rest), rather than the following note (the one to the right
            of the rest).

            This can be achieved simply by appending an \texttt{L} (for
            `\textbf{L}eft') to the rest symbol, i.e.\ by writing
            `\texttt{rL}' .
    \end{itemize}
\end{enumerate}

\subsubsection{PostScript type K slurs, ties and hairpins}
                                      \label{sec:usepsslurs}
_{PostScript!slurs, ties and hairpins}

The use of PostScript slurs, ties and hairpins circumvents most of the
shortcomings of the font-based counterparts. Of the two available
packages, only the type K slurs are explicitly supported by {\PMX}.
There is an option, \texttt{Ap}, to enable the use of this package.

\begin{itemize}
  \item \texttt{Ap} activate Type K PostScript slurs, ties and hairpins.

     \texttt{Ap} may also be entered at the beginning of any input block
     to activate certain suboptions controlling shapes and positions of
     the slurs and ties that are to be used. The first few of these
     options affect vertical positioning. When Type K PostScript slurs
     are activated with \texttt{Ap}~, slurs and ties will by default
     \emph{not} have their verticAl positions tweaked to avoid
     tangencies with staff lines.

     To control this type of adjustment, use one of the following
     suboptions to \texttt{Ap}~:
\begin{enumerate}
  \item
  \begin{itemize}
     \item \texttt{+s} activates automatic slur height adjustment,
     \item \texttt{+t} activates automatic tie height adjustment,
     \item \texttt{-s}/\texttt{-t} deactivate the corresponding
           height adjustment.
  \end{itemize}

  \item
    A second suboption, \texttt{+c}/\texttt{-c}, will increase or
    decrease the default curvature of the Type K slurs. The result of
    such commands is cumulative, and more than one suboption
    \texttt{+c} or \texttt{-c} may be used in a single command. If
    the cumulative change goes above \texttt{HH} or below
    \texttt{f}, a warning will be issued, the default will be set to
    \texttt{HH} or \texttt{f}, and processing will continue.

    Local curvature options in individual slur commands (cf.\
    Sec.~\ref{sec:usepsslurs}) will take precedence over the global
    default, but will \emph{not change the default}.
    \begin{quote}
      A special local option, \texttt{n} (`\textbf{n}ormal'), is of the
      `undo' type: it will cause that par\-ti\-cu\-lar slur, no matter
      what the global default happens to be, to have the normal
      curvature, i.e.\ between \texttt{f} and \texttt{h}.
    \end{quote}
  \item
  A third suboption, \texttt{l}, changes the appearance of slurs
     and ties that extend across line breaks:
  \begin{itemize}           _{slurs!across line break}
     \item Every slur/tie at a line break is automagically broken into
           two separate ones; no additional {\PMX} slur start or ending
           commands are required. Vertical and horizontal tweaks for
           the end of the first segment and Start of the second segment
           are entered as options in the normal command that starts the
           slur/tie:
           \begin{enumerate}
              \item the option for the end of segment 1 starts with
                    \texttt{s} (for \textbf{s}ever or \textbf{s}plit),
                    then the usual one or two signed numbers, then a
                    second \texttt{s} and one or two more signed numbers
                    for the start of segment 2,
              \item the usual curvature options \texttt{h, H, HH , f},
                    if included in the starting command for a line-break
                    slur, will apply to segment 1, and to segment 2 if
                    in the closing command. If the slur/tie does not
                    come at a line break, the special position tweaks
                    (those after the \texttt{s} option) will all be
                    ignored, and the curvature tweaks on the closing
                    note take precedence.
           \end{enumerate}
\end{itemize}
\end{enumerate}

         _{global options|see{\PMX!options!global}}
         _{general options|see{\PMX!options!general}}
         The \texttt{l} option can also be invoked globally
         (i.e.\ for the entire score) by specifying \texttt{Apl},
         instead of only \texttt{Ap}, in the header
         (recommended).
\end{itemize}

The third suboption concerns only line-break ties (it does not
affect slurs):
\begin{itemize}
   \item \texttt{+h}/\texttt{-h} activates/deactivates the use
         of special \textbf{h}alf-ties for the second segment of
         line-break ties after the line break. These are
         horizontal at their left end, and are only used if the
         required segment is shorter than 15 pt.
\end{itemize}
Note that this option is somewhat incompatible with the
\texttt{l} option, and they should not be used simultaneously.



\subsection{Page Size} \label{sec:pagesize} \label{p:pagesize}
        _{page!size} _{h symbol@\texttt{h} symbol}
                     _{W symbol@\texttt{W} symbol}
The default page size\,%
\footnote{This means the \emph{extent of the print} on the page. The
          -- empty -- top, bottom, left and right margins depend on the
          paper/printer used; they can not be altered within {\PMX}.
         }
is 740\,pt $\times$ 524\,pt (10.3\," $\times$ 7.3\,", or 261\,mm
$\times$ 185\,mm). To change the height or width, use the special
symbols \texttt{h}[\emph{n}][\emph{u}] or \texttt{w}[\emph{n}][\emph{u}]
in the header.  Here \emph{n} is a decimal number for the new size, and
\emph{u} defines the units: \texttt{i} for inches. \texttt{m} for
millimeters, and \texttt{p} for points. if no unit name \emph{u} is
given, \PMX} uses points as the default.

This command can be used together with \texttt{\%\%} or \texttt{\%!}
(see Section~\ref{sec:scor2prt}) to give the parts made by
\textbf{scor2prt} different page sizes than the parent score.

\medskip
\Note{This usage of the \textbf{h} symbol is not to be confused with
      that for a line of text above a system (see
      Section~\ref{sec:titles})! Although both can occur together in the
      header, they are in fact, different {\PMX} symbols, distinguished
      by their differing syntax.
     }

\subsection{Stem direction of bass notes} \label{sec:stemdirs}
               _{stems!direction of bass notes}  _{B symbol@\texttt{B} symbol}
By default {\PMX} makes stems go \emph{up} for middle-line D's in bass
clef, but \emph{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 the symbol \texttt{B} in the header.

\subsection{Horizontal Spacing}  \label{sec:spacing}
     _{spacing!horizontal}

\subsection*{Minimum Spacing between Notes}

_{W symbol@\texttt{W} symbol} _{spacing!minimum between notes}
{\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 this value to
some other fraction, enter \texttt{W.}$[n]$, where $n$ is a single digit
between \texttt{1} and \texttt{9}, giving the minimum spacing, in tenths
of a notehead width. This adjustment is very rarely used.

\subsubsection*{Extra Horizontal Shifts and hardspace}
     _{spacing!hard space} _{hard space|see{spacing}}

{\PMX} will usually provide satisfactory horizontal spacing. However,
there may be some occasions where you will want to adjust it manually. A
symbol starting with {\tt X} controls one of two available types of
horizontal adjustment:
\begin{enumerate}
  \item a \emph{shift} moves one or more characters in the current voice
        but does not affect any other spacing anywhere,
  \item a \emph{hardspace}, by contrast, is a fixed amount of space
        inserted at a particular time. The horizontal positions of
        everything in all staves in the system will be adjusted to
        accommodate the added space while maintaining vertical
        alignment.
\end{enumerate}
Here are the syntactic possibilities:
\begin{itemize} _{X symbol}
   \item \texttt{XS}$[x]$ (for \textbf{S}hift). This command shifts the
         the next character; $x$ is a decimal number, giving the amount
         of shift, in units of a notehead width.
   \item \texttt{X:[}$x$\texttt{]} or \texttt{X[}$x$\texttt{]:}
         initiates a ``group shift'', which operates like
         \texttt{XS[}$x$\texttt{]}, except that everything from the
         insertion point onward in the current voice is shifted until a
         termination symbol (``shift end'') is encountered.
   \item \texttt{X:} ends a ``group shift''.
   \item \texttt{X}$[x]$ (without any \texttt{S} or \texttt{:}) is a
         so-called \emph{hard space}. It inserts the specified space,
         given in units of notehead widths, at the present point in
         \emph{all staves} of the system. If $x$ is negative, space will
         be removed.
\end{itemize}

_{X symbol!with \textbf{scor2prt}}
Because horizontal spacing in parts will usually differ from that in the
score, \textbf{scor2prt} (cf.~Section~\ref{sec:scor2prt}) will by default
copy \emph{only} the shift commands \texttt{XS}$[x]$, \texttt{X:}$[x]$
and \texttt{X:} into the parts, but \emph{not} the hardspace command
\texttt{X}$[x]$ .


\medskip
This behavior can be overridden using the methods described in
section~\ref{sec:scor2prt}. There is, however, an alternative method that
helps to keep {\PMX} score files neat and readable: add the suboption
\texttt{B} or \texttt{P} (without space, as usual) to the \texttt{X}
symbol:
\begin{itemize}
   \item \texttt{B} (for \textbf{B}oth): with this option, the spacing
         symbol is to be applied to \textbf{b}oth score and part,
   \item \texttt{P} (for \textbf{P}art): with this option, the spacing
         symbol is to be applied to the \textbf{p}arts only.
\end{itemize}

\section{Macros}  \label{sec:macros} _{\PMX!macros} _{M symbol@\texttt{M} symbol}

A {\PMX} macro is a single symbol that stands literally for any
any string of characters that may occur in the input file\,%
\footnote{Note to seasoned programmers: {\PMX} macros are not really
          macros in the usual sense, but merely string abbreviations;
          they \emph{do not allow} for variables.
          _{\PMX!macros!no variables}
         }.
Macros may be useful to save tedious typing and disk space, and make
{\PMX} source text more readable if you need to repeat the same string
many times in a score.

\medskip
You may define up to 20 macros in any single {\PMX} input file. There is
no practical limit to the length of the character string that a
macro represents, but of course it must respect the {\PMX} rules on the
length of input lines and what must go on separate lines.

\medskip
Macros only exist within the {\PMX} input file where they are defined;
you can define a completely new set of macros in another {\PMX} input
file. Conversely, if you want to re-use the macros of file
\texttt{myopus1.pmx} in \texttt{myopus2.pmx}, you need to copy them
explicitly from one file to the other.

\medskip
There are two distinct ways to define and record a new macro or
redefine an existing one:

\begin{enumerate}
   \item to \textbf{R}\emph{ecord} a \textbf{M}acro: type
         \texttt{MR}$[n]$, followed by a space, as usual. $n$, the
         ``name'' of the macro, is an integer between 1 and 20.
         Everything you type after this will be processed normally, at
         that point in the input file, as well as stored, until you end
         the macro by entering the symbol \texttt{M},
   \item to \textbf{S}\emph{ave} a \textbf{M}acro: type
         \texttt{MS}$[n]$. Everything you type after this will be
         recorded (saved) as you enter it, \emph{without processing}
         the {\PMX} code. When saving macros, it is usually best to put
         them in the header, for readability's sake.
\end{enumerate}

Whenever you would otherwise need to re-enter the same character string,
you can simply \texttt{P}lay back the macro by typing \texttt{MP}$[n]$~.

\medskip
Macros can be redefined at will; {\PMX} will issue a warning whenever
this occurs.

\bigskip  _{\textbf{scor2prt}!macros} When you use
macros and want to make separate parts
(cf.~Section~\ref{sec:scor2prt}), some care is necessary:
\textbf{scor2prt} will transfer a \texttt{MR} macro only into the part
where it originated, but will transfer \texttt{MS} macros into all
parts.

\medskip
So if you want to make macro 1, which you will use in several or all
parts and then use it immediately in the part in which you write it,
dont use simply \verb#MR1#, but rather
\begin {verbatim}
              MS1
              MP1
\end{verbatim}

\bigskip
Fig.~\ref{fig:macro} contains an example of the use of macros.

\bigskip
\begin{figure}[!htb]
	\begin{center}
           \includegraphics[scale=.82]{eps/macro.eps}  \\[2ex]
------------------------------------------

\begin{minipage}{300pt}
\small
\begin{verbatim}
% macro 2 saved:
MS2 e4 f g2 o_ | M
% Bar 1  (macro 1 recorded and processed):
Rl MR1 c45 d e c | M
% Bar 2  (macro 1 played):
MP1
% Bar 3 (macro 2 played):
MP2
% macro 4 saved:
MS4 c4 g c2 o_ M
% Bar 4 (macro 2 played):
MP2
% Bar 5 (macro 3 recorded and processed):
MR3 g85 a g f e4 c | M
% Bar 6 (macro 3 played):
MP3
% Bar 7 (macro 4 played):
MP4 |
% Bar 8 (macro 4 played):
MP4 Rr /
%
\end{verbatim}

\vspace*{2ex}
\end{minipage}
	\end{center}
	\caption{``\emph{FrŠre Jacques}'' (usage of macros)}
	\label{fig:macro}
\end{figure}

\section{Inline {\TeX} commands}    \label{sec:inlineTeX}
      _{inline \TeX}

It may be worthwhile to reiterate at this point the very different
intentions of the software ingredients which make up the {\PMX} tool. It
is, in fact, a hierarchy:
\begin{enumerate}
   \item       _{\TeX}  _{Knuth, Donald E.}
         At the base of it all is {\TeX}. {\TeX} (written by Donald
         E.\ Knuth) is a general and extremely powerful tool for
         typesetting high-quality documents on a computer that are ready
         for printing\,%
         \footnote{``Its emphasis is on art and technology, as in the
                   underlying Greek word.'' (quote from the introduction
                   of \emph{the {\TeX}book}, the authoritative book on
                   {\TeX}, by Donald E.\ Knuth. _{Knuth, Donald E.}
                  }.
         But {\TeX} is much more than that: it is a full-grown and
         powerful computer programming language with which -- if you are
         a {\TeX}pert -- you can do almost anything.

         \medskip
         There is, however, a price to pay for this power: while you
         don't have to be a professional computer programmer to use
         {\TeX}, a pretty good familiarity with the basics of
         programming is unavoidable.
   \item            _{\MusiXTeX}  _{Taupin, Daniel}
         {\MusiXTeX} (written essentially by Daniel Taupin) is a
         `macro' for {\TeX}\,%
         \footnote{To be precise, {\MusiXTeX} consists of a very
                   extensive set of {\TeX} `macros' and music
                   typesetting fonts.
                  }.
         That alleviates most of the {\TeX} programming tasks for the
         special purpose of typesetting music. Thus, while it helps to
         have a programming background, such a background is not
         absolutely essentially for someone who just wants to write a
         few simple music scores.
   \item           _{\PMX} _{Simons, Don}
         {\PMX}, the `preprocessor' for {\MusiXTeX} written by Don
         Simons and described in detail in this tutorial, is yet another
         level of abstraction on the long way from the musical ideas
         that make up a score to getting ink on the paper at certain
         points. The whole purpose of {\PMX} is to make typesetting of
         music with {\MusiXTeX}/{\TeX} accessible to people with
         essentially \emph{no} prowess in computer programming.
\end{enumerate}
As a consequence of this hierarchy, {\PMX} is vastly simpler to use than
{\MusiXTeX}, which in turn is simpler than straight {\TeX}. But the
converse of this is also true: there are elements in {\MusiXTeX} that
are not directly accessible with the {\PMX} language, just as you cannot
unleash the full power of {\TeX} with {\MusiXTeX} alone.
So to allow the user full access to `lower-level' {\MusiXTeX} or {\TeX} --
while maintaining its higher-level notational simplicity -- {\PMX}
supports the inclusion of {\TeX} commands either directly in the
{\PMX} input file or via an external file.

\subsection{Including {\TeX} Commands in the \texttt{.pmx} source file}
            _{inline \TeX!in \texttt{.pmx} source}
The normal way for a {\PMX} user to insert user-defined {\TeX} code is
to enter it directly in the \texttt{.pmx} input file; this is what is
referred to as ``\,inline {\TeX}\,'' in this tutorial. There are four ways
to do that; these differ mainly in where the {\TeX} code will appear in
the {\PMX} output \texttt{.tex} file. The first 3 of these have \bs\ ,
\bs\bs\ or \bs\bs\bs\ (1, 2 or 3 backslashes) as a starting symbol, then
comes a sequence of {\TeX} commands, then another \bs\ (backslash) as a
terminating symbol, followed by the usual space\,%
\footnote{This means that type 1, 2, and 3 {\TeX} strings may \emph{not}
          contain the \TeX\ macro `\bs\,\,\,' \,(backslash-space). If
          you really need that, replace it by \bs\texttt{relax }.
         }.
All three of these must be contained fully in \emph{one line of input},
limited by default to 128 characters (cf.~Section~\ref{sec:limits}); but
this one line can contain any number of concatenated {\TeX} commands.

\medskip
The above description needs clarification on a subtle point: the
starting symbols \bs\ , \bs\bs\ or \bs\bs\bs\ \, are \emph{not} really
{\PMX} symbols in the sense used throughout this tutorial, in that there
would be `white space' after them, but the {\TeX} command(s) follow them
\emph{without a blank}. This has to do with the fact that all {\TeX}
commands -- called `control sequences' -- start out with a \bs\ . And
thus the last of the starting backslashes (the only one for type 1,
the second one for type 2, the third one for type 3) counts as the
{\TeX} control character of the following {\TeX} command. For example,
if you wanted to define a new {\TeX} command \verb#\Myspace# as a type 1
inline command, you would write
\begin{center} \verb#\def\Myspace\hskip{10mm}\ # \end{center}
whereas if it is to be a type 3 inline command, it would read
\begin{center} \verb#\\\def\Myspace\hskip{10mm}\ # \end{center}
in other words: the starting symbol itself also provides the first \bs\
of the {\TeX} command (control sequence).

This convention can also be seen clearly in the examples given below.

\bigskip
Here are the characteristics of the first three types:
\begin{description}   _{inline \TeX!Type 1/2/3/4}
   \item[Type 1 ( \bs\ \dots \bs\ ) : ]
        a Type 1 string usually serves to define or execute a command
        that is only needed locally for the current line of music, right
        after the place where it is entered in the \texttt{.pmx} file.
        {\PMX} inserts it in the resulting \texttt{.tex} file right
        before the {\MusiXTeX} command for the next note or rest.
        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.

        \Note{If an inline {\TeX} string contains a new {\TeX}
              definition, this definition is in general \emph{not}
              local; depending on circumstances, it can remain valid
              throughout the score and for \emph{all instruments} unless
              redefined somewhere\,! This is true for all types of
              inline {\TeX}, Type 3 in particular. So be careful!
             }
   \item[Type 2 ( \bs\bs\ \dots \bs\ ) : ] a Type 2 string usually serves
        to define or execute a command that is needed throughout the
        entire score. It will appear near the top of the \texttt{.tex}
        file, right before the \bs\texttt{startmuflex}, regardless of
        where it appears in the \texttt{.pmx} file.
   \item[Type 3 ( \bs\bs\bs\ \dots \bs\ ) : ] Type 3 strings will appear
        in the \texttt{.tex} file right before the \bs\texttt{xbar} or
        \bs\texttt{alaligne} of the current input block, i.e.\ before
        its first bar line. Thus a Type 3 string is typically used when
        you want to redefine a previously defined {\TeX} command, to be
        valid from a certain point on, but not before.
   \item[Type 4 : ]   \label{sec:inlinetypefour}
        The fourth way of inserting inline {\TeX} in a \texttt{.pmx}
        file is different from the first three in several ways:
        \begin{itemize}
           \item it is started by the character sequence \verb#---#
                 (triple dashes), on a line by itself, as the very first
                 line of the \texttt{.pmx} file,
           \item it is terminated by the next appearance of the same
                 character sequence, \verb#---# (triple dashes), on a
                 separate line,
           \item it can contain any number of lines with {\TeX} code,
                 although every single of these lines is again
                 restricted to a total of 128 characters,
           \item the lines of {\TeX} code between the opening and
                 terminating triple dashes will be copied
                 \emph{literally} to the very top of the \texttt{.tex}
                 file.
        \end{itemize}
        So Type 4 can also be (ab)used to copy comment lines
        literally from the \texttt{.pmx} file to the \texttt{.tex} file.
        This is convenient for documentation purposes.
\end{description}

\medskip _{inline \TeX!handled by \textbf{scor2prt}}
Another difference of practical importance is the way in which
\textbf{scor2prt} handles these type of inline {\TeX} when making
separate parts (cf.~Section~\ref{sec:scor2prt}): types 2-4 will be
copied into all parts, while type 1 only goes into the part in which it
appears in the original \texttt{.pmx} file.

\bigskip\bigskip
To understand better the differences between these 4 types on inline
{\TeX}, it may be useful to study the basic structure of the {\TeX} file
\texttt{inlinesample.tex}, given in Table~\ref{tab:inlinesample.tex},
produced from the {\PMX} input file \texttt{inlinesample.pmx}, given in
Fig.~\ref{fig:inlinesample.pmx}. In doing so, you may want to look at
the box on p.~\pageref{p:inlinesample.txt}.

\begin{figure}[!ht]
	\begin{center}
           _{\MusiXTeX!\bs\texttt{PED}}  _{\MusiXTeX!\bs\texttt{DEP}}
           \includegraphics[scale=.82]{eps/inlinesample.eps}  \\[2ex]
        ------------------------------------------
        \begin{minipage}{380pt}
        \small
        \begin{verbatim}
% beginning of inlinesample.pmx
---
% This sample demonstrates the use of all 4 types of inline TeX
---
% PREAMBLE:
%
1     1
1     2      0    0
0     0
1     2      16   .0
%

t
./
% BODY:
% HEADER:
w80m
\\nobarnumbers\
% begin of music input:
g24 | /
\\\systemnumbers\
\zcharnote{-2}{\PED}\ a D"\DEP"+3+15 | /
\\\barnumbers\ c Rb /
% end of inlinesample.pmx
        \end{verbatim}
        \end{minipage} \\[2ex]
        \end{center}
        \caption{A sample for the use of inline {\TeX} }
        \label{fig:inlinesample.pmx}
\end{figure}

\clearpage
\begin{table}[!ht]
        \begin{center}
        \begin{minipage}{400pt}
        \small
        \begin{verbatim}
     %%%%%%%%%%%%%%%%%
     %
     % inlinesample.tex
     %
     %%%%%%%%%%%%%%%%
 6   % This sample demonstrates the use of all 4 types of inline TeX
 7   \input musixtex
 8   \input pmx
 9   \input musixmad
     \smallmusicsize%
     \nopagenumbers
     \tracingstats=2\relax
     \hsize=227pt
     \vsize740pt
     \def\nbinstruments{1}
     \setstaffs11
     \setclef10
     \setname1{ }
     \generalsignature{ 0}%
     \parindent 0pt
     \elemskip1pt\afterruleskip1.000pt\beforeruleskip0pt\relax
     \stafftopmarg0pt\staffbotmarg5\Interligne\interstaff{10}\relax
23   \nostartrule
24   \readmod{inlinesample}
25   \nobarnumbers%
     \startmuflex\startpiece\addspace\afterruleskip%
     % BODY:
     % begin of music input:
     \znotes\zcharnote{16}{\titles{2.0}{}{0}{}{0}{}{0}}\en%
     % Bar count 1
31   \pnotes{4.00}\hu g\en%
32   \systemnumbers%
     % Bar count 2
34   \alaligne
35   \pnotes{4.00}\zcharnote{-2}{\PED}\txtdyn{-2}{15.0}{\normtype\it \DEP}%
     \hu{'a}\en%
37   \barnumbers%
     % Bar count 3
39   \xbar
     \pnotes{4.00}\hl{'c}\en%
     \endpiece
     \vfill\eject\endmuflex
     \bye
        \end{verbatim}
        \end{minipage}
        \end{center}
        \caption{\texttt{inlinesample.tex}, as produced from
                 \texttt{inlinesample.pmx}
                }
        \label{tab:inlinesample.tex}
\end{table}

\clearpage
% _{inline \TeX!in external file}
\begin{table}[!ht]
\begin{center}       _{inline \TeX!placement in \texttt{.tex} file}
\fbox{
\begin{minipage}{350pt}
Here is a short survey of what happens in the file
\texttt{inlinesample.tex} (cf.~Table~\ref{tab:inlinesample.tex}),
produced from \texttt{inlinesample.pmx}
(cf.~Fig.~\ref{fig:inlinesample.pmx}):

\begin{itemize}
   \item first, after the file name comment, which is inserted
         automatically by _{\textbf{pmxab}} \textbf{pmxab}, the Type 4
         string (the comment line on the top of the \texttt{.pmx} file)
         is inserted [line 6],
   \item then the files \texttt{musixtex.tex, pmx.tex} and
         \texttt{musicmad.tex} are always read in [lines [7,8,9]. This
         means that the \texttt{.tex} that {\PMX} produces has
         \emph{access to all the {\TeX} macros} defined in these files,
         and therefore you can use all of these in your inline {\TeX}
         commands,
   \item next, up to and including \bs\texttt{nostartrule} [line 23],
         there are a lot of settings, the details of which need not
         concern us here,

         \medskip
        The following {\TeX} macro [line 24],
        \bs\texttt{readmod{sample}} , tells {\TeX} to read in the file
        \texttt{inlinesample.mod} (if it exists). The file
        \texttt{inlinesample.mod} may contain any valid {\TeX} code of
        your choosing (cf.~Section~\ref{sec:external} for details on
        this),
   \item next [line 25] is the Type 2 string
         ``\bs\bs\texttt{nobarnumbers}\bs''. Type 2 strings are
         \emph{always} inserted at this point of the \texttt{.tex} file,
   \item \bs\texttt{startmuflex} [line 26] -- never mind what exactly it
         does -- is the actual beginning of the musical code,
   \item several lines down [line 31] there is an item
         \bs\texttt{hu g} : this is the half-note $g$ of the first
         bar,
   \item [line 32] contains the Type 3 string
         ``\bs\texttt{systemnumbers}\bs''. This changes the bar
         numbering scheme to the {\PMX} default
         (cf.~Section~\ref{sec:barnumbers}). {\PMX} inserted this Type
         3 string right before the next \bs\texttt{alaligne} [line 34],
   \item [line 35] contains the Type 1 string
         ``\bs\texttt{zcharnote{-2}}\bs\texttt{PED}\bs'', which prints
         the {\MusiXTeX} pedal\,%
         \footnote{The `end of pedal' symbol \bs\texttt{DEP} is coded
                   here in an alternative (perhaps simpler) way by using
                   a {\PMX} dynamics textual symbol
                   (cf.~Section~\ref{sec:dynamics}).
                   _{dynamic marks!textual}
                  },
   \item [line 37] contains another Type 3 string
         ``\bs\texttt{barnumbers}\bs'', before the code for bar 3 ,
         inserted right before \bs\texttt{xbar} in line 39 (coding the
         bar line). This changes the bar numbering scheme once again.
\end{itemize}
\end{minipage}
      }
\end{center} \label{p:inlinesample.txt}
\end{table}

\bigskip
\subsection{Denoting pitch in inline {\TeX} }
_{inline \TeX!pitch given as a number}
_{pitch!in inline \TeX!}

When using inline {\TeX}, you should be aware of a subtle aspect, which
can be a hazard:

\smallskip
In {\MusiXTeX}, you can always refer to a pitch with a number, rather
than a letter, and that number denotes exactly the position on whatever
staff you are using, counting from the bottom line as $0$ .

When you use this for a pitch, it will not be transposable, nor will it
respect (or indeed affect!) the memory \PMX\ keeps on the pitch: remember
that {\PMX} doesn't interpret any inline {\TeX} .

You should keep this in mind when designating a pitch within an inline
{\TeX} command.

\bigskip\noindent
We close this section with two practical examples and a final remark:
\begin{itemize}
   \item  _{\textbf{musixpss}}
         As was stated in Section~\ref{p:useMslurs}, when using Type
         M slurs you need to insert the line
         \begin{center}
            \bs\bs\texttt{input~musixpss{\bs}relax}\bs\
         \end{center}
         into the header of the \texttt{.pmx} file. This tells {\PMX} to
         read in the file \texttt{musixpss.tex}, which contains the
         macros for Type M slurs.

         \medskip
         This is the case of a type 2 inline {\TeX} string, and thus
         the input command is added to the \texttt{.tex} file right
         before \bs\texttt{startmuflex} (which is where it belongs).
   \item _{clefs!exotic} _{clefs!octave clefs} _{clefs!symbols}
         _{clefs!empty} _{octaviation!of clefs}
         Sometimes one needs clefs other than those defined in {\PMX}
         (cf.~Section~\ref{sec:numinput}). Some special clef symbols
         (among them no clef at all) are defined in {\MusiXTeX} and can
         be invoked by the command \bs\texttt{setclefsymbol} (cf.~the
         {\MusiXTeX} manual, Sec.~2.21.2). The most common of these are
         octave treble and octave bass clefs, in which a small $8$ is
         attached to either the top or the bottom of the clef symbol. To
         get a higher octave treble key for instrument number $2$, for
         example\,%
         \footnote{Matters are more complicated for instruments with
                   more than 1 staff, such as piano or organ, because
                   the number in the command refers to the number of the
                   \emph{instrument}, not the staff. Cf.~the
                   {\MusiXTeX} manual, Sec.~2.27.10 for details.
                   },
         just add the following type 2 inline {\MusiXTeX} command
         \begin{center}
           \bs\bs\texttt{setclefsymbol}\{\texttt{2}\}
           \qquad \bs\texttt{trebleoct}\bs \qquad.
         \end{center}
         The other 3 octave clef symbols are \bs\texttt{treblelowoct},
         \bs\texttt{bassoct},\bs\texttt{basslowoct}, for lower octave
         treble, higher octave bass and lower octave bass clefs, resp.

\end{itemize}
More examples can be seen in Section~\ref{sec:tricks} and in some of the
scores of the appendix.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%% Temp %%%%%%%%%%%%%%%%%%%%%%% Fri 2010 Dec 17 /15:6 /ccn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{Putting {\TeX} Commands in an external file}
               \label{sec:external}  _{inline \TeX!in external file}

_{directory}
{\PMX} provides one further option for entering an unlimited set of
{\TeX} commands, read into the {.tex} file by \verb#\readmod# just
before the \bs\texttt{startmuflex} line. command, and before any Type 2
inline {\TeX} strings. Simply put the commands into a text file named
[\emph{filename}]\texttt{.mod} in the current directory\,%
\footnote{This feature is retained mainly for backward compatibility
          with previous versions of {\PMX}; it has now been essentially
          replaced by the 4 options for inline {\TeX} strings described
          above.
         }.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           PMX tutorial by ccn / chapter C starts here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Special Features}  \label{sec:specials}

\section{Making Parts from a Score}
     \label{sec:scor2prt}  \label{p:scor2prt} _{\textbf{scor2prt}}

Separate parts can be made from a score with the tool \textbf{scor2prt}
(included in the standard {\PMX} distribution). Suppose you want to
produce the parts to the ``Mauerische Trauermusik''
(Fig.~\ref{fig:mtrauermus}), and the \texttt{.pmx} file of that score is
called \verb#mtrauermus.pmx#. All you to need to do is to run
\begin{center}\begin{verbatim}
        scor2prt mtrauermus
\end{verbatim}\end{center}
from the command line (if you omit the file name, you will be prompted
for one). The program will then create the following \texttt{.pmx}
files, one for each instrument\,%
\footnote{As is explained in Section~\ref{sec:mtrauer}, this particular
          {\PMX} source has defined both the oboes and the violins as
          one two-staves instrument each, so that there is a total of
          only 8 `instruments'.
         }:

\medskip
\hspace*{2.5em}
\begin{minipage}{20em} %
  \texttt{mtrauermus1.pmx} \qquad [\,Violoncello\,]                  \\
  \texttt{mtrauermus2.pmx} \qquad [\,Viola\,]                        \\
  \texttt{mtrauermus3.pmx} \qquad [\,Violins\,]                      \\
  \texttt{mtrauermus4.pmx} \qquad [\,French Horn II, in C\,]         \\
  \texttt{mtrauermus5.pmx} \qquad [\,French Horn I, in E $\flat$\,]  \\
  \texttt{mtrauermus6.pmx} \qquad [\,Basset Horn I, in F\,]          \\
  \texttt{mtrauermus7.pmx} \qquad [\,Clarinet in F\,]                \\
  \texttt{mtrauermus8.pmx} \qquad [\,Oboes\,]
\end{minipage}

\medskip
To obtain the parts, you then need to run each of these files through
{\PMX}, in the usual way.

As can be seen in the example, the parts files will be named
[\emph{yourscorename}][\emph{n}]\texttt{.pmx}, where [\emph{n}] is the
number of the instrument, by default; but the names of the files
created by \textbf{scor2prt} can be changed from within the {\PMX} file
for the whole score, the ``parent file''. For example, to cause the
file for instrument 3 to be named \texttt{mviolins.pmx}, include the
command \texttt{AN3"mviolins"} in the header of the parent file
(cf.~Table~\ref{tab:A}).

\bigskip
In the remainder of this section we describe how to control the layout
of the parts separately from that of the score by using commands that
are placed in the parent file.  This eliminates the need for editing the
\texttt{.pmx} files for the parts separately.  You can accomplish all
the editing in the parent file, and then re-run \textbf{scor2prt} as
required. Thus both the score and the parts can be corrected together,
and the parts need not be re-edited each time they are re-generated from
the score.

\subsection{Usage}
_{\textbf{scor2prt}!usage} _{comments!usage with \textbf{scor2prt}}

Since comment lines are by definition disregarded by {\TeX} and by the
{\PMX} program itself (\textbf{pmxab}, to be exact), they can, with a
slight extension of their syntax, be used to transfer information
\emph{meant for the parts only}\,%
\footnote{This is quite a useful method, employed in a similar way by
          other programs, such as the PostScript language.
          _{PostScript}
         }.
The following rules are used for this by the \verb#scor2prt# program:
\begin{itemize}
   \item If a line has \texttt{\%} in columns 1 and a space in column 2,
         it is considered a regular comment and transferred as such to
         all parts.
   \item If a line has \texttt{\%\%} in columns 1-2, both it \emph{and
         the following line} will be ignored when making parts.  If the
         ignored line (the second line) has \texttt{h}, \texttt{l}, or
         \texttt{T} in its first column, then \emph{one additional line}
         will be ignored (cf.~\ref{sec:titles} for the rationale behind
         this rule).
   \item If a line has \texttt{\%!} in columns 1-2, these first 2
         characters will be stripped, and the rest of the line will be
         put in the \texttt{.pmx} files for \emph{all} the parts.
   \item If a line has \texttt{\%}[\emph{h}] in columns 1-2, where
         \emph{h} is the hexadecimal digit representing the instrument
         number (\texttt{1, 2,..., 9, a, b, c}), the first two
         characters will be stripped and the rest of the line
         transferred to the part for instrument \emph{h} \emph{only} .

         \smallskip
         A good example for this usage is the page break(s) in a longer
         score, where the appropriate page numbers for the parts will be
         different from those in the full score.
         For example, to force a line break to system 15 and a page
         break to page 2 in \emph{part 11 only}, enter
         \texttt{\%bL15P2}.

             _{\textbf{scor2prt}!HEX digit usage incompatible with
                                 previous {\PMX} versions}

         \Note{The use of the hexadecimal digits \texttt{a-c} in this
               rule creates a potential incompatibility with previous
               versions of {\PMX}. To minimize this, the character after
               ``{\tt\%}" will \emph{only} be interpreted as a part
               number if it represents a number less than or equal
               \texttt{noinst}, as given in the parent file; otherwise
               the entire line will be treated as an ordinary comment,
               and transferred to all parts.
              }

   \item In addition to all entries in the header except \texttt{I}
         options (cf.\ Sec.~\ref{sec:MIDI}, p.~\pageref{sec:MIDI}), the
         following {\PMX} symbols \emph{with all their options} will
         automatically be copied to \emph{all parts} (unless the
         previous line starts with \texttt{\%\%}, of course):

         \begin{center}\begin{tabular}{l@{\qquad}l} \texttt{R}    & (bar
            symbol) \\ \texttt{V}    & (volta) \\ \texttt{K}    & (key
            change or transposition) \\ \texttt{A}    & (global options)
            \\ \end{tabular}\end{center} This is true for
            \texttt{R,V,K}, in spite of the fact that they can be
            entered in the \emph{first} voice of the score only!
            \end{itemize}

\subsection{The \texttt{S} symbol}   \label{sec:Ssymbol}
            _{S symbol@\texttt{S} symbol}

\begin{itemize}
   \item \texttt{S}[\emph{n}]:

         By default the total number of systems in each part will be the
         same as in the score.  If you want to override this, you can do
         that with \texttt{S}[\emph{n}], where \emph{n} is
         the desired number of systems. \texttt{S}[\emph{n}], if used,
         must appear in the header of the parent file. Legally, you
         could use \texttt{S}[\emph{n}] to reset the number of systems
         for the parent file itself, which you had just defined in the
         preamble. That, of course, does not make much sense, but in
         the form \\
         \text{\quad}\texttt{\%!S}[\emph{n}] \\
         or \\
         \text{\quad}\texttt{\%}[\emph{k}]\texttt{S}[\emph{n}] \\[1ex]
         it does, because then it does \emph{not} affect the full
         score, \emph{but all parts}, or part k only, resp. \\
         \texttt{barsant.pmx}, one of the examples given in Section
         \ref{sec:donsexamples}, includes a demonstration of this.
   \item \texttt{S}[\emph{n}]\texttt{P}[\emph{m}]:

         \textbf{scor2prt} will also compute how many pages it thinks
         each part should have, and enter that into the preamble for
         that part.  If you wish to override that, then insert into the
         parent file \texttt{\%3S14P2} for example, which would 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.

   \item \texttt{S}[\emph{n}]\texttt{m}[\emph{k}]:

         A musicsize of 20 is the default in all parts.  This may be
         overridden with the option \texttt{m} in the symbol \texttt{S}:
         e.g., \texttt{\%2S15m16}. Again, you must specify the number of
         systems before setting the musicsize.
\end{itemize}

\Note{Keep in mind the distinction among the various usages of
      \texttt{P}:
      \begin{itemize}
         \item as an option with \texttt{S}, it sets the total number of
               pages in a part,
         \item as an option with \texttt{L}, it forces a page break,
         \item as a {\PMX} command on its own, it controls page
               numbering and centered headings.
      \end{itemize}     _{P symbol@\texttt{P} symbol}
     }
\subsection{Other usage rules}
                   _{\textbf{scor2prt}!usage}
\begin{itemize}

   \item Inline {\TeX} strings of Type 2-4 will be copied to all parts,
         while a type 1 inline {\TeX} string will only go into the part
         in which it occurs in the parent file.
   \item _{spacing!hard space use with \textbf{scor2prt}}
         User-defined hardspaces (\texttt{X} without \texttt{:}) are by
         default not copied to parts. There are two ways to change this
         default: _{X symbol}
         \begin{enumerate}
            \item use the options of the \texttt{X} command
                  (cf.~Section~\ref{sec:spacing}): \texttt{B} causes
                  the hardspace to be used in \textbf{b}oth score and
                  parts; \texttt{P} puts it into the \textbf{p}arts, but
                  not the score,
            \item to insert \emph{x} notehead widths of hardspace into
                  part \emph{n}, place the symbol
                  {\tt\%}[\emph{n}]\texttt{X}[\emph{x}], on a line of
                  its own, in the parent file.
         \end{enumerate}
         _{page!numbering!with \textbf{scor2prt}}
         _{\textbf{scor2prt}! page numbering}
   \item As was already noted (cf.~Section~\ref{sec:pagenumbers}), a
         \texttt{P} symbol for page numbering in the parent file is
         ignored when making parts.  To initiate page numbering in the
         parts, use, for example, \texttt{\%!P} , with appropriate
         options added, anywhere within the {\PMX} code representing the
         first page of the parts\,%
         \footnote{From \TeX 's standpoint the command must occur
                   between the beginning and end of the page on which
                   the numbering is to begin.
                  }.
         It will often be useful in this case to use the option
         \texttt{c} , which by default causes the instrument name to be
         centered in small type at the top of every page after the
         first.
   \item _{MIDI!with \textbf{scor2prt}} \label{p:MIDI}
         MIDI commands, i.e., those starting with \texttt{I}, will never
         be copied into parts, unless they are in a special comment line
         as just described.
   \item _{rest!multibar rest}
         One function of \textbf{scor2prt} is to condense consecutive
         bars of rest into a single group of special printed characters
         with a number above it. Thus \textbf{scor2prt} will automatically
         insert \texttt{rm} symbols (cf.\ Sec.~\ref{sec:rests}) into the
         \texttt{.pmx} files for the parts where appropriate.  However,
         for this feature to work, the \emph{first} full-bar rest in the
         sequence \emph{must} have its duration explicitly defined in
         the parent file, either with a digit or with \texttt{p}.  In
         other words, the feature will not work if the first rest in the
         sequence inherits its duration from the previous note.
\end{itemize}

\bigskip
\Note{In standard {\TeX} the rule for comments is: a \% character
      \emph{and all text that follows it on the same line} is treated as
      a comment, i.e.\ it is totally ignored by the program. As a
      consequence of this rule, many users of {\TeX} have a habit of
      adding comments at the end of short lines of text, instead of
      writing a whole comment line, starting with a \% in column 1 .
      This is fine as far as {\PMX} is concerned; but
      _{\textbf{scor2prt}} \textbf{scor2prt} redefines this rule a bit
      and in general \emph{will misinterpret comments added in the same
      line after} some legal {\PMX} code. _{comments!usage with
      \textbf{scor2prt}}

      \medskip
      \emph{So when you intend to make parts using} \textbf{scor2prt},
      it is good practice to restrict true comments to lines with \%
      \emph{in column} 1, \emph{followed by at least one blank}.
     }

\section{Making MIDI Files}        \label{sec:MIDI}
_{MIDI}

Some users of {\PMX} and {\MusiXTeX} may never have heard of MIDI and
may therefore be a bit bewildered by this section. So here is a quick
introduction:
\begin{quotation}
   MIDI stands for ``\textbf{M}usical \textbf{I}nstruments
   \textbf{D}igital \textbf{I}nterface''. It is essentially a standard,
   consisting of a language and its hardware implementation, designed
   to produce digitally coded music with a device like a synthesizer or
   a multi-media computer. If your computer is equipped with the
   appropriate hardware and software (which is standard on PC's these
   days), you can listen to the music encoded in a MIDI file on your
   computer just as you can read the text encoded in a text file\,%
   \footnote{If you are interested in details on MIDI in general, a good
             place to start is the home page of the ``MIDI
             Manufacturer's Association'':
             \href{http://www.midi.org/about-midi/aboutmidi3.shtml}%
             {\texttt{http://www.midi.org/about-midi/aboutmidi3.shtml}%
             }~.
            }.
\end{quotation}

\bigskip
This section describes how to produce such MIDI files when writing a
piece of music with {\PMX}. When using this facility, you should be
aware both of the general restrictions of MIDI and the special ones that
{\PMX} imposes:

\begin{itemize}
   \item First of all, you should not expect the MIDI files that {\PMX}
         produces to be anything that resembles a performance of the
         piece by real, human musicians. While MIDI does make different
         shades of sound for the different instruments, the lack of any
         kind of expressivity (rhythmic accentuation, dynamics, vibrato,
         intonation etc.) does not really do justice to the musical
         character of acoustic instruments.

         \medskip
         So the MIDI file can be hardly more than an acoustic check on
         whether the notes produced are indeed what you had intended.
         But for that purpose it can be of great help in coding a score
         with {\PMX}, so it is generally advisable to produce the MIDI
         files.
   \item _{grace notes!not in MIDI} _{ornaments!not in MIDI}
          _{repeats!not in MIDI} _{volte!not in MIDI}
          _{volte!not in MIDI} _{slurs!in MIDI}
         \label{p:midi}
         The MIDI module of {\PMX} does not recognize graces, ornaments,
         repeats, volte, or segnos.  The only ties that are recognized
         are those using \texttt{s}, \texttt{t} or \texttt{(} \,; alone,
         with no explicit ID number.
   \item _{transposition!not with MIDI} _{octaviation!not with MIDI}
         Neither can the module reproduce music in which notes sound
         differently from what is written in the score. This pertains
         boths to transposing wind instruments and octaviation notation
         (cf.~Sections \ref{sec:mtrauer}, \ref{sec:clefoctaviation}).
   \item the MIDI file generator does not support changing the number of
         instruments in midstream. You will not see an error message,
         but the results will be unpredictable.
\end{itemize}

The MIDI file is produced by {\PMX} concurrently with the {\MusiXTeX}
output. To start this, enter the symbol \texttt{I}, together with any
options (as described below), usually in the header of the input file;
but \texttt{I} symbols can appear later in the file as well, but only at
the \emph{start of an input block}.
_{I symbol@\texttt{I} symbol}

If the name of the {\PMX} source file is, say, \texttt{Mymusic.pmx}, the
MIDI symbol \texttt{I} will cause a file \texttt{Mymusic.mid} to be
written in the directory given in the preamble. If \texttt{I} is used
without any options, {\PMX} will use default values for several of the
parameters; these default values are indicated below.

\medskip
Usually, however, you will want to specify some options. They follow the
MIDI symbol \texttt{I} immediately, without a space. Sometimes the order
of the options matters, so it is generally advisable to adhere to the
order in which they are given here:

\begin{enumerate}  _{MIDI!parameters}
  \item \texttt{t}[\emph{x}] sets the tempo to \emph{x}
        quarter notes per minute. Default is 96.  You can change the
        tempo as often as you like, but only at the start of an input
        block (as with all MIDI commands).
  \item _{instruments!names!in MIDI}
        \texttt{i}[\emph{i1i2...in}] assigns MIDI instrument names
        \emph{i1,i2,...,in} to the staves of the respective {\PMX}
        instruments. The default is harpsichord, of course.

        If you use this option, you must specify \emph{all} instruments.
        Each \emph{i} is either an integer between 1 and 255 or a
        2-letter mnemonic. The instrument mnemonics allowed with {\PMX}
        are listed in Table~\ref{tab:MIDIinstr}. Numbers and mnemonics
        may be mixed, but consecutive pairs of numbers must be separated
        by \texttt{:} (colon)\,%
        \footnote{Otherwise the assignment could be ambiguous!}.
        Care is needed with multi-staff instruments: there must be one
        instrument name \emph{per staff}; so for a sonata for violin and
        piano, e.g., the instrument names entry would be
        \texttt{ipipivl}, not \texttt{ipivl} !
  \item \texttt{v}[\emph{i1}]:[\emph{i2}]:[...]:\emph{in}] assigns the
        relative MIDI volume to each instrument. Each \emph{i} is an
        integer between 1 and 127; the colons are required. The volume
        parameter \texttt{v} must either be given with exactly as many
        parameters as there are instruments, or none at all. The default
        (no parameters given) is 127.
  \item \texttt{b}[\emph{m1}]:[\emph{m2}]:[...]:\emph{mn}] assigns the
        MIDI stereo balances to each instrument. The numbers \emph{m}
        may vary between 1 and 128; otherwise their usage is similar to
        that for the volume. The default value is 64, which represents
        the center; smaller numbers favor the left stereo channel,
        larger ones the right.
  \item \texttt{p}[\emph{x}] inserts a pause of \emph{x} quarter notes
        -- for all instruments! -- at the beginning of the first bar of
        the input block in which the MIDI symbol appears. Decimals are
        allowed, but will be rounded to the nearest sixteenth note.
  \item \texttt{g}[\emph{i}] sets the MIDI gap to \emph{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 corresponds to 2/3 of a 64th note.
\end{enumerate}

_{MIDI!file players and editors}
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 with some MIDI file players and editors.

\medskip
The instruments given in Table~\ref{tab:MIDIinstr} 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
(cf.~Table~\ref{tab:MIDIspecif}).

\newcommand{\T}[1]{\texttt{#1}}
\begin{table}[!htb]   _{MIDI!instrument mnemonic names}
\begin{tabular}{ll@{\qquad}ll@{\qquad}ll}
\T{pi} & Acoustic Grand Piano & \T{vl} & Violin        & \T{re} & Recorder              \\
\T{rh} & Rhodes Piano         & \T{va} & Viola         & \T{fl} & Flute                 \\
\T{ha} & Harpsichord          & \T{vc} & Cello         & \T{ob} & Oboe                  \\
\T{ct} & Clavinet             & \T{cb} & Contrabass    & \T{cl} & Clarinet              \\
\T{or} & Church Organ         & \T{ab} & Acoustic Bass & \T{ba} & Bassoon               \\
\T{so} & Soprano Sax          & \T{tr} & Trumpet       & \T{ma} & Marimba               \\
\T{al} & Alto Sax             & \T{fr} & French Horn   & \T{gu} & Acoustic Nylon Guitar \\
\T{te} & Tenor Sax            & \T{tb} & Trombone      & \T{vo} & Synth Voice           \\
\T{bs} & Baritone Sax         & \T{tu} & Tuba          &        &
\end{tabular}
	\caption{Mnemonics for instruments acceptable in {\PMX} }
	\label{tab:MIDIinstr}
\end{table}

\subsection{MIDI macros \protect\footnotemark}
\footnotetext{{\PMX} normally does not allow tempo changes in MIDI macros.
          As of version 2.511, this restriction no longer holds; but it
          is designated as ``experimental''. So if you use it, be
          prepared for surprises! Naturally, Don Simons will certainly
          be interested to hear of your experiments.
         }

\texttt{IM} initiates a MIDI macro operation. Although the syntax of a
{\PMX} MIDI macro is analogous to that of regular {\PMX} macros
(decribed in Section~\ref{sec:macros}), its function is different:
\begin{enumerate}
  \item a MIDI macro cannot be saved (i.e.\ recorded without playing ---
        there is no command \texttt{IMS[}\emph{i}\texttt{]}),
  \item the code sandwiched between \texttt{IMR[}\emph{i}\texttt{]}
        (``start \textbf{r}ecord \textbf{M}IDI macro'') and \texttt{IM}
        (``end \textbf{M}IDI macro'') will be recorded as with a regular
        macro, but
  \item \texttt{IMP[}\emph{i}\texttt{]} (``\textbf{P}layback of
        \textbf{M}IDI macro \emph{i}'') will \emph{not insert anything
        in the written score}, it will merely replay in the MIDI output
        the number of bars defined by the macro.
\end{enumerate}
MIDI macros are needed for repeats or dacapos, as the {\PMX} coding for
these features of a score merely provides the appropriate notation on
paper, nothing else. MIDI Macros must have ID numbers between 1 and 20.
Only one macro may be active at a time, recording or playing, but not
both. Never try nesting or overlapping macros!

\subsection{MIDI only accidentals} \label{sec:MIDIaccidentals}
_{MIDI!accidentals}  _{accidentals!MIDI}

\begin{table}[!hbp]
\begin{center}  _{MIDI!General Instrument Specification}
	{\scriptsize
	\begin{tabular}{|ll|ll|ll|}
	\hline
	\bfseries 1-8 & \bfseries PIANO	&	\bfseries 9-16 & \bfseries CHROMAT. PERC.	&
	\bfseries 17-24 & \bfseries ORGAN \\
	\hline
	1 &	Acoustic Grand Piano &	9 &	Celesta &	17 &	Drawbar Organ \\
	2 &	Bright Acoustic Piano &	10 &	Glockenspiel &	18 &	Percussive Organ \\
	3 &	Electric Grand Piano &	11 &	Music Box &	19 &	Rock Organ \\
	4 &	Honky-tonk Piano &	12 &	Vibraphone &	20 &	Church Organ \\
	5 &	Electric Piano 1 &	13 &	Marimba &	21 &	Reed Organ \\
	6 &	Electric Piano 2 &	14 &	Xylophone &	22 &	Accordian \\
	7 &	Harpsichord &	15 &	Tubular Bells &	23 &	Harmonica \\
	8 &	Clavinet &	16 &	Dulcimer &	24 &	Tango Organ \\
	\hline
	\bfseries 25-32 & \bfseries GUITAR &		\bfseries 33-40 &
	\bfseries BASS &	\bfseries 41-48 & \bfseries STRINGS \\
	\hline
	25 &	Acoustic Guitar (nylon) & 33 &	Acoustic Bass &	41 &	Violin \\
	26 &	Acoustic Guitar (steel) &	34 &	Electric Bass (finger) &	42 &	Viola \\
	27 &	Electric Guitar (jazz) &	35 &	Electric Bass (pick) &	43 &	Cello \\
	28 &	Electric Guitar (clean) &	36 &	Fretless Bass &	44 &	Contrabass \\
	29 &	Electric Guitar (muted) & 37 &	Slap Bass 1 &	45 &	Tremelo Strings \\
	30 &	Overdriven Guitar &	38 &	Slap Bass 2 &	46 &	Pizzicato Strings \\
	31 &	Distortion Guitar &	39 &	Synth Bass 1 &	47 &	Orchestral Strings \\
	32 &	Guitar Harmonics &	40 &	Synth Bass 2 &	48 &	Timpani \\
	\hline
	\bfseries 49-56 & \bfseries ENSEMBLE &		\bfseries 57-64 &
	\bfseries BRASS &	\bfseries 65-72 & \bfseries REED \\
	\hline
	49 &	String Ensemble 1 &	57 &	Trumpet &	65 &	Soprano Sax \\
	50 &	String Ensemble 2 &	58 &	Trombone &	66 &	Alto Sax \\
	51 &	Synth Strings 1 &	59 &	Tuba &	67 &	Tenor Sax \\
	52 &	Synth Strings 2 &	60 &	Muted Trumpet &	68 &	Baritone Sax \\
	53 &	Choir Aahs &	61 &	French Horn &	69 &	Oboe \\
	54 &	Voice Oohs &	62 &	Brass Section &	70 &	English Horn \\
	55 &	Synth Voice &	63 &	Synth Brass 1 &	71 &	Bassoon \\
	56 &	Orchestra Hit &	64 &	Synth Brass 2 &	72 &	Clarinet \\
	\hline
	\bfseries 73-80 & \bfseries PIPE	&	\bfseries 81-88 &
	\bfseries SYNTH LEAD &		\bfseries 89-96 & \bfseries SYNTH PAD \\
	\hline
	73 &	Piccolo &	81 &	Lead 1 (square) &	89 &	Pad 1 (new age) \\
	74 &	Flute 	& 82 &	Lead 2 (sawtooth) &	90 &	Pad 2 (warm) 	\\
	75 &	Recorder &	82 &	Lead 3 (calliope) &	91 &	Pad 3 (polysynth) \\
	76 &	Pan Flute &	83 &	Lead 4 (chiff) &	92 &	Pad 4 (choir) \\
	77 &	Blown Bottle &	84 &	Lead 5 (charang) &	93 &	Pad 5 (bowed) 	\\
	78 &	Shakuhachi &	85 &	Lead 6 (voice) &	94 &	Pad 6 (metallic) 	\\
	79 &	Whistle &	86 &	Lead 7 (fifths) &	95 &	Pad 7 (halo) 	\\
	80 &	Ocarina &	87 &	Lead 8 (bass+lead) &	96 &	Pad 8 (sweep) 	\\
	\hline
	\bfseries 97-104 & \bfseries SYNTH EFFECTS &		\bfseries 105-112 &
	\bfseries ETHNIC &	\bfseries 113-124 & \bfseries PERCUSSIVE	\\
	\hline
	97 &	FX 1 (rain) &	105 &	Sitar &	113 &	Tinkle Bell \\
	98 &	FX 2 (soundtrack) &	106 &	Banjo &	114 &	Agogo 	\\
	99 &	FX 3 (crystal) &	107 &	Shamisen &	115 &	Steel Drums 	\\
	100 &	FX 4 (atmosphere) &	108 &	Koto &	116 &	Woodblock 	\\
	101 &	FX 5 (brightness) &	109 &	Kalimba &	117 &	Taiko Drum 	\\
	102 &	FX 6 (goblins) &	110 &	Bagpipe &	118 &	Melodic Drum 	\\
	103 &	FX 7 (echoes) &	111 &	Fiddle &	119 &	Synth Drum \\
	104 &	FX 8 (sci-fi) &	112 &	Shanai 	&120 &	Reverse Cymbal \\
	\hline
	\bfseries 121-128 & \bfseries SOUND EFFECTS & & & & \\
	\hline
	121 &	Guitar Fret Noise  & & & & \\
	122 &	Breath Noise  & & & & \\
	123 &	Seashore  & & & & \\
	124 &	Bird Tweet & & & & \\
	125 &	Telephone Ring  & & & & \\
	126 &	Helicopter  & & & & \\
	127 &	Applause  & & & & \\
	128 &	Gunshot  & & & & \\
	\hline
	\end{tabular}
	}
	\caption{The General MIDI Instrument Specification}
	\label{tab:MIDIspecif}
\end{center}
\end{table}

In rare cases a special notation for accidentals is needed to guarantee
that the MIDI output corresponds exactly to what is intended in the
score. Cases in point are:
\begin{description}
  \item[Repeated notes with accidentals:] the generally accepted rules
       of musical orthography, at least for tonal music, say that when
       two identical notes with accidentals occur in the same bar (and
       in the same voice, of course), only the first one is written with
       an explicit accidental; for the following notes the accidentals are
       implied (`inherited', in {\PMX} parlance).

       This rule is less clear when there is a bar line between two
       successive notes. Some composers -- in particular in the baroque
       era, where this notation is almost the default -- will assume the
       first note in the new bar to have `inherited' the accidental
       along with it, while others would insist on repeating the
       accidental, and still others would put a cautionary accidental
       over the first note of the new bar. {\PMX} takes the first
       position, and MIDI files generated by {\PMX} will reflect this
       attitude.

       {\PMX} users with a different attitude could thus find their
       intention misrepresented in the MIDI output.

  \item[Editorial/dubious accidentals:] in editing an historical piece,
       a conscientious editor will provide information about
       dubious points, but she nevertheless, in creating a MIDI file,
       might want to assert her own position.
\end{description}
For these and similar applications {\PMX} provides the \emph{MIDI only
accidentals}. These are written and used like normal accidentals,
except with an `\texttt{i}' added . Such accidentals are
effective \emph{only in the MIDI output}; they are disregarded in the
printed score.

This is particularly useful when you want to override the MIDI
``baroque default'' described above. To understand the ``baroque
default''  clearly, consider the example given in
Fig.\ref{fig:MIDIbaroquedefault} , where the {\PMX} coding is given
directly below the system:

\begin{figure}[!htb]
  \begin{center}
        \includegraphics[scale=.82]{eps/MIDIbaroque.eps}
	\caption{The ``baroque default'', and overriding it with MIDI
                 only accidentals}
	\label{fig:MIDIbaroquedefault}
  \end{center}
\end{figure}
\noindent
Now compare the printed score with the MIDI version -- provided
\href{http://www.itp.uni-bremen.de/~noack/MIDI.mid}{here} for your
convenience --, and you can hear the differences explicitly\,%
\footnote{It is also instructive to note the MIDI implementation of
          slurs and ties generated by {\PMX} here (Cf.\ the list of MIDI
          restrictions on p.\pageref{p:midi}).
         }.

\medskip
Another example for the use of MIDI only accidentals is given in
Fig.\ref{fig:MIDIaccidentals}:
\begin{figure}[!htb]
  \begin{center}
     \includegraphics[scale=.82]{eps/MIDI.eps}
  \end{center}
	\caption{Further use of MIDI only accidentals}
	\label{fig:MIDIaccidentals}
\end{figure}
\begin{itemize}
  \item MIDI plays the first $C$ in bar 2 as a $C\sharp$. The editorial
        $\natural$ over the second $C$, however, suggests that
        $C\natural$ was intended (at least from here on), so the MIDI
        accidental \texttt{in} is appended to that $C$,
  \item the final $F$ (in bar 5) suggested to the editor that we are
        moving towards F major here, and thus the $B$ in bar 3 should
        actually have been a $B\flat$. By bar 4 the assumption is
        confirmed, and so he changes the `dubious' accidental to an
        editorial one, and the MIDI only accidental \texttt{fi} is appended
        to that $B$.
\end{itemize}

\section{Lyrics}    \label{sec:lyrics}
_{\texttt{musixlyr.tex}}  _{\textbf{musixlyr}}
_{lyrics|see{\textbf{musixlyr}}}

{\PMX} has no special provisions for lyrics.  One way to include them is
by using the macro package \texttt{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 inline
{\TeX} directly into the \texttt{.pmx} file, but most would prefer the
convenient interface to \textbf{musixlyr} via the program {\MTX}
developed by Dirk Laurie (cf.~Section~\ref{sec:MTX}).
_{\MTX} _{Laurie, Dirk} _{Dunker, Rainer}

_{accented letters in lyrics}

If you have foreign-language lyrics, you may run into the problem of
accented letters. Straight {\TeX} does not provide these directly, as
the modern font encoding schemes used by {\LaTeX} do.
_{Vogel, Olivier}
However, Olivier Vogel has developped a method with which to use these
encoding schemes with {\MTX}/{PMX}/{\MusiXTeX}. For details you should
look at his contribution on this in the
\href{http://icking-music-archive.org/software/pmxtricks/tricks.html}%
     {Tricks and Tricks}
section in the WIMA, or contact Olivier directly: \quad
\raisebox{-0.8ex}{\includegraphics[scale=0.6]{addresses/ovogel} }

\section{{\PMX} and {\LaTeX} }    \label{sec:LaTeX}
_{\LaTeX}

{\LaTeX} (``A Document Preparation System''), although written for a
very different purpose, has a lot in common with
{\PMX}: it is a (huge) set of {\TeX} macros that allows to solve
complicated layout problems without the need to dive into the --
sometimes arcane -- depths of {\TeX} itself. So {\LaTeX} simplifies the
use of {\TeX} for the non-{\TeX}pert in much the same way that {\PMX}
does for {\MusiXTeX}.

\medskip
So it would certainly be wonderful to have the best of two worlds: merge
{\LaTeX} and {\PMX}. The problems with that (or merging {\LaTeX} and
{\MusiXTeX}, for that matter) are threefold:
\begin{enumerate}
  \item {\PMX} deals with many of the layout aspects of a musical score
        on its own (such as width of systems, line breaks, page breaks
        etc.), and with techniques that are not really compatible with
        those of {\LaTeX}.
  \item {\MusiXTeX} / {\PMX} and {\LaTeX} make heavy use of
        {\TeX}'s ressources, both in memory and registers, and together
        they may strain these ressources beyond their usual limit.
  \item both {\MusiXTeX} / {\PMX} and {\LaTeX} use many special
        command definitions, often enough incompatible with one another.
\end{enumerate}

While with modern implementations of ressources are no longer a serious
problem, the incompatibility problems are, and their resolution would be
a major programming task. So there have, to this day, not been any
serious efforts to provide a truly merged version of {\LaTeX} with
{\PMX}.

\bigskip
There are, however, several methods to use {\LaTeX} and {\PMX} in
(partial) ``coexistence'':
\begin{enumerate}
   \item          _{\LaTeX!with short musical scores} _{short scores}
         The best way to include short scores, of less than one printed
         page, in a {\LaTeX} document is to
         \begin{enumerate}
            \item _{PostScript}
                  produce the musical score with {\PMX} -- {\MusiXTeX}
                  -- \textbf{dvips} in the way described in this tutorial.
                  The end product is a PostScript file,
            \item _{encapsulated PostScript file}
                  _{\texttt{.eps} file|see{encapsulated PostScript file}}
                  make an \texttt{.eps} (``encapsulated PostScript'')\,%
                  \footnote{In general, this is possible for
                            single-page PostScript files only.
                           }
                  file from the \texttt{.ps} with one of the standard
                  tools, e.g.~\textbf{ghostview},
            \item include this \texttt{.eps} file in the {\LaTeX}
                  document with the {\LaTeX} \bs\texttt{includegraphics}
                  command, e.g. \\[-1ex]
                  \hspace*{\fill}\verb#\includegraphics[scale=0.58]{sample.eps}#
                  \hspace*{\fill} .
         \end{enumerate}
         This is the method with which the present tutorial was produced.
   \item _{\textbf{musixltx}}   _{\LaTeX!\textbf{musixltx}}
         use the {\LaTeX} package \textbf{musixltx}, together with
         {\MusiXTeX}\,%
         \footnote{\textbf{musixltx} is part of the standard
                   distribution of the {\MusiXTeX} package.
                  }.
         The {\MusiXTeX} code is then sandwiched between the start and
         end of a specific environment:
         \begin{center}  \vspace*{-2ex}
         \verb#\begin{music}# \dots \verb#\end{music}# .
         \end{center}\noindent
         For more detail on this method see the {\MusiXTeX} manual by
         Daniel Taupin.  _{Taupin, Daniel}

         \medskip
         But be aware of the fact that the \texttt{.tex} files produced
         by {\PMX} contain a number of incompatibilities with {\LaTeX}.
         So if you want to use the \textbf{musixltx} package together
         with {\PMX}, you may have to comment out a few lines in the
         \texttt{.tex} file --- by hand, unfortunately. For that reason,
         the \textbf{musixltx} package usually works well with {\PMX}
         only in rather simple cases. An example of how to proceed can
         be found in the WIMA: \\
         \hspace*{\fill}
         \href{http://icking-music-archive.org%
                    /software/musixtex/add-ons/pmx-l2e.tex}%
              {\texttt{http://icking-music-archive.org/%
                             /software/musixtex/add-ons/pmx-l2e.tex}}
         \hspace*{\fill} \\
   \item _{\LaTeX!\textbf{mtxlatex}}  _{\LaTeX!e\TeX}
         _{\LaTeX!interface with \PMX} _{Laurie, Dirk} _{\MTX}
         Dirk Laurie, the author of {\MTX}, has developped a
         {\LaTeX} package, \textbf{mtxlatex}. It is is part of the
         \href{http://icking-music-archive.org/software/mtx/mtx060.pdf}%
         {{\MTX} 0.60b distribution}, available from the WIMA, and can be
         considered a successor to the \textbf{musixltx} package
         described above. An outstanding feature of this package is that
         it interfaces quite well with {\PMX}; so this is usually the
         method of choice in cases where you want to include longer
         music scores in a long text such as a book. Detailed
         instructions on how to use this package are contained in the
         {\MTX} manual.

         When
         using \textbf{mtxlatex}, be sure to
         include the \textbf{mtxlatex} package as the
                  \emph{first} package in the {\LaTeX} source file.
\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           PMX tutorial by ccn / chapter D starts here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Limitations, error messages, and bugs}
\section{Limitations}  \label{sec:limits}
_{limitations}

For simplicity in writing the program, {\PMX} has numerous variables
with fixed dimensions. In most cases there are no checks against these
limits, so occasionally there may be hangups due to exceeding a
dimension.

\medskip
The limits of the variables given in Tables~\ref{tab:softlimits} and
\ref{tab:hardlimits} fall in two distinct classes, named ``soft'' and
``hard'' limits to distinguish them:
\begin{enumerate}
   \item soft limits can be increased fairly easily: all it takes (sic!)
         is to change the dimensions in the FORTRAN source of
         _{\texttt{pmxab.exe}} \texttt{pmxab.exe} (the {\PMX} program)
         accordingly, and recompile,
   \item hard limits, on the other hand, could only be increased with
         more or less elaborate reprogramming
         \footnote{Often these hard limits are a consequence of
                   features of {\MusiXTeX} and thus cannot be changed
                   without changes in {\MusiXTeX}.

                   Note, however, that this character count
                   \emph{includes all empty spaces before the final
                   character} (such as \texttt{/}) at the end of an
                   input line. If -- for better readability, e.g.\ --
                   you are in the habit of aligning these end-of line
                   characters, being more stingy on the resulting blanc
                   characters often helps to stay within the limit.
                  }
         (or at least recompiling the source code), so for all practical
         purposes they are unchangeable.

\end{enumerate}
In both cases, however, it will usually be possible to work within
existing limits by breaking the input into smaller blocks. Consider that
solution before asking Don Simons for changes to the {\PMX} source code,
or attempting such changes yourself! _{Simons, Don}

\begin{table}[!htb]
\begin{center}
_{limitations!soft limits}
\begin{tabular}{l@{\quad:\quad}r}
characters per input line                   & 128 \\
staves                                      & 24  \\
voices per staff                            & 2   \\
voices per system                           & 24  \\
systems                                     & 125 \\
bars                                        & 600 \\
forced line breaks                          & 40  \\
forced page breaks                          & 10  \\
key changes                                 & 18  \\
pages                                       & 20  \\
notes per input block                       & 600 \\
bars per input block                        & 15  \\
slurs per input block                       & 101 \\
figures (figured bass) per input block      & 74  \\
grace note groups per input block           & 37  \\
notes in grace note groups per input block  & 74  \\
inline {\TeX} strings per input block       & 52  \\
volte per input block                       & 6   \\
trills per input block                      & 24  \\
chordal notes (non-spacing) per input block & 62  \\
beams per voice per bar                     & 8   \\
forced beams per voice per input block      & 40  \\
clef changes per voice per input block      & 10  \\
notes per beam                              & 24  \\
notes per xtuplet                           & 24  \\[-3ex]
\end{tabular}
\end{center}
       \caption{Numerical limits of {\PMX} variables (soft limits)}
                  \label{tab:softlimits}
\end{table}

\vfill
\begin{table}[!htbp]

\noindent
-------------------------------------------------
\begin{center}
_{limitations!hard limits}
\begin{tabular}{l@{\quad:\quad}r}
total number of characters in source file                  & 65~536 ($2^{16}$) \\
\bs{\tt notes} groups (total)                              & 2000  \\
\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     & 20    \\
inserted anti-collision end-of-bar hardspaces per system   & 19    \\
inserted anti-collision end-of-bar hardspaces (total)      & 83    \\
inserted standard anti-collision spaces per system         & 400   \\
inserted anti-collision spaces within xtuplets per system  & 100   \\
inserted standard anti-collision spaces                    & 1000  \\
inserted anti-collision spaces within xtuplets             & 200   \\
bytes of MIDI output data per line of music                & 24576
\\[-3ex] \end{tabular} \end{center} \caption{Numerical limits of {\PMX}
variables (hard limits)} \label{tab:hardlimits} \end{table}

\section{{\PMX}'s error messages}   \label{sec:errormsg}
_{error messages}

When run on, say, \verb#my_opus.pmx#, {\PMX} will always generate two
files in the working directory, \verb#my_opus.pml# and
_{\texttt{pmxaerr.dat}} \texttt{pmxaerr.dat}. \verb#my_opus.pml# is a
log file, and \verb#pmxaerr.dat# contains a single integer: 0 if the run
was successful, otherwise the line number in the source file
\verb#my_opus.pmx# of the fatal error (useful for batch processing).
Also, on successful completion, \verb#my_opus..tex# will be placed in
the path specified in the preamble.

\medskip
Usually, when there is an error, {\PMX} will give you a pretty good
explanation\,%
\footnote{Note that sometimes an error message will use a name for a
          preamble numerical parameter that differs from that used in
          this tutorial --- but it usually is easily recognized.
          \label{p:errormsg}
         }.
There are some cases, however, in which the error message will be issued
not by {\PMX}, but by the FORTRAN compiler directly, and it may look
very cryptic to you. An infamous example is:
\begin{center} \vspace*{-1ex} \begin{verbatim}
          forrtl: severe (24): end-of-file during read, unit 10
\end{verbatim} \vspace*{-1ex} \end{center}
Such messages are almost always caused by an extra line in your source
file that shouldn't be there, so experiment with deleting lines towards
the end of your file!

\section{Bugs}
_{bugs}

As was mentioned before, {\PMX} is continuously maintained and improved
by Don Simons, and there is a very active group of {\PMX} users. Thus
there is no serious bug known (as of Version 2.514) that hasn't been
fixed. _{Simons, Don}

\medskip
If you think you have discovered a new bug, don't hesitate to send a
message to the TeX-music users' list:
   \raisebox{-1.0ex}{%
                    \includegraphics[scale=0.72]{addresses/texmusiclist}
                    }$\!\!$%
\footnote{Almost all reported ``bugs'' turn out to be misunderstandings.
          So if you state politely that you \emph{think} you may have
          found a bug, and ask for help, you will avoid irate replies of
          the ``RTFM'' species.
         }.
The same is true if you have a problem with {\PMX} that you simply cannot
solve by yourself, even though you suspect that it's \emph{not} a bug:
don't hesitate to ask!

\subsection{A Benign Bug}   \label{sec:bug}
When {\TeX}ing the output of {\PMX} you will usually get an
\texttt{Underfull \bs vbox} message at the end of each page.  This is
due to {\PMX} inserting \verb#\eject# at the end of every page, which
automatically spaces the systems vertically without having to fiddle
with \verb#\staffbotmarg#.  As far as is known, the warning is benign,
and may be ignored.

\vfill
\vspace*{\fill}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           PMX tutorial by ccn / chapter E starts here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Tricks of the Trade}  \label{sec:tricks}

\section{Simple tricks}

\subsection{Special coding in L'Incoronazione di Poppea}
_{figured bass!continuation}

Bar 17 in Fig.~\ref{fig:poppea} requires an explanation: the
continuation figure appears under the \verb#5#, but the these two
figures are coded as \verb#x145 x12\_00.2# . Why not \verb#x14500.2# ,
giving them both the same horizontal offset? That is because the
continuation figure always starts 0.3 \verb#\noteskip#s to the
\emph{left} of the associated note's position. This works well in most
normal situations. But here \verb#\noteskip# is large,based on the
dotted half, while the desired length is short, so in fact the left
offset of the starting point is even larger than the desired length.
Consequently the entry point of the continuation figure has to be offset
by a half note to make it appear offset by a quarter note.

\subsection{Text after final system}
 _{text!after final system}
Suppose you want to add some text, Or any other {\TeX} material,
after the final system of a score. How can you include that in the
{\PMX} file?\,%
\footnote{This question was posted to the {\TeX}-music list by Herrmann
          Hinsch. _{Hinsch, Herrmann}
         }

The answer, given by Christian Mondrup, is instructive:
\begin{enumerate} _{Mondrup, Christian}
   \item Write the text to a separate file, say
         \verb#Myendnotes.tex# ,
   \item Insert
     \begin{center}\begin{verbatim}
     \let\Endpiecesav\Endpiece
     \def\Endpiece{\Endpiecesav\input Myendnotes}
     \end{verbatim}\end{center}
\end{enumerate}
in the header of the {\PMX} source file, i.e.\ as a Type 4 inline {\TeX}
command (cf.\ Sec.~\ref{sec:inlinetypefour}). You can see that the
redefinition of {\TeX} commands, if done carefully, can be a rather
powerful tool.

\medskip _{\LaTeX!interface with \PMX} _{\textbf{mtxlatex}}
Another solution to this problem is to use the {\LaTeX}/{\PMX}
interface \textbf{mtxlatex} (cf.~\ref{sec:LaTeX}); this may be
simpler in cases involving more complicated layout.

\begin{figure}[!htbp]
	\begin{center}
        \includegraphics[scale=.82]{eps/mtrauermus.eps}  \\[2ex]
        \end{center}
        \caption{\textbf{W.A.\ Mozart}, \emph{Mauerische Trauermusik} KV
                 477, bars 1 -- 9
                }
        \label{fig:mtrauermus}
\end{figure}

\begin{table}[!htbp]
	\begin{center}
\begin{minipage}{400pt}
\small
\begin{verbatim}
---
% Mozart, Mauerische Trauermusik KV 477, bars 1 -- 9
---
10  -8 1 1 2 1 1 1 1 2
4    4      5     0
0   -3
1    1     16     0.22
Violoncello
Viola
Violini
Corno II in Do
Corno I  in Mi $\flat$
Corno di Bassetto in Fa
Clarinetto in Fa
Oboi
battttbttt
./
AbeplI.8
w190m
h250m
Tc
W.A. Mozart
Tt20
Mauerische Trauermusik \\ KV 477
h
Adagio
%%
\\setsign{4}{0}\setsign{5}{0}\setsign{6}{-2}\setsign{7}{-1}\
% standard musixTeX commands to set the signatures of the transposing winds
%
\\groupbottom{1}{1}\grouptop{1}{3}\
\\groupbottom{2}{4}\grouptop{2}{6}\
\\groupbottom{3}{7}\grouptop{3}{8}\
% standard musixTeX commands to group instruments together
\end{verbatim}
\end{minipage}
	\end{center}
	\caption{{\PMX} code of the \emph{Mauerische Trauermusik}, ,
                 bars 1 -- 9
	        }
	\label{tab:mtrauermus}
\end{table}

\subsection{Transposing wind instruments} \label{sec:mtrauer}
_{transposition}

Fig.~\ref{fig:mtrauermus} contains the first few bars of Mozart's
``Mauerische Trauermusik KV 477. Two features of this score are
remarkable from the point of view of {\PMX} coding (given in Table
\ref{tab:mtrauermus}):
\begin{enumerate}
   \item[a)] _{instruments!transposing}
         the Mauerische Trauermusik is a piece for 10 instruments\,%
      \footnote{You may have seen (or heard) this piece before with a
                total of 13 instruments: 2 more Corni di bassettto and a
                Gran Fagotto. These were in fact added to the score
                later on by Mozart himself; the score given here
                reflects the orchestra of the first performance (on 17
                Nov. 1785).
               },
      4 of which are ``transposing wind instruments'' : a clarinet in
      B~$\flat$, a corno di bassetto in F, and two horns in C~.
      Consequently the parts for these instruments must be written with
      a  key signature different from the rest of the orchestra (this is
      true also for the 2 horns, even though the piece is in C minor:
      horn parts are invariably written \emph{without any signature}).
      {\PMX} has no mechanism to do that, so once again you have to
      resort to inline {\TeX},
   \item[b)] as is usual with orchestral music, similar instruments are
      grouped together by accolades (square brackets). How do you do
      that in {\PMX}?
\end{enumerate}

\bigskip
The example exhibits both features. The header contains the following
Type 2 inline {\TeX} commands:
\begin{enumerate}
   \item[a)]  _{\MusiXTeX!\bs\texttt{setsign}}
           \begin{verbatim}
\\setsign{4}{0}\setsign{5}{0}\setsign{6}{-2}\setsign{7}{-1}\
             \end{verbatim}
      \verb#\setsign{n}{m}# sets the ^{key signature} of instrument $n$
      to $m$ sharps (or flats if $m<0$). So this sets the signatures for
      the transposing wind instruments. The {\PMX} notation of the notes
      is then, of course, as they are written, not as they sound, and it
      is the composers's responsibilty, as usual, to get all the
      accidentals right.

\bigskip\bigskip
\Note{As just explained, this use of \bs\texttt{setsign\{n\}\{m\}} is a
      purely notational device. A seasoned orchestra conductor, when
      seeing the notation (name of instrument, together with the key
      signature), \emph{might mentally}  `hear' the sound of a clarinet
      in B\,$\flat$ a full note lower than what he sees written in the
      score; but {\PMX} does \emph{not} know about this when producing a
      MIDI file from that score\,\footnotemark.

      _{`transposing' instruments!not in MIDI}
      The upshot of this is: when you have transposing instruments coded
      with \bs\texttt{setsign\{n\}\{m\}} in {\PMX}, don't produce a MIDI
      file; it would be \emph{meaningless}\,\footnotemark.
     } \label{p:mtrauer}
\addtocounter{footnote}{-1}
\footnotetext{This is to be clearly distinguished from a difference in
              clefs: the note on the middle line of a staff with a
              violin clef \emph{is} a \texttt{b}, whereas with a bass
              clef it \emph{is} a \texttt{d}, and a MIDI file produced
              by {\PMX} will reflect that correctly.
             }

\addtocounter{footnote}{+1}
\footnotetext{_{MIDI!Jazz sequencer} _{Mondrup, Christian} If you insist
              on MIDI, their is some extra work to be done to the
              \texttt{.tex} output file of {\PMX}. Describing this is
              beyond the scope of this tutorial; you may find help with
              the freely available ``MIDI Jazz sequencer'' available
              from \\[-2ex]
              \hspace*{\fill}
              \href{http://www.jazzware.com/cgi-bin/Zope.cgi/jazzware}%
              {\texttt{http://www.jazzware.com/cgi-bin/Zope.cgi%
                       /jazzware}}~.
              \hspace*{\fill}
             }

  \item[b)] _{\MusiXTeX!\bs\texttt{groupbottom}, \bs\texttt{grouptop}}
   \begin{verbatim}
\\groupbottom{1}{1}\grouptop{1}{3}\
\\groupbottom{2}{4}\grouptop{2}{6}\
\\groupbottom{3}{7}\grouptop{3}{8}\
             \end{verbatim}

      These commands gather together 3 groups of instruments
      in the usual way: group 1 is the 4 strings\,%
      \footnote{Note that the two violins as well as the two oboes are
                coded in this {\PMX} source as one two-stave instrument
                each, so that they are accoladed with curly brackets.
                Thus, from the {\PMX} point of view, the whole score
                logically comprises 8 instruments!
               },
      group 2 the 2 horns and the basset horn, group 3 the clarinet and
      the 2 oboes.
\end{enumerate}


\subsection{Clef octaviation}  \label{sec:clefoctaviation}
_{octaviation}

As was noted in Section~\ref{sec:octaviation}, {\PMX} does not
presently provide a notation for octaviation; but native {\MusiXTeX}
does; cf.~the {\MusiXTeX} manual, Sec.~2.11 for details.

\medskip
Consider, for example,  bar 155 of the $2^\text{nd}$ movement of
Beethovens piana sonata op.\ 111 :

\begin{center}
\includegraphics[scale=.82]{eps/beethoven0.eps}   \\[2ex]
        ------------------------------------------
\begin{minipage}{360pt}
\small
\begin{verbatim}
\\interstaff{13}\
w170m
Abepl
%
[ e83d ze+ e8- ze+ sl c1- zc+ sl ] c8d-l zc+ | Rb /
[l c15x3n g+ c   b1-x3n g+ b c1-x3n g+ c ]
[l gs1x3n b  gs+ g1-x3n b  e a1-x3n e+ a ]
[l a-1x3n e+ a   g1-x3n e+ g a1-x3n e+ a ] | /
%
\end{verbatim}
\end{minipage}
\end{center}
In most editions, you will find the figures in the right hand in the
second and third three beats written in octaviation notation:
\begin{center}
\includegraphics[scale=.82]{eps/beethoven1.eps}   \\[2ex]
\end{center}
which is clearly easier to read. This octaviated version was produced by
the following {\PMX} code:
\begin{center}
\begin{minipage}{360pt}
\small
\begin{verbatim}
\\interstaff{13}\
w170m
Abepl
\\def\octnumber{8$^{va}$}\
%
[ e83d ze+ e8- ze+ sfu c1- zc+ sfu  ] c8d-l zc+          | Rb /
[l c15x3n g+ c   b1-x3n g+ b c1-x3n g+ c ]
\Ioctfinup1d\ [l g-s1x3n b  gs+ g1-x3n b  e a1-x3n e+ a ]
[l a-1x3n e+ a   g1-x3n e+ g a1-x3n e+ a ] \toctfin1\    |    /
%
\end{verbatim}
\end{minipage}
\end{center}

The octaviation is started with the Type 1 inline {\TeX} symbol
\verb#\Ioctfinup1d\# and ended with \verb#\toctfin1\# ; the
transposition downward is, of course, generated in the standard {\PMX}
way by writing \verb#g-s1x3n# instead of \verb#gs1x3n# . By default,
{\MusiXTeX} will start the octaviation symbol with a simple \texttt{8};
this is changed to 8$^{va}$ by the Type 2 inline {\TeX} symbol given in
the preamble.

\medskip
\Note{When using this octaviation notation in a score, do not try to
      produce a MIDI file for that score: it will come out faulty
      (cf.~the Note on p.\pageref{p:mtrauer}).
     }

\section{More tricks}
The above examples are actually rather simple cases of the use of inline
{\TeX}, not really ``tricks''~; they have been included here for you to
`warm up' to doing such things yourself. But there are many
further-reaching tricks to overcome shortcomings of {\PMX} ---
some truly ingenious. Here are a few of general interest:

\subsection{Changing vertical positioning of instrument name}
\label{sec:shiftname} _{\textbf{scor2prt}!use of Ti}
_{\textbf{scor2prt}!adjusting instrument name}

When making parts from a score with \textbf{scor2prt}, you will
sometimes find the adjustment of the vertical position of the instrument
name not to your liking. In particular, if you have a tempo indicated in
a line of text above the first system (e.g.~``allegro''), you may find
that the instrument name of some (but not all) parts collides with the
tempo indication. How can you fix that?

\medskip _{\textbf{scor2prt}!usage} _{Van Ryckeghem, Andre}
         _{instruments!names} _{comments!usage with \textbf{scor2prt}}
A practical solution of this problem has been given recently by Andre
Van Ryckeghem. It is quite instructive to see in this example how
the mechanism of handing over commands to \textbf{scor2prt} operates:

Suppose that you are writing a string quartet, and the relevant part of
the preamble and header in the score are:
\begin{small}\begin{verbatim}
...
Violoncello
Viola
Violine II
Violin I
batt
./
h
Allegro
Abpl
...
\end{verbatim}\end{small}

After running \textbf{scor2prt}, you find that the allegro command is
positioned the way you want it, but the cello name collides fully, and
the Violino II slightly, with the ``allegro''. Therefore you want to
raise the cello by \texttt{3ex}, the Violin II by \texttt{1.5ex} . To do
so, replace the above part of the preamble and header in the score by
\begin{small}\begin{verbatim}
     ...
     %% Violoncello
     %1 \raise+3ex \hbox{Violoncello}
     Viola
     %%
     Violin II
     %3 \raise+1.5ex \hbox{Violin II}
     Violin I
     batt
     ./
     h
     Allegro
     Abpl
     ...
\end{verbatim}\end{small}
All the comment lines are disregarded in compiling the score; but in the
\texttt{.pmx} file for the cello, you will find
\begin{small}\begin{verbatim}
     Ti
     \raise+3ex \hbox{Violoncello}
     b
     ./
     h
     Allegro
     Abpl
     ...
\end{verbatim}
and in the part for the second Violin
\begin{verbatim}
     Ti
     \raise+1.5ex \hbox{Violin II}
     t
     ./
     h
     Allegro
     Abpl
     ...
\end{verbatim}\end{small}
which does what you want.

\vspace*{3cm}
\subsection{Xtuplets ending with a rest}
            \label{sec:Xtuplets ending with a rest}
                _{xtuplets!ending with a rest}

   As was pointed out in Section~\ref{sec:xtuplets}, \PMX\ does not
   allow a rest as the last note in an xtuplet.

   \medskip
   Can one find a way to circumvent this restriction? A pedestrian,
   awkward way around might be this: remembering that \PMX\ is a
   preprocessor for MusixTeX, and in a second pass \TeX\ processes the
   \PMX\ output, one could simply enter some arbitrary note in place of
   the desired rest, run \PMX\ , and then in the resulting \TeX\ file
   replace the arbitrary note \emph{manually} by the appropriate
   MusixTeX rest symbol \emph{before} running the file through \TeX\ for
   the the 2nd pass.

   This semi-solution however, has two major drawbacks:
   \begin{enumerate}
     \item it takes a certain amount of aquaintance with basic MusixTeX,
           so this is not for everyone;
     \item more dangerously, this hack goes away if and when you
           rerun \PMX\ ! So if you are still in the middle of a
           development, you may find yourself redoing the hack over and
           over, which could quickly become a real nuisance.
   \end{enumerate}

   Luckily, for xtuplets with stand-alone notes there now exists a real
   solution: an ingenious, generally usable inline {\TeX} method --
   developped by Don Simons -- solves the problem completely for
   unbeamed xtuplets. Here is a simple example with two such triplets:
   \begin{center}
      \includegraphics[scale=.82]{eps/triplerest.eps} \end{center}
   \newpage And this is the \PMX\ source text that creates these staves:

------------------------------------
\begin{verbatim}
2 2
2 4 0 0
0 0
0 3 20  0.12


tt
./
w100m
\\def\qpforqu{\let\qut\qu\def\qu##1{\qp\zcharnote{##1}{~}\let\qu\qut}}\
\\def\dsforcu{\let\cut\cu\def\cu##1{\ds\zcharnote{##1}{~}\let\cu\cut}}\

e4ax3 \dsforcu\ e \dsforcu\ e e4ax3 \qpforqu\ eD  /
e4ax3           e           e e4ax3           eD  /
\end{verbatim}
------------------------------------

As you can see, there are two inline commands of type 2, which are
therefore effective throughout the file (from where they are first
entered), then followed by two standard \PMX\ lines; the lower one (the
top staff) of these has the standard triplets, as demonstration, while
the upper one (bottom staff) shows the corresponding triplets with ending
rests.

The two inline \TeX\ commands produce the type of rest: \verb#\dsforcu#
stands for a quarter rest, and \verb#\qpforqu# for a half rest. Note
that these inline \TeX\ commands not only provide the correct graphics,
but \PMX\ considers them to have the corresponding duration values! So
if you use wrong ones, \PMX\ will complain in the usual way.

\medskip
Explaining the inline {\TeX} commands in detail would go beyond the
scope of this tutorial. But if you know some of the MusixTeX
terminology, you will recognize that these commands conform to the
MusixTeX names for quarter and half notes etc.\,%
\footnote{This knowledge may be useful if you want to produce more
          complicated xtuplets with ending rests than the simple
          examples given here. The new MusixTeX-T114 manual may be
          helpful in such cases. If that doesn't help: consult a
          {MusiXTeX}pert!
         }

The inline commands are then each followed by a dummy note. Usually it
is a good (and safe) habit to use the same note name as the last real
note in the xtuplet; but any {\PMX} note name is valid; variations can
produce surprising, but possibly useful grahical results. So if you feel
up to it, you can play with such variations!

\subsection{Shorthand notation for consecutive quavers}
      _{Van Ryckeghem, Andre} _{shorthand!for quavers} _{eighths}
      _{quavers|see{eighths}}
      _{shorthand!for quavers|see also tremolo}
   Often, in accompanying voices, in particular, there are several
   repeated quavers (eighth notes), e.g.~4 quavers to a half note. There
   is a commonly used shorthand notation for this that helps
   sight-reading enormously: a half-note, with a line through its stem,
   indicating the quavers.

   Fig.~\ref{fig:JChrBach} shows the beginning of the cello part of a
   Joh.\ Chr.\ Bach quartet. In this example an inline {\MusiXTeX} macro
   (devised by Andre Van Ryckeghem) provides this shorthand.

\begin{figure}[!htb]
	\begin{center}
\includegraphics[scale=.82]{eps/JChrBach.eps}   \\[2ex]
        ------------------------------------------
\begin{minipage}{380pt}
\small
\begin{verbatim}
%----------------%
%
%  JCBach.pmx
%
%----------------%
%
---
\let\husav\hu\
\let\hlsav\hl\
\def\FE{\def\hl##1{\let\hu\husav\let\hl\hlsav%
        \relax{\advance\transpose2\loffset{0.5}%
         {\ibl0{##1}9}\roffset{0.5}{\tbl0}}\ha{##1}}%
        \def\hu##1{\let\hu\husav\let\hl\hlsav%
        \relax{\advance\transpose-3\loffset{0.5}%
         {\ibu0{##1}9}\roffset{0.5}{\tbu0}}\ha{##1}}%
       }
---
%
1 1 4 4 0 6 1.00 -2
0 8  16 0.1
%
Violoncello
b
./
Abpl
r4 | b83 Dmf b b b \FE\ b2 | \FE\ a2  a8 a b b              |
\FE\ e2-    e8 e f f       | \FE\ b2- Dp     \FE\ b2        |
\FE\ b2 \FE\ b2            | \FE\ b2 Df     b8 [ b Dp b b ] |
\FE\ b2 \FE\ b2                                       Rd    /
\end{verbatim}
\end{minipage}
	\end{center}
	\caption{\textbf{J.Chr.\ Bach}, Quartet in B Major
	         (beginning of cello voice)}
	\label{fig:JChrBach}
\end{figure}

   \medskip  _{semiquavers|see{sixteenths}} _{sixteenths}
             _{shorthand!for semiquavers}
   If you want such a shorthand for semiquavers (sixteenth notes), you
   need to consult the {\MusiXTeX} manual: you will find that all you
   need to do is to replace \bs\texttt{ibl0} and \bs\texttt{ibl0} by
   \bs\texttt{ibbl0} and \bs\texttt{ibbl0} , resp.


\subsection{Varying the stave sizes}  \label{sec:varstaves}
_{figured bass!varying staves sizes} _{\texttt{curly.tex}}
_{staves!varying size}

In modern editions of works with basso continuo e.g., the implementation
of the bass, as suggested by the editor, is often given in a staff using
a smaller size. {\MusiXTeX} does not support such a possibility.

\medskip      _{Molekwa, Mthimkhulu}
Fortunately, Mthimkhulu Molekwa has written two macros that provide
alternative solutions of this problem that are often sufficient. The
first, \verb#musixbar.tex#, which is included in {\MusiXTeX},
allows you to easily define a set of staves (the two bottom ones, in the
case of a basso continuo) that have common bar lines joining these
staves \emph{and only these}\,%
\footnote{Normally, {\MusiXTeX} will draw common bar lines for
          \emph{all} staves or for \emph{none}.
         }.

\medskip
The second macro, named \verb#curly.tex#\,%
\footnote{\texttt{curly.tex}, if not included in your {\MusiXTeX}
          installation, is available in the ``add-ons'' software
          section of the WIMA.
         },
provides a brace as an accolade of a set of staves\,% to be grouped
to\-gether\,%
\footnote{{\MusiXTeX} provides only the choir-type square accolades. For
          the practical usage of \texttt{curly.tex} see the Caccini
          example in the appendix, Fig.~\ref{fig:caccini}.
         }.

\medskip
Suppose we want to set a sonata for violin and basso continuo with
{\PMX}. There will be three staves: at the bottom the basso continuo
proper, then immediately above it, and grouped together with a brace
accolade (in a smaller size), its implementation, and above these the
violin staff.

To get this, do the following:

\begin{itemize}
   \item indicate in the preamble the number of instruments,
         \emph{three} in this case!
   \item add a Type 4) {\TeX} inline command at the beginning of
         the file, invoking the macros
         \verb#musixbar.tex# and \verb#curly.tex#, e.g.\,%
\footnote{The {\MusiXTeX} command
          \texttt{$\backslash$sepbarrules$\backslash$} sets the vertical
          bar to be discontinous, i.e.\ \emph{not} extend across
          different staves.
         }

         \vspace*{-2ex}
         {\small
         \begin{verbatim}
         ---
         \let\:=\relax\input musixtex\:\sepbarrules\input pmx
         \input musixbar\input curly
         ---
         \end{verbatim}
         }

         \vspace*{-5ex}
   \item insert the following {\TeX} inline commands in the header of
         the {\PMX} input file:

         {\small
         \begin{verbatim}
         \\\indivbarrules\sepbarrule3\
         \\setsize2\smallvalue\curlybrackets{{1}{2}}\
         \\let\interstaffsav\interstaff\def\interstaff#1{}\interstaffsav{9}\
         \end{verbatim}
         }


         \vspace*{-3ex}
        The command \verb#\interstaffsav{9}\# determines the extension
        of the brace (and can be adjusted). The command
	\verb#\\\indivbarrules\sepbarrule3\# says that the third staff,
        that for the violin, has its own discontinuous bar line, not
        joined with the other two.

	The second line contains two commands:
        \verb#\\setsize2\smallvalue# sets the size of staff 2 to be
        smaller, and \verb#\curlybrackets{{1}{2}}\# says which staves
        are to be accoladed, i.e.\ joined by the brace.
\end{itemize}
The file \verb#curly.tex# must, of course, be in a directory where
{\PMX} and {\TeX} can find it, viz.\ either in the current directory or
in one in which the other {\MusiXTeX} files are stored.

\subsection{Stuff in front of the clefs of the first system}
       _{inline \TeX!special trick}  _{Vogel, Olivier}
       _{\textbf{musixlyr}} _{\MusiXTeX!\bs\texttt{setclefsymbol}}
And finally, to show you what is possible, here is a special example of
using inline {\TeX}: it was contributed to the {\MusiXTeX} users' list
by Olivier Vogel. Here is the literal text of his contribution,
with the result shown in Fig.~\ref{fig:bruckner}:

\medskip
\begin{center}\begin{minipage}{380pt}
Dear all,

\medskip\noindent
I've got a score of ``\emph{Locus iste}'' by Bruckner, which begins with
the indication of the range of voices. I tried to reproduce the result,
and share with you my solution, since it seems to me to be an
interesting trick.
\begin{small}\begin{verbatim}
---
\input musixtex
\input musixlyr
\setlyrics{soprano}{%
Lo-cus i-ste a De-o fa-ctus est lo-cus i-ste a De-o %
fa-ctus est, a De-o, De-o fa-ctus est in-ae-sti-ma-bi-le}
\copylyrics{soprano}{alto}
\copylyrics{soprano}{tenor}
\copylyrics{soprano}{basse}
---
4 4 4 4 0 6 0 0 1 2 20 0.04

bttt
./
B
Abd
h180m
%1-2
\\staffbotmarg3\Interligne\
\\setclefsymbol{2}{\treblelowoct}\
\\groupbottom{1}{1}\grouptop{1}{4}\
\\sepbarrules\
\\startmuflex\indent\hskip-\parindent\hbox{\vbox{\hsize=\parindent\
\\setclefsymbol{1}{\empty}\setclefsymbol{2}{\empty}\
\\setclefsymbol{3}{\empty}\setclefsymbol{4}{\empty}\
\\grouptop{1}{0}\nostartrule\generalmeter{}\parindent=0pt\
\\startpiece\hardspace{2pt}\notes\zq{F}\nq{''C}&\zq{c}\nq{'e}&\
\\zq{N}\nq{'b}&\zq{b}\nq{'g}\en\zstoppiece}}\
\\\assignlyrics{1}{basse}\assignlyrics{2}{tenor}\
\\\assignlyrics{3}{alto}\assignlyrics{4}{soprano}\
...
\end{verbatim}\end{small}
(The regular {\PMX} encoding of the music follows).
\end{minipage}\end{center}

\begin{figure}[!htb]
	\begin{center}
\includegraphics[scale=.82]{eps/bruckner.eps}   \\[2ex]
	\end{center}
	\caption{\textbf{A.\ Bruckner}, \emph{Locus iste} }
	\label{fig:bruckner}
\end{figure}

\pagebreak

\vspace*{10ex}
If you encounter a tricky {\PMX} problem that you think is of general
interest, so that it may have been solved by someone else already,
a good place to search is the
\href{http://icking-music-archive.org/software/pmxtricks/tricks.html}%
     { {\PMX} `Tips and Tricks'} section of the WIMA.

\medskip
And if you have found a nice trick yourself, don't hesitate to
share it via the TeX-music users' list. Perhaps it can be included in
`Tips and Tricks' !

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           PMX tutorial by ccn / chapter F starts here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{An Extension of {\PMX}: {\MTX}} \label{sec:MTX}
_{\MTX} _{Laurie, Dirk}

Although {\PMX} is already vastly simpler to use than {\MusiXTeX},
anything can be improved. So Dirk Laurie
_{Laurie, Dirk}
set out to simplify {\PMX} even further, and thus created {\MTX}.

\medskip
{\MTX} is actually a preprocessor to {\PMX}. Its input is a file with
extension \verb#.mtx# , for example ~\verb#mymadrigal.mtx# , its output
has the extension \verb#.pmx# , \verb#mymadrigal.pmx#. Its input
language is similar, but not identical, to that of {\PMX} and includes
most of the functionality of {\PMX} as a subset.

\medskip _{\textbf{musixlyr}}
The major purpose of {\MTX} is to facilitate the introduction of lyrics
in a musical score of a song, cantata or opera. {\MTX} does this in
conjunction with the \textbf{musixlyr} package by Rainer Dunker; so if
you want to use {\MTX}, you ought to have \textbf{musixlyr} installed as
well. _{Dunker, Rainer}

\bigskip _{Laurie, Dirk}
Laurie's Work on {\MTX} had essentially been ended in November 1998 with
the `final' version 0.52. But, as many such projects, {\MTX} continued
to evolve; presently, the `official' version is 0,60, dated March 2005,
and the current patch is 0.60c , dated 22 November 2007 !

\bigskip
Since there is a full
\href{http://icking-music-archive.org/software/mtx/mtx060.pdf}%
              {manual on {\MTX}}
available in WIMA, these few remarks may suffice here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           PMX tutorial by ccn / Appendix starts here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \renewcommand{\thechapter}{}

\chapter{Appendix: Examples} \label{sec:examples}

\section{Dons Example Files}   \label{sec:donsexamples}

The `official' distribution files for {\PMX},
which are available from WIMA
\href{http://icking-music-archive.org/software/pmx/pmx2514.zip}%
     {[(pmx2514.zip)]},
, contain 3 instructive examples (not reproduced here):

\begin{description}
   \item[\texttt{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 Inline \TeX ~needed to
         output the text strings representing the {\PMX} commands.
         \textbf{WARNING:} Do not try to play this music; it could be
         hazardous.
   \item[\texttt{barsant.pmx}]
         _{\PMX!options!global} _{S symbol@\texttt{S} symbol}
         contains the first movement of a recorder sonata by the Italian
         Francesco Barsanti (1690-1772).  It demonstrates many of
         {\PMX}'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. It uses the global option \texttt{Ae} for equal space
         betweem systems. The space between systems was increased (using
         the option \texttt{AI1.1}) to give a more pleasing appearance.
         This is a good score to try making parts with
         \textbf{scor2prt}. The special command \texttt{\%2S9} is used
         to increase the number of systems in the recorder part (as
         explained in Section \ref{sec:Ssymbol}).

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


\section{Full-score examples} \label{sec:fullexamples}

_{Cataldi, Luigi}
In this appendix you will find the {\PMX} code (by Luigi Cataldi) of
a full piece, together with the actual score which was generated from it
(Section~\ref{sec:Dufay}), as well as two extended {\MTX} examples (also
coded by Luigi Cataldi).

\medskip
The {\PMX} code for the Dufay Kyrie contains a few inline {\TeX}
commands; this is done intentionally so you again can get a feel of the
usage of inline {\TeX}; to understand them fully, however, you will have
to consult the {\MusiXTeX} documentation.Similarily, you can get an idea
from the Vivaldi and Caccini example what {\MTX} is all about. For a
full understanding, you again need to look at the {\MTX} documentation.

\subsection{Dufay, \emph{Kyrie} ({\PMX} code) :}
     \label{sec:Dufay} \label{p:Dufay} _{\PMX!full-score example}

\begin{center} \begin{small}
\begin{verbatim}
%----------------%
%
%  Dufay, Kyrie
%
%----------------%
%
---
\font\tit = cmcsc10 scaled \magstep 5
\font\dat = cmr12
\def\comp{\rightline{\medtype Guillaume Dufay}}
\def\data{\rightline{\medtype (1400?--1474)}}
---
2 1 3 4 3 4 0 0
1 6 20 0

bt
./
Abe
\\def\writebarno{\ifnum\barno>1\lrlap{\oldstyle\the\barno\barnoadd}\fi}%\
\\def\shiftbarno{0\Interligne}\
Tt
{\tit Kyrie}
Tc
\vbox{\comp\data}
It92iororb60:68
% 1-6
h-4
Kyrie
dd23 | a23 bf4 | c24 d4 | ad23 | dd24 | a23 d44 //
a23 d4 | c2 d4 | e2 d4 | csd2 | f2 f4 | e2 f4 /
a24 a4 | e2 d4 | g2 f4 | e2 r4 | ad4 g8 a b | cd45 a84 b c85 /

% 7-9
c24 bf43 | ad2 | g2 d4 //
e24 d4 | e d8 c4 bf8 | d4 r+7 d /
a84 bf a g g f | ad2 | bf2 a4 /

% 10-12
e2 d4 | g4 bf a | gd2 Rd //
g8- f g e f4 | r8+8 [ d+ d cs c bn ] | dd2 /
g2 a4 | g2 fs4 | gd2 /
\end{verbatim}

\pagebreak
\begin{verbatim}
% 13-18
L3Mc+4
h-5
Christe
dd23 | fd2 | gd2 | d2 d4 | e2 d4 | g2 a4 //
dd24 | c2 f8 e | d4 c bf | ad2 | g2 f4 | r8+7 [ d+ c b c d ] /
ad24 s | ad2 s | r8 [ bf b a b g ] | fsd2 | g2 a4 | d- e f /

% 19-24
bf23 a4 | gd2 | d24 c4 | bf43 a g | d f e | dd2 Rd //
g4-r d+ c | d2 r4 | f2 e4 | d c b | a2 gs4 | ad2 /
g24 f4 | g r g | a bf a | g8 f4 e8 g d | f e c d cs b | dd2 /

% 25-28
L5Mc+4
h-5
Kyrie
d23 g4 | d r8 d e f | g4 f ef | d r+0 r+0 //
d24 ef4 | d2 c4 | bf2 c4 | dd2 /
a24 g4 | f2 g4 | bf a g | fsd2 /

% 29-32
g2 a4 | g2 f4 | g2 a4 | d2- d4 //
d2 cs4 | d2 a4 | bf2 c4 | ad2 /
r8 [ g g fs f e ] | g4 f8 g a bf | g4 f e | d r r /

% 33-36
g43 f g | a f e | d d+ c | d f e //
bf4 a g | fr a8 g4 f8 | a4 bf8r g4 a8 | d4-r d8+r c4 bf8 /
e84 d4 c8 bf4 | a8 c4 d8 c4 | d8 f4 g8 e4 | f8 d4 a8+ g4 /

% 37-39
d2 c4 | dd2 | gd2- //
d2 e4 | fd2 of-2 | dd2 of-2 /
a4 b c | ad2 of | gd2 of /
%
%----------------%
%
%  end of Dufay, Kyrie
%
%----------------%
\end{verbatim}
\end{small} \end{center}

\begin{figure}[!htbp]
	\begin{center}
\includegraphics[scale=.73]{eps/dufay.eps}
	\end{center}
	\caption{\textbf{G.\ Dufay}, \emph{Kyrie}
	         (generated by {\PMX})}
	\label{fig:dufay}
\end{figure}

\pagebreak
\subsection{Vivaldi, \emph{Mundi Rector} ({\MTX} code) :}
\label{sec:Vivaldi}   _{\MTX!full-score examples}

\vspace*{8ex}
\begin{center} \begin{small}
\begin{verbatim}
%----------------%
%
%  Vivaldi, Mundi Rector
%
%----------------%
%
Title: \vbox{\titA\titB}
Composer: \vbox{\comp\data}
Flats: 2
Meter: 3/8
Pages: 1
Systems: 2
Style: SATB4
Size: 16
Space: 6 6 6 12

%%\font\rxii = cmr12
%%\font\tixii = cmti12
%%\def\titA{\centerline{Mundi rector}}
%%\def\titB{\centerline{\rxii {\tixii Juditha Triumphans}, I, 27}}
%%\def\comp{\rightline{\medtype Antonio Vivaldi}}
%%\def\data{\rightline{\rxii (1678--1741)}}
%%\let\endpiecesav\endpiece\
%%\def\endpiece{\endpiecesav\input judt}\
%%\font\rix = cmr9
%%\rix

{sopA}={altoA}={tenorA}={basA}
Mun-di Rec-tor de Cae-lo mi-can-ti
Au-di pre-ces, au-di pre-ces, et su-sci-pe vo-ta
Quae de cor-de pro te di-mi-can-ti
Sunt pie-ta-tis in si-nu de-vo-ta.

{sopB}={altoB}={tenorB}={basB}
In Ju-di-ta tuae le-gi di-ca-ta
Flam-mas dul-cis, flam-mas dul-cis, tui_a-mo-ris-ac-cen-de
Fe-ri-ta-tis sic hos-tis do-ma-ta
In Be-thu-liae spem pa-cis in-ten-de.

{sopC}={altoC}={tenorC}={basC}
Re-di, re-di iam Vic-trix pu-gnan-do
In ci-li-cio, in ci-li-cio in pre-ce ri-vi-ve
De Ho-lo-fer-ne sic ho-die trium-phan-do
Pia_Ju-di-tha per sae-cu-la vi-ve.
\end{verbatim}

\newpage
\begin{verbatim}
%%Abp
%%B
%%\def\writebarno{\ifnum\barno>1\lrlap{\oldstyle\the\barno\barnoadd}\fi}%
%%\def\shiftbarno{0\Interligne}
%%It58ibaclobobb60:70
% 13
%%h-4
%%{\ppff ~~~Allegro}
r8 d+ e | e d d | [ c1 b ] c8 a | b g4
L: {sopA,sopB,sopC}
r8 g g | g g g | fs f f | d d4
L: {altoA,altoB,altoC}
r8 b c | c b b | a a c | b b4
L: {tenorA,tenorB,tenorC}
@+13 r8 g g | g g g | a d- d | g g4
L: {basA,basB,basC}

%17-20
r8 b b | [ b1 a ] b4 | r8 c c | [ c1 b ] c8 e
r8 f f |  [ g1 f ] g4 | r8 g g | [ a1 g ] a8 c
r8 d d | b b4 | r8 g g | c c e
r8 d d | e e4 | r8 en e | f f f

%21-24
d8 e c | (~ [ b1 a b c d e ] | [ f b- ] c4 oT0 )~ | bd4 :|:
b8 c a | (~ [ bd8 a1 b c ] | d b a4 oT0 )~ | bd4 :|:
f8 g f |  ( fd4 | fd4 ) | fd4 :|:
b8 e- f | (~ ( bd4- | b8 ) f4+ )~ | bd4- :|:

%25-28
%%L2
r8 bn b | [ c1 bn ] c8 g | d+ d d | [ e1 d ] c4 |
r8 g g | g g g | g g g | g g4 |
r8 d d | e e e | d d d | c c4 |
r8 g+ g | c- c c | bn b b | c e4 |

%29-31
c8 b4 | b8 a c | b c a |
a8 g4 | g8 fs a | g a fs |
fs8 d4 | eN8 FS F | D EF D |
D8 D4 | CS8 D D | G C- D |

%32-34
(~ [ G1 FS G A B C ] | [ D G- ] A4 OT0 )~ | GD4 OF :|
(~ [ GD8 FS1 G A ] | [ B G ] FS4 OT0 )~ | GD4 OF :|
( DD4 | DD ) | DD OF :|
{~ ( GD4 | G8 ) D4 }~ | GD- OF :|
\END{VERBATIM}

\NEWPAGE
\BEGIN{VERBATIM}
%%%%%%%%%%%%%%% TEXT WRITTEN TO A SEPARATE FILE
%%%%%%%%%%%%%%% JUDT.TEX
\FONT\BIG = CMCSC10 SCALED \MAGSTEP 5
\LEFTSKIP = 3 CM
\FONT\LYR = CMTI10
\LYR

\DEF\LYROFFS{5MM}

\VSKIP 10 MM
\HALIGN{\HSKIP 12MM # \HFILL & # \HFILL & # \HFILL & # \HFILL \CR

MUNDI RECTOR DE CAELO MICANTI
& IN JUDITA TUAE LEGI DICATA
& REDI, REDI IAM VICTRIX PUGNANDO \CR

AUDI PRECES ET SUSCIPE VOTA
& FLAMMAS DULCIS TUI AMORIS ACCENDE
& IN CILICIO IN PRECE RIVIVE \CR

QUAE DE CORDE PRO TE DIMICANTI
& FERITATIS SIC HOSTIS DOMATA
& DE HOLOFERNE SIC HODIE TRIUMPHANDO \CR

SUNT PIETATIS IN SINU DEVOTA.
& IN BETHULIAE SPEM PACIS INTENDE.
& PIA JUDITHA PER SAECULA VIVE. \CR
\END
%
%----------------%
%
%  end of Vivaldi, Mundi Rector
%
%----------------%
\end{verbatim}
\end{small} \end{center}
\pagebreak

\begin{figure}[!htbp]
	\begin{center}
\includegraphics[scale=.73]{eps/vivaldi2.eps}
	\end{center}
	\caption{\textbf{A.\ Vivaldi}, \emph{Mundi Rector}
	         (generated by {\MTX}/{\PMX})}
	\label{fig:vivaldi2}
\end{figure}
\pagebreak

\subsection{Caccini, \emph{Amor l'ali m'impenna} ({\MTX} code)}
\label{sec:Caccini}     _{\MTX!full-score examples}

\begin{center} \begin{small}
\begin{verbatim}
%----------------%
%
%  Caccini, Amor l'ali m'impenna
%
%----------------%
%
Title: {\tit {Amor l'ali m'impenna}}
Composer: \vbox{\compA\compB}
Meter: C
Style: Singer Cont Bass
Singer: Voices Sop; Vocal; Clefs G
Cont: Voices RH1,RH2; Clefs G
Bass: Voices B; Clefs F
Flats: 1
Systems: 12
Pages: 3
Space: 4 1
Size: 20
Indent: 0.10
Name: {\it{Soprano}} ~ {\it{Continuo}}

%%\input musixbar\input curly
%%\font\data = cmr10
%%\font\tit = cmb10 scaled \magstep 4
%%\font\rxii = cmr12
%\font\mov = cmmib10 scaled \magstep 1
%%\font\num = cmr9
%%\def\compA{\rightline{\rxii Giulio Caccini}}
%%\def\compB{\rightline{\data (1550--1618)}}
%%\def\writebarno{\ifnum\barno>1\lrlap{\oldstyle\the\barno\barnoadd}\fi}%
%%\def\shiftbarno{0\Interligne}

{Aria}
A-mor l'a-li m'im-pen-na.
A-mor dol-ce, a-mor ca-ro,_a-mor fe-li-ce.
Tal che non spe-ro pi{\`u} n{\'e} pi{\`u} mi li-ce.
Pas-so nem-bi_e pro-cel-le,
pas-so'l ciel e le stel-le,
del pia-cer que-st'{\`e}'l re-gno.
Ah, mia for-tu-na non se l'ab-bia a sde-gno.
Que-sto, que-sto m'ac-co-ra:
ch'al-tri ca-deo,
ch'al-tri ca-deo dal pa-ra-di-so_an-co-ra.
Ah, mia for-tu-na non se l'ab-bia a sde-gno.
Que-sto, que-sto m'ac-co-ra:
ch'al-tri ca-deo,
ch'al-tri ca-deo dal pa-ra-di-so_an-co-ra.

%%w187m
%%h251m
%%Ab
%%B
%%It86ivchaobb58:70:64
%% \\setsize2\smallvalue\curlybrackets{{1}{2}}\
%%\\let\interstaffsav\interstaff\def\interstaff#1{}\interstaffsav{9}\
%%\\\indivbarrules\sepbarrule3\
% Bar 1
@+2 f0
L: {Aria}
f0
c0 za
f0

% Bar 2
f2 ( f2
f2 f4 e
a2 zd c zf-
d2 - a2 6

% Bar 3
f4 ) f8 g8 (~ [ a1 b1 c1 b1 ] [ a8 g8 ]
d4.e f.e
b2 zf f zc+
b2 a2 6
 
% Bar 4
[ fd8 g1 ] [ f8 g8 ] [ a1 ( g g8 ) ] [ a1 ( f  f8 ) ] )~
d0e
cd2 zf- g4 zbn
d2 7 ( d4 7 d4 #6 )

% Bar 5
g2 r4 g8 g8
e2 g
c2 zg e+ zc
c2 c2

% Bar 6
b2 g4 d8 d8
b4 zd- a+ zc- g2+
g2e+ d zb
g2 - g2

% Bar 7
f4 [ f1 e1 f1 g1 ] a4 [ e1 d1 e1 f1 ]
fd2 za- g4 ze+
de2 c
d2+ - a4 c4

% Bar 8
g0
d0 zg-
ce2  bn
\zcharnote{-6}{\num 11}\ ( g2 \zcharnote{-6}{\num 10}\ g )

% Bar 9
g0
e0+
c0 zg
c0

% Bar 10
c4 g8 g8 b4 [ a1 b1 c1 b1 ]
g2 g
c2 ze d zb
c2 g2 -

% Bar 11
ad4 d8- f4 [ e1 f1 g1 f1 ]
f2.g
a2 zd d zb
d2+ - b4 g4 -

% Bar 12
e0
\zw e\ dr2 cs
a2d-2 g4
%%%%%% The two following lines must actually be written in one line!
\zcharnote{-6}{\num 11}\ (5t a2 \zcharnote{-6}{\num $\sharp $10}\
(6t a4 )5t a 7 )6t

% Bar 13
d2 r4 fs8 f8
d2 fs
fs2 zd+ d za
d2 # d2

% Bar 14
g4 d8 d8 (~ [ e8 f1 e1 ] [ f1 e1 d1 e1 ] )~
g4 fn e2
b2 zd c zg
g2- c2

% Bar 15
f2 r4 fs8 f8
f2 fs
a2 zc d za
f2 d2

% Bar 16
g4 d8 d8 [ e8 f8 fd8 e1 ]
g4 fn e2
b2 zd c zg
g2- c2

% Bar 17
f4 f8 g8 a2
f2 f
a2 zc c za
f2 f4 e8 d8

% Bar 18
cd8 c1 (~ [ b1 a1 g1 f1 ] g2 )~
e4 ( f f ) e
g2 zc c zg
%%%%%% The two following lines must actually be written in one line!
( c4 \zcharnote{-6}{\num 11}\ c4 )
\zcharnote{-6}{\num 11}\ c4 \zcharnote{-6}{\num 10}\ c4

% Bar 19
f0
f0
a0 zc
f0-

% Bar 20
ad2 g8 f8
f4 ( c c ) bn
a4 g ( f f )
f4+ e4 ( d4 d )

% Bar 21
e8 d8 e8 f8 g2
c2 r8+0 e d c
g2 ze rb
( c2 c8 ) c8 b8 a8
 
% Bar 22
g4 d4 d2
bnr4 ( c c ) b
g0 zd+
%%%%%% The two following lines must actually be written in one line!
\zcharnote{-6}{\num $\sharp $10}\ ( g4 \zcharnote{-6}{\num 11}\ g )
( \zcharnote{-6}{\num 11}\ g4 \zcharnote{-6}{\num $\sharp $10}\ g )

% Bar 23
c0
e0
c0 zg
c0

% Bar 24
gd4+ e8 a4 g8 f8
e2 e4 f
g2 zc c za
c2 a4 f4

% Bar 25
g2 f8 f8 f8 e8
e2 f
g2 zc c za
c2+ f2-

% Bar 26
d2 r8 b8+ b a
f2 g
b2 zd d zb
b4 b8 a8 g2 -
 
% Bar 27
g8 e8 e8 f8 g4 [ f1 g1 a1 b1 ]
g4 f e ( f
c2 ze c zg
c2 c4 \zcharnote{-4}{\num 11}\ c4

% Bar 28
g0
f2 ) cr4 b
g2 zc e zg-
%%%%%% The two following lines must actually be written in one line!
\zcharnote{-4}{\num 11}\ (5t c2
(6t \zcharnote{-4}{\num 10}\ c4 )5t c 7 )6t

% Bar 29
f0
f0+
a0
f0-
 
% Bar 30
ad2 g8 f8
f4 ( c c ) bn
a4 g ( f f )
f4+ e4 ( d 7 d #6 )

% Bar 31
e8 d8 e8 f8 g2
c2 r8+0 e d c
g2 ze rb
( c2 c8 ) c8 b8 a8
 
% Bar 32
gd8 (~ g1 [ f1 e1 d1 c1 ] )~ d2
bnr4 ( c c ) b
g0 zd+
%%%%%% The two following lines must actually be written in one line!
\zcharnote{-6}{\num $\sharp $10}\ ( g4 \zcharnote{-6}{\num 11}\ g )
( \zcharnote{-6}{\num 11}\ g \zcharnote{-6}{\num $\sharp $10}\ g )
 
% Bar 33
c0
e0
c0 zg
c0

% Bar 34
gd4+ e8 a4 g8 f8
e2 e4 f
g2 zc c za
c2 a4 f4

% Bar 35
g2 f8 f8 f8 e8
e2 f
g2 zc c za
c2+ f2-

% Bar 36
d2 r8 b8+ b a
f2 g
b2 zd d zb
b4 b8 a g2 -
 
% Bar 37
g2 r8 c8 c8 b8
g2 a4 b
c2 ze c4 zf d zg
c4 c8 b8 a4 6 g4

% Bar 38
a4 b4 ( c2
a2 a
f2 c
f2 a4 6 b4

% Bar 39
[ c8 ) (~ b1 a1 ] [ g1 f1 e1 d1 ] [ e1 d1 c1 d1 ] [ e1 f1 g1 a1 ]
g0
c0 ze
c0
 
% Bar 40
[ g1 c1- d1 e1 ] [ f1 g1 a1 b1 ] [ c1 b1 a g1 ] [ a1 g1 a1 f1 ]
e0
c0 zg
c0

% Bar 41
g0 )~
f2 e
\zw N\ ce2d+0+1 b4
%%%%%% The two following lines must actually be written in one line!
\zcharnote{-4}{\num 11}\
(1t c2 (2t \zcharnote{-4}{\num 10}\ c4 )1t c 7 )2t

% Bar 42
f0
f0
a0
f0-
%
%----------------%
%
%  end Caccini, Amor l'ali m'impenna
%
%----------------%
\end{verbatim}
\end{small} \end{center}

\begin{figure}[!htb]
	\begin{center}
\includegraphics[scale=.75]{eps/caccini1.eps}
	\end{center}
\end{figure}
\begin{figure}[!htb]
	\begin{center}
\includegraphics[scale=.75]{eps/caccini2.eps}
	\end{center}
\end{figure}
\begin{figure}[!htbp]
	\begin{center}
\includegraphics[scale=.75]{eps/caccini3.eps}
	\end{center}
	\caption{\textbf{G.\ Caccini}, \emph{Amor l'ali m'impenna}
                 (generated by {\MTX}/{\PMX})}
	\label{fig:caccini}
\end{figure}

\addcontentsline{toc}{chapter}{Index}

\renewcommand{\seename}{$\;\Rightarrow\;$}
\printindex

\end{document}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%          End of PMX tutorial by ccn / Mon 2003 Sep 22 /19:15 /ccn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%)))