summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/musixtex/musixdoc.tex
blob: 17cafecb4c944f22cdd363e0a306475d138d41bf (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
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
%
%  mxdoc111d.tex (formerly file 110d, internally called 109d1)
%    Different from version posted in that it has the extra paragraph
%    "You may wonder ..." in section 1.3
%
%   This file is part of MusiXTeX
%
%   MusiXTeX is free software; you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation; either version 2, or (at your option)
%   any later version.
%
%   MusiXTeX is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%   GNU General Public License for more details.
%
%   You should have received a copy of the GNU General Public License
%   along with MusiXTeX; see the file COPYING.  If not, write to
%   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
%   Boston, MA 02111-1307, USA.
%
%  This version 109d1 postdates the one posted to the site.
%

\ifx\documentclass\undefined
  \documentstyle[twoside,11pt,musixdoc,multicol,backgrnd]{report}
\else
  \documentclass[twoside,11pt,a4paper]{report}
  \usepackage{multicol}
  \usepackage{musixdoc}
  \usepackage{etex}
  \usepackage[dvips,bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,colorlinks=true,pdfborder={0 0 0}]{hyperref}
  \usepackage{url}
  \usepackage{indentfirst}
  \usepackage[ansinew]{inputenc}
\makeatletter
\def\notesintext#1{% no staff lines, no clefs
  {\let\extractline\relax
   \setlines10\smallmusicsize \nobarnumbers \nostartrule
   \staffbotmarg0pt \setclefsymbol1\empty \global\clef@skip0pt
   \startextract\addspace{-\afterruleskip}#1\zendextract}}
\makeatother
\def\musicintext#1#2{% normal
  {\let\extractline\relax
   \smallmusicsize \nobarnumbers
   \staffbotmarg0pt \setclef1{#1}
   \startextract\addspace{-\afterruleskip}#2\endextract}}
% macro adapted to insert music without clef:
\def\musicintextnoclef#1{% no clef small
  {\let\extractline\relax
   \smallmusicsize \nobarnumbers
   \staffbotmarg0pt \setclefsymbol1\empty
   \startextract\addspace{-\afterruleskip}#1\endextract}}
\def\musicintextnoclefn#1{%  no clef normal
  {\let\extractline\relax
   \nobarnumbers
   \staffbotmarg0pt \setclefsymbol1\empty
   \startextract\addspace{-\afterruleskip}#1\endextract}}
\fi
\def\musictex{Music\TeX{}}
\def\onen{{\tt\char123}$n${\tt\char125}}
\def\pitchp{{\tt\char123}$p${\tt\char125}}
\def\itbrace#1{{\tt\char123}$#1${\tt\char125}}
\def\nochange{(\ital{NOT to be changed})}

\ifx\setendvolta\undefined\def\setendvolta{\endvolta}\fi
\ifx\setendvoltabox\undefined\def\setendvoltabox{\endvoltabox}\fi

\startmuflex\makeindex

\begin{document}

%\changebarsep 10 pt
\title{\Huge\bf\musixtex\raise1.5ex\hbox{\large\copyright}\\[\bigskipamount]
\LARGE\bf Using \TeX{} to write polyphonic\\or
instrumental music\\\Large\sl Version T.114~-- June, 2006}
\author{\Large\rm Daniel \sc Taupin\\\large\sl
 Laboratoire de Physique des Solides\\\normalsize\sl
 (associ\'e au CNRS)\\\normalsize\sl
% b\^atiment 510, Centre Universitaire, F-91405 ORSAY Cedex\\ E-mail : {\tt
%taupin@lps.u-psud.fr}\\\medskip
 b\^atiment 510, Centre Universitaire, F-91405 ORSAY Cedex\\\medskip
 \\\Large\rm Ross \sc Mitchell\\\large\sl
 CSIRO Division of Atmospheric Research,\\\normalsize\sl
 Private Bag No.1, Mordialloc, Victoria 3195,\\ Australia \\\medskip
%   \\\Large\rm Andreas \sc Egler\ddag\\\large\sl
   \\\Large\rm Andreas \sc Egler\\\large\sl
   (Ruhr--Uni--Bochum)\\ Ursulastr. 32\\ D-44793 Bochum}
\date{}
%\let\endtitleORI\endtitlepage
% \def\endtitlepage{\vfill\noindent $^\ddag$ {\it For personal reasons, Andreas
%Egler decided to retire from authorship of this work. Nevertherless, he has
%done an important work about that, and I decided to keep his name on this
%first page. {\sc D. Taupin}}\endtitleORI}
 \maketitle
\clearpage
 %\check

\pagenumbering{roman}\setcounter{page}{2}

%\thispagestyle{empty}

\null
\vfill

\begin{flushright}\it
%.. All the possible is done,\\
%the impossible is being done,\\
%for miracles I ask for some delay.\\[\smallskipamount]
%{\sc N.N.}\\[\bigskipamount]
%...~time after time~...\\[\smallskipamount]
%{\sc Cindy Lauper}\\[\bigskipamount]
 If you are not familiar with \TeX{} at all\\
I would recommend to find another software\\
package to do musical typesetting.\\
Setting up \TeX{} and \musixtex\\
on your machine and mastering it\\
is an awesome job which gobbles up\\
a lot of your time and disk space.\\[\medskipamount]
But, once you master it...\\[\smallskipamount]
Hans {\sc Kuykens}
\end{flushright}

\begin{center}
\musixtex{} may be freely copied, duplicated and used in conformance to
the GNU General Public License (Version 2, 1991, see included file {\tt
copying})\footnote{Thanks to Free Software Foundation for advising us. See
\href{http://www.gnu.org}{\underline{\tt http://www.gnu.org}}}.

You may take it or parts of it to include in other packages, but no packages
called \musixtex{} without specific suffix may be distributed under the name
\musixtex{} if different from the original distribution (except obvious bug
corrections).

 Adaptations for specific implementations (e.g. fonts) should be provided as
separate additional \TeX\ or \LaTeX\ files which override original definitions.
 \end{center}

\clearpage

\chapter*{Preface to Version T.113}
%\thispagestyle{empty}

The main author of \musixtex{}, Daniel Taupin, died all too early in a 2003
climbing accident. The \musixtex\ community was shocked by this tragic and unexpected
event. You may read some tributes to Daniel Taupin which are archived at the
\href{http://icking-music-archive.org}{\underline{Werner Icking Music Archive}}.

Now, almost two years after his death, we would like to help keep his excellent
work alive and current by assembling a new release. This new version corrects various
minor bugs without adding any new functionality. At the same time it incorporates directly
into the distribution some additional packages:
\begin{itemize}\setlength{\itemsep}{0ex}
\item Type 1 (postscript) versions of all the \musixtex{} fonts, created by
Takanori Uchiyama;
\item Postscript Slur Package K (Ver 0.92, 12~May~02) by Stanislav Kneifl;
\item musixlyr (Ver 2.1c, 12 June 03) a \musixtex{} extension package for lyrics
handling, by Rainer Dunker.
\end{itemize}
We would like to thank the authors of these packages for generously agreeing to allow their
contributions to be included in the main \musixtex{} package.

We have left the remainder of this manual largely as Daniel Taupin left it,
except we have updated various references and provided dynamic links to
archived versions where possible.

This documentation is rather technical and is probably not the best way to
begin typesetting music. If you are a beginner, you should visit the
software section of the
\href{http://icking-music-archive.org/software/indexmt6.html}
{\underline{Werner Icking Music Archive}}.
In particular, we recommend
\href{http://icking-music-archive.org/software/pmx/pmxccn.pdf}
{\underline{Cornelius Noack's tutorial}}. It contains helpful information for
getting started with \musixtex, as well as a tutorial for \textbf{PMX}, a
preprocessor for \musixtex\ with a much simpler input language, and a brief
introduction to \textbf{M-Tx}, a preprocessor for \textbf{PMX}~which eases
the inclusion of lyrics.

\bigskip

\begin{flushright}
In the name of the community, Olivier Vogel
(\href{mailto:oliviervogel@freesurf.ch}{\url{oliviervogel@freesurf.ch}}),
July 30, 2005
\end{flushright}

%\clearpage

\chapter*{Preface to Version T.114}
%\thispagestyle{empty}

In order to expedite the release of version T.113 of \musixtex, only the most
essential modifications were made to the manual. With version T.114 the manual
has been extensively edited from cover to cover. Some material has been
rearranged, and references to \musictex, the immediate predecessor to
\musixtex, have been removed. The software itself remains
very stable. Only the slightest changes have been made since version T.113.

It remains true that this is the definitive reference to all features of
\musixtex, but also that it is not the best place for a novice user to start.
The \href{http://icking-music-archive.org/software/indexmt6.html}
{\underline{Werner Icking Music Archive}}\ contains excellent and detailed
instructions for installing \musixtex{} and the strongly recommended
preprocessors \textbf{PMX}
(for instrumental music) and \textbf{M-Tx} (for vocal) under
\href{http://icking-music-archive.org/software/musixtex/musixtex-for-unix.html}
{\underline{Linux/\unix}} or
\href{http://icking-music-archive.org/software/musixtex/musixwinstall.pdf}
{\underline{Windows 2000}}. Once the software is installed, most common
music typesetting tasks can be accomplished entirely by using one of these
preprocessors to generate the \musixtex\ input file, relieving the user of
learning any of the commands or syntax of \musixtex\ itself. It is only
for out-of-the-ordinary constructions that one must learn these details, so he
may insert the necessary \musixtex\ commands into the preprocessor's input file
as so called inline \TeX.
\href{http://icking-music-archive.org/software/pmx/pmxccn.pdf}
{\underline{Cornelius Noack's tutorial}} is an important resource which,
in addition to gently introducing the
novice to \textbf{PMX} and \textbf{M-Tx}, gives further details on installing
Postscript slur facilities.

\begin{flushright}
Don Simons, Andre van Ryckeghem, Cornelius Noack, August 30, 2005
\end{flushright}

\clearpage

%\pagenumbering{roman}
\renewcommand{\baselinestretch}{.8}\footnotesize\normalsize
\tableofcontents \setcounter{secnumdepth}3
\renewcommand{\baselinestretch}{1}\footnotesize\normalsize

%avrb page 4 was on top
\clearpage
%avre

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

\pagestyle{headings}



\chapter{Introduction to \musixtex}

This chapter is not a tutorial on the use of \musixtex, but instead serves as
an overview of some of its capabilities, quirks, and history.

\musixtex\ is a set of \TeX\ macros which enables the typesetting of music with
systems of up to twelve staves. It requires as a prerequisite a working
installation of \TeX\footnote{See section \ref{installation}~for guidance on
installing \TeX.}.
\musixtex\ might be regarded as the digital equivalent of a box of type. It
contains symbols for staves, notes, chords, beams, slurs and ornaments,
ready to be arranged to form a sheet of music. But it must be told how to position
those symbols on the page. This could be done by the typesetter
himself, if he elects to proceed by entering \musixtex\ commands manually
into an input file. However most users will find it far less taxing to let
such decisions be made largely by the preprocessor
\href{http://icking-music-archive.org/software/indexmt6.html#pmx}
{\underline{\textbf{PMX}}}, which in addition uses a much simpler input
language than \musixtex.

Lyrics can also be handled by \musixtex. There is a set of primitive
commands for this which are described later. But there is also a far
more adaptable set of macros contained in the extension file
\verb|musixlyr.tex|, and there is the preprocessor
\href{http://icking-music-archive.org/software/indexmt6.html#mtx}
{\underline{\textbf{M-Tx}}}\ which provides easy, transparent access to
these macros.

Most users of \TeX\ are familiar with \LaTeX, a set of \TeX\ macros
which eases document layout. In fact many may only use \LaTeX.
Until recently, \LaTeX\ and \musixtex\ coexisted only grudgingly, owing
primarily to the limited availabily of storage registers. But with modern
versions of \TeX\ and with the use of e\LaTeX, only a modest increase in
complexity is incurred with the addition of musical excerpts to a \LaTeX\
document. Still, fortunately, for typesetting a musical score there is
rarely if ever any advantage to using \LaTeX. Only if one wanted to create a
text document with embedded musical examples would there be much use for it.
Even in that case there is a perfectly fine way to avoid using \musixtex\
directly in the document file, namely, by using \musixtex\ to create
\verb|eps| files for
each of the examples, then embedding references to those in the file for
the book. But for anyone who still wants to use both together, there is
no better example than this manual, as generated with the files
\verb|musixdoc.tex| and \verb|musixdoc.sty|. A few further details about such
nonstandard applications are given in section \ref{excerpts}.

\section{Primary features of \musixtex}
 \subsection{Music typesetting is two-dimensional} Written music is not
usually a linear sequence of symbols like a literary text. Rather,
except for unaccompanied single-note instruments like clarinets,
trumpets and human voices, it has the form of a two-dimensional matrix.
 Thus, a logical way of coding music consists
in horizontally accumulating a set of \ital{vertical combs} with
\ital{horizontal teeth} as depicted in Table~\ref{readtable}.
\def\hboxit#1{\boxit{\rlap{#1}\hphantom{note sequence three}}}
 \begin{table}
 \begin{center}
%avrb
 \small
 %avre
 \begin{tabular}{|ll|ll|}\hboxit{note sequence one}
  &\hboxit{note seq.\ four}
  &\hboxit{note seq.\ seven}
  &\hboxit{note seq.\ ten}\\\hboxit{note sequence two}
  &\hboxit{note seq.\ five}
  &\hboxit{note seq.\ eight}
  &\hboxit{note seq.\ eleven}\\\hboxit{note sequence three}
  &\hboxit{note seq.\ six}
  &\hboxit{note seq.\ nine}
  &\hboxit{note seq.\ twelve}\\
 \end{tabular}
 \end{center}
 \caption{A logical way of coding music}\label{readtable}
 \end{table}
Accordingly, in \musixtex\ the fundamental macro used to represent
one of those vertical combs (or one of the columns in Table~\ref{readtable})
is of the form
\begin{center}
\verb|\notes ... & ... & ... \enotes|\footnote{The abbreviation
\keyindex{en} can be used in place of \keyindex{enotes}.}
\end{center}\index{\&}
\noindent where the character \verb|&| is used to separate the notes to be
typeset on respective staves of the various instruments, starting from the
bottom.

In the case of an instrument whose score has to be written with
several staves, they are separated by the
character \|. \index{"|@{\tt\char'174}}
Thus, a score written for a keyboard instrument and
a single-line instrument (e.g., piano and violin)
will be coded as follows:
\begin{center}
\verb=\notes ... | ... & ...\enotes=
\end{center}
\noindent for each column of simultaneous \ital{groups of notes}.
Each of those groups, represented by a single box in Table~\ref{readtable}\
and by a sequence of three dots in the the two example macros above, may contain
not only chord notes to be played simultaneously, but short sequences of
consecutive
notes or chords. As we'll soon see, this implies the need for two fundamentally different
kinds of elemental macros in \musixtex, those that are automatically followed
by some amount of space (called \ital{spacing macros}, and those that are not.
The former type, for example,
would be used to represent all the notes and rests in a single-line score.
The latter would be used for example for chord notes and ornaments.

\subsection{Horizontal spacing}
Deciding upon the proper horizontal spacing of notes is a very complicated matter
that we will not address in any detail here. Obviously short-duration notes
should be closer together than longer ones. Almost as obviously, the spacing
cannot be linearly proportional to the duration; otherwise  for example a whole
note would occupy 32 times as much horizontal space as a thirty-second note. And
in polyphonic scores the spacing in one staff is often influenced by the notes
in another. This is a decision that the typesetter or preprocessor
must make. Once the decision is made, \musixtex\ can provide the desired spacing.
The main mechanism is through a set of macros described in
section~\ref{newspacings}. At this point we shall only mention that to control
spacing, one of those
macros will be selected to replace the symbol \verb|\notes| in the two examples
above, and it will imply that whenever a spacing macro in encountered within
a group of notes, a
certain specific amount of horizontal space will be inserted.

 \subsection{Music tokens}
The tokens provided by \musixtex\ include
\begin{itemize}\setlength{\itemsep}{0ex}
 \item note symbols without stems;
 \item note symbols with stems, and flags for eighth notes and
shorter;
 \item beam beginnings and endings;
 \item beginnings and endings of ties and slurs;
 \item accidentals;
 \item ornaments: arpeggios, trills, mordents, turns, staccatos,
pizzicatos, fermatas, etc.;
 \item bar lines;
 \item meters, key signatures, clefs.
\end{itemize}

\smallskip

 Thus for example, \verb|\wh a| produces a whole note at nominal frequency 222.5~Hz,
\verb|\wh h| produces one an octave higher, \verb|\qu c|
produces an up-stemmed quarter note C (250~Hz), and \verb|\cl J| produces a down-stemmed C
eighth note an octave lower.

 To generate chords with solid note heads, the macro \keyindex{zq}
can be used. It produces a solid note head at the specified pitch,
the vertical position of which
is memorized and recalled whenever the next stemmed note (possibly with a flag) is
coded. The stem length is automatically adjusted to link all simultaneous notes. Thus, the
C-major chord

\begin{music}\nostartrule
\startextract\NOtes\zq{ceg}\qu j\en\zendextract
\end{music}
 \noindent is coded \verb|\zq c\zq e\zq g\qu j| or more concisely,
\verb|\zq{ceg}\qu j|. Here the \verb|u| in the spacing note macro
\verb|\qu| is what causes the upstem.

 \subsection{Beams}
Each beam \index{beams} is generated by a pair of macros. The first defines
the beginning horizontal position (implicitly the current position), altitude,
direction (upper or lower), multiplicity (number of lateral bars), slope and
reference number. This latter feature is needed so independent beams
can overlap. The second macro of the pair specifies the termination
location (again implicitly) and the reference number.

 \subsection{Setting anything on the score}
A general macro (\keyindex{zcharnote}) provides a means of
putting any sequence of symbols (possibly contained in an \verb|\hbox{...}|) at any
pitch of any staff of any instrument. This allows any symbol defined in a font
(letters, math symbols, etc.) to be placed in the score at a position keyed
to the music both in time (horizontally) and pitch (vertically) on the staff,
\section{A simple example}
 Before going into more detail, we give below an example of the two first
bars of the sonata in C-major KV545 by {\sc Mozart}\index{Mozart, W.A.@{\sc
Mozart, W.A.}}:

\begin{music}
\parindent11mm
\setname1{Piano}
\setstaffs12
\generalmeter{\meterfrac44}
\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
\zendextract
\end{music}
 The coding is as follows:
\begin{quote}\begin{verbatim}
\begin{music}\nostartrule
\parindent10mm
\instrumentnumber{1}       % a single instrument
\setname1{Piano}           % whose name is Piano
\setstaffs1{2}             % with two staffs
\generalmeter{\meterfrac44}% 4/4 meter chosen
\startextract              % starting real score
\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
\zendextract                 % terminate excerpt
\end{music}
 \end{verbatim}\end{quote}
\begin{itemize}\setlength{\itemsep}{0ex}
 \item \verb|\ibu0f0| begins an upper beam, aligned on the
\ital{f}, reference number 0, slope 0
 \item \verb|\tbu0| terminates this beam before writing
the second \ital{g} by means of \verb|\qb0g|
 \item \verb|\qb..| indicates a note belonging to a beam.
 \item \verb|\sk| sets a space between the two quarters in the right
hand, so that the second one is aligned with the third eighth in the left hand.
 \item\verb|\qlp| is a dotted quarter note.
 \item\verb|\ibbl1j3| begins a double beam, aligned on the \ital{C}
(\verb|j| at this pitch) with slope 15\%.
\end{itemize}

\section{The three pass system}
\TeX's line-breaking procedure implicitly assumes
that a normal line of text will contain many words, so that inter-word
glue need not stretch or shrink too much to justify the line.
One might at first consider extending this to music, treating each bar like a
word with no stretchable internal space. But typically this would lead to unsightly
gaps before each bar rule, simply because the number of bars per line
is normally many fewer than the number of words in a line of text.
\musixtex\ needs a more sophisticated horizontal spacing algorithm
than is used in \TeX.

To understand how \musixtex\ solves this problem, we have to
recognize two different kinds of horizontal space, \ital{hard}\ and
\ital{scalable}. Hard space is fixed and always represents the same
physical distance.
Examples of hard space are the widths of bar rules, clefs,
and key signatures. Scalable space can be stretched as needed. It
is what is normally used for the space after notes or rests. At the
outset it is only defined in a relative sense. In other words,
scalable spaces are defined as multiples of \verb|\elemskip|, an
initially undefined elemental spacing unit. For example, in \textbf{PMX}\
all sixteenth notes
are typically assigned a scalable width of 1.41\verb|\elemskip|.
One main job of \musixtex\ is to compute the physical value of
\verb|\elemskip|, often expressed in points (72nds of an inch).
The correct value is that which makes all the scalable space on
a line just fill up what's not occupied by hard space. Obviously
it may vary from line to line.

To this end a three pass system was developed. To start the
first pass on the file \verb|jobname.tex|, you would enter \verb|tex jobname|.
Information about each bar is written to
an external file named \verb|jobname.mx1|.
This file begins with a header containing parameters
such as line width and paragraph indentation. Then the hard and
scalable space is listed for each bar.
\index{scalable width}\index{hard width}

The second pass, which is started with \verb|musixflx jobname|,
determines optimal values of the elemental spacing unit \verb|\elemskip|
for each line, so as to properly fill each line, and to spread
the piece nicely over an integral number of full lines. This routine was written
in FORTRAN and now converted to C rather than \TeX, the main reason
being the lack of an array handling capability in \TeX.

\verb|musixflx| reads in the file \verb|jobname.mx1|, and writes its
output to \verb|jobname.mx2|. The latter file contains a single entry for
each line of music in the reformatted output. The key piece of information
is the revised value of \keyindex{elemskip} for each line.

Next, the file is \TeX-ed again, by entering \verb|tex jobname|. On this third pass,
the \verb|jobname.mx2| file is read in, and the information
is used to physically define the final score and embed the
page descriptions into a \verb|dvi|\ file.

You may wonder how the same command can
cause something different to happen the second time it is issued. The explanation
is that \musixtex\ checks for the presence of \verb|jobname.mx2|. If it's
not present, the first pass is executed; if it is, the third pass. Obviously if
you've made some corrections that affect any horizontal spacing, you must remember
to delete the old \verb|jobname.mx2| and then rerun all three passes, or
build or use a batch script that does so.

Here's an example. Here, no value for \verb|\elemskip| is explicitly specified,
so \musixtex\ assign a single, default value. After the first pass you might get
the following output:

\begin{music}
\hsize=100mm
\generalmeter{\meterfrac24}%
\parindent 0pt
\setsign1{-3}
\startpiece\bigaccid
\NOtes\qu{ce}\enotes
\bar
\NOtes\qu{gh}\enotes
\bar
\NOtes\qu{=b}\enotes
\Notes\ds\cu g\enotes
\bar
\NOtes\qu{^f=f}\enotes
\raggedstoppiece\contpiece% this is cheated, the problem was to get
%                           pass 1 and pass 3 at the same time
\NOtes\qu{=e}\itied0e\qu{_e}\enotes
\bar
\Notes\ttie0\Qqbu ed{_d}c\enotes
\bar
\Notes\ibu0b{-2}\qb0{=b}\enotes
\notes\nbbu0\qb0{=a}\tqh0N\enotes
\Notes\Dqbu cf\enotes
\raggedstoppiece\contpiece
\NOtes\uptext{\it tr}\qu e\uptext{\it tr}\qu d\enotes
\bar
\NOtes\qu c\qp\enotes
\setdoubleBAR\raggedstoppiece
\end{music}

\noindent Note that the space after every quarter note is the same, and
that lines are not justified.
After running \verb|musixflx| and \TeX-ing the second time you'll
get:

\begin{music}
\hsize=100mm
\generalmeter{\meterfrac24}%
\parindent 0pt
\generalsignature{-3}
\startpiece\bigaccid
\NOtes\qu{ce}\enotes
\bar
\NOtes\qu{gh}\enotes
\bar
\NOtes\qu{=b}\enotes
\Notes\ds\cu g\enotes
\bar
\NOtes\qu{^f=f}\enotes
\bar
\NOtes\qu{=e}\itied0e\qu{_e}\enotes
\bar
\Notes\ttie0\Qqbu ed{_d}c\enotes
\bar
\Notes\ibu0b{-2}\qb0{=b}\enotes
\notes\nbbu0\qb0{=a}\tqh0N\enotes
\Notes\Dqbu cf\enotes
\bar
\NOtes\uptext{\it tr}\qu e\uptext{\it tr}\qu d\enotes
\bar
\NOtes\qu c\qp\enotes
\Endpiece
\end{music}

\noindent Now \musixtex\ has determined a number of lines
(which is different from the original number), the lines are justified,
and if you look carefully you
can see that the space after quarters in the first line
is smaller than in the second. This example was coded as:
\begin{verbatim}
\hsize=100mm
\generalmeter{\meterfrac24}%
\parindent 0pt
\generalsignature{-3}
\startpiece\bigaccid
\NOtes\qu{ce}\en\bar
\NOtes\qu{gh}\en\bar
\NOtes\qu{=b}\en
\Notes\ds\cu g\en\bar
\NOtes\qu{^f=f}\en\bar
\NOtes\qu{=e}\itied0e\qu{_e}\en\bar
\Notes\ttie0\Qqbu ed{_d}c\en\bar
\Notes\ibu0b{-2}\qb0{=b}\enotes
\notes\nbbu0\qb0{=a}\tqh0N\enotes
\Notes\Dqbu cf\en\bar
\NOtes\uptext{\it tr}\qu e\uptext{\it tr}\qu d\en\bar
\NOtes\qu c\qp\en\Endpiece
\end{verbatim}

One benefit of the 3-pass system is the quick and easy
alteration to the layout which can be achieved
by changing only one parameter, namely \keyindex{mulooseness}. This value
acts analogously to \TeX's \verb|\looseness| command. For non-\TeX-perts: if you
state \verb|\looseness=-1| somewhere inside any paragraph, then
\TeX\ will try to make the paragraph one line shorter than it normally would.
With \verb|\mulooseness|, \musixtex\ does the same, but for \ital{systems}
and \ital{sections} rather than lines and paragraphs. A system is just a group of
staves treated as a unit, and in this discussion is analogous to a line of text.
What is a \ital{section}? It's any chunk of coding not containing a
forced system break, System breaks can be forced with
\keyindex{stoppiece}, \keyindex{endpiece}, \keyindex{zstoppiece},
\keyindex{Stoppiece}, \keyindex{Endpiece}, \keyindex{alaligne}
\keyindex{zalaligne}, \keyindex{alapage} or \keyindex{zalapage}. If none
of these is present, the section comprises the whole piece.
Somewhere\footnote{Advisably, at the beginning or
at the end of the section, for the sake of clarity.}
before the end of the section, you can change the value of
\keyindex{mulooseness} to something different from the default of 0, and
\musixtex\ will typeset that section with a different number of systems.

To give an easy example, changing the last line in the previous example to:
\begin{verbatim}
\NOtes\qu c\qp\en\mulooseness=1\Endpiece
\end{verbatim}
yields:

\begin{music}
\hsize=100mm
\generalmeter{\meterfrac24}%
\parindent 0pt
\generalsignature{-3}
\startpiece\bigaccid
\NOtes\qu{ce}\enotes
\bar
\NOtes\qu{gh}\enotes
\bar
\NOtes\qu{=b}\enotes
\Notes\ds\cu g\enotes
\bar
\NOtes\qu{^f=f}\enotes
\bar
\NOtes\qu{=e}\itied0e\qu{_e}\enotes
\bar
\Notes\ttie0\Qqbu ed{_d}c\enotes
\bar
\Notes\ibu0b{-2}\qb0{=b}\enotes
\notes\nbbu0\qb0{=a}\tqh0N\enotes
\Notes\Dqbu cf\enotes
\bar
\NOtes\uptext{\it tr}\qu e\uptext{\it tr}\qu d\enotes
\bar
\NOtes\qu c\qp\enotes
\mulooseness1\Endpiece
\end{music}

\noindent On the other hand,
\begin{verbatim}
\NOtes\qu c\qp\en\mulooseness=-1\Endpiece
\end{verbatim}
yields

\begin{music}
\hsize=100mm
\generalmeter{\meterfrac24}%
\parindent 0pt
\generalsignature{-3}
\startpiece\bigaccid
\NOtes\qu{ce}\enotes
\bar
\NOtes\qu{gh}\enotes
\bar
\NOtes\qu{=b}\enotes
\Notes\ds\cu g\enotes
\bar
\NOtes\qu{^f=f}\enotes
\bar
\NOtes\qu{=e}\itied0e\qu{_e}\enotes
\bar
\Notes\ttie0\Qqbu ed{_d}c\enotes
\bar
\Notes\ibu0b{-2}\qb0{=b}\enotes
\notes\nbbu0\qb0{=a}\tqh0N\enotes
\Notes\Dqbu cf\enotes
\bar
\NOtes\uptext{\it tr}\qu e\uptext{\it tr}\qu d\enotes
\bar
\NOtes\qu c\qp\enotes
\mulooseness-1\Endpiece
\end{music}

\noindent which is tighter than you would ever want, but serves to further
demonstrate the use of \keyindex{mulooseness}.

If you want to build up a \musixtex\ input file
manually (which in fact very few users will ever need to do, considering the
availability of \textbf{PMX}), here is a roadmap for one way to proceed:
\begin{enumerate}
 \item Enter the data one \verb|\notes| group at a time, taking care to select the
relative horizontal spacing for each group (via the macros discussed in section~\ref{newspacings})
so as to maintain a consistent relationship between scalable space and note durations.
This will be discussed in a great deal more detail in Chapter 2.
 \item \TeX~$\Longrightarrow$ {\tt musixflx} $\Longrightarrow$ \TeX.
 \item Look at the output and decide if you want to have more or fewer
systems, e.g.~to fill the page or to get an even number of
pages.\index{musixflx@{\tt musixflx}}
 \item If you want to change the number of systems in a section, adjust
\keyindex{mulooseness} accordingly. Keep in mind that each section cannot have fewer
systems than bars.
\item Delete \verb|jobname.mx2| and repeat the process\\
\TeX~$\Longrightarrow$ \verb|musixflx| $\Longrightarrow$ \TeX.

\end{enumerate}

There is an alternate way to proceed if you know at the outset
how many systems
you want in a section. You can specify it directly by assigning a
positive number to \keyindex{linegoal} somewhere within the
section (\verb|\linegoal| requires
version 0.83 or later of \verb|musixflx|).
\keyindex{mulooseness} must be zero
for \keyindex{linegoal} to work. Both are automatically reset to
zero after processing the end of a section e.g. as defined by
\keyindex{stoppiece}.

Finally, for large scores (more than 4 pages or so), having
only one section and an overall value of \verb|\mulooseness| becomes
impractical since one wants not only to have nicely spaced systems, but also
completely filled pages without empty top and
bottom margins on the last page. It is then wise to force the total number of
pages and possibly the line breaks in each page, which can be done using
\keyindex{alapage} and/or \keyindex{alaligne}\footnote{This is the technique
always used by \textbf{PMX} in constructing a \musixtex\ input file.}.
%avrb
%, or more automatically by
%means of the \keyindex{autolines} command borrowed from \musictex\ and
%implemented in the additional {\ttxem{musixcpt.tex}} file
%avre

There is another advantage to \musixtex's way of using scalable space and
the three pass system. In
\TeX nical terms it eliminates the need for \ital{glue}, and enables
every horizontal position in a line to be computed. This in turn enables certain
variable length symbols such as slurs to be specified by macros entered at
their beginning and ending points, rather than having to estimate the
length of the symbol and enter it at the starting point.

 \subsection{External executable \texttt{musixflx}}
One issue that compromises portability between computers is the
need for the executable {\tt musixflx}\index{musixflx@{\tt
musixflx}}.
%avrb
To address this, the C source and compiled versions for various OS's are included in
\verb|musixtex.zip| and are available from the
\href{http://icking-music-archive.org}{\underline{Werner Icking Music Archive}}.
%avre

On most computers, the executable is invoked by typing the name of the program
and the name of the file to be acted upon. \ital{i.e.}

\verb|musixflx jobname.mx1|

Optionally, you can add a letter to indicate one of the debug modes, which are:
\begin{quote}
\verb|d | for debug information to screen\\
\verb|f | for debug information to file \verb|jobname.mxl|\\
\verb|s | to get the computed lines immediately on screen
\end{quote}
To allow for ease of use with a batch file, \verb|musixflx| can either be fed
with \verb|jobname.mx1|, \verb|jobname.tex| or only
\verb|jobname|, any one of which will open \verb|jobname.mx1|.

 \subsection{Unrecorded spaces: the novice's bugaboo}

Because of the way \musixtex\ accounts for hard and scalable space and avoids
using glue, it is absolutely essential that every horizontal space be
properly entered into the input file. The most common error in this regard
is including a blank space in the midst \ital{or at the end} of an input line.
Such a blank space, or for that matter any stray character not entered with
an appropriate \musixtex\ macro, will not be properly
recognized and recorded by \musixtex, but it will still be treated like
ordinary text by \TeX. The symptoms of such a transgression will be an
{\bf Overfull hbox} warning during the third pass, and the appearance of
either excessive blank horizontal space or thick black vertical lines in
the page image.

\medskip
\centerline{\boxit{Considerable discipline is needed to avoid this problem!}}

The best technique for avoiding such unpleasantness is to avoid entering
any nonessential blanks within input lines, and to end every
input line with either \verb|%|\index{%@{\tt\char37}} or
\keyindex{relax}, unless it already ends with a control sequence
ending in a letter.

There are other ways to enter unrecorded space which should be
avoided. Between \verb|\startpiece| and \verb|\stoppiece| or
\verb|\endpiece|, never use \verb|\hskip| or \verb|\kern| except
within \ital{zero}-boxes like \verb|\rlap|, \verb|\llap|,
\verb|\zcharnote|, \verb|\uptext|, etc., and never assign hard
values to scalable dimensions like \verb|\noteskip|,
\verb|\elemskip|, \verb|\afterruleskip| and \verb|\beforeruleskip|
\footnote{Note that {\Bslash hardspace} does not fall in this
category; it is specifically designed to enter hard space in a way
the \musixtex\ can properly record it}.

Here is a checklist of tips related to spacing issues. Because the
foregoing several paragraphs are so important, some of their content
is repeated in the list.

\begin{enumerate}
 \item
Between \verb|\startpiece| and \verb|\stoppiece| or \verb|\endpiece|,
end every input line with a either \verb|%| or a command with no arguments
(including \verb|\relax|).
 \item \verb|\off| must only be used with scalable values, e.g.
\verb|\noteskip|, \verb|\elemskip|, \verb|\afterruleskip|, and
 \verb|\beforeruleskip|.
 \item Remember that \verb|\qsk| and \verb|\hqsk| are scalable, i.e. \verb|\qsk|
  doesn't necessarily mean exactly one note head width (it depends on \verb|\elemskip|).
 \item Lyrics and any other non-\musixtex\ text must be put in zero boxes
such as
  \verb|\zcharnote|, \verb|\zchar|, \verb|\rlap|, \verb|\lrlap|, \verb|\llap|,
\verb|\uptext|, or \verb|\zsong|. Additional specific capabilities for entering
lyrics are provided by
 \verb|\hardlyrics|, \verb|\hsong|, and---most significantly---the
text-emplacement macros defined in \verb|musixlyr.tex| (see \ref{lyrics},
p.~\pageref{lyrics}).
 \item
Between \verb|\startpiece| and \verb|\stoppiece| or \verb|\endpiece|,
don't assign hard values to \verb|\noteskip|, \verb|\beforeruleskip|,
or \verb|\afterruleskip|.
\end{enumerate}

\section{Further highlights}
 %\check
 \subsection{Key signatures}
A single key signature can be assigned to all \nolinebreak3
instruments, for example by \keyindex{generalsignature}\verb|{-2}|
which sets two flats on each staff. \keyindex{generalsignature}
can be overridden for selected instruments, for example by
\keyindex{setsign}\verb|2{1}| which puts one sharp on each staff
of instrument number 2. Of course, the current signature as well
as meters and clefs may change at any time.
\subsection{Transposition}
With some extra attention, a score can be input in such a way that it is
fairly easily transposed. There is an internal register
called \keyindex{transpose}, the default value of which is zero, but which may be
set to any reasonable positive or negative value. It defines a number of pitch
steps (lines or spaces on a staff) by which all pitched symbols with be offset, provided
they have been entered with letter values to represent their pitch.
However,
it will neither change the local accidentals nor the key signature.

For
example, suppose a piece were originally input in F major, and it contained a
B natural, and you wanted to transpose it to G. If you simply set
\verb|\transpose| to 1 with no other special considerations, then
the key signature would not change, and
the B natural would appear as a C natural, whereas it should be a C sharp.
So first you must explicitly change the key signature. Then, to
solve the problem with accidentals, you should declare
\verb|\relativeaccid|, which will cause the actual appearance of any
accidental to depend on the pitch of
the accidental as well as the current key signature. But the use of this
facility requires the typesetter to have entered the original set of accidentals
according to a nonstandard convention wherein an accidental does not
specifically refer to the black or white keys on a piano, but to the
amount by which the pitch is altered up or down from what it would naturally
have been, taking the key signature into account.\index{relative accidentals} This
is discussed in more detail in section~\ref{transposeaccids}. Now, finally, you
can enter \verb|\transpose=1| with more or less the desired effect.

More or less, because there is also an issue with stem
and beam directions. Normally a typesetter would want full control over them,
and would exercise that control by entering them with macros that explicitly
assign the direction. Naturally the assigned directions would persist
even after changing \verb|\transpose|. With respect to stems of unbeamed notes,
this matter can also be addressed at
the input level, by using special macros for notes that leave the
decision about stem directions up to \musixtex. These macros do the right
thing in the face of transposition. They are discussed in
section~\ref{autostemdirections}. Unfortunately there is no corresponding
such facility for beams, so the typesetter will have to edit the transposed
score to adjust beam directions as required\footnote{\textbf{PMX}
will automatically adjust both stem and beam directions when transposing, which
is yet another reason to use it. However
if a piece is to be transposed, the typesetter must still explicitly activate relative accidentals
and enter accidentals according to the relative accidental convention.}.

 %\check
 \subsection{Extracting parts from a score} Another question is:
\ital{``Can I write a full score and then extract separate scores for
each individual instrument?''}

The answer is yes, but only with a great deal of special attention---so much,
in fact, that we shall strongly recommend that if you want
to do this, you should use \textbf{PMX}, which makes the process
very easy. If for some reason you choose to ignore this advice, you may
refer to the details that were provided in the prior version of this manual,
\href{http://icking-music-archive.org/software/musixtex/mxdoc112.pdf}
{\underline{mxdoc112.pdf}}.

%After assigning symbolic numbers to instruments,
%there are macros (see \ref{instrum-inhibit}) that permit
% \begin{itemize}\setlength{\itemsep}{0ex}
% \item choosing which instrument the following source code is attached to,
% \item choosing which staff of an instrument the following source code is
%attached to,
% \item hiding one or several instruments by zeroing out their staff sizes and staff
%numbers.
% \end{itemize}

 %\check
 \subsection{Staff and note sizes}
 Although the standard staff size is 20pt, \musixtex\ allows scores with
sizes of 16, 24, or 29pt. Furthermore, any instrument may be assigned its own special staff
size (usually smaller than the overall staff size), and there are special macros
(e.g. \verb|\smallnotesize|, \verb|\tinynotesize|) that cause notes, beams, and
accidentals all to take a different size.

\subsection{Add-in macro libraries}
During the early stages of \musixtex's development, common versions of \TeX\ itself were
very limited in capacity, especially in terms of the numbers of registers that could
be defined for use in macros. For this historical reason, many important enhancements
to \musixtex\ are available only via add-in libraries. The user can thus pick and choose
which to include for any particular compilation. Most of these are included in
\verb|musixtex.zip|, and their uses are discussed in this manual. The
libraries have names like \verb|blabla.tex|, and are activated by including a line
like \verb|\input blabla|\ within the the input file. The most common such files
are \ttxem{musixadd.tex} and \ttxem{musixmad.tex} which respectively increase the
number of instruments from the default 6 to 9 or 12 as well as increasing available numbers
of other features; \verb|musixps.tex| which enables Type K postscript slurs; and
\verb|musixlyr.tex| which greatly eases typesetting lyrics. In fact the latter two,
while now included in \verb|musixtex.zip|, are not documented in this manual but
in separate files inside \verb|musixtex.zip|, namely \verb|musixps.tex| itself and
\verb|mxlyrdoc.pdf| respectively.

\section{Where to get the software and help using it}
The home base for all matters related to \musixtex\ is the
Werner Icking Music Archive, at
\href{http://icking-music-archive.org}{\underline{http://icking-music-archive.org}}.
The most up-to-date versions of \musixtex\ and friends are located in the
\href{http://icking-music-archive.org/software/indexmt6.html}{\underline{software}}
section of the archive. Assuming you already have \TeX\ and only want to install
\musixtex, the file you need to download will be named
\href{http://icking-music-archive.org/software/musixtex/musixtex.zip}
{\underline{\texttt{musixtex.zip}}} . Further details about
the installation process are given in section \ref{installation}.

The Werner Icking Archive also hosts the
\href{http://icking-music-archive.org/mailman/listinfo/tex-music}
{\underline{\TeX-music mailing list}}, where you will always find
someone willing to answer questions and help solve problems.

  \section{A very brief history of \musixtex}
The idea of using \TeX\ to typeset music appears to have originated
around 1987 with the master's thesis of Andrea
{\sc Steinbach} and Angelika {\sc Schofer}\footnote{Steinbach A. \& Schofer
A., \ital{Automatisierter Notensatz mit \TeX}, master's thesis,
Rheinische Friedrich-Wilhelms Universit\"at,
Bonn, Germany, 1987}. They called their package
\mutex\index{mutex@\protect\mutex}. It was limited to a single staff.
It introduced two key concepts: (1) using
a large number of font characters to construct beams and slurs, and (2) using
\TeX\ glue to help control horizontal spacing and justification.

The next major step came around 1991 when Daniel {\sc Taupin} created \musictex.
Its major enhancement was to allow multiple staves. But this came at a
price: some flexibility was lost in controlling horizontal spacing and
a great deal of trial and error became necessary to avoid excessive or
insufficient gaps before and after bar lines.

\musictex\ was a single-pass system. To remedy its shortcomings it became clear
that a multi-pass system would be required. Around 1997 Dr. Taupin along with Ross {\sc Mitchell}
and Andreas {\sc Egler} created the first version of \musixtex. At last a fully
automatic procedure was coded so as to provide pleasing horizontal spacing in
multi-staff scores.

Significant enhancements to \musixtex, which have already been mentioned, have been provided
by Stanislav {\sc Kneifl} (Type K postscript slurs) and
Rainer {\sc Dunker} (Lyrics handling via \verb|musixlyr.tex|).

Since Dr. Taupin passed away in 2003, the primary maintainer of \musixtex\ has been
Olivier {\sc Vogel}, with substantial assistance from Andre {\sc Van Ryckeghem},
Cornelius {\sc Noack}, and Don {\sc Simons}.

No discussion of the history of \musixtex\ would be complete without mentioning
the contributions of Werner {\sc Icking}. From the early days of \mutex\ until
his untimely death in 2001, he served this line of software as its most prominent
proponent, beta tester, web site and mailing list editor, consultant,
problem solver, and inspiration for
many third-party enhancements including \textbf{PMX}. In fact he founded the
mailing list and the archive that now is named in his honor. The web site is
currently edited by Christian {\sc Mondrup}, the software page by Don {\sc Simons},
and the mailing list by Maurizio {\sc Codogno}.


 %\check
\chapter{Elements of \musixtex}
\section{Setting up the input file}
\subsection{What makes a \TeX\ file a \musixtex\ file?}
A \musixtex\ input file is a special kind of \TeX\ input file. What makes it
special is that it must contain the command
\verb|\input musixtex|
before any reference to \musixtex\ macros. After that might follow
\verb|\input musixadd| or \verb|\input musixmad| if you want to have
respectively more than six or nine instruments or simultaneous beams,
ties, or slurs.\ixtt{musixtex.tex}\ixtt{musixadd.tex}\ixtt{musixmad.tex}
Since it is still a \TeX\ file, after that, if you wished to,
you could write a whole non-musical book
using normal \TeX\ commands provided that you did not
use \verb|&| as a tab character like in plain \TeX\ (In \TeX\ lingo,
its \keyindex{catcode} has been changed).

 \subsection{Cautions for the non \TeX pert}
When \TeX\ reads anything, it inputs one \ital{token} at a time. A token
may be either a \ital{command} or a character. A command (or \ital{macro},
or \ital{control sequence}) is a
\ital{backslash} (``{\Bslash}'') immediately followed by sequence of
letters with no intervening spaces. For practical purposes, any single symbol (letter, digit,
special character, or space) that is not part of a command counts as a character
and therefore as a token.

Each command expects a specific number of parameters.
The tokens ``\verb|{|'' and ``\verb|}|'' are very special, in that (1) they
must occur in matched pairs, and (2) any matched pair together with
the stuff inside counts as a single parameter.
If the first
parameter expected is a single letter, it must either be
separated from the command by a space or
enclosed in braces (otherwise it would be interpreted as part of the command).
For example the command \verb|\ibu| expects three parameters, so the
following are all OK: \verb|\ibu123|, \verb|\ibu1A3|, \verb|\ibu1{`A}3|,
\verb|\ibu{1}{2}{3}|, \verb|\ibu1{-2}3|, or \verb|\ibu1{23}4|, but
\verb|\ibu1234| is not OK; the first three digits are taken as parameters,
leaving the ``4'' with no purpose other than to cause some of the dreaded
unrecorded space that we have already mentioned.

In the rest of this manual, when describing commands we will write
things like \verb|\qb{|$n$\verb|}{|$p$\verb|}|. It should be understood that
when $n$ and $p$ are replaced by their literal values, the braces may
or may not be necessary. In particular, if both are single digits, no
braces are needed; but if $n$ has two digits, or if $p$ has more than
one character, they must be surrounded by braces.

Spaces (blank characters) in the input file must be handled very carefully.
They are ignored at the beginning of a line, enabling logical
indentation schemes to help make the file human-readable. There are also a few
other places within lines where blank spaces are OK (such as mentioned in the prior paragraph),
but in general is it safest to avoid
any unnecessary blanks between the beginning and end of an input line.
At the end of a line, the truth is that a command with no parameters, such as
\verb|\bar| or \verb|\enotes| will cause no trouble. However if a command with
one or more parameters is the last item in an input line, it will cause
unrecorded space. The way around this is to end the line with either ``\verb|%|''
or \verb|\relax|.

 \subsection{Usual setup commands}\label{whatspecify}

 The first decision is what size type to use. \musixtex\ offers four sizes:
``small'' (16-pt-high staves), ``normal'' (20pt),\index{sizes} ``large''
(24pt), and ``Large'' (29pt). The default is
\keyindex{normalmusicsize}. If you want a different size, then you have to
enter \keyindex{smallmusicsize}, \keyindex{largemusicsize}, or
\keyindex{Largemusicsize}. Each of these commands defines not only the
desired staff size but many other related sizes such as note heads, ornaments,
stem lengths, etc.

 The command \keyindex{instrumentnumber}\onen~defines the
number of instruments to be $n$. If not entered, the default is 1. This number is used in loops
that build staves,
set key signatures, set meters, etc., so if it differs from 1 it must be explicitly
defined before any further commands.

An instrument may have one or more staves (e.g.~a piano would normally have 2 staves).
The differences between one
instrument of several staves and several instruments with one staff each are as follows:
\begin{itemize}\setlength{\itemsep}{0ex}
 \item Different instruments may have different \itxem{key signatures}, while different
staves of an instrument will all have the same key signature.
 \item A \itxem{beam} may include notes in different
staves of the same instrument.
 \item A \itxem{chord} may extend across several staves of the same
instrument.
 \item If an instrument has more than one staff, they will be linked together
with a big, curly brace at the beginning of each line.
\end{itemize}
The default number of staves per instrument is 1. If it is different, then it
must be specified by \keyindex{setstaffs}\verb|{|$n$\verb|}{|$p$\verb|}|
where $p$ is the number of staves and $n$ is the
number of the instrument. In \musixtex, instruments are numbered
\ital{starting with the lowest}.
So for example \verb|setstaffs32|
assigns two staves to the third instrument from the bottom.

 The default clef for every staff is the \ital{treble} clef. To assign
any other clef, the command is
\keyindex{setclef}\verb|{|$n$\verb|}{|$s_1s_2s_3s_4$\verb|}|
where $n$ is the number of the instrument, $s_1$ is a digit specifying the
clef for the first (lowest) staff, $s_2$ for the second staff, and so forth.
Note that like
instruments, staves of a given instrument are numbered starting with
the lowest. The parameters $s_2$, $s_3$ and $s_4$ can be omitted, in which case
any unspecified staves will be assigned a treble clef.

The digits $s$ can range from 0 to 9, with the following meanings:
$s=0$ signifies treble or G clef.
$s=1$ to $4$ mean C-clef, respectively on the first (lowest) through fourth staff line.
$1$ is also called \ital{soprano}, $3$ \ital{alto} and $4$ \ital{tenor}.
$s=5$ to $s=7$ mean F-clef, respectively on the third through fifth staff line. $5$ is
also called \ital{baritone} and $6$ is the normal \ital{bass}.
 $s=8$ is not used.
$s=9$ represents a G clef on the first line, also called \ital{French violin} clef.

The three tokens \verb|\treble|, \verb|\alto|, and \verb|\bass| can be used instead
of a digit for $s$, but only if there would have been but one digit in the string.
So for example the clefs for a standard piano score
could be specified by
\keyindex{setclef}\verb|1{\bass}|.

To set a common key signature for all instruments, use
 \keyindex{generalsignature}\verb|{|$s$\verb|}|,
where $s>0$ is the number of \itxem{sharps} in the
signature and $s<0$ the number of \itxem{flats}\footnote{We once saw a
score in G-minor where the signature consisted of two flats (B and E) plus
one sharp (F). This is not directly supported by \musixtex.}. To override
the common key signature for instrument $n$, use
\keyindex{setsign}\verb|{|$n$\verb|}{|$s$\verb|}|. Note that differing
key signatures cannot be assigned to different staves of the same instrument.

A common \itxem{meter} for all staves can be specified by
 \keyindex{generalmeter}\verb|{|$m$\verb|}|,\label{generalmeter}
where $m$ describes the appearance of the meter indication, and can take several
different forms. If the meter is a \ital{fraction} (e.g.~3/4) the command is
 \verb|\generalmeter{|\keyindex{meterfrac}\verb|{3}{4}}|.
Other possible tokens~$m$ are \keyindex{meterC},
\keyindex{allabreve}, \keyindex{reverseC}, \keyindex{reverseallabreve} and
\keyindex{meterplus}. These are illustrated in the following example:

 %\check
\begin{music}
\generalmeter\meterC
\nostartrule
\parindent0pt\startpiece
\NOtes\qa{cegj}\enotes
\generalmeter\allabreve\changecontext
\NOTes\ha{ce}\enotes
\generalmeter\reverseC\changecontext
\NOTEs\zbreve g\enotes
\generalmeter\reverseallabreve\changecontext
\NOTEs\zwq g\enotes
\generalmeter{\meterfrac{3\meterplus2\meterplus3}8}\changecontext
\Notes\Tqbu ceg\Dqbl jg\Tqbu gec\enotes\setemptybar
\endpiece
\end{music}
\noindent which was coded as:
\begin{quote}\begin{verbatim}
\generalmeter\meterC
\nostartrule
\parindent0pt\startpiece
\NOtes\qa{cegj}\enotes
\generalmeter\allabreve\changecontext
\NOTes\ha{ce}\enotes
\generalmeter\reverseC\changecontext
\NOTEs\zbreve g\enotes
\generalmeter\reverseallabreve\changecontext
\NOTEs\zwq g\enotes
\generalmeter{\meterfrac{3\meterplus2\meterplus3}8}\changecontext
\Notes\Tqbu ceg\Dqbl jg\Tqbu gec\enotes\setemptybar
\endpiece
\end{verbatim}\end{quote}

To override the common meter for any  staff, use
\keyindex{setmeter}\verb|{|$n$\verb|}{{|$m_1$\verb|}{|$m_2$\verb|}{|$m_3$\verb|}{|$m_4$\verb|}}|.\linebreak
This works just like \verb|\setclef|. For example,
\verb|setmeter3{{\meterfrac{12}8}\allabreve}|
sets the meter to 12/8 for the first staff of the third instrument, and
\ital{alla breve} for the second staff.

To insert extra space before the meter is
written, use \keyindex{meterskip}$d$ where $d$ is any hard \TeX\
%dimension\footnote{{\Bslash\tt meterskip} is not a macro but a
dimension\footnote{{\tt\Bslash meterskip} is not a macro but a
dimension register. Whatever follows it
must be a \TeX\ dimension and {\it it must not be enclosed in braces}.}.
The assignment must occur outside \verb|\startpiece...\endpiece| and will be
reset to zero after first meter is posted.

To set an \itxem{instrument name}, use
\keyindex{setname}\verb|{|$n$\verb|}{|\ital{name of the instrument}\verb|}|.
This will place the name in the space to the left of the
first staff or group of staves for instrument $n$. To specify the amount of space
available, use \verb|\parindent|$d$ where $d$ is any hard \TeX\ dimension.
 \subsection{Groupings of instruments}\label{curlybrackets}
By default, all staves in a system will be joined
at the left by a thin, vertical rule. In addition, if an instrument has more than
one staff, they will be joined by a big, curly brace. Now we introduce a way
to delineate groups of instruments or choirs with a square brace containing two parallel
vertical rules, the left one thick and the right one thin. This is commonly used
to group together the voices in a choir.

If there is only one choir, this can be done with
 \begin{quote}
\keyindex{songtop}\onen\\
\keyindex{songbottom}\verb|{|$m$\verb|}|
\end{quote}
\noindent where $m$ and $n$ are the instrument numbers of the first
and last voices. An example is shown in section~\ref{song}.

If there is more than one choir to be set off with
square braces, each one can be specified with
 \begin{quote}
\keyindex{grouptop}\verb|{|$g$\verb|}{|$n$\verb|}|\\
\keyindex{groupbottom}\verb|{|$g$\verb|}{|$m$\verb|}|
\end{quote}
\noindent where $m$ and $n$ are the instrument numbers of the first
and last voices of group number $g$. \musixtex{} allows up to three
groups, numbered from 1 to 3. The command \verb|\songtop| is equivalent
to \verb|\grouptop 1|; \verb|\songbottom| is equivalent to
\verb|\groupbottom 1|.

With \ttxem{musixadd.tex}, the allowable number of groups is increased to four.

If any of the instruments grouped this way has more than one staff, the
heavy curly brace will be shifted to the left of the square brace.

Previously defined square braces can be removed by declaring
\verb|\songtop| less than \verb|\songbottom|. The same applies to
\verb|\grouptop| and \verb|\groupbottom| for the same group number.

 An alternate command allows you to specify all choirs at once:
\begin{quote}
 \keyindex{akkoladen}\verb|{{|{\it lower\_1\/}\verb|}{|{\it upper\_1\/}%
   \verb|}{|{\it lower\_2\/}\verb|}{|{\it upper\_2\/}\verb|}{|%
   {\it lower\_3\/}\verb|}{|{\it upper\_3\/}\verb|}}|
\end{quote}
\noindent where {\it lower\_n\/} and {\it upper\_n\/} are instrument
numbers that denote the span of bracket number $n$. For
setting fewer than three brackets, just omit all unneeded
\verb|{|{\it lower\_n\/}\verb|}{|{\it upper\_n\/}\verb|}|~pairs.
For example,
 \verb|\instrumentnumber{5}\akkoladen{{1}{2}{3}{5}}|
\noindent yields the first example below, with five single-staff instruments
divided into two groups.

The second example has 2 instruments, the first (lower) with two staves and the
second with three. Each instrument is set off by default with a curly bracket.

If for some reason you want more than one \ital{instrument}\ grouped
within a curly
bracket, then you can use the extension file
%\ttxem{curly.tex}\footnote{Submitted
\href{http://icking-music-archive.org/software/musixtex/add-ons/curly.tex}
{\underline{\ttxem{curly.tex}}}\footnote{Submitted
by Mthimkhulu {\sc Molekwa} to the mutex list}, which defines the command

 \keyindex{curlybrackets}\verb|{{|{\it lower\_1\/}\verb|}{|{\it upper\_1\/}%
   \verb|}{|{\it lower\_2\/}\verb|}{|{\it upper\_2\/}\verb|}...|

\noindent to be used as illustrated in the third example below.\\
\begin{minipage}[t]{50mm}
\begin{music}
 % just to avoid wasting space ...
 \sepbarrules
 \smallmusicsize
\setsize1\smallvalue\setsize2\smallvalue
\setsize3\smallvalue\setsize4\smallvalue\setsize5\smallvalue
 \instrumentnumber{5} \akkoladen{{1}{2}{3}{5}}
 \startextract\notes\en\bar\notes\en\zendextract
\end{music}
\begin{quote}is coded as:
\begin{verbatim}
 \sepbarrules
 \smallmusicsize
 \setsize1\smallvalue
 \setsize2\smallvalue
 \setsize3\smallvalue
 \setsize4\smallvalue
 \setsize5\smallvalue
 \instrumentnumber{5}
 \akkoladen{{1}{2}{3}{5}}
 \startextract
 \notes\en\bar\notes\en
 \zendextract
\end{verbatim}\end{quote}
\end{minipage}
\begin{minipage}[t]{50mm}
\begin{music}
  \sepbarrules
  \smallmusicsize
\setsize1\smallvalue\setsize2\smallvalue
  \instrumentnumber2 \setstaffs12\setstaffs23
  \startextract \notes\en\bar\notes\en\zendextract
\end{music}
\begin{quote}is coded as:
\begin{verbatim}
 \sepbarrules
 \smallmusicsize
 \setsize1\smallvalue
 \setsize2\smallvalue
 \instrumentnumber2
 \setstaffs12
 \setstaffs23
 \startextract
 \notes\en\bar\notes\en
 \zendextract
\end{verbatim}\end{quote}
\end{minipage}
\begin{minipage}[t]{50mm}
\begin{music}
 \input curly
 \sepbarrules
 \smallmusicsize
 \setsize1\smallvalue\setsize2\smallvalue
 \smallmusicsize
 \setsize3\smallvalue\setsize4\smallvalue\setsize5\smallvalue
 \instrumentnumber5 %\setstaffs12\setstaffs23
 \curlybrackets{1235}
 \startextract \notes\en\bar\notes\en\zendextract
\end{music}
\begin{quote}is coded as:
\begin{verbatim}
 \input curly
 \sepbarrules
 \instrumentnumber5
 \smallmusicsize
 \setsize1\smallvalue
 \setsize2\smallvalue
 \setsize3\smallvalue
 \setsize4\smallvalue
 \setsize5\smallvalue
 \curlybrackets{1235}
 \startextract
 \notes\en\bar\notes\en
 \zendextract
\end{verbatim}\end{quote}
\end{minipage}




\section{Preparing to enter notes}
 \subsection{After the setup, what next?}

The command \keyindex{startmuflex} initiates the serious business of
\musixtex. On the first \TeX\ pass it
opens \ital{jobname}{\tt .mx1} for writing bar-by-bar tabulations of all
hard and scalable space to be fed to \verb|musixflx| on the second pass.
\verb|musixflx| generates \ital{jobname}{\tt .mx2} which defines the
number of bars in each system and the factors relating scalable space
to hard space in each system. On the third pass both files will be opened
and read to define the final spacing. These files should be closed before
leaving \TeX, preferably before
\keyindex{bye} or \keyindex{end}, with \keyindex{endmuflex}. Normally \TeX\
closes all open files on its own when terminating the program, but it is still
cleaner to do this explicitly.

After \verb|\startmuflex|, the command \keyindex{startpiece} will initiate
the first system, containing all instruments you have previously defined.
The indentation will be \keyindex{parindent}, so if you want nonzero
indentation, this register should be set to the desired hard dimension
before issuing \verb|\startpiece|.

 \subsection{Horizontal spacing commands}\label{newspacings}
\subsubsection{Basic note spacing}
\musixtex\ provides a set of macros each of which defines a particular
increment of scalable spacing. The default set is tabulated below:

\begin{center}
\tinynotesize
\renewcommand{\arraystretch}{1.5}% I hate LaTeX
\begin{tabular}{|l|l|l@{~~~~}l|}
\multicolumn{1}{c}{usage}&
\multicolumn{1}{c}{spacing}&
\multicolumn{2}{c}{suggested use for}\\\hline
\keyindex{znotes}\verb| ... & ... & ... \enotes|&(non spacing)
  &&specials\\
\keyindex{notes}\verb|  ... & ... & ... \enotes|&\verb=2=\keyindex{elemskip}
  &\ccu1&16th\\
\keyindex{notesp}\verb| ... & ... & ... \enotes|&\verb=2.5\elemskip=
  &\pt1\ccu1&dotted 16th, 8th triplet\\
\keyindex{Notes}\verb|  ... & ... & ... \enotes|&\verb=3\elemskip=
  &\cu1&8th\\
\keyindex{Notesp}\verb| ... & ... & ... \enotes|&\verb=3.5\elemskip=
  &\cup1&dotted 8th, quarter triplet\\
\keyindex{NOtes}\verb|  ... & ... & ... \enotes|&\verb=4\elemskip=
  &\qu1&quarter\\
\keyindex{NOtesp}\verb| ... & ... & ... \enotes|&\verb=4.5\elemskip=
  &\qup1&dotted quarter, half triplet\\
\keyindex{NOTes}\verb|  ... & ... & ... \enotes|&\verb=5\elemskip=
  &\hu1&half\\
\keyindex{NOTesp}\verb| ... & ... & ... \enotes|&\verb=5.5\elemskip=
  &\hup1&dotted half\\
\keyindex{NOTEs}\verb|  ... & ... & ... \enotes|&\verb=6\elemskip=
  &\wh1&whole\\\hline
\end{tabular}\end{center}
\smallskip

\noindent What each of these macros actually does is to set an
internal dimension register \keyindex{noteskip} to the given multiple
of the fundamental spacing unit \keyindex{elemskip}
(which has dimensions of length, usually given in points).
Normally, every \itxem{spacing note} (e.g.,
\keyindex{qu},
\keyindex{qb}, \keyindex{hl}) will then be followed by a spacing of
width \keyindex{noteskip}.  By selecting a particular note spacing macro
from the above table, the typesetter can thus control the relative spacing
between notes.

The actual spacing will therefore be determined by the value of
\verb|\elemskip|. On the first pass, \TeX\ will set a default value for
\verb|\elemskip| based on the declared music size, or the user can
set it to any hard dimension he chooses. However, the value on the
first pass doesn't matter as much as you might think (more about that later).
On the second pass,
\verb|musixflx| determines where the system breaks will come,
and then computes the final value of \verb|\elemskip| for each system.

If the arthmetic progression of note spacings in the above table does not
meet your wishes, you may activate an alternate set with
the command \keyindex{geometricskipscale}. As implied by the name, this
is a geometric progression, where {\Bslash Notes} is
$\sqrt{2}$ times wider than {\Bslash notes},  {\Bslash NOtes} is $\sqrt{2}$
times wider than {\Bslash Notes}, and so forth.
Then the factors in the middle column
of the above table will be replaced by the sequence
2.00, 2.38, 2.83, 3.36, 4.00, 4.76, 5.66, 6.72, and 8.00. Two additional
macros, \verb|\NOTEsp| and \verb|\NOTES|, will be defined corresponding to
factors 9.52 and 11.32. The original arithmetic progression can be
restored by \keyindex{arithmeticskipscale}.

If neither of the predefined progressions satisfies you, you may define
your own, using the more general macro \verb|\vnotes| in the same manner
that \musixtex\ uses it for the predefined progressions. So for example
\verb|\def\NOtes{\vnotes5.34\elemskip}| will redefine \verb|\NOtes| in
the obvious way, and the extension to the other spacing macros should
likewise be obvious.

In addition, inside any pair \verb|\notes...\enotes| there are two
equivalent ways to
locally redefine \verb|\noteskip| to another scalable value, namely by
issuing a command like
\verb|\noteskip=2.4\noteskip| or \keyindex{multnoteskip}\verb|{2.4}|, which
have the expected effect until the notes group is terminated or
\verb|\noteskip| is further redefined.

Finally, by issuing a command like
\keyindex{scale}\verb|{2.4}| outside any notes group, you can scale all subsequent
\verb|\noteskip|s by any desired factor.

These facilities may be useful, for example,
to control spacing when there are three equal duration notes in one staff against two
 in another.

%\subsubsection{\Bslash{\tt elemskip}, \Bslash{\tt beforeruleskip} and
%\Bslash{\tt afterruleskip}}
%
% avr wants to call these "commands", but das doesn't.
%\subsubsection{Commands {\Bslash\texttt{elemskip}},
%{\Bslash\texttt{beforeruleskip}}
%and {\Bslash\texttt{afterruleskip}}}
\subsubsection{{\Bslash\texttt{elemskip}},
{\Bslash\texttt{beforeruleskip}}
and {\Bslash\texttt{afterruleskip}}}

We've just seen how \verb|\elemskip| is used to scale the spacings between notes.
There are two other spacing units that share some behavior with \verb|\elemskip|.
\verb|\beforeruleskip| is the horizontal space that is automatically inserted
\ital{before} every bar line, while \verb|\afterruleskip| goes \ital{after}
every bar line. (In
practice \verb|\beforeruleskip| is almost aways set to \verb|0pt| because there
will typically already be a space of \verb|1\noteskip| before every barline.)
On the first pass, just as with \verb|\elemskip|, \musixtex\ assigns them default
values according to the following table:

%\begin{quote}\begin{tabular}{lrrr}\hline
%\ital{using}&\keyindex{elemskip}&\keyindex{afterruleskip}
%  &\keyindex{beforeruleskip}\\\hline
%\keyindex{normalmusicsize}&6pt&8pt&0pt\\
%\keyindex{smallmusicsize}&4.8pt&6pt&0pt\\\hline
%\end{tabular}\end{quote}

\begin{center}\begin{tabular}{lrrr}\hline
\ital{using}&\keyindex{elemskip}&\keyindex{afterruleskip}
  &\keyindex{beforeruleskip}\\\hline
\keyindex{normalmusicsize}&6pt&8pt&0pt\\
\keyindex{smallmusicsize}&4.8pt&6pt&0pt\\\hline
\end{tabular}\end{center}

\noindent In the second pass, \verb|musixflx| assigns new values to each
of these dimensions, a different set for each line or system. It does this
in such a way that available scalable horizontal space in each system is
exactly filled up.

The values that are assigned to these dimensions on the first pass, whether by
default or explicitly by the user or in some combination, only matter insofar
as their relative sizes. That's why we earlier stated that the first-pass value
of \verb|\elemskip| didn't matter as much as you might think. For both music sizes
in the table above, it appears that by default \verb|\afterruleskip| is
\verb|1.3333\elemskip|\footnote{Editor's note: It is a mystery why the authors
%of \musixtex\ didn't simply define \Bslash{\tt beforeruleskip} and \Bslash{\tt afterruleskip} as
%specific multiples of \Bslash{\tt elemskip}}.
of \musixtex\ didn't simply define \Bslash\texttt{beforeruleskip} and \Bslash\texttt{afterruleskip} as
specific multiples of \Bslash\texttt{elemskip}}.

Note that if you do want to change any of these
values, you have to do so \ital{after} setting the
music size and before \verb|\startpiece|.

Here is an example that illustrates the various dimensions under discussion:\\
 %\check
\begin{music}\nostartrule
\afterruleskip7pt
\beforeruleskip2pt
\parindent0pt
\setclefsymbol1\empty
% special problems afford special solutions
\makeatletter\global\clef@skip\z@ \makeatother
\startpiece
\zchar{16}{\hbox to\afterruleskip{\downbracefill}}%
\zchar{19}{\hbox to\afterruleskip{\hss a\hss}}%
\addspace\afterruleskip
\zchar{16}{\hbox to2\elemskip{\downbracefill}}%
\zchar{19}{\hbox to2\elemskip{\hss b\hss}}%
\zchar{3}{\hbox to\elemskip{\upbracefill}\hbox to\elemskip{\upbracefill}}%
\zchar{-1}{\hbox to\elemskip{\hss e\hss}\hbox to\elemskip{\hss e\hss}}%
\notes\qa l\en
\znotes\en
\zchar{16}{\hbox to4\elemskip{\downbracefill}}%
\zchar{19}{\hbox to4\elemskip{\hss c\hss}}%
\zchar{3}{\hbox to\elemskip{\upbracefill}\hbox to\elemskip{\upbracefill}%
  \hbox to\elemskip{\upbracefill}\hbox to\elemskip{\upbracefill}}%
\zchar{-1}{\hbox to\elemskip{\hss e\hss}\hbox to\elemskip{\hss e\hss}%
  \hbox to\elemskip{\hss e\hss}\hbox to\elemskip{\hss e\hss}}%
\NOtes\qa l\en
\znotes\en
\zchar{16}{\hbox to\beforeruleskip{\downbracefill}}%
\zchar{19}{\hbox to\beforeruleskip{\hss d\hss}}%
\setemptybar\endpiece
\end{music}
\begin{quote}\begin{tabular}{l@{~$\rightarrow$~}l}
a&\keyindex{afterruleskip}\\
b&\keyindex{notes}\verb| = \vnotes 2\elemskip|\\
c&\keyindex{NOtes}\verb| = \vnotes 4\elemskip|\\
d&\keyindex{beforeruleskip}\\
e&\keyindex{elemskip}
\end{tabular}\end{quote}

\subsection{Moving from one staff or instrument to another}
 \label{movingtostaffs}

When entering notes inside \verb|\notes ... \enotes|, the usual way to suspend
input for one instrument and start the next (higher) is with  the character
``\verb|&|''\index{"&@{\tt\char'046}}. If the instrument has more than one
staff, to switch to the next (higher) one you can use the character
``\verb+|+''\index{"|@{\tt\char'174}}.

There are some alternate navigation commands that may be useful in
 special situations. Due to ``catcode
problems'' (see section~\ref{catcodeprobs}) it may sometimes be necessary
to use the more explicit commands
\keyindex{nextinstrument} and \keyindex{nextstaff}, which have the same
meanings as ``\verb|&|'' and ``\verb+|+'' respectively. To switch to the previous
(next lower) staff of the same instrument, use \keyindex{prevstaff}. This might
be useful if a beam starts in a higher staff than where it ends. More
generally, to switch to an arbitrary instrument $n$, use
\keyindex{selectinstrument}\onen, and to switch to an arbitrary staff $n$
of the current instrument, use \keyindex{selectstaff}\verb|{|$n$\verb|}|. In the
latter case if $n$ exceeds the number of staves defined for the instrument, you
will receive an error message. You can enter part of a successive voice on
\ital{same} staff by using \verb|\selectstaff{|$n$\verb|}| with $n$ for
the \ital{current} staff.


 %\check
\section{Note pitch specification}\label{pitchspec}
Note pitches can be specified either by letters or numbers. If no transposition
or octaviation is in effect, letters ranging
from \verb|a| to \verb|z| represent notes starting with the A below
middle C. Upper case letters from \verb|A| to \verb|N| represent pitches
two octaves lower than their lower case counterparts. Any letter can be used in
any clef, but some users may
prefer to use the lower case letters in treble clef, and the upper case ones
in bass clef.

Alternatively, a one- or two-digit, positive or negative integer can always be used.
The number represents
the vertical position on the staff, with \verb|0| for the lowest line and
\verb|1| for the space right above, \ital{regardless of the clef}.
Unlike with letters, the
associated pitch will depend on the clef, and notes entered this way are
immune to transposition and octaviation.

Notes lower than \verb|A| and higher than \verb|z| can be entered, with
either numbers as just described, or with octaviation as will be explained in
section~\ref{octaviation}.

 \section{Writing notes}\label{autostemdirections}
There are two major kinds of note macros, those that include a space (of
length \keyindex{noteskip}) after
the printed symbol, and those that don't cause any space. A single-line melody would be
written using the first type. All notes of a chord except the last would
use the second.

Another distinction concerns stemmed notes. Some macros explicitly set the
stem direction with either ``\verb|u|'' or ``\verb|l|'' contained in the name of
the macro. On the other hand, an ``\verb|a|'' in the macro's name usually signifies
\ital{automatic} stem direction selection. In this case notes below the middle
staff line will get up stems, otherwise down.

 \subsection{Normal (unbeamed) spacing notes}\label{NormalNotes}
In the following, \verb|{|$p$\verb|}| signifies a pitch specification as
described in sections~\ref{pitchspec} and \ref{octaviation}. However it
is understood that if the pitch is a single character, the brackets are
not neecessary, provided that if it is a letter, a space separates the
macro from the letter.


\begin{quote}\begin{description}\setlength{\itemsep}{0ex}
 \item[\keyindex{breve}{\tt\char123}$p${\tt\char125} :]breve (\hbox to 8pt{\zbreve1\hss}) .
 \item[\keyindex{longa}{\tt\char123}$p${\tt\char125} :]longa (\hbox to8pt{\zlonga1\hss}) .
 \item[\keyindex{longaa}{\tt\char123}$p${\tt\char125} :]longa with automatic stem
direction\footnote{Editor's note: Evidently there is no explicit up-stemmed longa} .
 \item[\keyindex{zmaxima}{\tt\char123}$p${\tt\char125} :]maxima(\hbox to16pt{\zmaxima1\hss}) .
 \item[\keyindex{wq}{\tt\char123}$p${\tt\char125} :]arbitrary duration note (\hbox to8pt{\zwq1\hss})
(also used as alternate representation of a \ital{breve}).
 \item[\keyindex{wqq}{\tt\char123}$p${\tt\char125} :]long arbitrary duration note
(\hbox to8pt{\zwqq1\hss}) (also used as alternate
representation of a \ital{longa}).
 \item[\keyindex{wh}{\tt\char123}$p${\tt\char125} :]whole note.
 \item[\keyindex{hu}{\tt\char123}$p${\tt\char125} :]half note with stem up.
 \item[\keyindex{hl}{\tt\char123}$p${\tt\char125} :]half note with stem down.
 \item[\keyindex{ha}{\tt\char123}$p${\tt\char125} :]half note with automatic stem direction
 \item[\keyindex{qu}{\tt\char123}$p${\tt\char125} :]quarter note with stem up.
 \item[\keyindex{ql}{\tt\char123}$p${\tt\char125} :]quarter note with stem down.
 \item[\keyindex{qa}{\tt\char123}$p${\tt\char125} :]quarter note with automatic stem direction.
 \item[\keyindex{cu}{\tt\char123}$p${\tt\char125} :]eighth note\footnote{The ``{\tt c}''
within this macro name stands for the equivalent British term ``crotchet''} with stem up.
 \item[\keyindex{cl}{\tt\char123}$p${\tt\char125} :]eighth note with stem down.
 \item[\keyindex{ca}{\tt\char123}$p${\tt\char125} :]eighth note with automatic stem direction.
 \item[\keyindex{ccu}{\tt\char123}$p${\tt\char125} :]sixteenth note with stem up.
 \item[\keyindex{ccl}{\tt\char123}$p${\tt\char125} :]sixteenth note with stem down.
 \item[\keyindex{cca}{\tt\char123}$p${\tt\char125} :]sixteenth note with automatic stem direction.
 \item[\keyindex{cccu}{\tt\char123}$p${\tt\char125} :]32nd note with stem up.
 \item[\keyindex{cccl}{\tt\char123}$p${\tt\char125} :]32nd note with stem down.
 \item[\keyindex{ccca}{\tt\char123}$p${\tt\char125} :]32nd note with automatic stem direction.
 \item[\keyindex{ccccu}{\tt\char123}$p${\tt\char125} :]64nd note with stem up.
 \item[\keyindex{ccccl}{\tt\char123}$p${\tt\char125} :]64nd note with stem down.
 \item[\keyindex{ccccl}{\tt\char123}$p${\tt\char125} :]64nd note with automatic stem direction.
\end{description}\end{quote}
 As an example, the sequence

 %\check
\begin{music}\nostartrule
\startextract
\Notes\cu c\cl j\enotes\bar
\Notes\ccu c\ccl j\enotes\bar
\Notes\cccu c\cccl j\enotes\bar
\Notes\ccccu c\ccccl j\enotes
\zendextract
\end{music}
 \noindent was coded as
\begin{quote}\begin{verbatim}
\Notes\cu c\cl j\enotes\bar
\Notes\ccu c\ccl j\enotes\bar
\Notes\cccu c\cccl j\enotes\bar
\Notes\ccccu c\ccccl j\enotes
\end{verbatim}\end{quote}

 \subsection{Non-spacing note heads}
These macros are used to create chords. Any number of them can be entered
in sequence, followed by a spacing note. All of the note heads will be
joined to the spacing note and the stem length will automatically be adjusted
as needed.

\begin{quote}\begin{description}\setlength{\itemsep}{0ex}
 \item[\keyindex{zq}{\tt\char123}$p${\tt\char125} :]quarter (or shorter) note head.
 \item[\keyindex{zh}{\tt\char123}$p${\tt\char125} :]half note head.
\end{description}\end{quote}
%das ???
% \begin{remark} Notes of duration longer than whole notes are
%always non-spacing. This saves one useless definition, since these notes are
%always longer than other simultaneous ones. If needed they can be followed by
%\keyindex{sk} to force spacing.
%\end{remark}

 \subsection{Shifted non-spacing note heads}
These symbols are used mainly
in chords containing an interval of a \ital{second}. They provide note
heads shifted either to the left or right of the default position by
the width of one note head.

\begin{quote}\begin{description}\setlength{\itemsep}{0ex}
\item[\keyindex{rw}{\tt\char123}$p${\tt\char125} :]whole note head shifted right.
\item[\keyindex{lw}{\tt\char123}$p${\tt\char125} :]whole note head shifted left.
\item[\keyindex{rh}{\tt\char123}$p${\tt\char125} :]half note head shifted right\footnote{Some may not
have realized that half and whole note heads have different shapes}.
\item[\keyindex{lh}{\tt\char123}$p${\tt\char125} :]half note head shifted left.
\item[\keyindex{rq}{\tt\char123}$p${\tt\char125} :]quarter note head shifted right.
\item[\keyindex{lq}{\tt\char123}$p${\tt\char125} :]quarter note head shifted left.
\end{description}\end{quote}

 \subsection{Non-spacing notes}
These macros provide normal notes, with stems if applicable, but without any
following space.
\begin{quote}\begin{description}\setlength{\itemsep}{0ex}
 \item[\keyindex{zhu}\pitchp~:]half note with stem up but no spacing. It acts like
\verb|\hu| for chord building, i.e., it will join together any immediately
preceding non-spacing note heads.
 \item[\keyindex{zhl}\pitchp~:]half note with stem down but no spacing. It acts like
\keyindex{hl} for chord building.
 \item[\keyindex{zqu}\pitchp~:]quarter note with stem up but no spacing. It acts like
\verb|\qu| for chord building.
 \item[\keyindex{zql}\pitchp~:]quarter note with stem down but no spacing. It acts
like \verb|\ql| for chord building.
 \item[\keyindex{zcu}\pitchp, \keyindex{zccu}, \keyindex{zcccu}, \keyindex{zccccu}
:]eighth, ..., note with stem up but no spacing. They act like
\verb|\cu| for chord building.
 \item[\keyindex{zcl}\pitchp, \keyindex{zccl}, \keyindex{zcccl}, \keyindex{zccccl}
:]eighth, ..., note with stem down but no spacing. They act
like \verb|\cl| for chord building.
 \item[\keyindex{zqb}\pitchp~:]note belonging to a beam but no spacing. (DAS: put this later!)
 \item[\keyindex{rhu}\pitchp, \keyindex{rhl}, \keyindex{rqu}, \keyindex{rql},
  \keyindex{rcu}, \keyindex{rcl} :] \verb|\rhu| acts like \verb|\zhu|,
  but the note is shifted one note width to the right; others analogous.
 \item[\keyindex{lhu}\pitchp, \keyindex{lhl}, \keyindex{lqu}, \keyindex{lql},
  \keyindex{lcu}, \keyindex{lcl} :]same
  as above, but the note is shifted one note width to the left.
 \item[\keyindex{zw}\pitchp~:]whole note with no following space.
 \item[\keyindex{zwq}\pitchp~:]arbitrary duration note
  (\hbox to8pt{\zwq1\hss}) with no following space.
 \item[\keyindex{zbreve}\pitchp~:]breve
  (\hbox to8pt{\zbreve1\hss}) with no following space.
 \item[\keyindex{zlonga}\pitchp~:]longa
  (\hbox to8pt{\zlonga1\hss}) with no following space.
 \item[\keyindex{zmaxima}\pitchp~:]maxima
  (\hbox to16pt{\zmaxima1\hss}) with no following space.
\end{description}\end{quote}
 %\check

\subsection{Spacing note heads}

Although not needed in normal music scores, these may be useful in
very special cases.

\begin{quote}\begin{description}\setlength{\itemsep}{0ex}
\item[\keyindex{nh}{\tt\char123}$p${\tt\char125} :]spacing half note head.
\item[\keyindex{nq}{\tt\char123}$p${\tt\char125} :]spacing quarter note head.
\end{description}\end{quote}

\noindent As an example, the sequence

\begin{music}\nostartrule
 \startextract
\notes\nq c\nq j\enotes\barre
\Notes\nh c\nh j\enotes\barre
\notes\nq {cdef}\enotes
\zendextract
\end{music}

\noindent was coded as

\begin{quote}\begin{verbatim}
\notes\nq c\nq j\enotes\barre
\Notes\nh c\nh j\enotes\barre
\notes\nq {cdef}\enotes
\end{verbatim}\end{quote}

Non spacing variants are also provided, namely
\keyindex{znh} and \keyindex{znq}.
% DAS: why???

 \subsection{Dotted notes}\label{dots}

By appending one or two \verb|p|'s (for ``pointed'') to the name, many of the
macros just introduced provide one or two dots after the notehead:
\keyindex{whp}\pitchp, \keyindex{whpp},
\keyindex{zwp}, \keyindex{zwpp},
\keyindex{hup}, \keyindex{hupp},
\keyindex{hlp}, \keyindex{hlpp},
\keyindex{zhp}, \keyindex{zhpp},
\keyindex{qup}, \keyindex{qupp},
\keyindex{qlp}, \keyindex{qlpp},
\keyindex{zqp}, \keyindex{zqpp},
\keyindex{cup}, \keyindex{cupp},
\keyindex{clp}, \keyindex{clpp},
\keyindex{qbp} and \keyindex{qbpp}.
Naturally, the ones that start with ``\verb|z|'' are used in chords.
The dot(s) will be raised if the note is on a line.

A more explicit way uses one of the macros \keyindex{pt}{\tt\char123}$p${\tt\char125},
\keyindex{ppt}, or \keyindex{pppt} right
before any note macro to place one to three dots after the normal note
head at pitch $p$. Again they will be raised if on a line. In fact this is the only
way to get a triple-dotted note.
For example a
quarter note with one dot could be coded \verb|\pt h\qu h|, with two dots
as \keyindex{ppt}\verb| h\qu h| and with three as
\keyindex{pppt}\verb| h\qu h|.

Yet another method for posting a dot is to insert a \ital{period} before
the letter representing the pitch. Thus \verb|\qu{.a}| is equivalent to
either \verb|\pt a\qu a| or \verb|\qup a| . This may be useful when
using \ital{collective coding}, which will be discussed in the next
section.

Non-spacing dotted notes can be produced using
\keyindex{zhup}, \keyindex{zhlp}, \keyindex{zqup}, \keyindex{zqlp},
\keyindex{zcup}, \keyindex{zclp}, \keyindex{zqbp},
and similarly with two \verb|p|'s for
double-dotted notes.

As a matter of style, if two voices share one staff, the dots in
the lower voice should be lowered if the note is on a line. For
this you can use \keyindex{lpt}{\tt\char123}$p${\tt\char125} and
\keyindex{lppt}{\tt\char123}$p${\tt\char125}.

\subsection{Sequences of equally spaced notes; collective coding}
\label{CollectiveCoding}

It isn't necessary to write a separate macro
sequence \verb|\notes...\enotes| for every individual column of notes.
Rather, a single such macro can contain all the notes in all staves
over an extended horizontal range, as long as all spacings are equal or
multiples of a unique value of \keyindex{noteskip}.
The notes in each staff could be entered one after another as normal
spacing notes as already described in section~\ref{NormalNotes}. Then
each spacing note will cause the insertion point to advance horizontally by the
operative value of \verb|\noteskip| defined by the choice of
\verb|\notes|, \verb|\Notes|, \verb|\NOtes|, etc. Of course in such sequences
non-spacing chord notes can be entered right before their associated
spacing note. If you need to skip forward by one \verb|\noteskip|, for
example after a quarter note when there are two eighth notes in
another staff, you can use \keyindex{sk}.

If there are only spacing notes in such a sequence, a further
simplification is available, called \ital{collective coding}. For instance
\verb|\qu{cdefghij}| writes the C major scale in quarters with
up stems. Similarly \verb|\cl{abcdef^gh}| writes the
\ital{A-minor} scale in non-beamed eighths. (Here ``\verb|^|'' represents
a sharp). If necessary a void can be inserted in a collective coding sequence
by using~\verb|*|\index{*}. Not all note generating macros can be
used to perform collective coding, but most of them can.

\section{Beams}
\subsection{Starting a beam}

Each beam must be declared with a macro issued before the first spacing
note under the beam is coded. Two distinct kinds of macros are provided
for this. The first kind initiates a ``fixed-slope'' beam, with an arbitrary
slope and starting height chosen by the user, while the second kind, a
``semi-automatic'' beam,
\ital{computes}~the slope and, in addition, adjusts the starting height in some
cases.

\def\nps{{\tt\char123}$n${\tt\char125}\pitchp{\tt\char123}$s${\tt\char125}}

The basic form of the macros for starting fixed-slope beams is exemplified
by the one for a single upper beam, \keyindex{ibu}\nps. Here
$n$ is the reference number of the beam, $p$ the starting ``pitch'', and
$s$ the slope. The reference number is assigned by the user. By default it must be
in the range [0-5], but the maximum can be increased to 8 or 11 respectively
if \verb|musixadd| or \verb|musixmad| has been \verb|\input|. The beam number is
needed because more than one beam may be open at a time, and it
tells \musixtex\ to which beam subsequent beamed notes and other beam specification
commands are assigned. The ``pitch'' parameter is a pitch that is three
staff spaces \ital{below} the bottom of the heavy connecting bar (\ital{above}
the bar for a lower beam); in many (but not all)
cases it should be input as the actual pitch of the first note. The slope $s$
is an integer in the range [-9,9]. When multipled
by 5\%~it gives the actual slope of the heavy bar. Typically a slope of 2 or 3
is OK for ascending scales, and 6 to 9 for ascending arpeggios.

The full set of fixed-slope beam initiation macros is as follows:
\begin{quote}\begin{description}\setlength{\itemsep}{0ex}

 \item[\keyindex{ibu}\nps~:]initiates an \ital{upper beam}.
 \item[\keyindex{ibl}\nps~:]initiates a \ital{lower beam}.
 \item[\keyindex{ibbu}\nps~:]initiates a \ital{double upper beam}.
 \item[\keyindex{ibbl}\nps~:]initiates a \ital{double lower beam}.
 \item[\keyindex{ibbbu}\nps~:]initiates a \ital{triple upper beam}.
 \item[\keyindex{ibbbl}\nps~:]initiates a \ital{triple lower beam}.
 \item[\keyindex{ibbbbu}\nps~:]initiates a \ital{quadruple upper beam}.
 \item[\keyindex{ibbbbl}\nps~:]initiates a \ital{quadruple lower beam}.
\end{description}\end{quote}

A semi-automatic beam is initiated with a command that has \ital{four}
parameters, the beam number, the first and last pitches, and the total
horizontal extent in
\verb|\noteskip|s, based on the value in effect at the start. For example,
if you input \verb|\Ibu2gj3|, \musixtex\ will understand that you want to
build an upper beam (beam number 2) horizontally extending \verb|3\noteskip|,
the first note of which is a \verb|g| and the last note a \verb|j|.
Knowing these parameters it will choose the highest slope number that
corresponds to a slope not more than $(\hbox{\tt j}-\hbox{\tt
g})/(3\keyindex{noteskip})$. The nominal height of the heavy bar is offset the same as
for fixed-slope beams. However, if there is no sufficiently steep beam
slope available, then \musixtex\ will raise (or lower) the starting point.

 Eight such macros are available: \keyindex{Ibu}, \keyindex{Ibbu},
\keyindex{Ibbbu}, \keyindex{Ibbbbu}, \keyindex{Ibl}, \keyindex{Ibbl},
\keyindex{Ibbbl} and \keyindex{Ibbbbl}.

\subsection{Adding notes to a beam}

Spacing notes belonging to beams are coded with the macro
\keyindex{qb}\verb|{|$n$\verb|}|\pitchp~where $n$ is
the beam number and $p$ the pitch of the note. \musixtex\ adjusts the
length of the note stem to link to the beam.

Chord notes within a beam are entered before the main note with the
non-spacing macro \keyindex{zqb}\verb|{|$n$\verb|}|\pitchp. Again,
the stem length will be automatically adjusted as required.

There are also special macros for semi-automatic beams with
two, three, or four notes:
\keyindex{Dqbu}, \keyindex{Dqbl}, \keyindex{Dqbbu}, \keyindex{Dqbbl},
\keyindex{Tqbu}, \keyindex{Tqbl}, \keyindex{Tqbbu}, \keyindex{Tqbbl},
\keyindex{Qqbu}, \keyindex{Qqbl}, \keyindex{Qqbbu} and \keyindex{Qqbbl}.
  %\check
For example \verb|\Dqbu gh| is equivalent to \verb|Iqbu1gh\qb1 g\tbu1\qb1 h|,
except that the special macros don't require a beam number.
Their use is illustrated in the following example:

\medskip
\begin{music}\nostartrule
\parindent0pt\startpiece
\Notes\Dqbu gh\Dqbl jh\en
\notes\Dqbbu fg\Dqbbl hk\en\bar
\Notes\Tqbu ghi\Tqbl mmj\en
\notes\Tqbbu fgj\Tqbbl njh\en\bar
\Notes\Qqbu ghjh\Qqbl jifh\en
\notes\Qqbbu fgge\Qqbbl jhgi\en\setemptybar\endpiece
\end{music}
\noindent This was coded as\footnote{Editor's note: Most music
typesetting books recommend beam slopes that are \ital{less} than
the slope between the starting and ending note; these macros cannot
provide that.}:
\begin{quote}\begin{verbatim}
\Notes\Dqbu gh\Dqbl jh\en
\notes\Dqbbu fg\Dqbbl hk\en\bar
\Notes\Tqbu ghi\Tqbl mmj\en
\notes\Tqbbu fgj\Tqbbl njh\en\bar
\Notes\Qqbu ghjh\Qqbl jifh\en
\notes\Qqbbu fgge\Qqbbl jhgi\en
\end{verbatim}\end{quote}
 %\check

 \subsection{Ending a beam}
 The termination of a given
beam must be declared \ital{before} coding the last spacing note
connected to that beam. The macros for doing that are
\keyindex{tbu}\verb|{|$n$\verb|}| for an upper beam and
\keyindex{tbl}\verb|{|$n$\verb|}| for a lower one. These work for
beams of any
multiplicity. So for example an upper triple beam with
32nd notes is initiated by
\verb|\ibbbu|\nps\ but terminated by \verb|\tbu{|$n$\verb|}|.

 Since beams usually finish with a \verb|\qb| for the last note, the
following shortcut macros have been provided:

\def\enpee{{\tt{\char123$n$\char125\char123$p$\char125}}}
\begin{quote}\begin{description}\setlength{\itemsep}{0ex}
 \item \keyindex{tqb}\enpee~is equivalent to \verb|\tbl{|$n$\verb|}\qb|\enpee~.
 \item \keyindex{tqh}\enpee~is equivalent to \verb|\tbu{|$n$\verb|}\qb|\enpee~.
 \item \keyindex{ztqb}\enpee~is equivalent to \verb|\tbl{|$n$\verb|}\zqb|\enpee~,
i.e., no spacing afterwards.
 \item \keyindex{ztqh}\enpee~is equivalent to \verb|\tbu{|$n$\verb|}\zqb|\enpee~,
i.e., no spacing afterwards.
\end{description}\end{quote}

\subsection{Changing multiplicity after the beam starts}
Multiplicity (the number of heavy bars) can be increased at any position after
the beam starts. The commands are \keyindex{nbbu}\onen~which increases the multiplicity of
upper beam
number $n$ to two starting at the current position, \keyindex{nbbbu}\onen~to
increase it to three, and \keyindex{nbbbbu}\onen~to increase to four. The
commands \keyindex{nbbl}\onen\dots\keyindex{nbbbbl}\onen~do the same
for lower beams.
Thus, the
sequence

\begin{music}\nostartrule
\startextract
\Notes\ibu0h0\qb0e\nbbu0\qb0e\nbbbu0\qb0e\nbbbbu0\qb0e\tbu0\qb0e\enotes
\zendextract
\end{music}
\noindent has been coded as
\begin{quote}\begin{verbatim}
\Notes\ibu0h0\qb0e\nbbu0\qb0e\nbbbu0\qb0e\nbbbbu0\qb0e\tbu0\qb0e\enotes
\end{verbatim}\end{quote}

To decrease multiplicity to one, use \keyindex{tbbu}\onen~or
\keyindex{tbbl}\onen. To decrease to two or three use
\keyindex{tbbbu}\onen\dots\keyindex{tbbbbl}\onen. For example,

\begin{music}\nostartrule
\startextract
\Notes\ibbbu0h0\qb0e\tbbbu0\qb0e\tbbu0\qb0e\tbu0\qb0e\enotes
\zendextract
\end{music}
\noindent has been coded as

\begin{quote}\begin{verbatim}
\startextract
\Notes\ibbbu0h0\qb0e\tbbbu0\qb0e\tbbu0\qb0e\tbu0\qb0e\enotes
\zendextract
\end{verbatim}\end{quote}

Although at first it may seem counterintuitive,
the macros \keyindex{tbbu} and \keyindex{tbbl} and higher order counterparts
may also be invoked when the multiplicity is one. In this case
a second, third, or fourth heavy bar will be opened one note width \ital{before}
the current stem, and immediately closed \ital{at} the stem.
Thus the following sequences

\begin{music}\nostartrule
\let\extractline\hbox
\hbox to \hsize{%
\hss
  \startextract
  \Notes\ibu0e0\qbp0e\tbbu0\tbu0\qb0e\en
  \zendextract
\hss\hss
  \startextract
  \Notes\ibu0e0\qbpp0e\tbbbu0\tbbu0\tbu0\qb0e\en
  \zendextract
\hss}
\end{music}
\noindent are coded
\hspace*{\fill}\begin{minipage}{.4\textwidth}\begin{verbatim}
\Notes\ibu0e0\qbp0e%
  \tbbu0\tbu0\qb0e\en
\end{verbatim}\end{minipage}\hfill
\begin{minipage}{.4\textwidth}\begin{verbatim}
\Notes\ibu0e0\qbpp0e%
  \tbbbu0\tbbu0\tbu0\qb0e\en
\end{verbatim}\end{minipage}\hfill

\medskip


The symmetrical pattern is also possible. For example:

\begin{music}\nostartrule
\startextract
\Notes\ibbl0j0\roff{\tbbl0}\qb0j\tbl0\qbp0j\enotes
\zendextract
\end{music}
\noindent has been coded as:
\begin{quote}\begin{verbatim}
\Notes\ibbl0j0\roff{\tbbl0}\qb0j\tbl0\qbp0j\enotes
\end{verbatim}\end{quote}

The constructions in this section illustrate some general
properties of
beam initiation and termination commands: To mate properly with the
expected stems, the starting position of the heavy bar(s) (for initiation commands)
and the ending position (for terminations) will be at
different horizontal locations
depending on whether they are for upper or lower beams: The position for
upper beam commands is one note head width to the right of those for
lower beams. In fact this is the \ital{only} difference between upper
and lower termination commands. Both types will operate on whatever kind of
beam is open and has the same beam number.

Recognizing this principle, in the example just given it was necessary to
shift the double termination to the right by one note head width, using the
command \keyindex{roff}\verb|{|\dots\verb|}|, which does precisely that for
any \musixtex\ macro.

Here is another, slightly more complicated example which also uses
\verb|\roff|:

\begin{music}\nostartrule
\startextract
\notes\ibbbu0e0\roff{\tbbbu0}\qb0f\en
\notesp\tbbu0\qbp0f\en
\Notes\tbu0\qb0f\en
\notesp\ibbu0f0\roff{\tbbu0}\qbp0f\en
\Notes\qb0f\en
\notes\tbbbu0\tbbu0\tbu0\qb0f\en
\zendextract
\end{music}
\noindent has been coded as:
\begin{quote}\begin{verbatim}
\notes\ibbbu0e0\roff{\tbbbu0}\qb0f\en
\notesp\tbbu0\qbp0f\en
\Notes\tbu0\qb0f\en
\notesp\ibbu0f0\roff{\tbbu0}\qbp0f\en
\Notes\qb0f\en
\notes\tbbbu0\tbbu0\tbu0\qb0f\en
\end{verbatim}\end{quote}

\noindent Note that the first beam opening command used a pitch one step
below the note. This makes the stem shorter by one pitch unit, since it is always
the \ital{closest} heavy bar that is separated from the given pitch by
three staff spaces.

We close this section with an example showing how to
open a beam of one sense, increase multiplicity, then terminate with
opposite sense:

\begin{music}\nostartrule
\startextract
\Notes\ibl0p0\qb0p\nbbl0\qb0p\nbbbl0\qb0p\tbu0\qb0e\enotes
\zendextract
\end{music}
\noindent which has been coded as
\begin{quote}\begin{verbatim}
\Notes\ibl0p0\qb0p\nbbl0\qb0p\nbbbl0\qb0p\tbu0\qb0e\enotes
\end{verbatim}\end{quote}

 \begin{remark} One may save some typing by defining personalized
\TeX\ macros to
perform any oft repeated sequence of commands. For example,
one could define a set of four sixteenths by the macro:

\verb|\def\qqh#1#2#3#4#5{\ibbl0#2#1\qb#2\qb#3\qb#4\tbl0\qb#5}|

\noindent where the first argument is the slope and the other four
arguments are the pitches of the four successive sixteenths.
\end{remark}

 %\check
 \subsection{Shorthand beam notations for repeated notes}\index{repeated patterns}
Sometimes you may want to indicate repeated short notes with open note heads joined
by a beam. Here's an example of how to do that
using the \keyindex{hb} macro:

\begin{music}\nostartrule
\startextract
\Notes\ibbl0j0\hb0j\tbl0\hb0j\enotes
\Notes\ibbu0g0\hb0g\tbu0\hb0g\enotes
\zendextract
\end{music}
\noindent which has been coded as:
\begin{quote}\begin{verbatim}
\Notes\ibbl0j0\hb0j\tbl0\hb0j\enotes
\Notes\ibbu0g0\hb0g\tbu0\hb0g\enotes
\end{verbatim}\end{quote}

It is also possible to dispense with the stems:

\begin{music}\nostartrule
\startextract
\Notes\ibbl0j3\wh j\tbl0\wh l\enotes
\Notes\ibbu0g3\wh g\tbu0\wh i\enotes
\zendextract
\end{music}
\noindent which was coded as
\begin{quote}\begin{verbatim}
\Notes\ibbl0j3\wh j\tbl0\wh l\enotes
\Notes\ibbu0g3\wh g\tbu0\wh i\enotes
\end{verbatim}\end{quote}
\noindent A different look could be obtained as follows:

\begin{music}\nostartrule
\startextract
\Notes\loff{\zw j}\ibbl0j3\sk\tbl0\wh l\enotes
\Notes\ibbu0g3\wh g\tbu0\roff{\wh i}\enotes\qspace
\zendextract
\end{music}
\noindent which was coded as:
\begin{quote}\begin{verbatim}
\Notes\loff{\zw j}\ibbl0j3\sk\tbl0\wh l\enotes
\Notes\ibbu0g3\wh g\tbu0\roff{\wh i}\enotes\qspace
\end{verbatim}\end{quote}

Yet another way to indicate repeated notes is given in the
following example:

 \begin{music}\nostartrule
\startextract
\Notes\ibl0h0\qb0{hhh}\tbl0\qb0h\bsk\bsk\bsk\bsk
      \ibu0j0\qb0{jjj}\tbu0\qb0j\en
\NOTes\loffset{0.5}{\ibl0j9}\roffset{0.5}{\tbl0}\zhl h%
      \loffset{0.5}{\ibu0g9}\roffset{0.5}{\tbu0}\hu j\en\bar
\notes\ibbl0i0\qb0{hhh}\tbl0\qb0h\bsk\bsk\bsk\bsk
      \ibbu0i0\qb0{jjj}\tbu0\qb0j%
      \ibbl0i0\qb0{hhh}\tbl0\qb0h\bsk\bsk\bsk\bsk
      \ibbu0i0\qb0{jjj}\tbu0\qb0j\en
\NOTes\loffset{0.5}{\ibbl0k9}\roffset{0.5}{\tbl0}\zhl h%
      \loffset{0.5}{\ibbu0f9}\roffset{0.5}{\tbu0}\hu j\en
\zendextract
 \end{music}
 \noindent whose coding (due to Werner {\sc Icking}) is

\begin{quote}\begin{verbatim}
\Notes\ibl0h0\qb0{hhh}\tbl0\qb0h\bsk\bsk\bsk\bsk
      \ibu0j0\qb0{jjj}\tbu0\qb0j\en
\NOTes\loffset{0.5}{\ibl0j9}\roffset{0.5}{\tbl0}\zhl h%
      \loffset{0.5}{\ibu0g9}\roffset{0.5}{\tbu0}\hu j\en\bar
\notes\ibbl0i0\qb0{hhh}\tbl0\qb0h\bsk\bsk\bsk\bsk
      \ibbu0i0\qb0{jjj}\tbu0\qb0j%
      \ibbl0i0\qb0{hhh}\tbl0\qb0h\bsk\bsk\bsk\bsk
      \ibbu0i0\qb0{jjj}\tbu0\qb0j\en
\NOTes\loffset{0.5}{\ibbl0k9}\roffset{0.5}{\tbl0}\zhl h%
      \loffset{0.5}{\ibbu0f9}\roffset{0.5}{\tbu0}\hu j\en
\end{verbatim}\end{quote}

 \subsection{Beams that cross line breaks}

Although careful typesetting can usually avoid it, occasionally
a beam may need to cross a line break. If so, it must be manually terminated at
the end of one line and continued in the next. This
can be done by shifting beam terminations and initiations
using \keyindex{roff} and/or
\keyindex{loff}, or by inserting a spacing command such as
\keyindex{hsk}. We give an example from {\sc Grieg}'s ``Hochzeit auf
Troldhaugen'':\index{Grieg, E.@{\sc Grieg, E.}}\medskip

\begin{music}
\parindent0pt
\def\rqs{\lower\Interligne\rlap\qs}
\def\snotes{\vnotes1\elemskip}
\setstaffs1{2}
\generalsignature{2}
\setclef1{\bass}
\interstaff{12}
\startpiece
%%% bar 1
\addspace\afterruleskip
\snotes|\tinynotesize\ibsluru0n\ibbu0m5\qb0{=m}\tqh0n\en
\qspace
\Notes\zchar{-7}\sPed\loffset{.3}{\fl E}\zq E\qu{_I}%
  |\zql g\ibu2l0\busf2\qb2{=m}\en
\Notes|\tubslur0o\qb2{_l}\en
\Notes\loffset{.3}{\fl L}\zq L\ibl0L0\qb0{_b}%
  |\ibl1h0\zqb1g\bupz2\qb2l\en
\Notes\zq L\tqb0b|\tbl1\zqb1g\bupz2\tqh2l\en
\NOtes\zq L\ql b|\zql g\qu l\en
\notes\zchar{-7}\sPed\zchar{-7}{\eightit ~~~sempre}%
  \zchar{14}{\pp\eightit~sempre}\zq I\ibbu1J0\qb1L|\qs\en
\notes\qs|\zq N\ibbu3d0\qb3{_d}\en
\notes\qb1E|\rqs\en
\notes\qs|\fl e\zq N\rq e\qb3d\en
%%% bar 2
\bar
\notes\loffset{.3}{\fl I}\zq I\qb1{_L}|\rqs\en
\qspace
\notes\qs|\lfl d\zq d\zq {=f}\qb3N\en
\notes\tqh1{_E}|\rqs\en
\notes\qs|\zq d\zq g\tqh3N\en
\notes\zq I\ibbu0J0\qb0L|\rqs\en
\notes\qs|\zq d\ibbu1d0\qb1N\en
\notes\qb0E|\rqs\en
\notes\qs|\fl e\rq e\zq d\qb1N\en
\notes\zq I\qb0L|\rqs\en
\notes\qs|\zq f\zq d\qb1N\en
\notes\tqh0E|\rqs\en
\notes\qs|\zq g\zq d\tqh1N\en
\notes\zq I\ibbu0J0\qb0L|\rqs\en
\notes\qs|\zq d\ibbu1d0\qb1N\en
\notes\qb0E|\rqs\en
\notes\rlap\qs\hsk\tbu0|\rq e\zq d\zqb1N\hsk\tbu1\en
\endpiece
\end{music}
\noindent The prolongation of the two upper beam at the end is
illustrated in the code fragment
\begin{quote}\begin{verbatim}
\notes\rlap{\qs}\hsk\tbu0|\rq e\zq d\zqb1N\hsk\tbu1\en
\end{verbatim}\end{quote}
 %\check

 \subsection{Beams with notes on several different staves}

Here's a simple example from {\sc Brahms}'s
Intermezzo op.~118,1 provided by
Miguel {\sc Filgueiras}:\index{Brahms, J.@{\sc Brahms, J.}}\medskip

\begin{music}
\interstaff{12}
\setstaffs1{2}
\setclef1\bass
\generalmeter\allabreve
\startextract
\NOtes\qp\nextstaff\isluru0q\zq{q}\ql{j}\enotes
\bar
\nspace
\Notes\ibu0L2\qb0{CEJLcL}%
  \nextstaff\roff{\zw{l}}\pt{p}\zh{_p}\pt{i}\hl{_i}\enotes
\Notes\qb0J\itied1a\qb0a\nextstaff\tslur0o\zq{o}\ql{h}\enotes
\bar
\Notes\ttie1\zh{.L.a}\hl{.e}%
  \nextstaff\qb0{chj}\tbl0\qb0l\cl{q}\ds\enotes
\NOtes\qp\nextstaff\zq{q}\ql{j}\enotes
\endextract
\end{music}
 %\check
\noindent The coding is
\begin{verbatim}
\interstaff{13}
\instrumentnumber{1}
\setstaffs1{2}
\setclef1\bass
\generalmeter\allabreve
\startextract
\NOtes\qp\nextstaff\isluru0q\zq{q}\ql{j}\enotes
\bar
\nspace
\Notes\ibu0a1\qb0{CEJLcL}%
  \nextstaff\roff{\zw{l}}\pt{p}\zh{_p}\pt{i}\hl{_i}\enotes
\Notes\qb0J\itied1a\qb0a\nextstaff\tslur0o\zq{o}\ql{h}\enotes
\bar
\Notes\ttie1\zh{.L.a}\hl{.e}%
  \nextstaff\qb0{chj}\tbl0\qb0l\cl{q}\ds\enotes
\NOtes\qp\nextstaff\zq{q}\ql{j}\enotes
\endextract
\end{verbatim}

\noindent (This example also shows that there is no problem in extending
a beam across a bar line.)

The general features that enable this type of coding as well as the
more complex example to follow are
 \begin{itemize}\setlength{\itemsep}{0ex}
%  \item Commands like \Bslash{\tt ibu}, \Bslash{\tt ibl},
%\Bslash{\tt Ibu}, and \Bslash{\tt Ibl} \rm
%define beams whose initial vertical position and slope are fixed
%relative
%to the staff where they begin, but notes in other staves can still be
%connected to them using \Bslash{\tt qb}\onen.
%
%  \item The commands \keyindex{tbu}\onen\rm~or \keyindex{tbl}\onen\rm~terminate
%beam $n$ at the specified position, but \musixtex\ remembers the beam
%parameters until a new beam with the same number is defined.
%Therefore, even after beam $n$ has been ``finished'' by a \verb|\tbu| or
%\verb|\tbl| command, commands like \Bslash{\tt qb}\enpee\rm~will still
%generate notes connected to the phantom extension of this beam,
%\ital{provided they are issued in a different staff}. If the command
%\verb|\qb|\enpee\rm~were issued on the same staff as the beam after
% the beam had ended, an error would result.
%
  \item Commands like {\Bslash\texttt{ibu}}, {\Bslash\texttt{ibl}},
{\Bslash\texttt{Ibu}}, and {\Bslash\texttt{Ibl}}
define beams whose initial vertical position and slope are fixed
relative
to the staff where they begin, but notes in other staves can still be
connected to them using {\Bslash\texttt{qb}\onen}.

  \item The commands {\keyindex{tbu}\onen}  or {\keyindex{tbl}\onen}
terminate
beam $n$ at the specified position, but \musixtex\ remembers the beam
parameters until a new beam with the same number is defined.
Therefore, even after beam $n$ has been ``finished'' by a \verb|\tbu| or
\verb|\tbl| command, commands like {\Bslash{\tt qb}\enpee} will still
generate notes connected to the phantom extension of this beam,
\ital{provided they are issued in a different staff}. If the command
\verb|\qb|\enpee\rm~were issued on the same staff as the beam after
 the beam had ended, an error would result.





 \item If the beam is initiated on one staff,
notes in a lower staff can be connected to it, but only \ital{after} the beam
has been defined. This may require using the command \keyindex{prevstaff}
to go back one staff, as described in section
\ref{movingtostaffs}.

 \end{itemize}

 Here is an example:

 \begin{music}
 \setstaffs13
 \setclef1{6000}
 \startextract
 \notes
 \nextstaff\Ibbbu0Ae7\prevstaff
 \qb0{AEH^JLa}\relax\nextstaff
 \qb0{******^c}\tqh0e\relax
 |\zq{h^jl}\ql o\enotes
 \notes
 \nextstaff
 \Ibbbu0hH6\qb0{hec}\prevstaff
 \qb0{***aLJ}\tqh0H\relax\nextstaff
 |\zq{h^jl}\ql o\enotes \nspace
 \zendextract
 \end{music}

 \noindent which is coded as:

 \begin{quote}
 \begin{verbatim}
 \setstaffs13
 \setclef1{6000}
 \startextract
 \notes
 \nextstaff\Ibbbu0Ae7\prevstaff
 \qb0{AEH^JLa}\relax\nextstaff
 \qb0{******^c}\tqh0e\relax
 |\zq{h^jl}\ql o\enotes
 \notes
 \nextstaff
 \Ibbbu0hH6\qb0{hec}\prevstaff
 \qb0{***aLJ}\tqh0H\relax\nextstaff
 |\zq{h^jl}\ql o\enotes \nspace
 \zendextract
 \end{verbatim}
 \end{quote}

In this example we not only see multiple uses of \keyindex{nextstaff} and
\keyindex{prevstaff}, but also the character \verb|*| to make virtual beam notes
(see section \ref{CollectiveCoding}).

\section{Rests}
 \subsection{Ordinary rests}
 A separate macro is defined for each kind of ordinary rest. They cause
a space after the symbol, just like spacing note commands, but they have
no parameters. A whole rest is coded as
\keyindex{pause}, dotted whole rest \keyindex{pausep},
half rest \keyindex{hpause}, dotted half rest \keyindex{hpausep},
quarter rest \keyindex{qp} or \keyindex{soupir},
eighth rest \keyindex{ds}, sixteenth rest \keyindex{qs},
32nd rest \keyindex{hs}, and 64th rest \keyindex{qqs}.

 Longer rests, normally interpreted as lasting
two or four bars respectively, can be coded as \keyindex{PAuse}
and \keyindex{PAUSe}, which yield:

\begin{music}\nostartrule
\generalmeter{\meterfrac44}
\startextract
\def\atnextbar{\znotes\centerbar\PAuse\en}%
\NOTEs\en\bar
\def\atnextbar{\znotes\centerbar\PAUSe\en}%
\NOTEs\en\zendextract
\end{music}
 %\check


 \subsection{Raising rests}\index{raising rests}
All the
previous rests except \keyindex{pausep} and
\keyindex{hpausep} are \ital{hboxes}, which means that
they can be vertically offset if needed using the
standard \TeX\ command \keyindex{raise}. For example:

 \begin{quote}
 \begin{verbatim}
 \raise 2\Interligne\qp
 \raise 3mm\qq
 \end{verbatim}
 \end{quote}

\noindent where \keyindex{Interligne} is the distance from one staff line to the
next.

In addition, two macros are available to put a whole or
half rest above or below the staff. The ordinary \verb|\pause| or
\verb|\hpause| cannot be used outside the staff because a short horizontal line
must be added to distinguish between the whole and the half rest. The commands,
which are non-spacing\footnote{Editor's note: The reason for having defined these
as non-spacing is not obvious}, are
 \begin{itemize}\setlength{\itemsep}{0ex}
 \item \keyindex{liftpause}~$n$ to get a
  \hbox to10pt{\liftpause{-2}\hss}
  raised from original position by $n$ staff line intervals,
 \item \keyindex{lifthpause}~$n$ to get
  \hbox to10pt{\lifthpause{-1}\hss} raised the same way.
 \item \keyindex{liftpausep}~$n$ to get a
  \hbox to10pt{\liftpausep{-2}\hss}
  raised from original position by $n$ staff line intervals,
 \item \keyindex{lifthpausep}~$n$ to get
  \hbox to10pt{\lifthpausep{-1}\hss} raised the same way.
 \end{itemize}
 %\check

 \subsection{Bar centered rests}\label{barcentered}
Sometimes it is necessary to place a rest (or any other symbol) exactly in the middle
of a bar. This can be done with combinations of the commands
\keyindex{atnextbar},
\keyindex{centerbar},
\keyindex{centerPAUSe},
\keyindex{centerPAuse},
\keyindex{centerpause},
\keyindex{centerhpause},
as demonstrated in the following example:

\begin{music}
\generalmeter\meterC
\setclef1\bass
\setstaffs1{2}
\parindent0pt
\startpiece\addspace\afterruleskip
\NOtes|\qa{cegj}\en
\def\atnextbar{\znotes\centerpause\en}\bar
\NOtes|\qa{jgec}\en
\def\atnextbar{\znotes\centerpause\en}\bar
\Notes\ca{`jihgfedc}\en
\def\atnextbar{\znotes|\centerpause\en}\bar
\NOTes\ha{Nc}\en
\def\atnextbar{\znotes|\centerpause\en}\bar
\addspace{10\elemskip}%
\def\atnextbar{\znotes\centerbar\duevolte|\centerbar\duevolte\en}\endpiece
\end{music}
\noindent with the coding
\begin{verbatim}
\generalmeter\meterC
\setclef1\bass
\setstaffs1{2}
\parindent0pt
\startpiece\addspace\afterruleskip
\NOtes|\qa{cegj}\en
\def\atnextbar{\znotes\centerpause\en}\bar
\NOtes|\qa{jgec}\en
\def\atnextbar{\znotes\centerpause\en}\bar
\Notes\ca{`jihgfedc}\en
\def\atnextbar{\znotes|\centerpause\en}\bar
\NOTes\ha{Nc}\en
\def\atnextbar{\znotes|\centerpause\en}\bar
\addspace{10\elemskip}%
\def\atnextbar{\znotes\centerbar{\duevolte}|\centerbar{\duevolte}\en}\endpiece
\end{verbatim}
 %\check

\section{Skipping spaces and shifting symbols}\label{spacing}
We've already mentioned that when coding a sequence of notes inside a
particular pair \verb|\notes...\enotes|, the command \keyindex{sk} can
be used to skip horizontally by one \keyindex{noteskip}. This would be
used for example to align the third note in one staff with the second note
in another. Skipping in this manner is logically equivalent to inserting
blank space; as such, the space must be recorded by \musixtex. This command
and the others discussed here will
do just that, so that \verb|musixflx| can properly account for
the added space.

To skip by one \verb|noteskip| while in a collective coding sequence,
you may simply insert an asterisk (``\verb|*|''\index{*}). This would have
the same effect as stopping the sequence, entering {\Bslash sk}, then
restarting. For example,

\begin{music}
\setstaffs12
\startextract
\Notes\hu{e*f*g}|\qu{gghhii}\en
\zendextract
\end{music}
\noindent was coded as
\verb|\Notes\hu{e*f*g}|{\tt |}\verb|\qu{gghhii}\en|

To skip forward
by one half of a \verb|\noteskip|, use \keyindex{hsk}.
To insert spacing of approximately one note head width, you can use
\keyindex{qsk}, or for half of that, \keyindex{hqsk}. To skip backward
by one \verb|\noteskip|, use \keyindex{bsk}. More generally,
to skip an arbitrary distance, use \keyindex{off}\verb|{|$D$\verb|}|
where $D$ is any \itxem{scalable dimension}, e.g.~\verb|\noteskip| or
\verb|\elemskip|. Indeed, if you look in the
\musixtex\ source, you will see that \verb|\off| is the basic control
sequence used to define all the other skip commands.

The foregoing commands only work \ital{inside} a \verb|\notes...\enotes| group.
A different set of commands must be used to insert space \ital{outside}
such a group. \keyindex{nspace} produces an
additional spacing of half a note head width;
\keyindex{qspace}, one note head width. These are ``hard'' spacings. To
insert an arbitrary amount of hard space outside a \verb|\notes...\enotes|
group, use \keyindex{hardspace}\verb|{|$d$\verb|}{|\dots\verb|}| where
$d$ is any fixed dimension\label{hardspace}. The foregoing three commands are the only
space-generating commands that insert hard space; all the others insert
scalable spacing: \keyindex{elemskip},
\keyindex{beforeruleskip}, \keyindex{afterruleskip}, \keyindex{noteskip} and
their multiples. Finally, to insert
scalable spacing outside
a \verb|\notes...\enotes| group, use
\keyindex{addspace}\verb|{|$D$\verb|}|. The argument may be negative, in
which case the normal spacing will be reduced. For example, after
\keyindex{changecontext}, many users prefer to reduce the space with
a command like
\verb|addspace{-|\keyindex{afterruleskip}\verb|}|.

There is yet another set of commands for simply shifting a note, symbol, or sequence
inside \verb|\notes...\enotes|
without adding or subtracting any space. To shift by one note head width,
you may write \keyindex{roff}\verb|{|\ital{any macro}\verb|}|
or \keyindex{loff}\verb|{|\dots\verb|}| for a right or left shift respectively.
 To shift by half of a note head width, use
\keyindex{hroff}\verb|{|\dots\verb|}| or
\keyindex{hloff}\verb|{|\dots\verb|}|.
For example, to get
 %\check

\begin{music}\nostartrule
\startextract
\Notes\roff{\zwh g}\qu g\qu h\qu i\enotes
\zendextract
\end{music}
\noindent you would code:

 %\check

\begin{quote}\begin{verbatim}
\Notes\roff{\zwh g}\qu g\qu h\qu i\enotes
\end{verbatim}\end{quote}

\noindent To shift notes or symbols by an arbitrary amount, use
\keyindex{roffset}\verb|{|$N$\verb|}{|\dots\verb|}| or
\keyindex{loffset}\verb|{|$N$\verb|}{|\dots\verb|}|, where
$N$ is the distance to be shifted in note head widths. For example

\begin{music}\nostartrule
\startextract
\Notes\roffset{1.5}{\zwh g}\qu g\qu h\qu i\enotes
\zendextract
\end{music}
\noindent was coded as

\begin{quote}\begin{verbatim}
\Notes\roffset{1.5}{\zwh g}\qu g\qu h\qu i\enotes
\end{verbatim}\end{quote}

An important feature of these shift commands is that the offset,
whether implicit or explicit, is \ital{not} added to
the total spacing amount, but any spacing due to the included commands is.


\section{Accidentals}

Accidentals can be introduced in two ways.

 The first way, using explicit macros, consists for
example in coding \keyindex{fl}\pitchp~to put a \ital{flat} at the
pitch $p$, presumably right before a note at the same pitch. This is a
non-spacing command and will automatically place the accidental an
appropriate distance to the left of the anticipated note head.
Naturals, sharps, double flats and double sharps are coded \keyindex{na}\pitchp,
\keyindex{sh}\pitchp, \keyindex{dfl}\pitchp~and \keyindex{dsh}\pitchp~respectively.

The alternate macros \keyindex{lfl}, \keyindex{lna}, \keyindex{lsh},
\keyindex{ldfl} and \keyindex{ldsh}
place the same accidentals, but shifted one note head width
to the left. These can be used if a note head has been shifted to the left, or
to avoid collision with other accidentals
in a chord. If you want to shift an accidental by some other amount for
more precise positioning, you could use \keyindex{loffset} with the normal
accidental macro as the second parameter.

 The second way of coding accidentals is to modify the parameter of a
note command. Just put the symbol
\verb|^| for a sharp, \verb|_| for a flat, \verb|=|~for a natural,
\verb|>| for a double sharp, or \verb|<| for a double
flat, right before the letter or number representing the pitch.
For example, \verb|\qb{^g}| yields a
$G\sharp$. This may be used effectively in collective coding, e.g.
\verb|\qu{ac^d}|.

 There are two sizes of accidentals. By default they will be large unless there
is not enough space between notes, in which case they will be made small. Either
size can be forced locally by coding \keyindex{bigfl}, \keyindex{bigsh}, etc., or
\keyindex{smallfl}, \keyindex{smallsh}, etc. If you want all accidentals to
be large, then declare \keyindex{bigaccid} near the top of the input file. For
exclusively small ones use \keyindex{smallaccid}. \keyindex{varaccid} will restore
variable sizes.

 For editorial purposes, small accidentals can be placed \ital{above} note
heads. This is done using \keyindex{uppersh}\pitchp, \keyindex{upperna}\pitchp, or
\keyindex{upperfl}\pitchp:

\begin{music}\nostartrule
\startextract
\NOtes\uppersh l\qa l\enotes
\NOtes\upperna m\qa m\enotes
\NOtes\upperfl l\qa l\enotes
\zendextract
\end{music}
 It also possible to introduce \ital{\ixem{cautionary accidental}s},
i.e.\ small accidentals enclosed in parentheses. This done by preceding
the name of the accidental keyword with ``\verb|c|'',\label{cautionary}
 e.g.~\keyindex{cfl}\pitchp~for a cautionary flat.
 Available cautionary accidentals are \keyindex{csh}, \keyindex{cfl},
\keyindex{cna},
\keyindex{cdfl} and \keyindex{cdsh}, which give

\begin{music}\nostartrule
\startextract
\NOtes\csh g\qa g\enotes
\NOtes\cfl h\qa h\enotes
\NOtes\cna i\qa i\enotes
\NOtes\cdfl j\qa j\enotes
\NOtes\cdsh k\qa k\enotes
\zendextract
\end{music}
\noindent

The distance between all notes and accidentals is controlled by
\keyindex{accshift}\verb|=|\ital{any \TeX\ dimension}, where
positive values shift to the left and negative to right, with a
default value of \verb|0pt|.

 \section{Transposition and octaviation}\label{octaviation}
Two different subjects are discussed in this section. First, there
are commands that cause notes to be printed at different pitches than
entered. We shall refer to this as \ital{logical} transposition.
Second, there are notations for octaviation that do
not otherwise alter the appearance of the score, which we'll call
\ital{octaviation lines}.

\subsection{Logical transposition and octaviation}

Logical transposition is controlled by an integer-valued \TeX\ register
\keyindex{transpose}. Its default value is 0. If you enter
\verb|\transpose=|$n$, then all subsequent pitches specified by
letters will be transposed by $n$ positions. Normally this method would be
used to transpose an entire piece. Pitches specified with
numbers will not be affected, so if you think you will ever want to
transpose a piece, you should enter all note pitches with letters.

One way to transpose up or down by one octave would be to set
\keyindex{transpose} to 7 or $-7$. For example, to make a quarter note
octave as a chord, you could define a macro as
\verb|\def\soqu#1{\zq{#1}{\transpose=7 \qu{#1}}}|.
Note that because \verb|\transpose| is altered inside a pair of braces, the
effect of the alteration is only local and does not reach outside the braces.

 Another more convenient way to transpose locally up or down by one octave
makes use respectively of the characters
\verb|'| (\itxem{acute accent}) and \verb|`| (\itxem{grave accent}),
placed immediately before the letter specifying the pitch. So
for example \verb|\qu{'ab}| is equivalent to \verb|\qu{hi}| and
\verb|\qu{`kl}| is equivalent to \verb|\qu{de}|. These characters have
cumulative effects but in a somewhat restricted sense. They will alter the value of
\verb|\transpose|, but only until changing to a different staff or
instrument or encountering \verb|\enotes|, at which time it will be reset to the
value it had before the accents were used. (That value is stored in
another register called \keyindex{normaltranspose}). Thus for example
\verb|\qu{''A'A}| and \verb|\qu{''A}\qu{'A}|
are both equivalent to \verb|\qu{ah}|.

At any point it is possible to reset the \verb|\transpose| register
explicitly to the value it had
when entering \verb|\notes|, by prefacing a pitch indication with
``\verb|!|''. Thus \verb|\qu{!a'a}| always
gives the note \verb|a| and its upper octave \verb|h|, shifted by the
value of {\Bslash transpose} at the beginning of the current
\verb|\notes...\enotes| group, regardless of the number of grave and
acute accents occurring previously within that group.

 \subsection{Behavior of accidentals under logical transposition}\label{transposeaccids}
 The above processes indeed change the vertical position of the note heads
and associated symbols (e.g.~stems and beams), but they don't take
care of the necessary changes of accidentals when transposing. For example,
suppose an F$\sharp$ occurs in the key of C major. If the piece is
transposed up three steps to the key of F, the F$\sharp$ should logically
become a
B$\natural$. But if all you do is set \verb|\transpose=3|, the note will
be typeset as a B$\sharp$. In other words, \musixtex\ will interpret the~\verb|\sh|
or~\verb|^| to mean ``print a $\sharp$''.

Naturally there is a solution, but it requires the typesetter to plan
ahead: To force accidentals to behave well under transposition, they
must be entered according to the \ital{relative
accidental convention}. To alert \musixtex\ that you are using this
convention to enter notes, you must issue the command
\keyindex{relativeaccid}. Once you have done this, the meaning of
accidental macros and characters (accents) in the input file is changed.
Under the convention, when for example a
\verb|\sh| is entered, it indicates a note that is supposed to sound
\ital{one half step higher than what it would normally be under the
current key signature}. Flats and naturals on entry similarly indicate
notes one half step lower or at the same pitch as what the key signature
dictates. \musixtex\ will take account of the key signature, and print
the correct symbol according to the modern notational convention,
provided you have explicitly entered the transposed key signature using
for example \verb|\generalsignature|.

Many people have a difficult time understanding how this works, so
here are two simple examples in great detail. Consider the case already mentioned
of the F$\sharp$ in the key of C major. With
\verb|\relativeaccid| in effect, it should still be entered as \verb|\sh f|, and
with no transposition it will still appear as F$\sharp$. With
\verb|\transpose=3| and \verb|\generalsignature{-1}| it will appear
(correctly) as B$\natural$. Conversely, suppose you want to enter a
B$\natural$ when originally in the key of F. With \verb|\relativeaccid| in effect, it
should be entered as \verb|\sh i|. (That's the part that people
have the most trouble with: ``If I want a natural, why do I have to enter a sharp?'' Answer:
``Go back and re-read the previous paragraph very carefully.'') With no transposition, it will be
printed as B$\natural$. Now to transpose this to C major, set
\verb|\transpose=-3| and \verb|\generalsignature0|, and it will appear
as F$\sharp$.

If you have invoked \verb|\relativeaccid| and then
later for some reason wish to revert to the ordinary convention,
enter \keyindex{absoluteaccid}.

\subsection{Octaviation lines}
The first kind of notation for octave transposition covers a
horizontal range that must be specified at the outset. The sequence

\medskip
\begin{music}\nostartrule
\startextract
\NOTEs\octfinup{10}{3.5}\ql{!'a}\ql b\ql c\ql d\en
\zendextract
\end{music}
\noindent can be coded as
\verb|\NOTEs\octfinup{10}{3.5}\qu a\qu b\qu c\qu d\en|.
\zkeyindex{octfinup}
Here, the dashed line is at staff level 10 and extends 3.5\verb|\noteskip|.
Conversely, lower octaviation can be coded. For example

\begin{music}\nostartrule
\startextract
\NOTEs\octfindown{-5}{2.6}\ql j\ql i\ql h\en
\zendextract
\end{music}
\noindent is coded as
\verb|\NOTEs\octfindown{-5}{2.6}\ql j\ql i\ql h\en|.
\zkeyindex{octfindown}
 To change the text that is part of these notations, redefine one of
the macros \keyindex{octnumberup} or \keyindex{octnumberdown}. The reason for
the distinction between up and down is that, traditionally, upper octaviation
only uses the figure
``8'' to denote its beginning, while lower octaviation uses a more
elaborate indication such as \hbox{\ppffsixteen8$^{va}$ \it bassa}. Thus

\bigskip
\begin{music}\nostartrule
\startextract
\NOTEs\def\octnumberup{\ppffsixteen8$^{va}$}\octfinup{10}{2.5}\qu c\qu d\qu e\en
\zendextract
\end{music}
\noindent is coded

\noindent\verb|\NOTEs\def\octnumberup{\ppffsixteen8$^{va}$}\octfinup{10}{2.5}\qu c\qu d\qu e\en|

\noindent while

\begin{music}
\startextract
\NOTEs\def\octnumberdown{\ppffsixteen8$_{ba}$}\octfindown{-5}{2.5}\ql l\ql
k\ql j\en
\endextract
\end{music}
\noindent is coded as
\begin{quote}\begin{verbatim}
\NOTEs\def\octnumberdown{\ppffsixteen8$_{ba}$}%
  \octfindown{-5}{2.5}\ql l\ql k\ql j\en
\end{verbatim}\end{quote}

The foregoing constructions have the drawbacks that (a) the span must be
indicated ahead of time and (b) they cannot extend across a line break.
Both restrictions are removed with the use of the alternate macros \keyindex{Ioctfinup},
\keyindex{Ioctfindown} and
\keyindex{Toctfin}.

{\Bslash Ioctfinup}~$np$ indicate an upward octave transposition line with reference number
$n$ ($0\le n<6$) and with dashed line at pitch $p$. Usually $p$ will be numeric and $>9$,
but it can also be a letter.
{\Bslash Ioctfindown}~$np$ starts a lower octave transposition line at pitch $p$
(usually $p<-1$). Both extend until terminated with {\Bslash Toctfin}. The
difference between {\Bslash Ioctfinup}~$n$ and {\Bslash Ioctfindown}~$n$ is
the relative position of the figure ``8'' with respect to the dashed line, and
the sense of the terminating hook As shorthand, \keyindex{ioctfinup} is equivalent to
\verb|\Ioctfinup 0| and \keyindex{ioctfindown} is equivalent to
\verb|\Ioctfindown 0|.

For example,

\medskip
 \begin{music}\nostartrule
\instrumentnumber{1}
\setstaffs12
\setclef1{6000}
%
\startextract
\notes\wh{CDEFGH}|\wh{cde}\Ioctfinup 1p\wh{fgh}\enotes
\bar
\notes\Ioctfindown 2A\wh{IJKLMN}|\wh{ijklmn}\enotes
\bar
\Notes\wh{NMLKJI}|\wh{nmlkji}\Toctfin1\enotes
\bar
\Notes\wh{HGFED}\Toctfin2\wh C|\wh{hgfedc}\enotes
\zendextract
\end{music}
\noindent is coded as
\begin{quote}\begin{verbatim}
\begin{music}\nostartrule
\instrumentnumber{1}
\setstaffs12
\setclef1{6000}
%
\startextract
\notes\wh{CDEFGH}|\wh{cde}\Ioctfinup 1p\wh{fgh}\enotes
\bar
\notes\Ioctfindown 2A\wh{IJKLMN}|\wh{ijklmn}\enotes
\bar
\Notes\wh{NMLKJI}|\wh{nmlkji}\Toctfin1\enotes
\bar
\Notes\wh{HGFED}\Toctfin2\wh C|\wh{hgfedc}\enotes
\zendextract
\end{music}
\end{verbatim}\end{quote}
 %\check

 The elevation of octaviation lines may be changed in midstream using
\keyindex{Liftoctline}~$n$$p$, where $n$ is the reference number of the
 octave line, and $p$ a (possibly negative) number of
\keyindex{internote}s (staff pitch positions) by which elevation of the dashed line should be changed.
This may be useful when octaviation lines extend over several systems and the
elevation needs to be changed in a systems after the one where it was initiated.


\section{Slurs and ties}
Two fundamentally different implementations of slurs, ties, and hairpins are
available. (The hairpins ``go along for the ride'' with slurs and ties.) First, there are the
original \ital{font-based} versions. These are constructed with traditional
\TeX\ font characters that were created with \MF\ and stored in \TeX\ font files.
Second, it is now possible
to generate these shapes directly with postscript, dispensing altogether with
the font characters\footnote{Please do not be confused by the availability of
postscript versions of the font-based slur fonts (along with all other \musixtex\ fonts).
Once installed in a \TeX\ system,
their function and use are 100\% transparently identical with bitmapped versions
of the slur fonts. On the other
hand, postscript slurs are functionally distinct from font-based slurs, and only
 share some of the same syntax.}. We shall first describe the font-based versions,
then Type K postscript slurs, which are one of two available postscript slur
options\footnote{An
alternate approach to postscript slurs, called {\it Type M} after its developer
Hiroaki {\sc Morimoto}, is available from the
\href{http://icking-music-archive.org/software/indexmt6.html}
{\underline{Icking Music Archive}}.}. If you plan to use Type K postscript slurs,
you may skip directly to section~\ref{PostscriptSlurs}.

 \subsection{Font-based slurs}

Font-based slurs and ties provided by \musixtex\ can be divided into two categories:
\label{simpleslur}
\begin{itemize}\setlength{\itemsep}{0ex}
   \item Those where the complete slur symbol is composed of a single
   character from one of the slur fonts, and
   \item those where the slur symbol is composed of three distinct
   characters, to form the beginning, middle and end of the slur.
\end{itemize}

The former are called \ital{simple slurs} and the latter,
\ital{compound slurs}. In many cases the distinction between the two is
invisible to the user, in that many of the macros described below will
automatically select between the two types. However, there are other macros
that allow simple slurs to be forced.

The next few subsections describe the usual method of slur coding, where the
choice between simple or compound slurs is made automatically.
In this case, slurs are initiated and terminated by separate macros,
similar to beams.

 \subsubsection{Font-based slur initiation}
A slur must be initiated \ital{before}
the spacing note on which the slur begins, and terminated \ital{before} the
note on which it ends. The basic slur initiation macro is
\keyindex{isluru}\enpee, which initiates an upper slur, with reference
number $n$, beginning on a note at pitch $p$. The starting point of the slur is
centered above a virtual quarter note head at pitch
$p$\footnote{The slur will start in the same place regardless of whether there is
{\it actually} a note at pitch $p$.}.
As with beams, the reference number $n$ can take values from 0 to 5, or
up to 8 or 11 respectively if \ttxem{musixadd.tex} or \ttxem{musixmad.tex} is included.
Similarly, \keyindex{islurd}\enpee\ initiates a lower slur.
These slurs are terminated by coding
\keyindex{tslur}\enpee\ where $n$ is the reference number and $p$ is the
termination pitch. To illustrate with an elementary example, the following
passage

\begin{music}\nostartrule
\startextract
\NOtes\islurd0g\qu g\tslur0{'c}\qu c\en
\Notes\isluru0{'e}\ibl0e{-2}\qb0{edc}\tslur0b\tqb0b\en
\bar
\NOtes\islurd0{'a}\qu a\tslur0{`f}\qu f\en
\NOTes\hu g\en
\zendextract
\end{music}

\noindent was coded as:
\begin{quote}\begin{verbatim}
\NOtes\islurd0g\qu g\tslur0{'c}\qu c\en
\Notes\isluru0{'e}\ibl0e{-2}\qb0{edc}\tslur0b\tqb0b\en
\bar
\NOtes\islurd0{'a}\qu a\tslur0{`f}\qu f\en
\NOTes\hu g\en
\end{verbatim}\end{quote}

Other macros are provided to change the starting and ending point of the slur
in relation to the initial and final notes. Thus, \keyindex{issluru}\enpee\
initiates a ``short'' upper slur suitable for linking notes involved in chords.
The
starting point is shifted to the right, and is vertically aligned with the
center of a virtual quarter note head at pitch $p$. If a lower short slur
is wanted, one should use \keyindex{isslurd}\enpee.

Sometimes, busy scores call for slurs which are vertically aligned with the
ends of note stems rather than note heads. These ``beam'' slurs---so called
because the slur is written at usual beam height---are provided by the
macros \keyindex{ibsluru}\enpee\ and \keyindex{ibslurd}\enpee. These macros
initiate slurs raised or lowered by the current stem height to accommodate
stems or beams above or below.
 %\check

 \subsubsection{Font-based slur termination}
Font-based slurs that are not forced to be simple must be terminated by an explicit
command right before the last note under the slur. There are termination
commands analogous to each of the initiation commands alread presented. They
are summarized in the following table:
\begin{center}
  \begin{tabular}{ll}
    Initiation                             &   Termination \\
    \hline
    \keyindex{isluru},  \keyindex{islurd}  & \keyindex{tslur}  \\
    \keyindex{issluru}, \keyindex{isslurd} & \keyindex{tsslur} \\
    \keyindex{ibsluru}                     & \keyindex{tbsluru}\\
    \keyindex{ibslurd}                     & \keyindex{tbslurd}\\
    \hline
  \end{tabular} \end{center}

\noindent All of these command have two parameters, $n$ and $p$.

These specific termination macros are not restricted to being used with their
initiation counterpart. A slur
started in one sense can be terminated in another. For example, a slur beginning
as a ``beam'' slur may be terminated as a normal slur. This would be achieved
using the macro pair \verb|\ibslur...\tslur|.

 \subsubsection{Font-based ties} Font-based ties will have the same shapes as
ordinary font-based slurs of the same length between notes of equal pitch,
but there are two important distinctions:
(1) There cannot be any pitch difference between start and end, and (2) the
positions of both the beginning and end of a tie relative to the note heads
are slightly different from those of an ordinary slur\footnote{Editor's note: In
fact, it appears that the default positioning of the ends of ties is exactly
the same as that of short slurs.}.
Upper ties are initiated by \keyindex{itieu}\enpee, which starts an upper tie of
reference number $n$ at pitch $p$.
Lower ties are initiated by \keyindex{itied}\enpee, which starts an lower tie of
reference number $n$ at pitch $p$. The starting position of the tie is the same
as \verb|\issluru| and
\verb|\isslurd| respectively. The tie is terminated by coding
\keyindex{ttie}\onen. Note that no pitch parameter is required.

There are also \ital{short ties}, which bear the same relation to ordinary
ties as short slurs to ordinary slurs. They are intended to be used between chords.
They are initiated with
\keyindex{itenu}\enpee~or \keyindex{itenl}\enpee\footnote{Editor's note: It is
not clear why this command uses ``{\tt l}'' when all other similar ones use
``{\tt d}''.}, and terminated with \keyindex{tten}\onen.

The following example illustrates the differences in positioning of the various
slur and tie options:

\begin{music}\nostartrule
\startextract
\NOTes\islurd0g\qu g\tslur0g\qu g\isslurd0g\qu g\tsslur0g\qu g%
\ibsluru0g\qu g\tbsluru0g\qu g\itied0g\qu g\ttie0\qu g%
\itenl0g\qu g\tten0\qu g\en
\zendextract
\end{music}
\noindent It was coded as
\begin{quote}\begin{verbatim}
\NOTes\islurd0g\qu g\tslur0g\qu g\isslurd0g\qu g\tsslur0g\qu g%
\ibsluru0g\qu g\tbsluru0g\qu g\itied0g\qu g\ttie0\qu g%
\itenl0g\qu g\tten0\qu g\en
\end{verbatim}\end{quote}

\noindent Here are some more general examples of font-based slurs and ties
discussed so far:

\begin{music}\nostartrule
\startextract
\NOTes\isluru0g\hl g\tslur0h\hl h\en
\NOTes\islurd0c\issluru1g\zh{ce}\hu g\tslur0d\tsslur1h\zh{df}\hu h\en
\NOTes\ibsluru0g\islurd1g\hu g\tubslur0h\hu h\en
\NOTes\itieu0k\hl k\ttie0\tdbslur1f\hl k\en
\zendextract
\end{music}
\noindent This was coded as:
\begin{quote}\begin{verbatim}
\NOTes\isluru0g\hl g\tslur0h\hl h\en
\NOTes\islurd0c\issluru1g\zh{ce}\hu g\tslur0d\tsslur1h\zh{df}\hu h\en
\NOTes\ibsluru0g\islurd1g\hu g\tubslur0h\hu h\en
\NOTes\itieu0k\hl k\ttie0\tdbslur1f\hl k\en
\end{verbatim}\end{quote}

\subsubsection{Dotted slurs}

Any font-based slur may be made dotted by specifying \keyindex{dotted}
just before it is initiated:

\begin{music}\nostartrule
\startextract
\NOtes\dotted\islurd0g\qu g\tslur0{'c}\qu c\en
\Notes\dotted\isluru0{'e}\ibl0e{-2}\qb0{edc}\tslur0b\tqb0b\en\bar
\NOtes\dotted\slur{'a}{`f}d1\qu{'a`f}\en
\NOTes\hu g\en
\zendextract
\end{music}

\noindent This was coded as:
\begin{quote}\begin{verbatim}
\NOtes\dotted\islurd0g\qu g\tslur0{'c}\qu c\en
\Notes\dotted\isluru0{'e}\ibl0e{-2}\qb0{edc}\tslur0b\tqb0b\en\bar
\NOtes\dotted\slur{'a}{`f}d1\qu{'a`f}\en
\NOTes\hu g\en
\end{verbatim}\end{quote}

 \subsubsection{Modifying font-based slur properties}
Several macros are provided to modify the shape of slurs already initiated.
These macros must be coded right before the slur \ital{termination}. Invoking
any of the macros described in this section will force the slur to be compound.

By default, the midpoint of a font-based slur is three \verb|\internote|s
above or below a line between its ends. This can be changed using the macro
\keyindex{midslur}~$h$ where $h$ is the revised vertical displacement. For
example, \verb|\midslur6| coded right before \verb|\tslur| causes an upper slur to
rise to a maximum height of \verb|6\internote| above the starting position.
For example,

\begin{music}\nostartrule
\startextract
\NOtes\multnoteskip8\isluru0g\ql g\en
\notes\tslur0g\ql g\en
\zendextract
\startextract
\NOtes\multnoteskip8\isluru0g\ql g\en
\notes\midslur7\tslur0g\ql g\en
\zendextract
\startextract
\NOtes\multnoteskip8\isluru2g\ql g\en
\notes\midslur{11}\tslur2g\ql g\en
\zendextract
\end{music}
\noindent was coded as
\begin{quote}\begin{verbatim}
\NOtes\multnoteskip8\isluru0g\ql g\en
\notes\tslur0g\ql g\en
\NOtes\multnoteskip8\isluru0g\ql g\en
\notes\midslur7\tslur0g\ql g\en
\NOtes\multnoteskip8\isluru2g\ql g\en
\notes\midslur{11}\tslur2g\ql g\en
\end{verbatim}\end{quote}

The macro \keyindex{curve}$hij$ allows more precise control over the shape
of a slur or tie. The first parameter $h$
is the vertical deviation and it works exactly like the sole parameter of
\verb|\midslur| described above. The second and
third parameters $i$ and $j$ set the initial and final gradient respectively.
They are defined as the horizontal distance required to attain maximum
vertical deviation. Thus smaller numbers for $i$
and $j$ lead to more extreme gradients.
The default setting is \verb|\curve344|. Hence, coding \verb|\curve322|
doubles the initial and final gradient relative to the default.
As with \verb|\midslur|, \verb|\curve| must be coded {\em immediately} before
the slur termination. The example below illustrates the use of \verb|\curve|.

\begin{music}\nostartrule
\startextract
\NOtes\multnoteskip8\itieu0g\ql g\en
\notes\ttie0\ql g\en
\zendextract
\startextract
\NOtes\multnoteskip8\itieu1g\ql g\en
\notes\curve 322\ttie1\ql g\en
\zendextract
\startextract
\NOtes\multnoteskip8\itieu2g\ql g\en
\notes\curve 111\ttie2\ql g\en
\zendextract
\end{music}
\noindent This was coded as
\begin{quote}\begin{verbatim}
\NOtes\multnoteskip8\itieu0g\ql g\en
\notes\ttie0\ql g\en
\zendextract
\startextract
\NOtes\multnoteskip8\itieu1g\ql g\en
\notes\curve 322\ttie1\ql g\en
\zendextract
\startextract
\NOtes\multnoteskip8\itieu2g\ql g\en
\notes\curve 111\ttie2\ql g\en
\end{verbatim}\end{quote}

Two macros are provided to control the behaviour of slurs which extend across
line breaks. Normally, the part of the slur before the line break is
treated as a tie.  This can be changed using \keyindex{breakslur}\enpee,
which sets the termination height of
the broken slur at the line break to pitch $p$, for slur number $n$.

After the line break, the slur is normally resumed at the initial pitch
reference, i.e., the one coded in \verb|\islur|. To change this, the macro
\keyindex{Liftslur}\verb|{|$n$\verb|}{|$h$\verb|}| may be used.
Here $n$ is again the slur reference
number and $h$ is the change in height relative to the initialization height.
This macro is normally used following line breaks, in which case it is best
coded using the \verb|\atnextline| macro. For example, coding
\verb|\def\atnextline{\Liftslur06}| raises the continuation of slur zero
by \verb|6\internote| relative to its initialization height.

The following example illustrates the use of the macros for broken slurs:

\begin{minipage}[t]{75mm}
Default, without adjustments:\\
\begin{music}
\hsize=50mm
\generalmeter{\meterfrac24}%
\parindent 0pt\staffbotmarg0pt%
%
%\interstaff{14\internote}%
%
\startpiece\bigaccid
\Notes\ibsluru1b\qu b\qu g\en\bar
\Notes\qu{'c!}\tslur1f\qu f\en
\mulooseness1\Endpiece
\end{music}
\begin{verbatim}
\Notes\ibsluru1b\qu b\qu g\en\bar
\Notes\qu{'c!}\tslur1f\qu f\en
\end{verbatim}
\end{minipage}%
\begin{minipage}[t]{75mm}
With~\verb|\Liftslur|~and~\verb|\breakslur|~:\\
\begin{music}
\hsize=50mm
\generalmeter{\meterfrac24}%
\parindent 0pt\staffbotmarg0pt%
%
%\interstaff{14\internote}%
%
\startpiece\bigaccid
\def\atnextline{\Liftslur17}%
\Notes\ibsluru1b\qu b\qu g\breakslur1g\en\bar
\Notes\qu{'c!}\tslur1f\qu f\en
\mulooseness1\Endpiece
\end{music}
\begin{verbatim}
\def\atnextline{\Liftslur17}%
\Notes\ibsluru1b\qu b\qu g%
\breakslur1g\en\bar
\Notes\qu{'c!}\tslur1f\qu f\en
\end{verbatim}
\end{minipage}\medskip

Occasionally in keyboard works one needs to begin a slur in one
staff but end it in another. This can be done using the macro
\keyindex{invertslur}\onen\ which is best described by
reference to the example
shown below.

% Finding the final pitch is try and error, sorry, no way out.

\begin{music}
\setstaffs1{2}
\setclef1\bass\interstaff{10.5}
\startextract
\NOtes\multnoteskip5\isluru0a\ql a\en
\notes\invertslur0\curve311\tslur0j|\qu d\en
\NOtes\multnoteskip{10}\isluru0a\ql a\en
\notes\invertslur0\curve333\tslur0j|\qu d\en
\zendextract
\end{music}
\noindent This was coded as
\begin{quote}\begin{verbatim}
\NOtes\multnoteskip5\isluru0a\ql a\en
\notes\invertslur0\curve311\tslur0g|\qu d\en
\NOtes\multnoteskip{10}\isluru0a\ql a\en
\notes\invertslur0\curve333\tslur0g|\qu d\en
\end{verbatim}\end{quote}

\noindent Slur inversion as just described takes effect where the slope is zero; therefore it
only works with ascending slurs that were started with \verb|\isluru|, and with
descending slurs started with \verb|\islurd|. Otherwise no horizontal place
can be found and the result is erratic.

A different approach removes this restriction. The idea is to stop the slur at a
the desired inversion point and restart it in the other sense at the
same place. The commands to do this are as follows:
 \begin{itemize}\setlength{\itemsep}{0ex}
 \item \keyindex{Tslurbreak}\enpee~stops slur number $n$ \ital{exactly} at pitch $p$,
not above or below the virtual note head.
 \item \keyindex{Islurubreak}\enpee~restarts an upper slur at the same position,
not above a virtual note head.
 \item \keyindex{Islurdbreak}\enpee~restarts a lower slur at the same position,
not below a virtual note head.
 \end{itemize}

\noindent The vertical position may have to be adjusted to minimize any discontinuity
in the slope. For example, the following pattern

 \begin{music}\nostartrule
\setclef1\treble
\startextract
\NOTes\multnoteskip 3\isluru0a\ql a\en
\NOTes\multnoteskip 3\Tslurbreak0d\Islurdbreak0d\sk\en
\Notes\tslur0h\qu h\en
\NOTes\multnoteskip 3\islurd0a\ql a\en
\NOTes\multnoteskip 3\Tslurbreak0d\Islurubreak0d\sk\en
\Notes\tslur0h\qu h\en
\zendextract
\end{music}
\noindent was coded as
\begin{quote}\begin{verbatim}
\begin{music}\nostartrule
\NOTes\multnoteskip 3\isluru0a\ql a\en
\NOTes\multnoteskip 3\Tslurbreak0d\Islurdbreak0d\sk\en
\Notes\tslur0h\qu h\en
\NOTes\multnoteskip 3\islurd0a\ql a\en
\NOTes\multnoteskip 3\Tslurbreak0d\Islurubreak0d\sk\en
\Notes\tslur0h\qu h\en
\end{music}
\end{verbatim}\end{quote}

\ital{Simple} slurs and ties have advantages in some cases: (1) They will
always have the best possible shape, and (2) if \verb|\noteskip| doesn't
change from start to finish, they are easier to code. But they have drawbacks
as well: (1) They are limited in length to 68pt
for slurs and 220pt for
ties, (2) their maximum vertical extent is \verb|8\internote|, and (3) they
may not extend across a line break.
Despite all these limitations, simple slurs are extremely useful in many
applications where the slurs are short and contained within a bar.

Simple slurs must be coded {\em before} the note on which the slur begins.
The primary macro is
\keyindex{slur}\verb|{|$p_1$\verb|}{|$p_2$\verb|}|$sl$
where $p_1$ and $p_2$ are respectively the initial and final pitches,
$s$ is the sense (either ``{\tt u}'' or ``{\tt d}''), and $l$ is the length,
in {\tt noteskip}s.
Thus, thirds slured in pairs can be coded

 %\check

\begin{quote}\begin{verbatim}
\NOtes\slur ced1\qu{ce}\en
\NOtes\slur dfd1\qu{df}\en
\NOtes\slur egd1\qu{eg}\en
\NOtes\slur{'e}cu1\ql{ec}\en
\NOtes\slur{'d}bu1\ql{db}\en
\NOtes\slur{'c}au1\ql{ca}\en
\end{verbatim}\end{quote}
which yields

\begin{music}\nostartrule
\startextract
\NOtes\slur ced1\qu{ce}\en
\NOtes\slur dfd1\qu{df}\en
\NOtes\slur egd1\qu{eg}\en
\NOtes\slur{'e}cu1\ql{ec}\en
\NOtes\slur{'d}bu1\ql{db}\en
\NOtes\slur{'c}au1\ql{ca}\en
\zendextract
\end{music}
%%

There are similar commands to force simple versions of the other
variants of font-based slurs and ties. Simple ties may be set using
\keyindex{tie}\verb|{|$p$\verb|}|$sl$ (only one pitch is needed).
Simple short slurs and short ties can be forced with the macros
\keyindex{sslur}\verb|{|$p_1$\verb|}{|$p_2$\verb|}|$sl$ and
\keyindex{stie}\verb|{|$p$\verb|}|$sl$ respectively. Finally,
simple beam slurs can be forced with
\keyindex{bslur}$s$\verb|{|$p_1$\verb|}{|$p_2$\verb|}|$l$.

 \subsubsection{Limitations of font-based slurs}
  The change in altitude between slur initiation and slur termination is limited to
16\verb|\Internote|. Thus unexpected vertical gaps can appear, as seen in

 \begin{music}\nostartrule
\instrumentnumber{1}
\generalmeter{\meterfrac34}
\startextract\NOTes\multnoteskip3\isluru0c\ql c\tslur0j\ql j\enotes
  \bar\NOTes\multnoteskip3\isluru0c\ql c\tslur0n\ql n\enotes\zendextract

\startextract\NOTes\multnoteskip3\isluru0c\ql c\tslur0s\ql s\enotes
  \bar\NOTes\multnoteskip3\isluru0c\ql c\tslur0z\ql z\enotes\zendextract
 \end{music}
 \noindent whose coding was
 \begin{quote}\begin{verbatim}
\NOTes\multnoteskip3\isluru0c\ql c\tslur0j\ql j\enotes
  \bar\NOTes\multnoteskip3\isluru0c\ql c\tslur0n\ql n\enotes
\NOTes\multnoteskip3\isluru0c\ql c\tslur0s\ql s\enotes
  \bar\NOTes\multnoteskip3\isluru0c\ql c\tslur0z\ql z\enotes
 \end{music}
 \end{verbatim}\end{quote}

Furthermore, if the slope becomes too steep, even worse results can occur, such as

 \begin{music}\nostartrule
\instrumentnumber{1}
\generalmeter{\meterfrac34}
\startextract\NOTes\isluru0c\ql c\enotes\notes\tslur0j\ql j\enotes
  \bar\NOTes\isluru0c\ql c\enotes\notes\tslur0n\ql n\enotes
 \NOTes\isluru0c\ql c\enotes\notes\tslur0s\ql s\enotes
 \bar\NOTes\isluru0c\ql c\enotes\notes\tslur0z\ql z\enotes
 \zendextract
 \end{music}

Another limitation of font-based slurs crops up when one attempts to
generate bitmapped versions for high-resolution printers: the characters
for long ties can exceed \MF's maximum capacity.

 \subsection{Type K postscript slurs}\label{PostscriptSlurs}
All of the aforementioned limitations of font-based slurs can be circumvented
by using Type~K postscript slurs\footnote{``K'' stands for Stanislav Kneifl,
the developer of the Type K postscript slur package.}. As well as slurs, the package includes
ties and crescendos (see section \ref{sec:crescnd}).
Its use is very similar to font-based slurs, and in fact identical if only
the elementary slur and tie initiation and termination macros are used.

In order to use Type K postscript slurs, you must first place \texttt{musixps.tex}
anywhere \TeX\ can find it. You must also place \texttt{psslurs.pro}
somewhere that \texttt{dvips} can find it.

The \index{mxsk font}\texttt{mxsk} font is required for ``half ties,'' which
are special symbols that are used by default for the second portion of a tie
that crosses a line break. If you like
this treatment you must install the font in your \TeX\ system. However, perfectly
acceptable line-breaking ties will appear if you invoke \keyindex{nohalfties},
and then you will not have to install this font.

Once the software mentioned in the prior two paragraphs is emplaced and the
\TeX\ filename database is refreshed, the Type K package can be
invoked by including the command \verb|\input musixps|
near the beginning of your source file.
The resulting dvi file should then be converted into postscript using \textbf{dvips}.
If desired, a PDF file can then be generated with \textbf{ps2pdf}, \textbf{ghostscript},
\textbf{Adobe Acrobat} (see chapter \ref{installation} for more information on this).

Two minor inconveniences with Type K postscript slurs are that (1) they won't appear
in any standard dvi previewer, and (2) they won't appear in PDF files generated with
\textbf{pdftex}. The former limitation can be circumvented by using a postscript
viewer such as \textbf{GSview}. The latter simply requires that you create an intermediate
postscript file with \textbf{dvips}, then make the PDF with any of the software
mentioned above.

\subsubsection{Initiating and terminating type K postscript slurs}

Basic usage of type K slurs is the same as for font-based slurs. To initiate one,
use for example \verb|\isluru0g| to start an upper slur with ID 0 above a virtual note
at pitch level {\tt g}. To terminate one, use a command like
\verb|\tslur0i| which terminates the slur with ID 0 on a
virtual note at pitch level {\tt i}.
Both types of commands are non-spacing and must precede the first or last
note under the slur.

You can shift the starting or ending point slightly to the left
or right by substituting one of the commands \keyindex{ilsluru},
\keyindex{ilslurd}, \keyindex{irsluru},
\keyindex{irslurd}, \keyindex{trslur} or \keyindex{tlslur}.

You can control the shape of Type K slurs with variants of
the termination command. To make the slur a bit flatter than default use
\keyindex{tfslur}0f; a bit higher, \keyindex{thslur}0f; higher still,
\keyindex{tHslur}0f;  or
even higher, \keyindex{tHHslur}0f.  These commands have an effect like
\keyindex{midslur} does for font-based slurs.

All combinations of the shifting and curvature variants are allowed,
e.g.\ \verb|\trHHslur|.

The following examples demonstrate how much better the type K slurs perform
in the extreme situations of the prior two typeset examples. The coding is
exactly the same as above except that \verb|\input musixps| has been added:
\begin{quote}\begin{verbatim}
\begin{music}\nostartrule
\input musixps
\startextract\NOTes\multnoteskip3\isluru0c\ql c\tslur0s\ql s\enotes
....
\end{verbatim}\end{quote}

%\begin{center}
%\includegraphics[scale=1]{./mxdexamples/pslurvgap.eps}
%\end{center}

\begin{music}\nostartrule
\input musixps
\instrumentnumber{1}
\generalmeter{\meterfrac34}
\startextract\NOTes\multnoteskip3\isluru0c\ql c\tslur0j\ql j\enotes
  \bar\NOTes\multnoteskip3\isluru0c\ql c\tslur0n\ql n\enotes\zendextract

\startextract\NOTes\multnoteskip3\isluru0c\ql c\tslur0s\ql s\enotes
  \bar\NOTes\multnoteskip3\isluru0c\ql c\tslur0z\ql z\enotes\zendextract
% \end{music}

%\begin{music}\nostartrule
%\input smallmusixpsx
%\instrumentnumber{1}
%\generalmeter{\meterfrac34}
\startextract
\NOTes\isluru0c\ql c\enotes\notes\tslur0j\ql j\enotes\bar
\NOTes\isluru0c\ql c\enotes\notes\tslur0n\ql n\enotes
\NOTes\isluru0c\ql c\enotes\notes\tslur0s\ql s\enotes\bar
\NOTes\isluru0c\ql c\enotes\notes\tslur0z\ql z\enotes
\zendextract
 \end{music}


For maximal control over type K slurs, you can use one of the commands
\keyindex{iSlur}~$npvh$ and
\keyindex{tSlur}~$npvhca$, where the characters in
$npvhca$ respectively stand for ID number, height, vertical offset, horizontal offset,
curvature, and angularity.
All offsets are in \verb|internote|, and the slur direction is determined
by the sign of the vertical offset. See the comments in \verb|musixps.tex|
for precise definitions of the other parameters. Examples of permissible forms for
these commands are
\verb|iSlur0c11| and \verb|tSlur0{!d}11{.2}0|.

The next example shows how you can use \verb|iSlur| in difficult
circumstances:

\begin{music}\nostartrule
\input musixps
\nobarnumbers
\generalsignature1%
\generalmeter{\meterfrac{2}{4}}%
\nostartrule
\startextract
\NOtes\zchar{-8}{\Bslash irslur...\Bslash tlslur}\irslurd0{'b}\zhl b\sk\zq{!e}\qu{'c}\en\bar
\NOtes\zh{'d}\zhu{`f}\off{7.2pt}\tlslur0{'b}\ql b\ql b\en\bar
%
\NOtes\zchar{-8}{\Bslash irslur...\Bslash tlfslur}\irslurd0{'b}\zhl b\sk\zq{!e}\qu{'c}\en\bar
\NOtes\zh{'d}\zhu{`f}\off{7.2pt}\tlfslur0{'b}\ql b\ql b\en\bar
%
\NOtes\zchar{-8}{\Bslash iSlur...\Bslash tSlur}\iSlur0{'b}{-.5}3\zhl b\sk\zq{!e}\qu{'c}\en\bar
\NOtes\zh{'d}\zhu{`f}\off{7.2pt}\tSlur0{'b}{.5}{-1}{.3}0\ql b\ql b\en
\zendextract
 \end{music}
\noindent with this coding:

\begin{quote}\begin{verbatim}
\NOtes\irslurd0{'b}\zhl b\sk\zq{!e}\qu{'c}\en\bar
\NOtes\zh{'d}\zhu{`f}\off{7.2pt}\tlslur0{'b}\ql b\ql b\en\bar
%
\NOtes\irslurd0{'b}\zhl b\sk\zq{!e}\qu{'c}\en\bar
\NOtes\zh{'d}\zhu{`f}\off{7.2pt}\tlfslur0{'b}\ql b\ql b\en\bar
%
\NOtes\iSlur0{'b}{-.5}3\zhl b\sk\zq{!e}\qu{'c}\en\bar
\NOtes\zh{'d}\zhu{`f}\off{7.2pt}\tSlur0{'b}{.5}{-1}{.3}0\ql b\ql b\en
\end{verbatim}\end{quote}


The ID number for a slur, tie or crescendo should
normally range from 0 to 9. If it is bigger
than nine but less than 15,
the object can cross a line break but not a page break. If bigger than
14 but less than $2^{31}$, it can't be broken at all,
        nor can a slur termination be positioned at a beam with
        e.g.~\verb|\tbsluru{17684}{16}|; however \verb|\ibsluru{152867}{16}| is OK.

It's also OK to have opened simultaneously a slur, tie and crescendo all
with the same ID, or a slur, tie and decrescendo, but not a crescendo and
decrescendo.

\def\emen{{\tt\char123}$n${\tt\char125\char123}$m${\tt\char125}}

\subsubsection{Type K postscript beam slurs}
Type K beam slurs are defined differently than the font-based ones:
They require as parameters both a slur ID number $n$ and a beam ID number $m$,
but that's all. The commands are
\keyindex{iBsluru}\emen, \keyindex{iBslurd}\emen, and
\keyindex{tBslur}\emen.
They must be placed \ital{after} the beam initiation or termination command.
Type K slurs may start on one beam and end on another.
For example,

\begin{quote}\begin{verbatim}
\Notes\ibu0i0\iBsluru00\qb0{eh}\tbu0\qb0i\ibu0j0\qb0{jl}\tbu0%
 \slurtext{6}\tBslur00\qb0e\en
\end{verbatim}\end{quote}

\noindent produces
%\begin{center}
%\includegraphics[scale=1]{./mxdexamples/psbeamslur.eps}
%\end{center}

\begin{music}\nostartrule\input musixps\startextract
\Notes\ibu0i0\iBsluru00\qb0{eh}\tbu0\qb0i\ibu0j0\qb0{jl}\tbu0%
 \slurtext{6}\tBslur00\qb0e\en
\zendextract\end{music}

The above example also illustrates the use of the macro
\keyindex{slurtext}. It has just one parameter---some text to be
printed---and it centers it just above or below the midpoint of
the next slur that is closed.
This works only for non-breaking slurs; if the slur is broken,
the text
disappears\footnote{If you insist on viewing files with a dvi viewer despite the
fact that Type K slurs will not be visible, you may also find that
figures emplaced with \keyindex{slurtext} will appear at the end of the
slur rather than the middle.}.
%The placing of the slur text is done with a very dirty postscript
%hack, so I am not really sure that everything you want to typeset
%will be placed at the correct position (if you are interested, see
%the end of psslurs.pro for details). If you find something that won't
%work, let me know.

% DAS: why do we need this ???
%\paragraph{General coding for postscript slurs and ties of type K.}
%This can be done by:
%\begin{quote}\begin{verbatim}
%\i[h.shift]slur[u|d]{slur ID}{note height}
%\t[h.shift][slur height]slur{slur ID}{note height}
%\iBslur[u|d]{slur ID}{beam ID}
%\tB[slur.height]slur{slur ID}{beam ID}
%\end{verbatim}\end{quote}
%\noindent where h.shift can be 'l', 'r' or nothing
%and slur.height can be 'f', nothing, 'h', 'H' or 'HH'
%
%Example: \keyindex{tlfslur} means 'terminate left flat slur'.
%
%
%There are also simple slurs with same invocation and parameters as the
%original ones.

\subsubsection{Type K postscript ties}
All of the foregoing Type K slur commands have counterparts for ties. Simply
replace ``\verb|slur|'' with ``\verb|tie|'', and for terminations omit
the pitch parameter. Type K ties not only are positioned differently by
default, but they also have different shapes than slurs.

\subsubsection{Dotted type K slurs and ties.}%please check the capital D(otted)
A slur or tie can be made dotted simply by entering \keyindex{dotted} anywhere before
the beginning of the slur or tie. Only the first slur or tie following this
command will be affected. On the other hand, if you enter \keyindex{Dotted}, then ALL
slurs and ties from this point forward will be dotted until you say
\keyindex{Solid}. Furthermore, inside \verb|\Dotted...\Solid| you can make any individual
slur or tie solid saying \verb|\solid| before its beginning.

\subsubsection{Avoiding collisions of Type K slurs and ties with staff lines.}
In postscript it is possible to do some computations which would be very hard
to implement directly in TeX. Type K slurs can use this facility to check whether
the curve of a slur or tie is anywhere nearly tangent to any staff line, and if
so, to adjust
the altitude of the curve to avoid the collision. By default this feature is turned
on.
You can disable it either
globally (\keyindex{Nosluradjust}, \keyindex{Notieadjust}) or locally
(\keyindex{nosluradjust}, \keyindex{notieadjust}), and you can also turn it
back on globally (\keyindex{Sluradjust},
\keyindex{Tieadjust}) or locally (\keyindex{sluradjust}, \keyindex{tieadjust}).
Here ``locally''
means that the command will only affect the next slur or tie to be opened.


\subsubsection{Line breaking slurs and ties}
Tyle K slurs and ties (and crescendos) going across line breaks are handled
automatically. In fact they can go over more lines than two (this is
true also for ties, though it would be somewhat strange).

There is a switch \verb|\ifslopebrkslurs| that controls the default
height of the end point
of the first segment of all broken slurs. By default the height will be
the same as the beginning. To have it raised by \verb|3\internote|, simply
issue the command \keyindex{slopebrkslurstrue}. To revert to the default,
use \keyindex{slopebrkslursfalse}.

To locally override the default height of the end of the first segment,
use the command \keyindex{breakslur}\enpee,
which sets the height for slur number $n$ to pitch $p$, just like with
font-based slurs.

You can raise or lower the starting point of the second segment of a broken slur
with the command \keyindex{liftslur}\verb|{|$n$\verb|}{|$h$\verb|}|, with
parameters slur ID and relative offset in
\verb|\internote|s measured from the slur beginning. Its effect is
the same as \keyindex{Liftslur} for font-based slurs, except it is not
necessary to code
it within \verb|\atnextstaff{}|, just anywhere inside the slur.

As already mentioned, anything with ID$<$10 is broken fully automatically, but
you should be careful about slurs, ties and crescendos with 10$\le$ID$<$15.
These cannot cross page breaks, although they can cross line breaks.

If the second segment of a broken tie is less than 15pt long, then by
default it will have a special shape which begins horizontally. These shapes are
called \ital{half ties} and are contained in the font \index{mxsk font}\verb|mxsk|.
Of course if they are to be used, the font files must be integrated into the
\TeX\ installation. Their use can be turned off with \keyindex{nohalfties}
and back on with \keyindex{halfties}.

%\paragraph{Backwards compatibility.}
%There are several ``aliases'' which allow to use the old, bitmapped slur
%commands for PS slurs without any change. There are however a few differences:
%the \keyindex{invertslur} is not implemented yet and
%the \keyindex{curve} and \keyindex{midslur} macros have no effect.

%\paragraph{Memory requirements.}
\subsubsection{A few final technical details}
Each \verb|\i...| and \verb|\t...|
produces a \verb|\special| command, which must be stored in TeX's main memory.
Therefore, if too many slurs occur in one page, some memory problems could
occur. The only solutions are to use Big\TeX\ (if you aren't already), or to use
font-based slurs.

Type K slurs need the postscript header file
\index{psslurs.pro}\texttt{psslurs.pro} to be included in the
output postscript file. This is made to happen by the \TeX\ command
\verb|\special{header=psslurs.pro}|, which is automatically
included when you \verb|\input musixps|. So normally this is not
of concern. However if you wish to extract a subset of pages from
the master \verb|dvi| file using \index{dvidvi}\texttt{dvidvi}, then
you have three options: (1)~include the first page in the subset,
(2)~manually issue the
\verb|\special| command in the \TeX\ source for the first page of the subset, or
(3)~use the option \texttt{-h psslurs.pro} when you run \texttt{dvips}.


\section{Bar Lines}
 \subsection{Single, double, and invisible bar lines}\label{doublebars}
The usual macro to typeset a single bar line is \keyindex{bar}.
There is a possibility of
confusion with a command in \TeX's math mode that has exactly the same name.
However, there will generally be no problem, because inside
\verb|\startpiece...\endpiece|,
\verb|\bar| will take the musical meaning, while outside, it will have the
mathematical one.
If for some reason you need the math \verb|\bar| inside, you can use
\verb|\endcatcodesmusic...\bar...\catcodesmusic|.

To typeset a double bar line with two thin rules, use \keyindex{doublebar}. You could
also issue \keyindex{setdoublebar} to cause the next \verb|\bar| (or
\keyindex{stoppiece}, \keyindex{alaligne}, or \keyindex{alapage}) to be replaced
by a double bar.

There is no specific command to print a thin-thick double bar line, but
\keyindex{setdoubleBAR} will cause one in the same cases where
\verb|\setdoublebar| would cause a thin-thin double bar line.

To make the next bar line invisible, use \keyindex{setemptybar} before
\verb|\bar|.

You can suppress the beginning vertical rule with saying \keyindex{nostartrule}
and restore the default with \keyindex{startrule} after that.

\subsection{Simple discoutinuous bar lines}
Normally, bars (as well as double bars, final bars and repeat bars) are
drawn continuously from the bottom of the lowest staff of the
lowest instrument to the top of the highest staff of the uppermost
instrument. However, if desired, they can be made discontinuous between
instruments by saying \keyindex{sepbarrules}. An example of this is given in
%avrb
%{\tt ANGESCAO} (or {\tt ANGESCAM}) example; it has also been used in the
%avre
\texttt{avemaria.tex} in section \ref{avemaria}\label{avemaria2}.

Continuous bar lines can be restored with \keyindex{stdbarrules}. In
the extension library are some more types of bar rules, mainly for very old
music, see section \ref{otherbars}.

% DAS. Andre, are there some other kinds of bars in an addon?

\subsection{Elementary asynchronous bar lines}

 Situations may arise where the bar lines in different instruments are not
aligned with one another.  To set this up, first say \verb|\sepbarrules|.
Then use a combination of the following five commands:

\begin{itemize}\setlength{\itemsep}{0ex}
\item\keyindex{hidebarrule}\onen~hides the bar rule for instrument $n$, until
this is changed by \verb|\showbarrule|\onen.
\item\keyindex{showbarrule}\onen~stops hiding the bar rule for instrument $n$,
until this is changed by \verb|\hidebarrule|\onen.
\item\keyindex{Hidebarrule}\onen~hides the bar rule for instrument $n$, only
for the next bar.
\item\keyindex{Showbarrule}\onen~shows the bar rule for instrument
$n$ once only,
and then resets it \verb|Hidebarrule|.
%
% DAS ???
%  and then resets it to \verb|hidebarrule|.
%
\item\keyindex{showallbarrules} resets all defined instruments to
\verb|\showbarrule|\onen. This command is automatically inserted with double
bars, final bars and repeats.
\end{itemize}

Thus, this example

\begin{music}
\instrumentnumber3
\setmeter3{{\meterfrac{3}{4}}}
\setmeter2{{\meterfrac{2}{4}}}
\setmeter1{{\meterfrac{3}{8}}}
\nobarnumbers
\sepbarrules

\startextract
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\hidebarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\showbarrule2\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\showbarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\showbarrule2\hidebarrule3\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\setdoublebar
\bar\hidebarrule3
\NOtes\pt f\qa f&\qa f&\qa f\en
\Hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\message{Showbarrule3 coming}%
\Hidebarrule2\Showbarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\Hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\setrightrepeat
\endextract
\end{music}

\noindent was obtained with the following coding:
\begin{quote}\begin{verbatim}
\instrumentnumber3
\setmeter3{{\meterfrac{3}{4}}}
\setmeter2{{\meterfrac{2}{4}}}
\setmeter1{{\meterfrac{3}{8}}}
\nobarnumbers
\sepbarrules

\startextract
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\hidebarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\showbarrule2\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\showbarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\showbarrule2\hidebarrule3\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\setdoublebar
\bar\hidebarrule3
\NOtes\pt f\qa f&\qa f&\qa f\en
\Hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\message{Showbarrule3 coming}%
\Hidebarrule2\Showbarrule3\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\bar
\NOtes\pt f\qa f&\qa f&\qa f\en
\Hidebarrule2\bar
\NOtes\multnoteskip{.333}\Tqbu fff&\qa f&\qa f\en
\setrightrepeat
\zendextract
\end{verbatim}\end{quote}

\subsection{Dotted, dashed, and more general asynchronous and discontinuous bar lines}\label{musixdbr}

The extension
package \href{http://icking-music-archive.org/software/musixtex/add-ons/musixdbr.tex}
{\underline{\ttxem{musixdbr.tex}}} by Rainer {\sc Dunker} provides commands for
dashed, dotted, and arbitrarily discontinuous bar lines. It supports
individual bar line settings for each instrument, multi-staff instruments,
different sizes of staves, and even different numbers of lines per staff,

To use the package, you must \verb|\input musixdbr| after \verb|musixtex|, and
execute the macro \keyindex{indivbarrules} which activates individual bar line
processing. Then the following commands are available:

\begin{itemize}\setlength{\itemsep}{0ex}

\item  \keyindex{sepbarrule}\onen~separates bar lines of instrument $n$ from those of instrument $n-1$

\item \keyindex{condashbarrule}\onen~connects bar lines of instrument $n$ to those of instrument $n-1$
   with a dashed line

\item \keyindex{condotbarrule}\onen~connects bar lines of instrument $n$ to those of instrument $n-1$
   with a dotted line

\item \keyindex{conbarrule}\onen~connects bar lines of instrument $n$ to those of instrument $n-1$

\item \keyindex{hidebarrule}\onen~hides bar lines of instrument $n$

\item \keyindex{showdashbarrule}\onen~dashes bar lines of instrument $n$

\item \keyindex{showdotbarrule}\onen~dots bar lines of instrument $n$

\item \keyindex{showbarrule}\onen~shows bar lines of instrument $n$

\item \keyindex{sepmultibarrule}\onen~separates bar lines within multistaff instrument $n$

\item \keyindex{condashmultibarrule}\onen~dashes bar lines between staves of multistaff instrument $n$

\item \keyindex{condotmultibarrule}\onen~dots bar lines between staves of multistaff instrument $n$

\item \keyindex{conmultibarrule}\onen~ shows bar lines between staves of multistaff instrument $n$

\item \keyindex{allbarrules}[\ital{any of the above commands, without numerical parameter}] sets bar
line style for all instruments together.

\end{itemize}

Dashing and dotting style may be changed by redefining the macros
\verb|\barlinedash| or \verb|\barlinedots| respectively (see original definitions in \verb|musixdbr.tex|).

Here is an example of the use of these macros:

\begin{music}
\input musixdbr

\instrumentnumber4 \setstaffs23 \setstaffs32 \setlines14\setsize2\tinyvalue
\indivbarrules
\parindent0pt\startextract
%\startpiece
%\scale{2}
  % normal barlines
  \bar
  % separate instrument 2 from 1
  \sepbarrule2
  \notes\en\bar
  % barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showbarrule
  \NOTes\en\bar
  % barlines between staves
  \allbarrules\conbarrule
  \allbarrules\conmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % dashed barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showdashbarrule
  \NOTes\en\bar
  % dashed barlines between staves
  \allbarrules\condashbarrule
  \allbarrules\condashmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % dotted barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showdotbarrule
  \NOTes\en\bar
  % dotted barlines between staves
  \allbarrules\condotbarrule
  \allbarrules\condotmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % a wild mixture of all
  \showdotbarrule1\hidebarrule2\showdashbarrule3\showbarrule4%
  \condashbarrule2\conbarrule3\condotbarrule4%
  \condashmultibarrule2\sepmultibarrule3%
  \NOTes\en\bar
  % conventional ending
  \allbarrules\showbarrule
  \allbarrules\conbarrule
  \allbarrules\conmultibarrule
  \NOTes\en\setdoubleBAR\endextract
\end{music}

This is the code:

\begin{quote}\begin{verbatim}
\input musixdbr
\instrumentnumber4\setstaffs23\setstaffs32\setlines14\setsize2\tinyvalue
\indivbarrules\parindent0pt\startextract
  % normal barlines
  \bar
  % separate instrument 2 from 1
  \sepbarrule2
  \notes\en\bar
  % barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showbarrule
  \NOTes\en\bar
  % barlines between staves
  \allbarrules\conbarrule
  \allbarrules\conmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % dashed barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showdashbarrule
  \NOTes\en\bar
  % dashed barlines between staves
  \allbarrules\condashbarrule
  \allbarrules\condashmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % dotted barlines on staves
  \allbarrules\sepbarrule
  \allbarrules\sepmultibarrule
  \allbarrules\showdotbarrule
  \NOTes\en\bar
  % dotted barlines between staves
  \allbarrules\condotbarrule
  \allbarrules\condotmultibarrule
  \allbarrules\hidebarrule
  \NOTes\en\bar
  % a wild mixture of all
  \showdotbarrule1\hidebarrule2\showdashbarrule3\showbarrule4%
  \condashbarrule2\conbarrule3\condotbarrule4%
  \condashmultibarrule2\sepmultibarrule3%
  \NOTes\en\bar
  % conventional ending
  \allbarrules\showbarrule
  \allbarrules\conbarrule
  \allbarrules\conmultibarrule
  \NOTes\en\setdoubleBAR\zendextract
\end{verbatim}\end{quote}

\section{Bar numbering}
The current bar number is stored in a count register call \keyindex{barno}.
When \verb|\startpiece| is encountered, \verb|\barno| is set equal to
another count register called \verb|\startbarno|, whose default value is one.
Therefore, if you want the first bar to have a number $n$ different from 1, you
may either say \verb|\startbarno=|$n$ before \verb|\startpiece|, or say
\verb|\barno=|$n$ afterwards, but before the first bar line. You may also alter the bar
number at any time, either by explicitly resetting \verb|\barno|, or by
incrementing it with a command like \verb|\advance\barno-1|.

\musixtex\ supports two distinct modes for printing bar numbers. In \ital{periodic}
bar numbering, the bar number is
placed above the top staff with a user-selectable frequency. In
\ital{system} bar numbering, the
number will appear at the beginning of each system.

\subsection{Periodic bar numbering}
In a normal piece, periodic bar number printing is turned on by default, with a frequency
of one. In an extract, the default is to not print bar numbers.
To turn off bar numbering say \keyindex{nobarnumbers}. To reinstate periodic
bar numbering, or to initiate it in an extract, say \keyindex{barnumbers}.
To change to a
different frequency $n$, say \verb|\def|\keyindex{freqbarno}\verb|{|$n$\verb|}|.

The appearance and positioning of the bar number is controlled by the
token \keyindex{writethebarno}, which by default is defined as\\
\verb|\def\writethebarno{\fontbarno\the\barno\kernm\qn@width}|
where the font is defined as \verb|\def\fontbarno{\it}|. You can change
either of these as desired, for example

  \medskip
\begin{music}\barnumbers
\parindent0pt\startpiece
\Notes\Dqbu gh\Dqbl jh\en
\notes\Dqbbu fg\Dqbbl hk\en\bar
\Notes\Tqbu ghi\Tqbl mmj\en
\def\fontbarno{\bf}%
\notes\Tqbbu fgj\Tqbbl njh\en\bar
\Notes\Qqbu ghjh\Qqbl jifh\en\bar
\notes\Qqbbu fgge\Qqbbl jhgi\en\endpiece
\end{music}
\noindent which was coded as
\begin{quote}\begin{verbatim}\barnumbers
\Notes\Dqbu gh\Dqbl jh\en
\notes\Dqbbu fg\Dqbbl hk\en\bar
\Notes\Tqbu ghi\Tqbl mmj\en
\def\fontbarno{\bf}%
\notes\Tqbbu fgj\Tqbbl njh\en\bar
\Notes\Qqbu ghjh\Qqbl jifh\en\bar
\notes\Qqbbu fgge\Qqbbl jhgi\en
\end{verbatim}\end{quote}

\subsection{System bar numbering}
To have a bar number printed just above the beginning of each system, use
\keyindex{systemnumbers}. The distance above the staff is controlled
by \verb|\raisebarno|, which by default is \verb|4\internote| (to fit
above a treble clef). This can be redefined with the command\\
\verb|\def|\keyindex{raisebarno}\verb|{|\ital{any \TeX~dimension}\verb|}|.
The horizontal position similarly is defined by \keyindex{shiftbarno}
which by default is \verb|0pt|.

The number normally is enclosed in a
box. If you don't like that, you may redefine the macro \verb|\writebarno|
which by default is defined as\\
\verb|\def|\keyindex{writebarno}\verb|{\boxit{\eightbf\the\barno\barnoadd}}|.\\
This uses the utility \musixtex\ macro \keyindex{boxit} which will enclose
any text string in a box.

Here are some possible alternate formats for system bar numbers:

\medskip
\begin{music}\nostartrule
\def\fontbarno{\it}%
\let\extractline\hbox
\startbarno=36
\hbox to \hsize{%
\hss
  \raise20pt\hbox{(a) }%
  \systemnumbers\startextract
    \Notes\wh g\en
  \zendextract
\hss
  \def\writebarno{\tenrm\the\barno\barnoadd}%
  \def\raisebarno{2\internote}%
  \def\shiftbarno{2.5\Interligne}%
  \raise20pt\hbox{(b) }%
  \systemnumbers\startextract
    \Notes\wh g\en
  \zendextract
\hss
  \def\writebarno{\llap{\tenbf\the\barno\barnoadd}}%
  \def\raisebarno{2\internote}%
  \def\shiftbarno{1.3\Interligne}%
  \raise20pt\hbox{(c) }%
  \systemnumbers\startextract
    \Notes\wh g\en
  \zendextract
\hss}
\end{music}
\noindent This was coded as
\begin{itemize}\setlength{\itemsep}{0ex}
 \item[(a)] (default)
 \item[(b)]
  \begin{verbatim}
\def\writebarno{\tenrm\the\barno\barnoadd}%
\def\raisebarno{2\internote}%
\def\shiftbarno{2.5\Interligne}%
  \end{verbatim}
 \item[(c)]
  \begin{verbatim}
\def\writebarno{\llap{\tenbf\the\barno\barnoadd}}%
\def\raisebarno{2\internote}%
\def\shiftbarno{1.3\Interligne}%
  \end{verbatim}
\end{itemize}

If the previous line does not stop with a bar rule, then the next
printed system bar number will immediately be followed by the contents
of the token \keyindex{writezbarno}, whose
default setting is the lower case character `\verb|a|'. You might want to
change this to `\verb|+|', in which case you should say
\verb|\def\writezbarno{+}|.

%DAS: Who cares ???
%\noindent Besides, you can suppress the messages of bar numbers on
%\verb|stdout| (normally screen) with \keyindex{nobarmessage}. In the same way,
%you can suppress the messages abour new lines (new systems) with
%\keyindex{nolinemessages}.
 %\check

\section{Managing the layout of your score}
\subsection{Line and page breaking}\label{linebreak}
If every bar ends with \verb|\bar| and no other line- or page-breaking commands
are used, then the external program \verb|musixflx| will decide where to insert
line and page breaks. Line breaks will only come at bar lines. The total
number of lines will depend on the initial value of \verb|\elemskip|, which by
default is 6 pt in \verb|\normalmusicsize|.

You can force a line or page break by replacing \keyindex{bar} with
\keyindex{alaligne} or \keyindex{alapage} respectively. On the other hand,
to forbid line-breaking at a particular bar, replace \verb|\bar|
with \keyindex{xbar}. To force a line or page break where there is
no bar line, use \keyindex{zalaligne} or \keyindex{zalapage}. To mark any
mid-bar location as an optional line-breaking point, use \keyindex{zbar}.

The heavy final double bar of a piece is one of the consequences of
\keyindex{Endpiece} or \keyindex{Stoppiece}. If you just want to terminate
the text with a simple bar, say \keyindex{stoppiece} or \keyindex{endpiece}.
To terminate it with no bar line at all, code \keyindex{zstoppiece}.

Once you have stopped the score by any of these means, you may want to restart
it, and there are several ways to do so. If you don't need to change the key
signature, meter, or clef,
you can use \keyindex{contpiece} for no indentation, or \keyindex{Contpiece}
to indent by \keyindex{parindent}. If you do want to change some score
attribute that takes up space, for example
with \keyindex{generalsignature} after \verb|\stoppiece|, then to restart you
must use \keyindex{startpiece}. However, if you don't want \verb|\barno| reset
to 1, you must save its new starting value to \verb|\startbarno|. You may also
wish to modify instrument names or \verb|\parindent| before restarting.

Recall that thin-thin or thin-thick double bars or blank bar lines can be
inserted without stopping by using the commands described in section
\ref{doublebars}. Those commands can also be used before \verb|\stoppiece|,
\verb|\alaligne|, or \verb|\alapage|

\subsection{Page layout}
Blank space above and below each staff is controlled by the dimension
registers \keyindex{stafftopmarg} and \keyindex{staffbotmarg}. For more
info see section \ref{LayoutParameters}.

The macro \keyindex{raggedbottom} will remove all vertical glue and
compact everything toward the top of page.
In contrast, the macro \keyindex{normalbottom} will restore default
behavior, in which vertical space between the systems is distributed
so that the first staff
on the page is all the way at the top and the last staff all the way at
the bottom.

The macro \keyindex{musicparskip} will allow the existing space between
systems to increase by up to \verb|5\Interligne|.

The following values of page layout parameters will allow the maximum material
to fit on each page, provided the printer allows the margins that are implied.

\begin{center}
\begin{tabular}{|l|l|l|}\hline
\multicolumn{1}{|c|}{A4}&\multicolumn{1}{|c|}{letter}&\multicolumn{1}{|c|}{A4 or letter}\\\hline
\multicolumn{3}{|c|}{\tt\Bslash parindent= 0pt}\\\hline
\multicolumn{3}{|c|}{\tt\Bslash hoffset= -15.4mm}\\\hline
\multicolumn{3}{|c|}{\tt\Bslash voffset= -10mm}\\\hline
\verb+\hsize= 190mm+&\verb+\hsize= 196mm+&\verb+\hsize= 190mm+\\\hline
\verb+\vsize= 260mm+&\verb+\vsize= 247mm+&\verb+\vsize= 247mm+\\\hline
\end{tabular}
\end{center}
%avre
\zkeyindex{parindent}\zkeyindex{hoffset}\zkeyindex{voffset}
\zkeyindex{hsize}\zkeyindex{vsize}


\subsection{Page numbering, headers and footers}\index{page
number}\index{footnote}

There are no special page numbering facilities in \musixtex; you must rely on
macros from plain \TeX. There is a count register in \TeX\ called
\verb|\pageno|. It is always initialized to \verb|1| and incremented by one
at every page break. By saying \keyindex{pageno}$=n$, it can be reset to any
value at any time, and will continue to be incremented from the new value.

By default, \TeX\ will place a page number on
every page, centered at the bottom. Unfortunately, this is not the preferred
location according to any standard practice. To suppress this default
behavior, say \keyindex{nopagenumbers}.

One way to initiate page numbering in a more acceptable location is to take
advantage of the facts that (a) \TeX\ prints the contents of the control sequences
\keyindex{headline} and \keyindex{footline} at the top and bottom
respectively of every page, and (b) the value of \verb|\pageno| can be printed by
saying \keyindex{folio}. Therefore, for example, the following sequence of
commands, issued anywhere before the end of the first page, will cause page
numbers and any desired text to be printed at the top of every page,
alternating between placement of the number at the left and right margins, and
alternating between the two different text strings (the capitalized text in
the example):

\begin{quote}\begin{verbatim}
\nopagenumbers
\headline={\ifodd\pageno\rightheadline\else\leftheadline\fi}%
\def\rightheadline{\tenrm\hfil RIGHT RUNNING HEAD\hfil\folio}%
\def\leftheadline{\tenrm\folio\hfil LEFT RUNNING HEAD\hfil}%
\voffset=2\baselineskip
\end{verbatim}\end{quote}

\subsection{Controlling the total number of systems and pages}\index{page and line
layout (global)}

Once all the notes are entered into a \musixtex\ score, it would be convenient
if there were a simple sequence of commands to
cause a specified number of systems to be uniformly distributed over a
specified number of pages. Unfortunately that's not directly
possible\footnote{It \textit{is} possible in \textbf{PMX}.}.
Rather, some trial and error will usually be required to achieve the desired final
layout. To this end, some combination of the following strategies may be used:

 \begin{enumerate}\setlength{\itemsep}{0ex}
  \item Assign a value to the count register \keyindex{linegoal} representing
the total number of systems. The count register \keyindex{mulooseness} must be 0 if using
\verb|\linegoal|.
  \item Explicitly force line and page breaking as desired, using
the macros \verb|\alaligne|, \verb|\alapage|, \verb|\zalaligne|
or \verb|\zalapage|.
  \item Adjust both \keyindex{mulooseness} and the initial value of
\keyindex{elemskip}: increasing \verb|\mulooseness| from its default of 0 will
increase the total number of systems, while changing the initial value of
\verb|\elemskip| (use \verb|\showthe\elemskip| to find its default value) may change the
total number of systems accordingly.
 \end{enumerate}
 %\check

\section{Changing clefs, key signatures, and meters}

\subsection{Introduction}\label{contextintro}

To define clefs, key signatures, or meters at the start of a piece,
or to change one or more of these attributes\footnote{In this section,
\ital{attribute} will refer to any clef, key signature, or meter.}~anywhere
else in a score,
\musixtex\ requires two steps. The first step is to \ital{set} the new values of
the attributes.
Most of the commands for this have the form \verb|\set|...~. They will be
described in the following subsections.

But this alone will
not cause anything to be changed or printed. The second step is to activate the
change. This is done by issuing one of the
following commands (outside \verb|\notes|$\dots$\verb|\en|):
\verb|\startpiece|, \verb|\startextract|, \verb|\contpiece|,
\verb|\Contpiece|,
\verb|\alaligne|, \verb|\alapage|, \verb|\zalaligne|, \verb|\zalapage|,
\verb|\changecontext|,
\verb|\Changecontext|, \verb|\zchangecontext|, \verb|\changesignature|,
\verb|\changeclefs|, or \verb|\zchangeclefs|. Most of these perform
other functions as well, and some may be used even when no attributes
change. Features unrelated to changing attributes are detailed elsewhere.
The first 11 will activate all pending new attributes.
If more than one type is activated by a single command in this manner,
then regardless of the order
they were set, they will always appear in the following order: clef, key signature,
meter.
The last three commands in the above list obviously activate only
the specific type of attribute referred to in the name of the command.

The macros \verb|\changecontext|, \verb|\Changecontext|, \verb|\zchangecontext|
will respectively insert a single, double, or invisible bar
line before printing the attributes.

\subsection{Key Signatures}

We've already seen in section \ref{whatspecify} how to set key
signatures for all instruments with \keyindex{generalsignature}, or for
specific instruments with \keyindex{setsign}. As just noted, these commands only
prepare for the insertion of the signatures into the score; it is
really \verb|\startpiece| that puts them in place at the beginning of the
score.

The commands \verb|\generalsignature| and \verb|\setsign| also serve to set
new key signature(s) anywhere in score. The change can then be activated with one of
the 11 general commands listed above, or with \keyindex{changesignature} if
in the middle of a bar.
While neither \verb|\changesignature| nor \verb|\zchangecontext| prints a bar
line, the differences are that the latter increments the bar number counter and
inserts a horizontal space of \verb|\afterruleskip| after the new signature(s).
All of these options will repost signatures that have not been changed.

Normally, changing a signature from flats to sharps or vice-versa, or
reducing the number of sharps or flats, will produce the appropriate set of
naturals to indicate what has been suppressed. This standard feature can be
temporarily inhibited by the command \keyindex{ignorenats} issued right before
the change-activating command.

Here is an example showing various possibilities for changing key signatures.
Note the comments between the code lines.

\begin{quote}\begin{verbatim}
\instrumentnumber2\setstaffs22%
\setclef1{\bass}\generalsignature2%
\startextract
\Notes\qu K&\qu d|\qu e\en
% Signature change in a single instrument with two staves.
% Naturals appear by default, indicating cancelled sharps.
\setsign20\changesignature
\Notes\qu J&\qu d|\qu e\en
% When changing signature in the middle of a bar and no naturals
% are posted, the new signature can be confused with a simple accidental.
\setsign11\ignorenats\changesignature
\Notes\qu M&\qu d|\qu e\en
% New signatures after a double bar line
\generalsignature{-2}\Changecontext%
\Notes\qu K&\qu d|\qu e\en%
\Notes\qu K&\qu d|\qu e\en%
% New signatures after an invisible bar line. Note the
% difference in spacing compared with beat 3 of the prior measure
\generalsignature{1}\zchangecontext%
\Notes\qu K&\qu d|\qu e\en%
\end{verbatim}\end{quote}

\begin{music}
\instrumentnumber2\setstaffs22%
\setclef1{\bass}\generalsignature2%
\startextract
\Notes\qu K&\qu d|\qu e\en
% Signature changing in a single instrument with 2 staves
% Naturals are allowed to shown there are no more sharps
\setsign20\changesignature
\Notes\qu J&\qu d|\qu e\en
% Signature changing in a single staff without naturals
% if there is no bar line, the signatures are confusing:
% it is not clear if they are for a single note or not
\setsign11\ignorenats\changesignature
\Notes\qu M&\qu d|\qu e\en
% New signatures after a double bar line
\generalsignature{-2}\Changecontext%
\Notes\qu K&\qu d|\qu e\en%
\Notes\qu K&\qu d|\qu e\en%
% New signatures after an invisible bar line
% see the difference in space comparing beat 2
\generalsignature{1}\zchangecontext%
\Notes\qu K&\qu d|\qu e\en%
\endextract
\end{music}


\subsection{Clefs}\label{treblelowoct}

Macros that define clefs have already been discussed in section
\ref{whatspecify}. By way of review, here are all of the possible clefs
(applied to the lowest staff):
%avrb
\newcommand{\musicintextsign}[1]{\musicintext#1{\notes\en}}

\begin{center}\vskip-1ex\footnotesize%\small
\begin{tabular}{||c|c|c|c|c||}\hline\hline
&&&&\\
\verb+\setclef1\treble+&&&\verb+\setclef1\alto+&\\
\verb+\setclef10+&\verb+\setclef11+&\verb+\setclef12+
&\verb+\setclef13+&\verb+\setclef14+\\[-2ex]%\hline
\musicintextsign{\treble}&\musicintextsign1&\musicintextsign2
&\musicintextsign{\alto}&\musicintextsign4\\[3ex]\hline
%\end{tabular}
&&&&\\
%\begin{tabular}{ccccc}
&\verb+\setclef1\bass+&&\verb+\setclefsymbol1\empty+\footnotemark&\\
\verb+\setclef15+&\verb+\setclef16+&\verb+\setclef17+
&\verb+\setclef18+&\verb+\setclef19+\\[-2ex]%\hline
\musicintextsign5&\musicintextsign{\bass}&\musicintextsign7
&\musicintextsign8&\musicintextsign9\\[3ex]\hline\hline
%This one uses \setclefsymbol1\empty :
%&\musicintextnoclef{\notes\qu h\en}&\musicintextsign9\\[3ex]\hline\hline
\end{tabular}
\footnotetext{Details of the macro {\tt\Bslash setclefsymbol} will be discussed later}
\end{center}
%avre

Just as with key signatures, these commands only \ital{prepare} for clef changes.
To \ital{activate} them, any of the first 11 commands listed in section
\ref{contextintro} could be used. However, one should keep in mind that
according to modern conventions, a clef change at a bar line is posted
before the bar line, while for example \verb|\changecontext| would post it
after the bar line. In part for this reason, we have the special command
\keyindex{changeclefs}. It can be used anywhere outside
\verb+\notes...\enotes+ to activate a clef change and insert an amount of
horizontal space to accommodate the new clef symbol(s), without printing a
bar line. Sometimes no added
space is required, in which case \keyindex{zchangeclefs} should be used.

Here are some examples of clef changes:

\begin{quote}\begin{verbatim}
\instrumentnumber2\setstaffs22%
\setclef1{\bass}\generalsignature2%
\startextract
% Change in one staff only, with added space
\setclef1\treble\changeclefs%
\Notes\qu k&\qu e|\cu{.d}\ccu{e}\en%
% Combined with signature change, also no extra space needed
% twice the same clef in staff 2 - with the help of a blank clef
\setclef28\zchangeclefs\setclef2\treble%
\setclef1\bass\zchangeclefs\setsign1{-2}\setsign2{-2}%
\ignorenats\changesignature%
\Notes\qu K&\cu{de}|\qu e\en%
% clef change before barline
\setclef1\treble\zchangeclefs\bar%
\Notes\qu k&\cu{de}|\qu e\en%
% clef change after barline
\setclef1\bass\bar\changeclefs%
\Notes\qu K&\cu{de}|\qu e\en%
% clef change after barline with changecontext
\setclef1\treble\changecontext%
\Notes\cu k&\cu d|\qu e\en%
% twice the same clef
\setclef18\zchangeclefs\setclef1\treble\changeclefs%
\Notes\cu k&\cu e |\en%
\zendextract
\end{verbatim}\end{quote}
\begin{music}
\instrumentnumber2\setstaffs22%
\setclef1{\bass}\generalsignature2%
\startextract
% Change in one staff only, with added space
\setclef1\treble\changeclefs%
\Notes\qu k&\qu e|\cu{.d}\ccu{e}\en%
% Combined with signature change, also no extra space needed
% twice the same clef in staff 2 - with the help of a blank clef
\setclef28\zchangeclefs\setclef2\treble%
\setclef1\bass\zchangeclefs\setsign1{-2}\setsign2{-2}%
\ignorenats\changesignature%
\Notes\qu K&\cu{de}|\qu e\en%
% clef change before barline
\setclef1\treble\zchangeclefs\bar%
\Notes\qu k&\cu{de}|\qu e\en%
% clef change after barline
\setclef1\bass\bar\changeclefs%
\Notes\qu K&\cu{de}|\qu e\en%
% clef change after barline with changecontext
\setclef1\treble\changecontext%
\Notes\cu k&\cu d|\qu e\en%
% twice the same clef
\setclef18\zchangeclefs\setclef1\treble\changeclefs%
\Notes\cu k&\cu e |\en%
\endextract
\end{music}

\noindent Of course the examples in the last two bars are contrary
to accepted practice.

Clef changes initiated with the \verb|\setclef| command have several features
in common. When activated after the beginning of the piece, the printed symbol
is smaller than the normal one used at the beginning of the piece. Also,
\musixtex\ automatically adjusts vertical positions of noteheads consistent
with the new clef.

There is an additional group of macros for setting new clefs which does not share
either of these features. In other words, they will always print full sized symbols, and they
won't change the vertical positions of noteheads from what they would have been
before the new symbol was printed. We could call this process ``clef symbol substitution'',
because all it does is print a different symbol (or no symbol at all) in place of
the underlying clef which was set in the normal way.

You'll need to use clef symbol substitution if you want to have a so-called
\index{octave clefs}\label{octclef}octave treble clef or octave bass
clef, i.e., one containing a numeral 8 above or
below the normal symbol. The syntax for setting upper
octaviation
is \keyindex{setbassclefsymbol}\onen\keyindex{bassoct}\\
or \keyindex{settrebleclefsymbol}\onen\keyindex{trebleoct}; for lower octaviation
it is\\ \keyindex{setbassclefsymbol}\onen\keyindex{basslowoct} or
\keyindex{settrebleclefsymbol}\onen\keyindex{treblelowoct}. Because these sequences act to
\ital{replace} normal bass or treble clefs with a different symbol, they
require that the normal clefs be set first. For example

\noindent\begin{minipage}{80mm}
\begin{music}\nostartrule
 \parindent 19mm
 \instrumentnumber{4}
 \generalmeter{\empty}
 \setclef1\bass \setclef2\bass \setclef3\treble \setclef4\treble
 \setbassclefsymbol1\basslowoct
 \setbassclefsymbol2\bassoct
 \settrebleclefsymbol3\treblelowoct
 \settrebleclefsymbol4\trebleoct
\startextract
\Notes\qu{`abcdefghi}&\qu{`abcdefghi}&\qu{abcdefghi}&\qu{abcdefghi}&\enotes
\zendextract
\end{music}
\end{minipage}
\begin{minipage}{50mm}
\begin{verbatim}
\parindent 19mm
\instrumentnumber{4}
\generalmeter{\empty}
\setclef1\bass \setclef2\bass
\setclef3\treble \setclef4\treble
\setbassclefsymbol1\basslowoct
\setbassclefsymbol2\bassoct
\settrebleclefsymbol3\treblelowoct
\settrebleclefsymbol4\trebleoct
\startextract
\Notes\qu{`abcdefghi}&\qu{`abcdefghi}%
&\qu{abcdefghi}&\qu{abcdefghi}&\enotes
\zendextract
\end{verbatim}
\end{minipage}

\index{clefs (empty)}
Another application of clef symbol substitution is to cause no clef to be
printed, as for example might be desired in percussion music, This
can be accomplished with \keyindex{setclefsymbol}\onen\verb|\empty|, which
once activated would replace \ital{all} clef symbols in the first (lowest)
staff of instrument $n$ with blanks.

Normal symbols for those clefs that have been substituted can be restored by
\keyindex{resetclefsymbols}.

The various clef symbol substitution commands can only be used to substitute for
\texttt{treble}, \texttt{alto}, or \texttt{bass} clefs.

In the following example, (1) is two normal clef changes. At (2) the clef is first changed
back to treble and then the \verb|\treblelowoct| symbol is substituted by using
\verb|\settrebleclefsymbol|.
When changing the clef away from treble and then back as at (3), the substitution
symbol is still in force. At (4), \verb|\resetclefsymbols| cancels the symbol substitution.
If using \verb|\setclefsymbol| all available clefs are changed to the same symbol, as you can see
in the two clefs after (5) in comparison with (2). Obviously the second clef after (5) is
nonsense; \verb|\resetclefsymbols| puts matters in order at (6) and (7).

\begin{music}
\instrumentnumber1\setclef1\bass
\startpiece
\notes\zchar{-5}{1}\qu H\en\setclef1\treble\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{2}\qu J\en
\setclef1\treble\settrebleclefsymbol1\treblelowoct\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{3}\qu I\en\setclef1\treble\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{4}\qu J\en\resetclefsymbols\setclef1\treble\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\doublebar
\notes\zchar{-5}{5}\qu J\en
\setclef1\treble\setclefsymbol1\treblelowoct\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{6}\qu I\en\setclef1\treble\changeclefs
\notes\qu i\en\resetclefsymbols\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{7}\qu J\en\setclef1\treble\changeclefs
\notes\qu i\en
\endpiece
\end{music}

\noindent This is the code:

\begin{quote}\begin{verbatim}
\begin{music}\nostartrule
\instrumentnumber1\setclef1\bass
\startpiece
\notes\zchar{-5}{1}\qu H\en\setclef1\treble\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{2}\qu J\en
\setclef1\treble\settrebleclefsymbol1\treblelowoct\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{3}\qu I\en\setclef1\treble\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{4}\qu J\en\resetclefsymbols\setclef1\treble\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\doublebar
\notes\zchar{-5}{5}\qu J\en
\setclef1\treble\setclefsymbol1\treblelowoct\changeclefs
\notes\qu i\en\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{6}\qu I\en\setclef1\treble\changeclefs
\notes\qu i\en\resetclefsymbols\setclef1\bass\changeclefs\bar
\notes\zchar{-5}{7}\qu J\en\setclef1\treble\changeclefs
\notes\qu i\en
\endpiece
\end{verbatim}\end{quote}

\subsection{Meter changes}

As mentioned in section \ref{generalmeter}, a common \itxem{meter} for all
staves can be specified by \keyindex{generalmeter}\verb|{|$m$\verb|}|,
where $m$ denotes the meter. On the other hand, meter changes in specific
staves are implemented with
\keyindex{setmeter}\onen\verb|{{|$m1$\verb|}{|$m2$\verb|}{|$m3$\verb|}{|$m4$\verb|}}|,
where $n$ is the number of the instrument, $m1$ specifies the meter
of the first (lowest) staff, $m2$ the second staff, and so forth. (Only enter
as many $m$'s as necessary.)

Since meter changes are meaningful only across bars, there is no special command to
activate a new meter; rather, they are activated with the general commands
\keyindex{changecontext}, etc., listed in section \ref{contextintro}.

The next example shows a few methods to get a meter change, in all staves or
in a single staff.

\begin{quote}\begin{verbatim}
\instrumentnumber2\setstaffs22%
\generalmeter{\meterfrac{4}{4}\meterfrac{2}{4}\meterfrac{1}{4}}%
\setclef1{\bass}\generalsignature2%
\startextract
\setmeter1{{\meterfrac{2}{4}}}%
\setmeter2{{\lower2pt\hbox{\meterfrac{\Bigtype 2}{}}}%
{\meterfrac{3}{4}}}\changecontext
\Notes\qu K&\cu{de}|\qu e\en
% bar 11
% Meters, clefs, and key signatures.
% All 3 clefs after bar (probably bad form) if no changeclefs
\setmeter1{{\meterfrac{2}{8}}}%
\setmeter2{{\meterfrac{3}{6}}{\meterfrac{3}{8}}}%
\setsign2{-1}%
% How to force showing the bass clef?
\setclef1\bass\setclef2{23}%
\Changecontext
\Notes\qu K&\cu{de}|\qu e\en
% bar 12
% Meters, clefs, and key signatures, with clef before the bar.
% Maybe not best form if signatures are involved
\setmeter1{{\meterfrac{2}{4}}}%
\setmeter2{{\meterfrac{3}{8}}{\meterfrac{3}{6}}}%
\setsign2{-1}%
\setclef1\treble\zchangeclefs\changecontext
\Notes\qu k&\cu{de}|\qu e\en
\end{verbatim}\end{quote}
\begin{music}
\instrumentnumber2\setstaffs22%
\generalmeter{\meterfrac{4}{4}\meterfrac{2}{4}\meterfrac{1}{4}}%
\setclef1{\bass}\generalsignature2%
\startextract
\setmeter1{{\meterfrac{2}{4}}}%
% How big the '2' must be?
\setmeter2{{\lower2pt\hbox{\meterfrac{\Bigtype 2}{}}}%
{\meterfrac{3}{4}}}\changecontext
\Notes\qu K&\cu{de}|\qu e\en
% bar 11
% Meter Clefs and Key Signatures
% all 3 clefs after bar if no changeclefs
\setmeter1{{\meterfrac{2}{8}}}%
\setmeter2{{\meterfrac{3}{6}}{\meterfrac{3}{8}}}%
\setsign2{-1}%
% How to force showing the bass clef?
\setclef1\bass\setclef2{23}%
\Changecontext
\Notes\qu K&\cu{de}|\qu e\en
% bar 12
% Meter Clefs Keys Signatures all 3 with clef before the bar
% probably not if signatures are involved
\setmeter1{{\meterfrac{2}{4}}}%
\setmeter2{{\meterfrac{3}{8}}{\meterfrac{3}{6}}}%
\setsign2{-1}%
\setclef1\treble\zchangeclefs\changecontext
\Notes\qu k&\cu{de}|\qu e\en
\endextract
\end{music}

\section{Repeats}

To replace a bar line with a left, right, or left-right repeat, use one of the
commands \keyindex{leftrepeat}, \keyindex{rightrepeat} or
\keyindex{leftrightrepeat} in place of \verb|\bar|. If a \verb|\leftrepeat|
happens to come at the end of a system, it will automatically be moved to the
start of the next system. If a \verb|\leftrightrepeat| happens to come at the
end if a system, \musixtex\ will automatically post a right repeat at the end
of the system and a left repeat at the beginning of the next.

For example,

\begin{music}\nostartrule
\startextract
\NOTes\ha g\enotes
\leftrepeat
\NOTes\ha h\enotes
\leftrightrepeat
\NOTes\ha i\enotes
\rightrepeat
\NOTEs\wh j\enotes
\zendextract
\end{music}
 \noindent has been coded as:
\begin{quote}\begin{verbatim}
\NOTes\ha g\enotes
\leftrepeat
\NOTes\ha h\enotes
\leftrightrepeat
\NOTes\ha i\enotes
\rightrepeat
\NOTEs\wh j\enotes
\end{verbatim}\end{quote}

To insert a right repeat at a forced line break or at the end of a piece, use
\verb|\setrightrepeat| \textit{before}\ \verb|\alaligne| or \verb|\endpiece|.
In contrast, to insert a left repeat at a forced line break or at the
beginning of a piece, simply use \verb|\leftrepeat| immediately \textit{after}
\verb|\startpiece| or \verb|\alaligne|. To insert a left-right repeat at a
forced line break, use \verb|\setrightrepeat\alaligne\leftrepeat|.

In fact it is possible to use \keyindex{setleftrepeat},
\keyindex{setrightrepeat} or \keyindex{setleftrightrepeat} before any
\keyindex{bar}, \keyindex{stoppiece} or \keyindex{changecontext}. But
be aware that while \verb|\setleftrepeat| behaves properly if the
bar is at the end of a system, \verb|\setleftrightrepeat| does not, placing
the symbol only at the end of the system.

 \subsection{First and second endings (Voltas)}\index{volta}

All volta commands must be entered right before the bar line command
(or repeat, etc.) where they are to take effect. There are three
commands that suffice to set all voltas. To start one, use
\keyindex{Setvolta}\verb|{|\textit{text}\verb|}|; to terminate it
with or without a vertical line, use \keyindex{endvolta} or
\keyindex{endvoltabox} respectively. The text by default will be followed
by a period. There are also various alternate
commands (e.g., \verb|\setendvoltabox| is equivalent to \verb|endvoltabox|).
Some such alternate forms are used in the following example, but the first three
mentioned above are all that are required:

\medskip \begin{music}
 \parindent0pt
 \startpiece
 \addspace\afterruleskip
 \NOTEs\wh a\en\bar
 \NOTEs\wh b\en\setvoltabox{1.-3}\bar
 \NOTEs\wh c\en\setvolta4\setendvolta\rightrepeat
 \NOTEs\wh d\en\doublebar
 \NOTEs\wh e\en\bar
 \NOTEs\wh f\en\leftrepeat
 \NOTEs\wh g\en\bar
 \NOTEs\wh h\en\Setvolta1\bar
 \NOTEs\wh i\en\bar
 \NOTEs\wh j\en\Setvolta2\setendvoltabox\rightrepeat
 \NOTEs\wh i\en\bar
 \NOTEs\wh h\en\setendvoltabox
 \Endpiece
 \end{music}
 \noindent This was coded as
 \begin{quote}\begin{verbatim}
 \startpiece \addspace\afterruleskip
 \NOTEs\wh a\en\bar
 \NOTEs\wh b\en\setvoltabox{1.-3}\bar
 \NOTEs\wh c\en\setvolta4\setendvolta\rightrepeat
 \NOTEs\wh d\en\doublebar
 \NOTEs\wh e\en\bar
 \NOTEs\wh f\en\leftrepeat
 \NOTEs\wh g\en\bar
 \NOTEs\wh h\en\Setvolta1\bar
 \NOTEs\wh i\en\bar
 \NOTEs\wh j\en\Setvolta2\setendvoltabox\rightrepeat
 \NOTEs\wh i\en\bar
 \NOTEs\wh h\en\setendvoltabox
 \Endpiece
\end{verbatim}\end{quote}
 \zkeyindex{leftrepeat}\zkeyindex{rightrepeat}

If the volta only spans one measure and ends without a vertical segment,
it can be specified simply by saying
\keyindex{setvolta}\verb|{|\textit{text}\verb|}| before the bar line command
that starts it, and it will automatically terminate at the
second bar line command:

\medskip \begin{music}
 \parindent0pt \startpiece \addspace\afterruleskip
 \NOTEs\wh a\en\bar
 \NOTEs\wh b\en\setvolta{1.-3}\bar \NOTEs\wh c\en\setvolta4\rightrepeat
 \NOTEs\wh d\en\bar
 \NOTEs\wh e\en\Endpiece
\end{music}
\noindent which was coded as:
 \begin{quote}\begin{verbatim}
 \parindent0pt \startpiece \addspace\afterruleskip
 \NOTEs\wh a\en\bar
 \NOTEs\wh b\en\setvolta{1.-3}\bar \NOTEs\wh c\en\setvolta4\rightrepeat
 \NOTEs\wh d\en\bar
 \NOTEs\wh e\en\Endpiece
\end{verbatim}\end{quote}

The height above the top staff line of the horizontal line in a volta symbol
is determined by the token \keyindex{raisevolta} which is 4\verb|\internote| by
default. You can change this to any desired dimension.

The period after the text can be
removed by saying \verb|\def|\keyindex{voltadot}\verb|{}|
and restored by \verb|\def|\keyindex{voltadot}\verb|{.}|\ .

 \subsection{Special symbols for repeating long sections}

Four special symbols and corresponding macros are available, namely
\keyindex{coda}~$p$, \keyindex{Coda}~$p$,
and \keyindex{segno}~$p$, where $p$ specifies the pitch; and \keyindex{Segno}
with no argument. Their behavior is illustrated in this example:

\begin{music}
\startextract
\NOtes\segno n\enotes
\bar
\NOtes\coda n\enotes
\NOtes\Segno\enotes
\bar
\NOtes\Coda n\enotes
\endextract
\end{music}
\noindent which has been coded:
\begin{quote}\begin{verbatim}
\NOtes\segno m\enotes\bar
\NOtes\coda m\enotes
\NOtes\Segno\enotes\bar
\NOtes\Coda m\enotes
\end{verbatim}\end{quote}

\subsection{Repeating a single bar}
 The special symbol for a single bar repeat is generated by \keyindex{duevolte}, as shown
in the following example:

\begin{music}
\generalmeter\meterC
\setclef1\bass\setstaffs1{2}
\startextract
\NOtes\sk\sk\pause|\qa{cegj}\en
\bar\NOtes\qa{cdef}|\sk\hsk\duevolte\en
\endextract
\end{music}
\noindent whose coding is:
\begin{quote}\begin{verbatim}
\generalmeter\meterC
\setclef1\bass\setstaffs1{2}
\startextract
\NOtes\sk\sk\pause|\qa{cegj}\en
\bar\NOtes\qa{cdef}|\sk\hsk\duevolte\en
\endextract
\end{verbatim}\end{quote}

\noindent This is often used with \verb|\centerbar| to more easily center the
symbol between bar lines, as shown in the example in section \ref{barcentered}.

\section{Font selection and text placement}

\subsection{Predefined text fonts}
While any \TeX\ font can be used by \musixtex, there are certain styles and
sizes that can be selected using shortcut commands.
For ordinary text the shortcuts cover fonts of eight different
sizes and three styles. The sizes in points are 8, 9, 10, 12, 14, 17, 20, and 25;
the styles are from the standard Computer Modern family: Roman, bold and italic. The
four smallest sizes are each available in all three styles, while the larger
sizes, which are intended for titles, are available only in bold style.
The size selection macros from smallest to biggest are \keyindex{smalltype},
\keyindex{Smalltype},
\keyindex{normtype}, \keyindex{medtype}, \keyindex{bigtype},
\keyindex{Bigtype} ,
\keyindex{BIgtype} and \keyindex{BIGtype}. Following size selection, the
style may be selected or changed using \keyindex{rm} (Roman), \keyindex{bf}
(bold) or \keyindex{it} (italic). If no style is explicitly selected, Roman style
will be used for the sizes \verb|\medtype| or smaller. For the larger sizes,
only bold style is provided and no style selection is required. Thus, for example,
eight point italic is selected with \verb|\smalltype\it|, while
twelve point Roman is selected using \verb|\medtype\rm| or simply
\verb|\medtype|. To change between styles while maintaining the same size,
code \verb|\rm|, \verb|\it| or \verb|\bf| as in Plain \TeX.
When \musixtex\ is started, the default font for ordinary text is
ten point Roman, equivalent to \verb|\normtype\rm|.

Another group of fonts, in bold extended italic style, is predefined in point sizes
10, 12, 14, and 17 for dynamic markings. The appropriate font for the current
staff size may be selected simply by using \keyindex{ppff} as a
font specification. Macros \verb|\smalldyn|, \verb|\normdyn|, or \verb|\meddyn| may be
used to redefine \verb|\ppff| to represent one of the smallest three.

All predefined fonts are summarized in the following table. The second column gives an
explicit control sequence that can alternatively be used locally as a font specification.

\begin{center}
  \begin{tabular}{lll}
    \hline
    Size and style  &  Font specification & Example \\
    \hline
    \verb|\smalltype|    & \verb|\eightrm| & {\smalltype    small Roman}  \\
    \verb|\smalltype\bf| & \verb|\eightbf| & {\smalltype\bf small bold}   \\
    \verb|\smalltype\it| & \verb|\eightit| & {\smalltype\it small italic} \\
    \verb|\Smalltype|    & \verb|\ninerm| & {\Smalltype    Small Roman}  \\
    \verb|\Smalltype\bf| & \verb|\ninebf| & {\Smalltype\bf Small bold}   \\
    \verb|\Smalltype\it| & \verb|\nineit| & {\Smalltype\it Small italic} \\
    \verb|\normtype|     & \verb|\tenrm| & {\normtype     normal Roman} \\
    \verb|\normtype\bf|  & \verb|\tenbf| & {\normtype\bf  normal bold}  \\
    \verb|\normtype\it|  & \verb|\tenit| & {\normtype\it  normal italic}\\
    \verb|\medtype|      & \verb|\twelverm| & {\medtype      medium Roman} \\
    \verb|\medtype\bf|   & \verb|\twelvebf| & {\medtype\bf   medium bold}  \\
    \verb|\medtype\it|   & \verb|\twelveit| & {\medtype\it   medium italic}\\
    \verb|\bigtype|      & \verb|\bigfont| & {\bigtype      big bold}     \\
    \verb|\Bigtype|      & \verb|\Bigfont| & {\Bigtype      Big bold}     \\
    \verb|\BIgtype|      & \verb|\BIgfont| & {\BIgtype      BIg bold}     \\
    \verb|\BIGtype|      & \verb|\BIGfont| & {\BIGtype      BIG bold}     \\
    \verb|\smalldyn|  & \verb|\ppffsixteen| & {\ppffsixteen  pp ff diminuendo}\\
    \verb|\normdyn|   & \verb|\ppfftwenty| & {\ppfftwenty   pp ff crescendo}\\
    \verb|\meddyn|   & \verb|\ppfftwentyfour| & {\ppfftwentyfour   pp ff crescendo}\\[.4ex]
    ~                & \verb|\ppfftwentynine| & {\ppfftwentynine   pp ff diminuendo}\\[.4ex]
    \hline
  \end{tabular}
\end{center}

\subsection{User-defined text fonts}

Since \musixtex\ is a superset of \TeX, you are free to use the standard \TeX\
machinery for defining and using any special font you desire. You must first
of course ensure that (a) all the necessary font files (e.g., \verb|bla10.tfm|,
\verb|bla10.pfb|, or equivalents) are installed in the right places in your system, (b) all
configuration files (e.g., \verb|config.ps| or equivalent) have been updated, and
(c) the \TeX\ system has been ``rehashed''. Then you can use the font just as
in any \TeX\ document, e.g. by coding \verb|\font blafont=bla10| and then
\verb|\zchar{10}{\blafont Text in user-defined font}|.

You might also wish to replace once and for all the typefaces invoked by the
commands described in the previous section. Again, before doing this, you must
follow steps (a-c) of the previous paragraph for all fonts in questions.
\label{musixtmr}
You can use the standard bitmapped fonts which are converted to
postscript by e.g.\ \verb|dvips|, but you also may replace them
by native postscript fonts.

As an example, you can replace the standard \verb|musixtex| fonts by
the Times series of fonts as follows:

\begin{verbatim}
% 8pt roman, bold, and italic
\font\eightrm=ptmr7t at 8pt
\font\eightbf=ptmb7t at 8pt
\font\eightit=ptmri7t at 8pt
% 9pt
\font\ninerm=ptmr7t at 9pt
\font\ninebf=ptmb7t at 9pt
\font\nineit=ptmri7t at 9pt
% 10pt
\font\tenrm=ptmr7t
\font\tenbf=ptmb7t
\font\tenit=ptmri7t
% 12pt
\font\twelverm=ptmr7t scaled \magstep 1
\font\twelvebf=ptmb7t scaled \magstep 1
\font\twelveit=ptmri7t scaled \magstep 1
% Large fonts for titles : normal shaped Times-Roman fonts are applied
\font\bigfont=ptmr7t scaled \magstep2 % 14pt
\font\Bigfont=ptmr7t scaled \magstep3 % 17pt
\font\BIgfont=ptmr7t scaled \magstep4 % 20pt
\font\BIGfont=ptmr7t scaled \magstep5 % 25pt
%
\normtype
\end{verbatim}
The above definitions are made available in a file
\verb|musixtmr.tex|\footnote{by Hiroaki {\sc Morimoto}}, to be used as
\begin{quote}\begin{verbatim}
\input musixtex
\input musixps
\input musixtmr
...
\end{verbatim}\end{quote}

\font\tnormtype=ptmr7t
\font\tnormtypebf=ptmb7t
\font\tnormtypeit=ptmri7t
\font\tbigtype=ptmr7t scaled \magstep2
\font\tBIgtype=ptmr7t scaled \magstep4

\noindent Here's a comparison of some of the Computer Modern Roman and Times Roman fonts:
\begin{center}
  \begin{tabular}{ll}
    \hline
    {\normtype     normal (10pt) cm Roman} &  {\tnormtype  normal Times Roman} \\
    {\normtype\bf  normal cm bold}         &  {\tnormtypebf  normal Times bold}  \\
    {\normtype\it  normal cm italic}       &  {\tnormtypeit  normal Times italic}\\
    {\bigtype      cm big}                 &  {\tbigtype      Times big}     \\
    {\BIgtype      cm BIg }                &  {\tBIgtype      Times BIg bold}     \\
    \hline
  \end{tabular}
\end{center}

\subsection{Text placement}\label{textplacement}
Special macros are provided to allow precise placement of any \TeX\ text, vertically
relative to the staff, and horizontally relative to any note in
the staff.

The macros in the first group will vertically position the text with the
baseline at any specified pitch or staff line. They must be used
inside \verb|\notes...\enotes|. They will not insert any additional
horizontal space. They have the forms
\keyindex{zcharnote}\pitchp\verb|{|\ital{text}\verb|}|, \keyindex{lcharnote}\pitchp\verb|{|\ital{text}\verb|}|,
and \keyindex{ccharnote}\pitchp\verb|{|\ital{text}\verb|}|,
where \ital{p} is the pitch. With the first one, text will spill to the right
from the current insertion point, with the second it will spill to the left, and with the
third it will be centered horizontally.

There are similar macros \keyindex{zchar}\pitchp\verb|{|\ital{text}\verb|}|,
\keyindex{lchar}\pitchp\verb|{|\ital{text}\verb|}|, and \keyindex{cchar}\pitchp\verb|{|\ital{text}\verb|}|,
which differ from the previous three in that the pitch \ital{must} be given with
a number (representing the number of staff positions up from the lowest line),
and that the number need not be an integer.

To vertically position any text midway between two consecutive staves, use
\keyindex{zmidstaff}\verb|{|{\it text}\verb|}|, \keyindex{lmidstaff}\verb|{|{\it text}\verb|}|,
or \keyindex{cmidstaff}\verb|{|{\it text}\verb|}| at the appropriate point in the lower staff.

The macros \keyindex{uptext}\verb|{|\ital{text}\verb|}| and
\keyindex{Uptext}\verb|{|\ital{text}\verb|}| are simply shorthands for
\verb|\zchar{10}{|\ital{text}\verb|}| and \verb|\zchar{14}{|\ital{text}\verb|}| respectively.

The text items handled by all of the above macros can include any appropriate
string of \TeX\
control sequences, including font definitions, \verb|\hbox|'es, etc.

Material posted with any of the macros described in this section will not
create any additional horizontal or vertical space within the current system,
and will overwrite anything in the current system that gets in the way. It is
the typesetter's responsibility to ensure there is adequate white space
within the current system to accommodate any text emplaced with
these macros. On the other hand, if text is emplaced far above or below a
system, \musixtex\ will usually insert additional vertical space if needed.

\subsection{Rehearsal marks}

Rehearsal marks are usually
boxed or circled uppercase letters or digits. They can be defined using the macros
\keyindex{boxit}\verb|{|\ital{text}\verb|}| or
\keyindex{circleit}\verb|{|\ital{text}\verb|}|. For boxed text,
the margin between the text and box is controlled by the dimension
register \keyindex{boxitsep}, which can be reset to any \TeX\ dimension if the
default value of \verb|3pt| is unsatisfactory. To emplace the mark, use \verb|\Uptext| or
any of the other macros defined in the previous section.


\section{Miscellaneous other notations}
%avre
 \subsection{Metronomic indications}
%Metronomic indication deserves a special macro. The mention:
%
%\medskip
%\centerline{\def\nbinstruments{0}\metron{\hup}{60}}
%
%\smallskip\noindent
%is coded by \keyindex{metron}\verb|{\hup}{60}| (normally embedded in
%\keyindex{Uptext} which is in turn embedded within \verb|\notes...\enotes|).
%
% On the other hand, music writers sometimes want to specify that the duration
%of a previous note is equal to a distinct furthernote. Thus
%
% \smallskip
%\centerline{\def\nbinstruments{0}\metronequiv{\qup}{\qu}}
%
%\smallskip\noindent
%is coded by \keyindex{metronequiv}\verb|{\qup}{\qu}|.

By way of example, the notations~~~{\def\nbinstruments{0}
\metron{\hup}{60}}~~~and~~~{\def\nbinstruments{0}\metronequiv{\qup}{\qu}}~~~are
respectively coded as
\keyindex{metron}\verb|{\hup}{60}| and \keyindex{metronequiv}\verb|{\qup}{\qu}|,
which are normally emplaced using \keyindex{Uptext}.

 \subsection{Accents}

You may use\footnote{Note from the editor: the reason the names of some of
these macros don't seem to be constructed to suggest the terms used in the
descriptions is that whoever originally defined the macros had in mind terms
that did not agree with normal English usage.}
\begin{itemize}\setlength{\itemsep}{0ex}
 \item \keyindex{upz}\pitchp~(upper \itxem{staccato}) to put a dot above a note
head at pitch $p$,
 \item \keyindex{lpz}\pitchp~(lower \ital{staccato}) to put a dot below a note
head at pitch $p$,
 \item \keyindex{usf}\pitchp~(upper \itxem{sforzando}) to put a $>$ accent above
a note head at pitch $p$,
 \item \keyindex{lsf}\pitchp~(lower \itxem{sforzando}) to put a $>$ accent below
a note head at pitch $p$,
 \item \keyindex{ust}\pitchp~(upper \itxem{tenuto}) to put a
hyphen above a note head at pitch $p$,
 \item \keyindex{lst}\pitchp~(lower \ital{tenuto}) to put a
hyphen below a note head at pitch $p$,
 \item \keyindex{uppz}\pitchp~(upper \itxem{staccatissimo}) to put a solid vertical
wedge above a note head at pitch $p$,
 \item \keyindex{lppz}\pitchp~(lower \ital{staccatissimo}) to put an inverted
solid vertical wedge below a note head at pitch $p$,
 \item \keyindex{usfz}\pitchp~(upper \itxem{forzato}) to put a
``dunce cap'' above a note head at pitch $p$,
 \item \keyindex{lsfz}\pitchp~(lower \ital{forzato}) to put an inverted
``dunce cap'' below a note head at pitch $p$,
 \item \keyindex{upzst}\pitchp~(upper \itxem{staccato/tenuto}) to put a
dot and a hyphen above a note head at pitch $p$,
 \item \keyindex{lpzst}\pitchp~(lower \ital{staccato/tenuto}) to put a
dot and a hyphen below a note head at pitch $p$,
 \item \keyindex{flageolett}\pitchp~to put a
small circle above a note head at pitch $p$.
\end{itemize}
These marks are horizontally centered relative to solid note heads. To
compensate for the fact that whole notes are wider, you should use
\keyindex{wholeshift}\verb|{|\ital{Any nonspacing macro}\verb|}| to center accents
and other items (e.g.~\verb|\Fermataup|) above a whole note.

There are also variants of the most common accents\footnote{Thanks to Klaus
{\sc Bechert}'s corrections.} which will be automatically positioned
above or below a beam. They are spelled like the corresponding normal
accent, but preceded with the letter \verb|b|, and their argument, instead of
the pitch, is the beam reference number . Thus

\medskip
\begin{music}\nostartrule
\startextract
\Notes\ibu0f3\busfz0\qb0f\bupz0\qb0g\bust0\qb0h%
  \buppz0\qb0i\busf0\qb0j\butext0\tqh0k\en
\Notes\Ibl0lg5\blsfz0\qb0l\blpz0\qb0k\blst0\qb0j%
  \blppz0\qb0i\blsf0\qb0h\bltext0\tqb0g\en
\zendextract
\end{music}
\noindent was coded as
\begin{quote}\begin{verbatim} \startextract
\Notes\ibu0f3\busfz0\qb0f\bupz0\qb0g\bust0\qb0h%
  \buppz0\qb0i\busf0\qb0j\butext0\tqh0k\en
\Notes\Ibl0lg5\blsfz0\qb0l\blpz0\qb0k\blst0\qb0j%
  \blppz0\qb0i\blsf0\qb0h\bltext0\tqb0g\en
\zendextract
\end{verbatim}\end{quote}
\zkeyindex{busfz}
\zkeyindex{bupz}
\zkeyindex{bust}
\zkeyindex{buppz}
\zkeyindex{busf}
\zkeyindex{butext}
\zkeyindex{blsfz}
\zkeyindex{blpz}
\zkeyindex{blst}
\zkeyindex{blppz}
\zkeyindex{blsf}
\zkeyindex{bltext}

The macros \verb|\bltext| and \verb|\butext| are detailed in the next section,
where the mystery of why they produce the number 3 is resolved.


\subsection{Numbers and brackets for xtuplets}\label{tuplet}

The following table lists all the special macros that place a number indicating
an xtuplet. Some also place a bracket above or below the notes, and are
intended for use with unbeamed notes.
In the table, $p$ is a pitch, $k$ is a number, $n$ is a beam number,
$w$ is a bracket width in \verb|\internote|s, and $s$ is the bracket slope as
a multiple of 1.125 degrees. The macro \verb|\txt| contains a default number
and its font, which will be emplaced by the first and third through sixth macros,
and is initially defined as \verb|\def\txt{\eightit 3}|. The macro
\verb|\tuplettxt| serves the same role for the last two macros. The first four
are to be used with beamed xtuplets. As indicated in the
last column, the last four produce a sloping bracket and are to be used with
unbeamed xtuplets. The last two require the extension file
\verb|tuplet.tex| to be input right after \verb|\input musixtex|.


\begin{center}
  \begin{tabular}{lclcc}
    \hline
    ~ & Number & ~ & Needs & ~ \\
    Macro and arguments & printed & Where invoked & \verb|tuplet.tex|? & Bracket \\
    \hline
    \verb|\triolet|\pitchp & \verb|\txt| & before beam & no & none \\
    \verb|\xtuplet|\itbrace{k}\pitchp & $k$ & before beam & no & none \\
    \verb|\butext|\itbrace{n} & \verb|\txt| & before note at number & no & none \\
    \verb|\bltext|\itbrace{n} & \verb|\txt| & before note at number & no & none \\
    \verb|\uptrio|\pitchp\itbrace{w}\itbrace{s} & \verb|\txt| & before first note & no & solid \\
    \verb|\downtrio|\pitchp\itbrace{w}\itbrace{s} & \verb|\txt| & before first note & no &  solid \\
    \verb|\uptuplet|\pitchp\itbrace{w}\itbrace{s} & \verb|\tuplettxt| & before first note & yes & with gap \\
    \verb|\downtuplet|\pitchp\itbrace{w}\itbrace{s} & \verb|\tuplettxt| & before first note & yes & with gap \\
    \hline
  \end{tabular}
\end{center}
\medskip

Here are some examples of the first six macros in the table:\\
\vskip-3pt
\begin{music}
\parindent0mm
\generalmeter{\meterfrac24}
\startpiece
\addspace\afterruleskip
\notesp\xtuplet6n\isluru0l\ibl0l0\qb0{lllll}\tslur0l\tqb0l\en\bar
\notesp\triolet n\isluru0l\Ibl0ln2\qb0{lm}\tslur0n\tqb0n\en
\notesp\ibslurd0k\Ibl0km2\qb0k\bltext0\qb0l\tdbslur0m\tqb0m\en\bar
\Notesp\triolet o\isluru0l\ql{lm}\tslur0n\ql n\en\bar
\Notesp\uptrio o16\ql l\en\notesp\cl n\en
%avrb
\Notesp\downtrio O16\qu e\en\notesp\cu g\en
%avre
\endpiece
whose coding is
\begin{quote}\begin{verbatim}
\notesp\xtuplet6n\isluru0l\ibl0l0\qb0{lllll}\tslur0l\tqb0l\en\bar
\notesp\triolet n\isluru0l\Ibl0ln2\qb0{lm}\tslur0n\tqb0n\en
\notesp\ibslurd0k\Ibl0km2\qb0k\bltext0\qb0l\tdbslur0m\tqb0m\en\bar
\Notesp\triolet o\isluru0l\ql{lm}\tslur0n\ql n\en\bar
\Notesp\uptrio o16\ql l\en\notesp\cl n\en
\Notesp\downtrio O16\qu e\en\notesp\cu g\en
\end{verbatim}\end{quote}
\end{music}
\zkeyindex{xtuplet}\zkeyindex{triolet}

\medskip
Next are examples using the macros from \verb|\tuplet.tex|. Comparison of the
coding with the printed result reveals that (a) a redefinition of
\verb|\tuplettxt| inside a notes group only applies inside that group and
leaves the default definition intact (bar 2),
(b) the default definition is
\verb|\def\tuplettxt{\ppffsixteen3}|, a 10-pt bold extended italic numeral 3
which may be larger and heavier than desired (first set, bar 3) (c) to get the
number properly centered in the gap, you must include some extra spaces after
the number in the definition of \verb|\tuplettxt|, and (d) as you can see in
the last bar, if the span becomes to small, the macros still won't provide
enough room for the number in the gap; in this case it would be better to
use to the macros without gaps.

%   Examples:
%
%       Draw a triplet bracket over the notes, starting at pitch "p",
%       1.25\noteskip wide, with a slope up of 3-3/8 degrees:
%
%           \uptuplet p{1.25}3
%
%       Draw a sextuplet bracket under the notes, starting at pitch "a",
%       2.5\noteskip wide, with a slope down of 4-1/2 degrees:
%
%           \def\tuplettxt{\smallppff 6\/\/}
%           \downtuplet{a}{2.5}{-4}

\begin{music}
\input tuplet
\parindent0mm
\generalmeter{\meterfrac24}
%\startpiece
\startextract
\addspace\afterruleskip
\notesp\triolet o\Ibl0ln2\qb0{lm}\tqb0n\en
\notesp\Ibl0km2\qb0k\bltext0\qb0l\tqb0m\en\bar
\notesp\def\tuplettxt{\eightit 5\/\/}\uptuplet o{4.1}2\cl{jklmn}\en\bar
\Notesp\uptuplet o16\ql l\en\notesp\cl n\en
\def\tuplettxt{\eightit 3\/\/}
\Notesp\downtuplet O16\qu e\en\notesp\cu g\en\bar
\notesp\uptuplet o16\ccl l\en\notesp\cccl n\en
\notesp\downtuplet O16\ccu e\en\notesp\cccu g\en
%\endpiece
\endextract
\end{music}

\noindent with coding

\begin{quote}\begin{verbatim}
\input tuplet
\parindent0mm\generalmeter{\meterfrac24}
\startextract\addspace\afterruleskip
\notesp\triolet o\Ibl0ln2\qb0{lm}\tqb0n\en
\notesp\Ibl0km2\qb0k\bltext0\qb0l\tqb0m\en\bar
\notesp\def\tuplettxt{\eightit 5\/\/}\uptuplet o{4.1}2\cl{jklmn}\en\bar
\Notesp\uptuplet o16\ql l\en\notesp\cl n\en
\def\tuplettxt{\eightit 3\/\/}
\Notesp\downtuplet O16\qu e\en\notesp\cu g\en\bar
\notesp\uptuplet o16\ccl l\en\notesp\cccl n\en
\notesp\downtuplet O16\ccu e\en\notesp\cccu g\en
\endextract
\end{verbatim}\end{quote}

 \subsection{Ornaments}

 \subsubsection{Arpeggios}
\ital{Arpeggios} (i.e.~~~\arpeggio{-2}3) can be coded with the macro
\keyindex{arpeggio}\pitchp\itbrace{m}
where $p$ is the pitch of
the base of the arpeggio symbol and $m$ is its height in units of
\verb|\interligne|, the distance from one staff line to the next. It should be
issued before the affected chord. It is
automatically positioned to the left of the chord, but inserts no spacing.
Its variant \keyindex{larpeggio} sets the arpeggio symbol roughly
one note head width to the left of the default position, and is intended to
avoid collision with single accidentals on chord notes.

 \subsubsection{Arbitrary length trills}
 There are two styles of arbitrary length trills\index{trills}, each with two
variants.
For a trill with preassigned length, use \keyindex{trille}\pitchp\itbrace{l}
for \hbox to 1cm{\noteskip1cm\trille11\hss} or
\keyindex{Trille}\pitchp\itbrace{l} for~~\hbox to
2cm{\noteskip1cm\Trille12\hss}, where $p$ is the pitch and $l$ the length in
current \verb|\noteskips|.

To let \musixtex\ compute the length of the trill, or if it extends across a
system break, you can use \keyindex{Itrille}$n$\pitchp\ to start a plain
trill, where $n$ is a trill reference number between 0 and 6; then
\keyindex{Ttrille}$n$ to terminate it. To get the {\it tr} at the
beginning, use \keyindex{ITrille}$n$\pitchp\ to start the trill and
\verb|\Ttrille|$n$ to close it.

For example:

\medskip
 \begin{music}
\instrumentnumber{1}
\setstaffs12
\setclef1{6000}
%
\startextract
\notes\qu{CDEFGH}|\hu k\sk\ITrille 1p\itenu1l\wh l\enotes
\bar
\notes\Itrille 2A\itenu2E\whp E|\tten1\hlp l\sk\Ttrille 1\qu {mno}\enotes
\bar
\Notes\tten2\itenu2E\whp E|\ql{nmlkji}\enotes
\bar
\Notes\tten2\whp E\sk\sk\sk\sk\Ttrille2|\qu{hgfedc}\enotes
\endextract
\end{music}
whose coding is
\begin{quote}\begin{verbatim}
\begin{music}\nostartrule
\instrumentnumber{1}
\setstaffs12
\setclef1{6000}
%
\startextract
\notes\qu{CDEFGH}|\hu k\sk\ITrille 1p\itenu1l\wh l\enotes
\bar
\notes\Itrille 2A\itenu1e\whp E|\tten1\hlp l\sk\Ttrille 1\qu {mno}\enotes
\bar
\Notes\tten1\itenu1E\whp E|\ql{nmlkji}\Toctfin1\enotes
\bar
\Notes\tten1\whp E\sk\sk\sk\sk\Ttrille2|\qu{hgfedc}\enotes
\endextract
\end{verbatim}\end{quote}

 \subsubsection{Piano pedal commands}
The macro \keyindex{PED} inserts a piano pedal command below the staff;
\keyindex{DEP}, a pedal release. Alternate symbols, the first of which
occupies less space, are invoked with \keyindex{sPED} and \keyindex{sDEP}.
For example,

\begin{music}
\setclef1\bass
\setstaffs1{2}
\startextract
\NOtes\PED\wh J|\qu h\enotes
\NOtes|\qu g\enotes
\NOtes|\hu k\enotes
\Notes\DEP\enotes
\bar
\NOtes\sPED\wh J|\qu h\enotes
\NOtes|\qu g\enotes
\NOtes|\hu k\enotes
\Notes\sDEP\enotes
\endextract
\end{music}
 \noindent was coded as \begin{quote}\begin{verbatim}
 \NOtes\PED\wh J|\qu h\enotes
 \NOtes|\qu g\enotes
 \NOtes|\hu k\enotes
 \Notes\DEP\enotes \bar
 \NOtes\sPED\wh J|\qu h\enotes
 \NOtes|\qu g\enotes
 \NOtes|\hu k\enotes
 \Notes\sDEP\enotes
 \end{verbatim}\end{quote}

 The vertical position of
\keyindex{PED}, \keyindex{sPED}, \keyindex{DEP} and \keyindex{sDEP} can be
globally changed by redefining its elevation, which has the default
definition \verb|\def|\keyindex{raiseped}\verb|{-5}|.
To locally change the vertical position of a pedal symbol, use one of the more
fundamental
macros \keyindex{Ped}, \keyindex{sPed}, \keyindex{Dep} and \keyindex{sDep}
in combination with \keyindex{zchar} or \keyindex{zcharnote}.
Since the \hbox to .7cm{ \Ped\hss} symbol is rather wide, it might collide
with adjacent bass notes. To shift it horizontally, you could use \verb|\loff{\PED}|.

 \subsubsection{Other ornaments}\index{ornaments}

The argument $p$ in the following macros for ordinary ornaments is the
pitch at which the ornament itself appears. They are all nonspacing macros.
You may use
\begin{itemize}\setlength{\itemsep}{0ex}
 \item \keyindex{mordent}\pitchp\ for \hbox to .75em{\mordent 0\hss},
 \item \keyindex{Mordent}\pitchp\ for \hbox to 1.5em{\kern 0.6em\Mordent 0\hss},
 \item \keyindex{shake}\pitchp\ for \hbox to .75em{\shake 0\hss},
 \item \keyindex{Shake}\pitchp\ for \hbox to 1.5em{\kern 0.6em\Shake 0\hss},
 \item \keyindex{Shakel}\pitchp\ for \hbox to 1.5em{\kern 0.6em\Shakel 0\hss},
 \item \keyindex{Shakesw}\pitchp\ for \hbox to 1.5em{\kern 0.6em\Shakesw 0\hss},
 \item \keyindex{Shakene}\pitchp\ for \hbox to 1.5em{\kern 0.6em\Shakene 0\hss},
 \item \keyindex{Shakenw}\pitchp\ for \hbox to 1.5em{\kern 0.6em\Shakenw 0\hss},
 \item \keyindex{turn}\pitchp\ for \hbox to 1.5em{\kern 0.6em\turn 0\hss},
 \item \keyindex{backturn}\pitchp\ for \hbox to 1.5em{\kern 0.6em\backturn 0\hss}.
 \end{itemize}

In the following macros for fermatas, the argument $p$ is the pitch of the
notehead on which the fermata rests, assuming no additional vertical
adjustments are needed for stems or intervening staff lines. They are all
nonspacing macros. You may use
\begin{itemize}\setlength{\itemsep}{0ex}
 \item \keyindex{fermataup}\pitchp\ for
\raisebox{0ex}[0ex][0ex]{\notesintext{\notes\fermataup1\en}},
\end{itemize}
\begin{itemize}\setlength{\itemsep}{3ex}
 \item \keyindex{fermatadown}\pitchp\ for
\raisebox{0ex}[0ex][0ex]{\notesintext{\notes\fermatadown2\en}},
 \item \keyindex{Fermataup}\pitchp\ for
\raisebox{-1ex}[-1ex][0ex]{\musicintextnoclef{\notes\Fermataup 7\zwh{'c}\en}}~,
centered over a whole note,
 \item \keyindex{Fermatadown}\pitchp\ for
\raisebox{-1ex}[0ex][0ex]{\musicintextnoclef{\notes\Fermatadown1\zwh{'c}\en}}~,
centered under a whole note.
 \end{itemize}
\bigskip

A \itxem{breath} mark
\raisebox{-5ex}[0ex][0ex]{\notesintext{\notes\zbreath\en}}
can be put just above the staff with \keyindex{zbreath}. This is a nonspacing
macro. On the other hand, \keyindex{cbreath} will cause a space of one
\verb|\noteskip| and place the comma midway through the space.

The \keyindex{caesura} command inserts a slash \verb|0.5\noteskip| before
the place it is entered, while adding no space:

\begin{music}\nostartrule
\startextract
\NOTes\zhu j\hl{^e}\caesura\en
\Notes\zcu j\cl e\en
\zendextract
\end{music}

\subsection{Alphabetic dynamic marks}
 Conventional dynamic symbols
\pppp, \ppp, \pp,
\p,
\mezzopiano,
\mf,
\f,
\fp,
\sF,
\ff,
\fff\ and
\ffff\ can be posted using the macros
\keyindex{pppp},
\keyindex{ppp},
\keyindex{pp},
\keyindex{p},
\keyindex{mp},
\keyindex{mf},
\keyindex{f},
\keyindex{fp},
\keyindex{sF},
\keyindex{ff},
\keyindex{fff},
\keyindex{ffff} respectively as the second argument of \verb|\zcharnote| or
\verb|\ccharnote|.

\subsection{Hairpins (crescendos and decrescendos)}\label{sec:crescnd}

The syntax and properties of hairpins will differ depending on whether or not you
have input \verb|musixps.tex|, which activates not only type K postscript slurs and
ties but hairpins as well. The font-based variety are always horizontal,
are limited in length, and cannot span system breaks. Using the postscript variety
removes all these restrictions, but they will not be visible in DVI previewers.

\subsubsection{Font-based hairpins}

There are two categories of font-based hairpins. The first type requires only
one command, \keyindex{crescendo}\verb|{|$\ell$\verb|}| or
\keyindex{decrescendo}\verb|{|$\ell$\verb|}|, where $\ell$ is any \TeX{}
dimension, either a fixed one---for example in points---or a scalable one
expressed either explicitly or implicitly as some number of
\verb|\noteskip|s. These should be used as arguments to
\verb|\zcharnote|, \verb|\zchar|, \verb|\uptext|, \verb|\zmidstaff|, etc., to
post them at the desired altitude. The longest such symbol is $\simeq$ 68 mm.

The second type of font-based hairpin requires two commands, one to start it
and another to end it. The starting macro is \keyindex{icresc}. It has no
arguments. Only one invocation suffices to start any number and combination of
crescendos and diminuendos. The ending macros are \keyindex{tcresc} or
\keyindex{tdecresc}. They should be used as arguments of \verb|\zcharnote| etc,
which will set the altitude. For example,

\begin{music}
\parindent0pt
\generalmeter{\meterfrac{12}8}
\setstaffs1{2}
\startextract
\Notes\cmidstaff\ppp|\ca c\en
\Notes\icresc|\ca{defgh'abcde}\en
\Notes\zmidstaff{\loff\tcresc}\cmidstaff\fff|\ca{'f}\en
\endextract
\end{music}
\noindent which was coded as
\begin{quote}\begin{verbatim}
\Notes\cmidstaff\ppp|\ca c\en
\Notes\icresc|\ca{defgh'abcde}\en
\Notes\zmidstaff{\loff\tcresc}\cmidstaff\fff|\ca{'f}\en
\end{verbatim}\end{quote}
\medskip\noindent while
\begin{music}
\parindent0pt
\generalmeter{\meterfrac{12}8}
\setstaffs1{2}
\startextract
\Notes\cmidstaff\ppp|\ca c\en
\Notes\icresc|\ca{defgh'abcde}\en
\Notes\zcharnote N{\tcresc}\cmidstaff\fff|\zcharnote q{\tcresc}\ca{'f}\en
\endextract
\end{music}
\noindent was coded as
\begin{quote}\begin{verbatim}
\Notes\cmidstaff\ppp|\ca c\en
\Notes\icresc|\ca{defgh'abcde}\en
\Notes\zcharnote N{\tcresc}\cmidstaff\fff|\zcharnote q{\tcresc}\ca{'f}\en
\end{verbatim}\end{quote}

\subsubsection{Postscript hairpins}
As already noted, these require that you have input \verb|musixps.tex|.
Once having done that, you should not try to use font-based hairpins
because the syntax is incompatible.

Again,
there are two different types. The first type is normally initiated with either
\keyindex{icresc}\onen~or \keyindex{idecresc}\onen, and terminated with
\keyindex{tcresc}\onen, where $n$ is a hairpin index,
which is virtually unlimited but certain restrictions apply if it exceeds 14.
The altitude is set by the value of \keyindex{setcrescheight}, which by default
is -5 and which must be expressed numerically. Note that
\keyindex{tcresc}~is the same as \keyindex{tdecresc}.

You can shift the starting or ending point horizontally by replacing the
foregoing macros with
\keyindex{ilcresc},    \keyindex{ildecresc},
\keyindex{ircresc},    \keyindex{irdecresc},
\keyindex{tlcresc},    \keyindex{tldecresc},
\keyindex{trcresc},    \keyindex{trdecresc},
for example to make space for an alphabetic dynamic mark.

The second form of postscript hairpin macros allows individual and arbitrary
specification of the altitude and horizontal offset. The syntax is
\keyindex{Icresc}\itbrace{n}\itbrace{h}\itbrace{s}, where $h$ is the
altitude---which must be numerical---and $s$ is the horizontal offset
in \verb|\internote|. Similar syntax obtains for \keyindex{Idecresc}\
and \keyindex{Tcresc}.

These hairpins may span several lines. If one of them spans three systems
then the height of the middle section can be adjusted with
\keyindex{liftcresc}\itbrace{n}\itbrace{h}. The height of the first and last
parts of a broken crescendo will be defined by the height parameter in
\keyindex{Icresc}~or \keyindex{Tcresc}.

There are numerous other nuances and shorthand macros that are described
in the comments in \verb|musixps.tex|.

As an example of a postscript hairpin,
\begin{music}\nostartrule
%\input smallmusixpsx
\input musixps
\generalmeter{\meterfrac{12}8}
\startextract
\Notes\ccharnote{-8}{\ppp}\Icresc0{-7}6\ca{bdegh'bde}\en
\Notes\Tcresc0{-4}{-2}\zcharnote{-5}{\fff}\ca{'f}\en
\zendextract
\end{music}
\noindent  was coded as
\begin{quote}\begin{verbatim}
\input musixps
\generalmeter{\meterfrac{12}8}
\startextract
\Notes\ccharnote{-8}{\ppp}\Icresc0{-7}6\ca{bdegh'bde}\en
\Notes\Tcresc0{-4}{-2}\zcharnote{-5}{\fff}\ca{'f}\en
\zendextract
\end{verbatim}\end{quote}

 \subsection{Length of note stems}

The default length of note stems is the distance of one octave, i.e.
\verb|7\internote| or 4.66 \keyindex{interbeam}. The default may be changed
with the macro \keyindex{stemlength}\itbrace{b}\ where $b$ is the length in
\verb|\interbeam|s.

The command \keyindex{stemcut} causes stems that extend outside the staff
to be shortened depending on the pitch of the notes. It is the default
behavior. To suppress this adjustment, issue the command
\keyindex{nostemcut}.

Normally, down stems never end above the middle line of the staff and up stems
never below that line. The command \keyindex{stdstemfalse} will inhibit this
adjustment, but only for the next stem generated.  There is no command to globally
suppress this behavior.

 \subsection{Brackets, parentheses, and oblique lines}\label{brapar}

Several varieties of brackets, parentheses and oblique lines are provided for
use within a score.
 \begin{itemize}\setlength{\itemsep}{0ex}
 \item \keyindex{lpar}\verb|{|$p$\verb|}| and
\keyindex{rpar}\verb|{|$p$\verb|}| yield left and right
parentheses at pitch $p$. They could be used to enclose notes or to build
\ital{cautionary} accidentals, although the latter are more easily
obtained with predefined macros (see \ref{cautionary}).

%avrb
For example,

\begin{tabular}{ll}
\raisebox{-1.5ex}[0ex][0ex]{\musicintextnoclefn{\notes\bsk\lpar{g}\rpar{g}\hu{g}\sk%
\loffset{1.5}{\lpar{g}}\loffset{1.5}{\rpar{g}}\loffset{.4}{\sh g}\hu{g}\en}}
&\begin{tabular}{ll}
&\verb+\notes\lpar{g}\rpar{g}\hu{g}\sk%+\\
is coded as&\verb+\loffset{1.5}{\lpar{g}}\loffset{1.5}{\rpar{g}}%+\\
&\verb+\loffset{.4}{\sh g}\hu{g}\en}+
\end{tabular}
\end{tabular}
%avre

 \item \keyindex{bracket}\verb|{|$p$\verb|}{|$n$\verb|}| posts a
square bracket to the left of a chord, vertically spanning $n$
\verb|internote|s.
 \item \keyindex{doublethumb}\verb|{|$p$\verb|}| indicates a bracket as
above spanning 2\verb|\internote|s.
 \item \keyindex{ovbkt}\verb|{|$p$\verb|}{|$n$\verb|}{|$s$\verb|}| and
\keyindex{unbkt}\verb|{|$p$\verb|}{|$n$\verb|}{|$s$\verb|}|
draw a sloped bracket starting at the current position at pitch $p$,
with horizontal extent $n$ \verb|noteskip|s and slope $s$ in multiples of
1-1/8 degree.
 \item \keyindex{uptrio}\verb|{|$p$\verb|}{|$n$\verb|}{|$s$\verb|}| and
\keyindex{downtrio}\verb|{|$p$\verb|}{|$n$\verb|}{|$s$\verb|}| are like
\verb|\ovbkt| but with freely definable \keyindex{txt} centered inside.

 \item \keyindex{varline}\itbrace{h}\itbrace{\ell}\itbrace{s}\ builds an
oblique line starting at the current horizontal position. It must be used
inside a zero box, such as for example as the second argument of
\verb|\zcharnote|. $h$ is the height of the starting point, $\ell$ is the
length, and $s$ is the slope. It is used in the definitions of some of
the foregoing macros, and could be used, for example, to construct various
obscure baroque ornaments made up of diagonal lines.

\end{itemize}

For example,

\begin{music}
\setstaffs1{2}
\setclef1\bass
\startextract
\NOtes\bracket C8\zq C\qu J\en
\NOtes|\doublethumb g\rq h\qu g\en
\NOtes\lpar c\rpar c\qu c\en
\NOtes\unbkt C15\qu {FH}|\ovbkt n14\ql{kl}\en
\NOtes\downtrio C16\qu {FH}|\uptrio o14\ql{lm}\en
\endextract
\end{music}
\noindent is coded as
\begin{quote}\begin{verbatim}
\begin{music}
\setstaffs1{2}
\setclef1{\bass}
\startextract
\NOtes\bracket C8\zq C\qu J\en
\NOtes|\doublethumb g\rq h\qu g\en
\NOtes\lpar c\rpar c\qu c\en
\NOtes\unbkt C15\qu {FH}|\ovbkt n14\ql{kl}\en
\NOtes\downtrio C16\qu {FH}|\uptrio o14\ql{lm}\en
\zendextract
\end{music}
\end{verbatim}\end{quote}

 \subsection{Forcing activity at the beginning of systems}
A macro named \keyindex{everystaff} is executed each time a new system
begins. It is normally void, but it can be defined (simply by \verb|\def|%
\keyindex{everystaff}\verb|{...}|) to cause \musixtex\ to post anything
reasonable at the beginning of each system. For it to affect the first system
in a score, it must be defined \ital{before}
\verb|\startpiece|.

If a macro named \keyindex{atnextline} is defined at any point in a score,
it will be executed just once, viz., at the next computed or forced system
break. More
precisely, it is executed after the break and before the next system begins.
Thus it is suitable for redefining layout parameters.

 \index{octave treble clef}In some scores, tenor parts are not coded using the
\ital{bass} clef, but using rather the \ital{octave treble clef}, which is
subscripted by a numeral {\tt8}.
This clef is supported by the clef substitution command
\keyindex{settrebleclefsymbol}\onen\keyindex{treblelowoct}, as already
explained in section \ref{treblelowoct}. However, if for some reason you
aren't happy with the height of the ``8'', it can be posted on selected
staves at the beginning of every system using \keyindex{everystaff} and
\keyindex{zcharnote} as follows:

\begin{music}
\instrumentnumber{4}
\setclef1\bass
\def\everystaff{%
  \znotes&\zchar{-6}{\eightrm\kern-2\Interligne8}%
  &\zchar{-6}{\eightrm\kern-2\Interligne8}\en}%
\startextract
\NOTes\ha{HIJK}&\ha{efgh}&\ha{hijk}&\ha{hmlk}\en
\zendextract
\end{music}
\noindent The coding is
\begin{quote}\begin{verbatim}
\instrumentnumber{4}
\setclef1\bass
\def\everystaff{%
  \znotes&\zchar{-6}{\eightrm \kern -2\Interligne 8}%
  &\zchar{-6}{\eightrm \kern -2\Interligne 8}\en}%
\startextract
\NOTes\ha{HIJK}&\ha{efgh}&\ha{hijk}&\ha{hmlk}\en
\endextract
\end{verbatim}\end{quote}

\section{Smaller notes in normal-sized staves}
Here we describe how to reduce the size of note symbols without changing the
size of the staff itself. Changing overall staff size will be treated in
section \ref{staffspacing}.

\subsection{Arbitrary sequences of notes}
Written-out ornaments and \itxem{cadenzas} are usually typeset with
smaller notes and spacing than normal. The smaller \ital{size} can be
initiated anywhere inside a \verb|\notes| group by stating
\keyindex{smallnotesize} or \keyindex{tinynotesize}. Normal note size is then
restored by \keyindex{normalnotesize} or simply by terminating the
\verb|notes| group and starting another. Smaller \ital{spacing} must also be
explicitly indicated, usually by redefining \verb|\noteskip| in some way.

As an example, this excerpt, from the beginning
of the Aria of the ``Creation'' by Joseph {\sc Haydn})\index{Haydn, J.@{\sc
Haydn, J.}},

\begin{music}
\instrumentnumber{2}
\generalmeter{\meterfrac44}
\def\qbl#1#2#3{\ibl{#1}{#2}{#3}\qb{#1}{#2}}
\setstaffs2{2}
\setclef1\bass
\setclef2\bass
\startbarno0
\startextract
\NOtes\qp&\zmidstaff{\bf II}\qp|\qu g\en
% mesure 1
\bar
\Notes\itieu2J\wh J&\zw N\ibl0c0\qb0e|\qu j\en
\notes&\qbl0c0|\multnoteskip\tinyvalue\tinynotesize
  \Ibbu1ki2\qb1{kj}\tqh1i\hqsk\en
\Notes&\qb0e\tbl0\qb0c|\qu j\en
\Notes&\ibl0c0\qb0{ece}\tbl0\qb0c|\ql l\sk\ql j\en
% mesure 2
\bar
\Notes\ttie2\wh J&\ql J\sk\ql L|\zqupp g\qbl1e0%
  \zq c\qb1e\zq c\qb1e\zq c\tbl1\zqb1e\en
\notes&|\sk\ccu h\en
\Notes&\ql N\sk\ibl0L{-4}\qbp0L|\ibl1e0\zq c\zqb1e\cu g%
  \zq c\zqb1e\raise\Interligne\ds\zqu g\qb1g\en
\notes&\sk\tbbl0\tbl0\qb0J|\tbl1\zq c\qb1e\en
\endextract
\end{music}
\noindent can be coded as
\begin{quote}\begin{verbatim}
\instrumentnumber{2}
\generalmeter{\meterfrac44}
\setstaffs2{2}
\setclef2{\bass}
\setclef1{\bass}
\startbarno=0
\startextract
\NOtes\qp&\zmidstaff{\bf II}\qp|\qu g\en
% mesure 1
\bar
\Notes\itieu2J\wh J&\zw N\ibl0c0\qb0e|\qu j\en
\notes&\ibl0c0\qb0c|\multnoteskip\tinyvalue\tinynotesize
  \Ibbu1ki2\qb1{kj}\tqh1i\en
\Notes&\qb0e\tbl0\qb0c|\qu j\en
\Notes&\ibl0c0\qb0{ece}\tbl0\qb0c|\ql l\sk\ql j\en
% mesure 2
\bar\Notes\ttie2\wh J&\ql J\sk\ql L|\zqupp g\qbl1e0%
  \zq c\qb1e\zq c\qb1e\zq c\tbl1\zqb1e\en
\notes&|\sk\ccu h\en
\Notes&\ql N\sk\ibl0L{-4}\qbp0L|\ibl1e0\zq c\zqb1e\cu g%
  \zq c\zqb1e\raise\Interligne\ds\zqu g\qb1g\en
\notes&\sk\tbbl0\tbl0\qb0J|\tbl1\zq c\qb1e\en
\endextract
\end{verbatim}\end{quote}

 \subsection{Grace notes}
Grace notes are a special case of small and tiny notes, namely single-stemmed
eighth notes with a diagonal slash through the flag. To enable this, there
are the macros \keyindex{grcu}\pitchp\ and \keyindex{grcl}\pitchp, which by
themselves would
produce normal-sized eighth notes with a slash. They should be used along
with the note size reduction macros and spacing reduction macros just
discussed. In addition, chordal grace notes can be built as in the following
example:

\begin{music}\nostartrule
\startextract
\NOTes\hu h\enotes
\notes\multnoteskip\smallvalue\smallnotesize\grcu j\enotes
\NOTes\hu i\enotes
\bar
\notes\multnoteskip\tinyvalue\tinynotesize\zq h\grcl j\enotes
\NOTEs\wh i\enotes
\zendextract
\end{music}
\noindent which was coded as
\begin{quote}\begin{verbatim}
\startextract
\NOTes\hu h\enotes
\notes\multnoteskip\smallvalue\smallnotesize\grcu j\enotes
\NOTes\hu i\enotes
\bar
\notes\multnoteskip\tinyvalue\tinynotesize\zq h\grcl j\enotes
\NOTEs\wh i\enotes
\zendextract
\end{verbatim}\end{quote}

 \subsection[Ossia]{Ossia\texorpdfstring{\protect\footnote{(Italian O sia) Or else}}{}}
This clever example had been provided by Olivier Vogel:\label{ossia}

%\begin{center}
%\includegraphics[scale=1]{./mxdexamples/ossiavogel.eps}
%\end{center}

\begin{music}
%\startextract
%\hsize70mm
\let\extractline\hbox
\hbox to \hsize{\hss
\def\xnum#1#2#3{\off{#1\elemskip}\zcharnote{#2}{\smalltype\it #3}%
\off{-#1\elemskip}}%
\newbox\ornamentbox
\setbox\ornamentbox=\hbox to 0pt{\kern-4pt\vbox{\hsize=2.6cm%
\makeatletter
\nostartrule\smallmusicsize\setsize1{\smallvalue}\setclefsymbol1\empty\global\clef@skip0pt%
\makeatother
%\smallmusicsize\setsize1{\smallvalue}\setclefsymbol1\empty%
%\startpiece
%\addspace{2pt}%
\startextract
\addspace{-2pt}%
\let\notest\notes\def\notes{\vnotes2.1\elemskip}%
\notes\ibbbl2{'c}0\qb2b\qb2c\qb2d\tbbbl2\qb2c\en%
\notes\xnum{1.15}{'e}3\qb2d\qb2c\tbl2\qb2d\en%
\notes\ibl2{'c}1\usf e\qb2c\en%
\notes\tbl2\qb2{'d}\en
\let\notes\notest%
%\zstoppiece%
\endextract
}\hss}
%\setbox\ornamentbox=\hbox to 0pt{Hello}
%
%
%\normalmusicsize\nopagenumbers
%\def\nbinstruments{1}%
\setstaffs12\setclef1{60}%
\generalsignature{-2}\generalmeter{\meterfrac{3}{4}}%
%\parindent 0pt%
%\stafftopmarg0pt\staffbotmarg5\Interligne\interstaff{10}\relax
%\startpiece\addspace\afterruleskip%
\startextract\addspace\afterruleskip%
\NOtes\ibl1{'G}{-1}\qb1G\sk\bigna F\tbl1\qb1F|%
\ibbl2{'b}0\qb2b\qb2a\qb2b\tbl2\qb2c\en%
\NOtes\hl{'E}\bsk\raise6\internote\ds\ibu3{G}1\bigsh F%
\qb3F\qb3G\tbu3\qb3{'A}|\zcharnote{10}{\copy\ornamentbox}\qlp{'c}\sk\sk%
\cl d\en%
%\endpiece
\endextract
\hss}
%\vfill\eject\endmuflex
\end{music}


The code is:
\begin{quote}\begin{verbatim}
\hsize70mm%
\def\xnum#1#2#3{\off{#1\elemskip}\zcharnote{#2}{\smalltype\it #3}%
\off{-#1\elemskip}}%
\newbox\ornamentbox
\setbox\ornamentbox=\hbox to 0pt{\kern-4pt\vbox{\hsize=2.6cm%
\nostartrule\smallmusicsize\setsize1{\smallvalue}\setclefsymbol1\empty%
\startpiece\addspace{2pt}%
\notes\ibbbl2{'c}0\qb2b\qb2c\qb2d\tbbbl2\qb2c\en%
\notes\xnum{1.15}{'e}3\qb2d\qb2c\tbl2\qb2d\en%
\notes\ibl2{'c}1\usf e\qb2c\en%
\notes\tbl2\qb2{'d}\en%
\zstoppiece%
}\hss}
\normalmusicsize\nopagenumbers
\def\nbinstruments{1}%
\setstaffs12\setclef1{60}%
\generalsignature{-2}\generalmeter{\meterfrac{3}{4}}%
\parindent 0pt%
\stafftopmarg0pt\staffbotmarg5\Interligne\interstaff{10}\relax
\startpiece\addspace\afterruleskip%
\notes\ibl1{'G}{-1}\qb1G\sk\bigna F\tbl1\qb1F|%
\ibbl2{'b}0\qb2b\qb2a\qb2b\tbl2\qb2c\en%
\notes\hl{'E}\bsk\raise6\internote\ds\ibu3{G}1\bigsh F%
\qb3F\qb3G\tbu3\qb3{'A}|\zcharnote{10}{\copy\ornamentbox}\qlp{'c}\sk\sk%
\cl d\en%
\end{verbatim}\end{quote}

%
% Why is this here?? DAS 4/30/06
%
% \subsection{Other note shapes}\label{othernotes}
% The classical note heads
%given above --- namely \raise.5ex\hbox{\musixchar7}~~, \raise.5ex
%\hbox{\musixchar8}~~ and \raise.5ex\hbox{\musixchar9}~~~
%--- can be replaced with less classical note heads, for example to code
%special \itxem{violin harmonic notes} or \itxem{percussion music}. See an
%example in \ref{abnormalscores}.
%
% At present time, alternate available note heads can be found in the
%extension library, see \ref{diam}, \ref{perc}, \ref{gregnotes} and \ref{litu}.

\section{Staff size} \index{staff size}\label{staffspacing}
In contrast with the prior section, here we describe how to change the sizes
of everything...staff, notes, and all other symbols. In
section~\ref{whatspecify} we saw how to set the size for all instruments at
the start of a score. Any one of the same macros---\verb|\normalmusicsize|,
\verb|\smallmusicsize|, \verb|\largemusicsize|, or
\verb|\Largemusicsize|---can be used to change the size of all instruments
midway through a score, but in this case it must come between
\verb|\stoppiece| and \verb|\startpiece|.

Once the overall staff size is set, you can alter the size of any desired
instrument with the macro \keyindex{setsize}\itbrace{n}\itbrace{s}, where
$n$ is the instrument number and $s$ is a factor by which the size is to be
changed from the prevailing overall size. There are five predefined macros
that should be used for the size factor $s$. Their names and respective values
are \keyindex{normalvalue}~(1.0), \keyindex{smallvalue}~(0.80),
\keyindex{tinyvalue}~(0.64), \keyindex{largevalue}~(1.2), and
\keyindex{Largevalue}~(1.44). \musixtex\ should not crash if you use an
explicit number different from any of these, but the result may be
less than satisfactory.

Once again, if used at the beginning of a piece, the \verb|\setsize| macro
must precede \verb|\startpiece| (not \verb|\contpiece|), and if used after
the beginning, must be preceded by \verb|\stoppiece|.

As an example, we give two bars of the \ital{Ave Maria} by Charles {\sc
Gounod}\index{Gounod, C.@{\sc Gounod, C.}}, based on the first prelude of
J. S. Bach's \ital{Well Tempered Clavier}, as transcribed for
organ, violin and voice by Markus {\sc Veittes}:\label{avemaria}

\begin{music}
\def\oct{\advance\transpose by 7}
\def\liftqs#1{\raise#1\Interligne\qs}
\parindent0pt
\sepbarrules
\instrumentnumber{3}
\generalmeter{\meterC}
\setinterinstrument2{3\Interligne}
\setsize3\tinyvalue
\setsize2\tinyvalue
\setclef1\bass
\setstaffs1{2}
\startpiece\addspace\afterruleskip
%Takt 9
\notes\zhl c\liftqs6\qupp e|\ds&\oct
  \itieu5h\hl h&\tx ~~~gra---*\itied4h\hu h\enotes
\notes|\ibbl0j3\qb0h\tqb0l\enotes
\notes|\ibbl1k0\qb1{ohl}\tqb1o\enotes
\notes\zhl c\liftqs6\qupp e|\ds&\oct
  \ttie5\ibl4c0\qb4h&\ttie4\ibu5g{-3}\qb5h\enotes
\notes|\ibbl0j3\qb0h\tqb0l&\oct\qb4a&\tx ---*\tqh5a\enotes
\notes|\ibbl1k0\qb1o\qb1h&\oct\qb4b&\tx ~~ti~-*\cu b\enotes
\notes|\qb1l\tqb1o&\oct\tqb4c&\tx a*\cu c\enotes
\bar
%Takt 10
\notes\zhl c\liftqs6\qupp d|\ds&\oct
  \qlp d&\tx ~~~ple---*\ibsluru4e\qup d\enotes
\notes|\ibbu1g3\bigaccid\qb1{^f}\tqh1h\enotes
\notes|\ibbu2i0\qb2k\qb2f\enotes
\notes|\qb2h\tqh2k&\oct\cl e&\tubslur4f\cu e\enotes
\notes\zhl c\liftqs6\qupp d|\ds&\oct\ql d&\tx na,*\qu d\enotes
\notes|\ibbu1g3\qb1f\tqh1h\enotes
\notes|\ibbu2i0\qb2{kfh}\tqh2k&\qp&\qp\enotes
\endpiece
\end{music}
 This example was coded as:
\begin{quote}\begin{verbatim}
\def\oct{\advance\transpose by 7}
\def\liftqs#1{\raise#1\Interligne\qs}
\parindent0pt
\sepbarrules
\instrumentnumber{3}
\generalmeter{\meterC}
\setinterinstrument2{3\Interligne}
\setsize3\tinyvalue
\setsize2\tinyvalue
\setclef1\bass
\setstaffs1{2}
\startpiece\addspace\afterruleskip
%Takt 9
\notes\zhl c\liftqs6\qupp e|\ds&\oct
  \itieu5h\hl h&\tx ~~~gra---*\itied4h\hu h\enotes
\notes|\ibbl0j3\qb0h\tqb0l\enotes
\notes|\ibbl1k0\qb1{ohl}\tqb1o\enotes
\notes\zhl c\liftqs6\qupp e|\ds&\oct
  \ttie5\ibl4c0\qb4h&\ttie4\ibu5g{-3}\qb5h\enotes
\notes|\ibbl0j3\qb0h\tqb0l&\oct\qb4a&\tx ---*\tqh5a\enotes
\notes|\ibbl1k0\qb1o\qb1h&\oct\qb4b&\tx ~~ti~-*\cu b\enotes
\notes|\qb1l\tqb1o&\oct\tqb4c&\tx a*\cu c\enotes
\bar
%Takt 10
\notes\zhl c\liftqs6\qupp d|\ds&\oct
  \qlp d&\tx ~~~ple---*\ibsluru4e\qup d\enotes
\notes|\ibbu1g3\bigaccid\qb1{^f}\tqh1h\enotes
\notes|\ibbu2i0\qb2k\qb2f\enotes
\notes|\qb2h\tqh2k&\oct\cl e&\curve222\tubslur4f\cu e\enotes
\notes\zhl c\liftqs6\qupp d|\ds&\oct\ql d&\tx na,*\qu d\enotes
\notes|\ibbu1g3\qb1f\tqh1h\enotes
\notes|\ibbu2i0\qb2{kfh}\tqh2k&\qp&\qp\enotes
\endpiece
\end{verbatim}\end{quote}

\section{Layout parameters}\label{LayoutParameters}
 Most layout parameters are set by \musixtex\ to reasonable default values.
However, some projects will require altering one or more of them. In this
section we discuss the most important parameters and how to change them.

 \subsection{List of layout parameters}
 In the following, the indication ``\nochange'' does not mean that this
parameter cannot be changed at all, but that it should not be modified
directly, e.g.\ by saying something like \verb|\Interligne=14pt|. In other
words, changes in these parameters must be accomplished only by more
comprehensive macros which not only revise them but at the same time perform
other necessary related changes. Even though you cannot \ital{change} these,
you may \ital{refer} to them in your coding if that proves useful.

\begin{description}\setlength{\itemsep}{0ex}
 \item[\keyindex{Interligne} :]vertical distance between the bottoms of
consecutive staff lines of the current instrument, taking no account of a
possible alteration by \keyindex{setsize} \nochange.
 \item[\keyindex{internote} :]vertical spacing between notes one scale
step apart in the current instrument, taking account of a possible alteration
by \keyindex{setsize} \nochange.
 \item[\keyindex{Internote} :]vertical spacing between notes one scale
step apart in any instrument whose \keyindex{setsize} has the default
value \keyindex{normalvalue} (1.0), equal to \verb|0.5\Interligne| \nochange
\item[\keyindex{staffbotmarg} :]margin below the first (lowest) staff of the
first (lowest) instrument. Changes are recognized at the next system.
Default is \verb|3\Interligne|.
 \item[\keyindex{stafftopmarg} :]margin above the last (uppermost) staff of
last (uppermost) instrument. Changes are recognized at the next system.
Default is \verb|3\Interligne|.
 \item[\keyindex{interbeam} :]vertical distance between beams. \nochange.
\item[\keyindex{interstaff} :]a very important macro with a single numerical
argument representing the factor that multiplies \verb|2\internote| to give the
distance between the bottom of one staff and the bottom of the next one. In
fact the macro redefines the parameter \verb|\interfacteur|.
\item[\keyindex{interportee} :]distance between the bottom of one staff and
the bottom of the next one. It is always reset to
\verb|2|\keyindex{interfacteur}\verb|\internote| at the next system.
Therefore, trying to change \verb|\interportee| will have no effect. Change
\verb|\interstaff| instead. Further, note that \verb|\interstaff| applies to all the
instruments, but each distinct instrument may have a different
\verb|\internote| (see \ref{staffspacing}).

\item[\keyindex{interinstrument} :]additional vertical distance between
two consecutive instruments. This means that the distance between the lowest
line of the previous instrument and the lowest line of the top staff of the current
instrument is \keyindex{interportee+\Bslash interinstrument}. The
default value of \verb|\interinstrument| is zero, but sometimes you
may want additional space between distinct instruments. This is a general
dimension register. As usual in \TeX, it can be set using a command such as
\verb|\interinstrument=10pt| or \verb|\interinstrument=6\internote|. Its
value can be overridden for the space above any particular instrument
with the macro \keyindex{setinterinstrument}\itbrace{n}\itbrace{s}, where
$n$ is the instrument and $s$ is the replacement value of the space to
be added. The \verb|\setinterinstrument| macro may be useful in some vocal
scores to provide vertical space for lyrics. Note that
after you have used \keyindex{setinterinstrument},
you cannot reset the distances for that instrument with
\keyindex{interinstrument}; you must subsequently use
\keyindex{setinterinstrument} for that purpose.

 \item[\keyindex{systemheight} :]distance from the bottom of the
lowest staff to the top of the highest one. This is the length of any
vertical lines such as repeats that span the full height of a system.
\nochange.
\end{description}

 In addition, when handling notes of a given staff of a given instrument, the
following dimensions are available (note these are not true registers, but
\ital{equivalenced symbols} through a \verb|\def|):

\begin{description}\setlength{\itemsep}{0ex}
 \item[\keyindex{altplancher} :]altitude of the lowest line of the lowest
instrument \nochange.
 \item[\keyindex{altitude} :]altitude of the lowest line of the lowest
staff of the current instrument \nochange.
 \item[\keyindex{altportee} :]altitude of the lowest line of the current
staff \nochange.

 %??? Next perhaps will change to steps of \verb|\internote|.

 \item[\keyindex{stemfactor} :]parameter defining the length of stems on
half, quarter, and beamed eighth notes, in units of \verb|\interbeam|.
Normally a stem has the length of one octave,
i.e. 3.5\keyindex{Interligne}. However, this is not correct for small or tiny
note sizes. Therefore, stem length is defined as a multiple of the
dimension \keyindex{interbeam}, which is chosen because it is automatically
redefined as a
different multiple of \keyindex{Interligne} whenever note size is changed. For
example, with \verb|\normalmusicsize| when \verb|\setsize| is
\verb|\normalvalue|, \verb|\interbeam| is 0.75 \keyindex{Interligne}. This
legislates a default value for \keyindex{stemfactor} of 4.66 (=3.5/0.75).
To change stem length, it is easiest to use e.g.
\keyindex{stemlength}\verb|{3.5}|, which simply redefines \verb|\stemfactor|.
Subsequently, \verb|\stemfactor| will not automatically be reset to the default,
but keep in mind that if it is changed
inside a notes group, the change will only be effective within that notes group.
\end{description}

 \subsection{A convenient macro for changing layout parameters in mid-score}
Of the parameters just described that can be changed, many should only be
changed between the end of one system and the beginning of the next. The
command sequence \verb|\def\atnextline{|\ital{any control sequence}\verb|}|
may be useful for this purpose. It will cause \ital{any control sequence} to
be inserted right before the next new line is begun, provided the line break
is not initiated by a \verb|\startpiece|. Thus this will work with
automatically generated line breaks, with those forced by \verb|\alaligne|, and
with those forced by explicit use of \verb|\endpiece| or \verb|\stoppiece|
followed by \verb|\contpiece|. (Note, however, that in the latter case it
would be just as convenient to enter the parameter changes explicitly as well.)
The control sequence will only be executed once,
after which \verb|\atnextline| is redefined as \verb|\empty|.

 \subsection{Changing the number of lines per staff}\label{stafflinenumber}
Naturally, the default number of lines per staff is five. But you may want a
different number in some or all staves, for example for gregorian music,
percussion music, guitar tablature, or early baroque keyboard music. To do so,
use the command \keyindex{setlines}\itbrace{n}\itbrace{m}~where $n$ is the
instrument number and $m$ is the number of lines.

 \subsection{Resetting normal layout parameters}
The general size can only be changed with one of the commands
\keyindex{smallmusicsize},
\keyindex{normalmusicsize}, \keyindex{largemusicsize}, or
\keyindex{Largemusicsize}. Beyond that, the command
\keyindex{resetlayout} will reset the following key layout parameters
to their default values: \keyindex{staffbotmarg} (3\verb|\Interligne|),
\keyindex{stafftopmarg} (3\verb|\Interligne|), \keyindex{interstaff} (9),
 number of lines per staff for all instruments (5); and will reset all clef
symbols to standard clef symbols.

% The whole subsection on excerpts should go with "MusiXTeX and LaTeX", currently 2.25
% \subsection{Typesetting one-line excerpts rather than large scores}\label{excerpts}

% All the old lyrics stuff should be deleted, with a reference to some older version of
% musixdoc.

\section{Lyrics}\index{lyrics}\label{lyrics}
\musixtex{} itself doesn't manage lyrics very well. You should use
\verb+musixlyr+ instead, a MusiXTeX extension package for lyrics handling by Rainer Dunker.
The \TeX~source and
\href{http://icking-music-archive.org/software/musixtex/add-ons/mxlyrdoc.pdf}
{\underline{documentation}}~are included in the \musixtex~distribution.

But first we recall briefly on the older methods, who are still usefull when
only a small number of words are involved.

\subsection{Native lyrics method: placing single words}
\subsubsection{Native \musixtex\ commands for lyrics}
 \begin{enumerate}\setlength{\itemsep}{0ex}
 \item An obvious solution consists in using the commandc
\keyindex{zcharnote} (expanded to the right),
\keyindex{lcharnote} (expanded to the left),
\keyindex{ccharnote} (centered), to post the text at any position (computed in
\verb|\internote|s) with respect to the lower line of the current staff.
The pitch should be usually negative to have the text below the staff.

Example:\quad
\raisebox{0ex}[4ex][3ex]{\musicintextnoclefn{\notes\sk\zcharnote{N}{Word}\wh g\sk\en}}
\quad is coded by \quad
\verb|\zcharnote{N}{Word}\wh g|~.

\item The vertical position can also be given with a number in the commands
\keyindex{zchar} (expanded to the right),
\keyindex{lchar} (expanded to the left),
\keyindex{cchar} (centered). The number is internally multiplied by \verb|\internote|~.

Example:\quad
\raisebox{0ex}[4ex][3ex]{\musicintextnoclefn{\notes\sk\cchar{-4}{Word}\wh g\sk\en}}
\quad is coded by \quad
\verb|\cchar{-5}{Word}\wh g|~.

\item Of easier use are the commands \keyindex{zsong} (right of the note),
\keyindex{lsong} (left) and \keyindex{csong} (centered) which post the lyrics
at the lower staff line \ital{minus} the previous
\keyindex{interinstrument}~$n$ or the \keyindex{staffbotmarg} quantity. These
commands only have one argument, namely the lyrics text:
%\begin{center}
\keyindex{zsong}\verb|{|\ital{text}\verb|}|\quad
\keyindex{lsong}\verb|{|\ital{text}\verb|}|\quad
\keyindex{csong}\verb|{|\ital{text}\verb|}|
%\end{center}
 Depending on the values of the inter-instrument spacings and margins, the
resulting vertical position might be inappropriate. Then it can be changed for
any specific $n$-th instrument until further change using
\begin{quote}
\keyindex{setsongraise}~$n$\verb|{|\ital{any \TeX-dimension}\verb|}|
\end{quote}
As an example, the following French song\\
 \begin{music}
 \generalsignature{1}
 \startextract
 \geometricskipscale
 \NOtes\zsong{Au }\qu g\en
 \NOtes\zsong{clair }\qu g\en
 \NOtes\zsong{de }\qu g\en
 \NOtes\zsong{la }\qu h\en
 \bar
 \NOTes\zsong{lu- }\hu i\en
 \NOTes\zsong{ne, }\hu h\en
 \bar
 \NOtes\zsong{mon }\qu g\en
 \NOtes\zsong{a- }\qu i\en
 \NOtes\zsong{mi }\qu h\en
 \NOtes\zsong{Pier- }\qu h\en
 \bar
 \NOTes\zsong{rot, }\wh g\sk\en
 \endextract
 \end{music}

\noindent was coded as:
\begin{quote}\begin{verbatim}
 \generalsignature{1}
 \startextract
 \geometricskipscale
 \NOtes\zsong{Au }\qu g\zsong{clair }\qu g\en
 \NOtes\zsong{de }\qu g\zsong{la }\qu h\en\bar
 \NOTes\zsong{lu- }\hu i\zsong{ne, }\hu h\en\bar
 \NOtes\zsong{mon }\qu g\zsong{a- }\qu i\en
 \NOtes\zsong{mi }\qu h\zsong{Pier- }\qu h\en\bar
 \NOTes\zsong{rot, }\wh g\sk\en
 \zendextract
\end{verbatim}\end{quote}
\end{enumerate}

\subsubsection{Adapting note spacing for lyrics}

The command \keyindex{hardlyrics}\verb|{longword}| provides a spacing that is equal to the length
of the text argument \verb|{longword}|. In the same time the argument \verb|{longword}|
is saved in \keyindex{thelyrics}

As an example \quad
\raisebox{0ex}[5ex][4ex]%
{\musicintextnoclefn{\staffbotmarg2\Interligne%
\hardlyrics{clair}\notes\hsong{\thelyrics}\wh g\en\notes\wh{gg}\en}}
\quad is coded by:
\begin{tabular}{l}
\verb|\hardlyrics{clair}%|\\
\verb|\notes\hsong{\thelyrics}\wh g\en|\\
\verb|\notes\wh{gg}\en|\\
\end{tabular}

All notes with long lyrics need such a treatment. The commands only carry out on
\verb|\notes| (not on \verb|\Notes|, \verb|\NOtes|...).

If you want to go back to the normal placing on an easy way, you simply can replace
'\verb|\hardlyrics|' by '\verb|\softlyrics|'.

 A complete score is given in example {\tt glorias.tex}\label{glorias} and in
{\tt gloriab.tex}, the latter exhibiting not only the song tune but also the
organ accompaniment.

Alternate versions of \verb|\hsong| are \keyindex{dhsong} which has a fixed
length of \verb|2\noteskip| and \keyindex{thsong} whose fixed length is
\verb|3\noteskip|. These are useful when the text is set below (or above) a
collective coding of two or three notes.

\subsection{Musixlyr}\label{musixlyr}

Lyrics are best handled by the \texttt{musixlyr}\index{musixlyr} package by Rainer Dunker.
The package can be used by inserting a file in your source code:
\begin{quote}\begin{verbatim}
\input musixtex
\input musixlyr
...
\end{verbatim}\end{quote}

The manual, the input file and a few examples can be downloaded as
compact musixlyr packet
\href{http://icking-music-archive.org/software/musixtex/add-ons/musixlyr21c.zip}
{\underline{for Windows}} or \href{http://icking-music-archive.org/software/musixtex/add-ons/musixlyr21c.tgz}
{\underline{for \unix}}. Look at the manual for a detailed description. Here you can find an overview
of the commands and an example of use.

\def\keyexample#1{\keyindex{#1}}

\noindent\begin{tabbing}
\verb|\NOtes|\keyexample{assignlyricshere}\verb|{alto}\qa c\en|\quad\= assigning without staff number\kill
Example\> Explanation
\end{tabbing}
\vspace{-1ex}
\hrule
\vspace{-2ex}
\begin{tabbing}
\verb|\NOtes|\keyexample{assignlyricshere}\verb|{alto}\qa c\en|\quad\= assigning without staff number\kill
\keyexample{setlyrics}\verb|{sopr}{the ly_-ric words_}|\> defining the lyrics text\\
\keyexample{copylyrics}\verb|{sopr}{alto}|\> alto has same lyrics as soprano\\
\keyexample{appendlyrics}\verb|{alto}{more words}|\> alto lyrics is longer\\
\keyexample{assignlyrics}\verb|2{sopr,alto}|\>soprano and alto lyrics at staff 2\\
\keyexample{assignlyricsmulti}\verb|{1}{2}{alto}|\>assign alto lyrics to staff 2 of instrument 1\\
\verb|\NOtes|\keyexample{assignlyricshere}\verb|{alto}\qa c\en|\>assigning without staff number\\
\keyexample{auxlyr}\verb|\assignlyrics{2}{sopr}|\> assign soprano above staff 2\\[.8ex]
\keyexample{lyrrule}\verb|\qu c|...\keyexample{lyrruleend}\verb|\qu c|\>make a melisma by hand\\
\keyexample{beginmel}\verb|\qu c|...\keyexample{endmel}\verb|\qu c|\>melisma, same as word extension underline\\[.8ex]
\keyexample{lyr}\verb|\qu c|\>force a syllable from lyrics text at this note or rest\\
\keyexample{lyric}\verb|{word}\qu c|\>insert syllable 'word' at this note\\
\verb|\loffset{2}{|\keyexample{lyric*}\verb|{1.}}\qu c|\>combine '1.' with regular syllable\\
\keyexample{lyrich}\verb|{syl}\qu c|\>same as \verb|\lyric|, but with hyphenation\\
\keyexample{lyrich*}\verb|{}\qu c|\>same as \verb|\lyric*|, but with hyphenation\\
\keyexample{lyricsoff}...\keyexample{lyricson}\>stop lyrics, then start again\\
\keyexample{nolyr}\verb|\qu c|\>no syllable at this note\\[.8ex]
\keyexample{llabel}\verb|{labelname}name|\>labelling a ``go to'' target in text\\
\keyexample{golyr}\verb|{labelname}\qu c|\>perform a jump, in music code\\[.8ex]
\keyexample{lyrpt}\verb|,\qu c|\>add a comma to the syllable under this note\\
\keyexample{lyrnop}\verb|\qu c|\>remove last character in syllable\\
\keyexample{lclyr}\verb|\qu c|\>make first character lower case\\
\keyexample{llyr}\verb|\qu c|\>left justified syllable\\
\keyexample{leftlyrtrue}\verb|\qu c|...\keyexample{leftlyrfalse}\verb|\qu c|\>start and stop left justification as the default\\
\keyexample{lyroffset}\verb|{-4}\qu c|\>shift syllable 1 notehead to the left\\[.8ex]
\keyexample{minlyrspace}\verb|{3pt}\qu c|\>define minimum space between the words\\
\keyexample{forcelyrhyphenstrue}\verb|\qu c|\>always use a hyphen from now on\\
\keyexample{forcelyrhyphensfalse}\verb|\qu c|\>remove hyphen and make one word if necessary \\
\keyexample{showlyrshifttrue}\verb|\qu c|\>show the lyric shift\\[.8ex]
\keyexample{lyrraise}\verb|{1}{a 2\Interligne}|\>raise lyrics below staff 1 by \verb|2\Interligne|\\
\keyexample{lyrraisemulti}\verb|{1}{2}{a 2\Interligne}|\>raise alto lyrics above staff 2 of instrument 1\\
\keyexample{lyrraisehere}\verb|{b 2\Interligne}\qu c|\>raise lyrics below this staff by \verb|2\Interligne|\\[.8ex]
\keyexample{minlyrrulelength}\verb|{2mm}|\>melismas shorter than 2mm are not shown \\
\keyexample{minmulthyphens}\verb|{15mm}|\>distance between hyphens in 'hyphen melisma'\\
\verb|\def|\keyexample{lyrhyphenchar}\verb|{-}|\>chose a hyphen character\\
\verb|\setlyrics{|\keyexample{lyrlayout}\verb|{\it}..}|\>apply italics to all lyrics lines\\
\keyexample{verses}\verb|{,\beginmel}\qu c|\>initiate melisma at second verse\\[.8ex]
\verb|\small|\keyexample{setlyrstrut}\>adapt the vertical distance between lyrics lines\\
\keyexample{lyrstrutbox}\verb|{10pt}|\> (re)define the distance between the lyrics lines\\[.8ex]
\keyexample{lyrmodealter}\verb|2|\>attach lyrics of staff 2 to the upper voice\\
\keyexample{lyrmodealtermulti}\verb|{1}{2}|\>attach lyrics of instr.\ 1 staff 2 to the upper voice\\
\keyexample{lyrmodealterhere}\verb|\qu c|\>attach lyrics of this staff to the upper voice\\
\keyexample{lyrmodenormal}\verb|2|\>restore the default behaviour\\
\keyexample{lyrmodenormalmulti}\verb|{1}{2}|\>restore the default behaviour at staff 2 of instr.\ 1\\
\keyexample{lyrmodenormalhere}\verb|\qu c|\>restore the default behaviour of this staff\\[.8ex]
\keyexample{lyrlink}\>linking 2 words with a '$_{_\smile}$'\\
\keyexample{lowlyrlink}\>same as \verb|\lyrlink| but a little bit lower\\[.8ex]
\keyexample{resetlyrics}\>set word pointer to the first word in all lyrics lines\\[.8ex]
\keyexample{enableauxlyrics}\>don't use this anymore\\
\keyexample{setsongraise}\verb|{1}{2\Interligne}|\>same as \verb|{\lyrraise}{1}{b 2\Interligne}|\\
\keyexample{auxsetsongraise}\verb|{1}{2\Interligne}|\>same as \verb|{\lyrraisemulti}{1}{b 2\Interligne}|\\
\keyexample{oldlyrlinestart}\>don't let the lyrics extent to the left margin\\
\end{tabbing}

As a further illustration of the use of the commands, have a look at the following
example\footnote{The example is taken from the musixlyr manual.}:

\medskip\medskip
%\oneversespace
\begin{music}
\input musixlyr
 \resetlyrics \small
\lyrmodealter0
 \setlyrics{soprano}{bring her die Gans,} \auxlyr{\assignlyrics1{soprano}}
 \copylyrics{soprano}{alto}                       \assignlyrics1{alto}

 \generalsignature{-2}
 \advance\stafftopmarg1\Interligne
 \advance\staffbotmarg2\Interligne

 \startextract\addspace\afterruleskip
  \NOtes\zqu g\ql e\en
  \bar
  \Notes\zqu i\beginmel\ibslurd0f\ibl0f{-1}\qb0{fe}\en
  \Notes\auxlyr\beginmel\ibsluru1i\zqup i\qb0d\en
  \Notes\tqb0e\en
  \Notes\endmel\tbslurd0e\ql c\en
  \notes\ibbu0h{-1}\qb0h\tqh0g\en
  \NOtes\auxlyr\endmel\tbsluru1h\zqu h\ql c\en
  \bar
  \NOTEs\auxlyr\lyr\zwh i%       The lyrics of the whole notes
    \lyr\wh b\en     %       must be given manually.
 \endextract
 \lyrmodenormal0
\end{music}
\medskip

%\oneversespace

which was coded as:
\begin{quote}
\begin{verbatim}
% define lyrics above the staff
\setlyrics{soprano}{bring her die Gans,}
% lyric beneath the staff are the same
\copylyrics{soprano}{alto}
% assign alto lyrics below staff 1 on the notes with stem down
\assignlyrics1{alto}
% assign soprano lyrics above staff 1 on the notes with stem up
\auxlyr{\assignlyrics1{soprano}}
% attach both lyrics to the upper voice
\lyrmodealter0
\generalsignature{-2}
% make place for the lyrics
\advance\stafftopmarg1\Interligne\advance\staffbotmarg2\Interligne
\startextract\addspace\afterruleskip
\NOtes\zqu g\ql e\en\bar
% start melisma in lower lyrics
\Notes\zqu i\beginmel\ibslurd0f\ibl0f{-1}\qb0{fe}\en
% start melisma in upper lyrics
\Notes\auxlyr\beginmel\ibsluru1i\zqup i\qb0d\tqb0e\en
% end melisma in lower lyrics
\Notes\endmel\tbslurd0e\ql c\en
\notes\ibbu0h{-1}\qb0h\tqh0g\en
% start melisma in upper lyrics
\NOtes\auxlyr\endmel\tbsluru1h\zqu h\ql c\en\bar
% The lyrics of the whole notes (without stem) must be given manually.
\NOTEs\auxlyr\lyr\zwh i\lyr\wh b\en
\endextract
\lyrmodenormal0
\end{verbatim}\end{quote}

  \subsection{Getting enough vertical space for lyrics}
  Since songs are
usually equivalent to a one-staff instrument (possibly with several voices)
the recommended solution consists in adjusting the distance between
instruments using either \keyindex{interinstrument}\verb|=|\ital{any
\TeX-dimension} to give more place below all instruments or using
\keyindex{setinterinstrument} to make more space above. Note that {\Bslash
setinterinstrument} defines spacing above and not below an instrument. Since
lyrics are usually set below the staff, the first argument of a
\verb|\setinterinstrument| should be the song instrument number \ital{minus
one}.

 In the case of a single staff tune, or if the song instrument is the lowest
one, then additional place can be provided using \keyindex{staffbotmarg}.

\subsection{Fine tuning the placement of the lyrics}
 When not using \verb|\hardlyrics|, on short notes, sometimes
 the lyrics are shifted away from the notes or they collide with other words.
 This are a few approaches to get around this:
\begin{enumerate}\setlength{\itemsep}{0ex}
\item Making more music lines for the notes to go further apart. This could be done with
\verb|\mulooseness|.
\item Stretch a bar with short notes in it by i.e.\ replacing \verb|\notes| by \verb|\NOTes|.
\item Insert space between the notes by using \verb|\sk|, \verb|\hsk|, \verb|\qsk|...
\item Stretch a bar with short notes in it by using the command \keyindex{scale}:
\begin{verbatim}
\scale{1.6}\notes..\en\scale{1}%
\end{verbatim}
This method can be used in \textbf{PMX} but only with care, because it changes horizontal spacing
in a way that \textbf{PMX} will not be aware of. It will not move bars to the next line, but
will shorten the other bars on the line.

As an example, the lyrics of this music line are better placed by using \verb|\scale| in
the first bar and moving to the left the word 'mon'. Note that the hyphen is removed
when there is no place for it:

 \begin{music}
 \input musixlyr
 \resetlyrics
 \setlyrics{v1}{Au clair de la lu-ne, mon a-mi Pier-rot,}%
 \assignlyrics1{}\assignlyrics1{v1}%
 \staffbotmarg2\Interligne\generalsignature{1}%
 \startextract
 \geometricskipscale
 \notes\qu{gggh}\en\bar
 \Notes\hu{ih}\en\bar
 \notes\qu{gihh}\en\bar
 \Notes\wh g\en
 \endextract
% \end{music}
%%%%% combined for saving registers %%%%%
% \begin{music}\nostartrule
% \input musixlyr
 \resetlyrics
 \setlyrics{v1}{Au clair de la lu-ne, \kernm1exmon a-mi Pier-rot,}%
 \assignlyrics1{}\assignlyrics1{v1}%
 \staffbotmarg2\Interligne\generalsignature{1}%
 \startextract \geometricskipscale
 \scale{1.4}\notes\qu{gggh}\en\bar\scale{1}%
 \Notes\hu{ih}\en\bar
 \notes\qu{gihh}\en\bar
 \Notes\wh g\en
 \endextract
 \end{music}

\medskip
The code of the second music line is (\verb|\assignlyrics1{}| is only needed because
lyrics are assigned before this in this manual):
\begin{quote}\begin{verbatim}
 \begin{music}
 \input musixlyr
 \resetlyrics
 \setlyrics{v1}{Au clair de la lu-ne, \kernm1exmon a-mi Pier-rot,}%
 \assignlyrics1{}\assignlyrics1{v1}%
 \staffbotmarg2\Interligne\generalsignature{1}%
 \startextract \geometricskipscale
 \scale{1.4}\notes\qu{gggh}\en\bar\scale{1}%
 \Notes\hu{ih}\en\bar
 \notes\qu{gihh}\en\bar
 \Notes\wh g\en
 \endextract
 \end{music}
\end{verbatim}\end{quote}

\item Moving a word in any direction

\noindent\begin{tabular}{ll}
\multicolumn{2}{l}{\Bslash setlyrics\{alto\}\{\Bslash kernm3ex1.$\sim\sim$firstsyllable...\}}\\
& left moving for numbering verses\\
\verb|\setlyrics{alto}{...\kern1exword...}| &right moving a single word\\
\verb|\setlyrics{alto}{...\lower2pt\hbox{word}...}|& lowering a single word\\
\verb|\setlyrics{alto}{...\raise2pt\hbox{word}...}|& raising a single word\\
\multicolumn{2}{l}{\Bslash def\Bslash strut\{\Bslash vbox to 2\Bslash Interligne\{\}\}%
\Bslash setlyrics\{alto\}\{\Bslash lyrlayout\{\Bslash strut\}...\}} \\
& controlling distance between verses\\
\verb|\lyrlayout{\vphantom{Mp(\lowlyrlink}|& minimum distance between verses\\
\multicolumn{2}{l}{\Bslash setbox\Bslash lyrstrutbox=\Bslash hbox\{\Bslash vphantom\{yM\Bslash lyrlink\}\}}\\
& redefining default lyrstrut
\end{tabular}

\item Placing of accents can be made easier as shows this example:
\begin{center}
\begin{minipage}{50mm}
\begin{music}\nostartrule
\input musixlyr
\catcode`\ä\active \defä{\"a}
\catcode`\ö\active \defö{\"o}
\catcode`\å\active \letå\aa
\setlyrics1{å ä ö}
\assignlyrics1{}\assignlyrics11
\startextract
 \setsongraise1{1ex}\NOtes\qa{ggg}\en
\zendextract
\end{music}
\end{minipage}%
\begin{minipage}{80mm}
\verb|\catcode`\|\"a\verb|\active \def|\"a\verb|{\"a}|\\
\verb|\catcode`\|\"o\verb|\active \def|\"o\verb|{\"o}|\\
\verb|\catcode`\|\aa\verb|\active \let|\aa\verb|\aa|\\
\verb|\setlyrics1{|\aa\ \"a\ \"o\verb|} \assignlyrics1{}|\\
\verb|\assignlyrics11|\\
\verb|\startextract|\\
\verb|\NOtes\qa{ggg}\en|\\
\verb|\zendextract|\\
\end{minipage}
\end{center}
\item Using an 8-bit encoded characterset\label{8bit}

This can be achieved
by putting
\verb+\input plainenc\relax\inputencoding{cp850}+
at the beginning of the file.

Here you must adapt the character
set to your region.
To do this, if necessary, replace \verb+cp850+ by
\verb+cp1250+ (Czech, Croation region),
\verb+cp1251+ (Russian, Bulgarian region),
\verb+cp1252+ (most other European regions),
\verb+cp1253+ (Greek region)
or check your \TeX distribution for the right file.

This is the coding for the previous example by using an 8-bit characterset:

\begin{center}
\begin{minipage}{25mm}
\begin{music}\nostartrule
% this manual is in latex, the 8bit is taken by
% \usepackage[ansinew]{inputenc}
%
%\input plainenc\relax\inputencoding{cp850}
\input musixtex
\input musixlyr
\setlyrics1{á ä ö}\assignlyrics1{}\assignlyrics11%
\startextract%
\znotes\zcharnote{12}{Poème naïf}\en%
\Notes\qa{ggg}\en%
\zendextract%
\end{music}
\end{minipage}
~~~~~~
\begin{minipage}{100mm}% program to run apart from musixdoc
\verb+\input plainenc\relax\inputencoding{cp850}+\\
\verb+\input musixtex+\\
\verb+\input musixlyr+\\
\verb+\startpiece%+\\
\verb+\znotes\zcharnote{16}{Poème naïf}\en%+\\
\verb+\setlyrics1{á ä ö}\assignlyrics11%+\\
\verb+\Notes\qa{ggg}\en%+\\
\verb+\Endpiece\vfill\eject \bye+
\end{minipage}
\end{center}

\end{enumerate}

\section{Embedding musical excerpts in text documents}

Here we discuss the options for including music in text documents. The first
decision is whether or not to use \LaTeX\footnote{We'll assume a user wanting
to embed a musical excerpt in a \LaTeX\ document is already familiar with the
fundamentals of \LaTeX. For more information about it, see for example the manual
\ital{\LaTeX: A Document Preparation System} by Leslie {\sc Lamport}}.
Because \LaTeX\ so effectively simplifies
production of text-based \TeX\ documents, most users take that path, and most of the
descriptions given here will assume that's the case\footnote{Please do not be confused;
while \LaTeX\ is recommended for text-based documents containing musical
exceprts, its use is definitely discouraged for ordinary self-contained musical scores
of any sort.}.

If for some reason you choose not to use \LaTeX\ to emplace musical excerpts,
the basic approach is simply to set off the musical
parts between \verb|\startpiece| or \verb|\contpiece| and \verb|\stoppiece| or
\verb|\endpiece|, or between \verb|\startextract| and \verb|\zendextract|. But
some details in what follows will also apply with no \LaTeX.

There are two basic approaches to embedding musical excerpts in \LaTeX\
documents. The first method is to directly include the \musixtex\ code in
the \LaTeX\ source file. That will be the subject of the next subsection. The
other is to create an EPS (encapsulated Postscript) file containing only the
excerpt, and then ``paste'' it into the \LaTeX\ file. That will be covered in
subsection \ref{embedeps}.

The advantages of using the direct method are that all of the source code for
all excerpts can be kept in the same file as the text, and that there is no
limit on the length of the excerpt.
The advantage of the EPS method is that you don't have to burden the \LaTeX\
source with any of the \musixtex\ paraphernalia. That in turn permits use of
primitive versions of the \TeX\ compiler that may not have the capacity
to handle the direct method (due to the number of registers consumed by \LaTeX\
and \musixtex). The disadvantages are that you must create and keep
track of a separate \TeX\ and EPS file for every excerpt, and that the excerpt
must not span any page breaks. On balance, the
direct method is probably to be preferred.

\subsection{Directly embedding excerpts in \LaTeX\ documents}\label{excerpts}

To use the direct method, you should include ``\verb|musixtex|'' as one of the
arguments of the \keyindex{documentstyle} command. This will cause the file
\ttxem{musixtex.sty} to be loaded, so naturally you must make that file
available in a place where \TeX\ can find it. That file simply inputs two
other files, \verb|musixtex.tex| and \ttxem{musixltx.tex}, which again must
obviously be available to \TeX.

Now you are in position to directly embed an excerpt by inserting code at the
appropriate place in the source file. The most common type of excerpt is
one that occupies less than a full line and is to be horizontally centered. In
that case, the extract should begin with the command \keyindex{begin\LBR music\RBR},
followed by any preliminary commands. Then, instead of \verb|\startpiece|,
use \keyindex{startextract}. Now comes the normal \musixtex\ coding. Finally,
end the extract with \keyindex{endextract} instead of \verb|\endpiece|
or \verb|\stoppiece|, followed by \keyindex{end\LBR music\RBR}.

To terminate an extract without any bar line, use \keyindex{zendextract}
instead of \verb|\zendextract|.

To create a left-justified excerpt, use the sequence
\keyindex{let\Bslash extractline\Bslash leftline}.

If several extracts are to be placed on the same line, you can
redefine \keyindex{extractline} as demonstrated in the following
example\footnote{The macro {\tt\Bslash extractline} is defined once and for all in
{\tt musixtex.tex} as {\tt\Bslash centerline}. You might think that the suggested
coding would permanently redefine {\tt\Bslash extractline}, thereby upsetting the
normal function of {\tt\Bslash startextract ... \Bslash endextract} for subsequent use.
But it doesn't, because any actions within
\keyindex{begin\LBR music\RBR}...\keyindex{end\LBR music\RBR} are local, not
global.}:

% DAS temp (where is the reference???)
%An example of this is given at \ref{extractline} on page \pageref{extractline}.
% end DAS temp
\begin{quote}\begin{verbatim}
\begin{music}\nostartrule
\let\extractline\hbox
\hbox to \hsize{%
\hss\startextract ... \zendextract\hss%
\hss\startextract ... \zendextract\hss}
\end{music}
\end{verbatim}\end{quote}

An even shorter type of extract is one that is embedded \ital{within} a line of text.
To insert \musixtex\ symbols within a line of text, you could begin by defining
\keyindex{notesintext} as follows\footnote{provided by Rainer {\sc Dunker}}:

\begin{quote}\begin{verbatim}\begin{music}\nostartrule
\makeatletter
\def\notesintext#1{%
  {\let\extractline\relax
   \setlines10\smallmusicsize \nobarnumbers \nostartrule
   \staffbotmarg0pt \setclefsymbol1\empty \global\clef@skip0pt
   \startextract\addspace{-\afterruleskip}#1\zendextract}}
\makeatother
\end{music}\end{verbatim}\end{quote}

Then, for example, the code

\begin{verbatim}
Use \raisebox{0ex}[0ex][0ex]{\notesintext{\notes\rql1\qu2\en}}
not \raisebox{0ex}[0ex][0ex]{\notesintext{\notes\ql2\lqu1\en}}
\end{verbatim}

\noindent would produce: ``Use \raisebox{0ex}[0ex][0ex]{\notesintext{\notes\rql1\qu2\en}} not
\raisebox{0ex}[0ex][0ex]{\notesintext{\notes\ql2\lqu1\en}}~''.

\noindent The \verb|\raisebox| voids the vertical space that is introduced by the notes.

Finally, you may want to insert an extract containing more than one line
of music. Once having mastered \musixtex, this is the easiest of all: Between
\verb|\begin{music}\nostartrule| and \verb|\end{music}|, use \ital{exactly} the same
coding you would to make an ordinary score.

The best way to learn how to apply these methods is to study
\verb|musixdoc.tex|, the source file for this document\footnote{Do note,
however, that {\tt musixdoc.tex} includes {\tt musixdoc} but not {\tt musixtex}
as an argument of {\tt\Bslash documentstyle}. The former performs the functions
of the latter as well as numerous tasks peculiar to this particular document.}.

%DAS I don't think this section is worth including.

% \subsection{Wide music in \LaTeX}\label{musixblx}
% Another difficulty appears with \LaTeX: internal \LaTeX\ macros handle the
%page size in a way which is not supposed to be changed within a given document.
%This means that text horizontal and vertical sizes are somewhat frozen so that
%one can hardly insert pieces of music of page size different from the size
%specified by the \LaTeX{} \itxem{style}.
%Although a \ttxem{musixblx.tex} has been provided, which makes the
%\ital{environment} \verb|bigmusic| available.
%\zkeyindex{begin\LBR bigmusic\RBR}
%The main drawback is an unpredictable behaviour of top and bottom
%printouts, especially page numberings.
%
% If the whole of a document has wide pages, it can be handled with the
%\ttxem{a4wide} style option, or any derivate of it.

\subsection{Embedding musical excerpts as encapsulated postscript files}
\label{embedeps}
To use this method of including excerpts, you first must create a separate
\musixtex\ input file for each excerpt. Process each such file with
\TeX\ and \verb|musixflx| to generate a \verb|.dvi| file. Generate
a postscript file from each \verb|.dvi| using \verb|dvips|. Then
convert each postscript file to an \verb|.eps| file. One way to do that is
with \textbf{ghostscript} and---if you are using Windows---\textbf{GSview}.
In general this is possible only for single-page postScript files.

To set up your \LaTeX\ document for including \verb|.eps| files, you must post
the command \verb|\usepackage[dvips]{graphicx}| in the preamble of the
document. Now, you may include each \texttt{.eps} file at the appropriate place
in the {\LaTeX} document with a command
like \keyindex{includegraphics}\verb|{sample.eps}|.

\subsection{Issues concerning \texorpdfstring{{\Bslash catcodes}}{catcodes}}
\label{catcodeprobs}

\musixtex\ uses the following symbols differently from plain \TeX: \verb|>|,
 \verb|<|, \verb&|&, \verb|&|, \verb|!|, \verb|*|, \verb|.|, and \verb|:|\ .\\
The symbols are given their special meanings by executing the macro
\keyindex{catcodesmusic}, and are restored to their plain \TeX\ meanings with
\keyindex{endcatcodesmusic}. When setting either a self-contained score or
a musical extract, you normally need not worry
about this at all, because \verb|\startpiece| or \verb|\startextract| executes
\verb|\catcodesmusic| and \verb|\endpiece| or \verb|\zendextract| executes
\verb|\endcatcodesmusic|. But there are some special situations where you
might need to use these catcode-modifying macros explicitly. One is if you
were to define a personalized macro outside
\verb|\startpiece ... \endpiece|, but which incorporated any of the
symbols with their \musixtex\ meanings. Another would be if you wished to have
access to facilities enabled by alternate style files such as
{\tt\ixem{french.sty}} which change \keyindex{catcode}s themselves. In
such cases, provided you have input \verb|musixtex.tex|, you can always
invoke \keyindex{catcodesmusic} to set the \keyindex{catcode}s at their
\musixtex\ values, and \keyindex{endcatcodesmusic} to restore them to their
prior values.

\section{Extension Library}
All following files are invoked by saying \keyindex{input} \ital{filename}\ .
Most of them are fully compatible with \musixtex\ in that they do not redefine
any existing macros but rather provide additional functionality. In future
versions of \musixtex\ we may very well incorporate many of them directly into
\verb|musixtex.tex|, but for now we leave them separate.

 \subsection{curly}
Allows you to group more than 1 instrument with curly
brackets (see \ref{curlybrackets}).

 \subsection{musixadd}\ixtt{musixadd.tex}
Increases the number of instruments, slurs and beams from six to nine.

 \subsection{musixbm}
 Provides 128th notes, either with flags or with beams, via the commands
\keyindex{ibbbbbu},
\keyindex{ibbbbbl},
\keyindex{nbbbbbu},
\keyindex{nbbbbbl},
\keyindex{tbbbbbu},
\keyindex{tbbbbbl},
\keyindex{Ibbbbbu},
\keyindex{Ibbbbbl},
\keyindex{cccccu},
\keyindex{ccccca},
\keyindex{zcccccu},
\keyindex{cccccl} and
\keyindex{zcccccl}.

 \subsection{musixbbm}
 Provides 256th notes, only with beams, via the commands
\keyindex{ibbbbbbu},
\keyindex{ibbbbbbl},
\keyindex{nbbbbbbu},
\keyindex{nbbbbbbl},
\keyindex{tbbbbbbu},
\keyindex{tbbbbbbl},
\keyindex{Ibbbbbbu} and
\keyindex{Ibbbbbbl}.

\subsection{musixcho}\label{song}
 Enables certain macros intended for choral music\footnote{Remember
that we now recommend using \texttt{musixlyr} for any except the
simplest lyrics. The extension \texttt{musixcho} is only for those
diehards who choose to ignore this advice}. Provides the following commands:
\keyindex{biglbrace}, \keyindex{bigrbrace}, \keyindex{braceheight},
\keyindex{Dtx} and \keyindex{Drtx} for two-line text, \keyindex{Ttx} and
\keyindex{Trtx} for three-line text, \keyindex{Qtx} and \keyindex{Qrtx} for
four-line text.  To eliminate zigzagging lyrics lines, all multiple line texts
are automatically vertically justified with the macro \keyindex{ChroirStrut},
defined as \verb|\vphantom{\^Wgjpqy}|.

The macros \keyindex{tx}\verb|{|$text$\verb|}|,
\keyindex{rtx}\verb|{|$text$\verb|}| cause song text to be left-justified
on the insertion point rather then centered.
 \keyindex{hf}\verb|{|$m$\verb|}| sets a text
continuation rule of length $m$ \verb|\noteskip|.

Consult the source file {\tt musixdoc.tex} to see the coding of the following
example:

\begin{music}
\tenrm
\parindent11.5mm
\braceheight5.4\Interligne\relax
%\rightline{Arr.: H.~W.~Eichholz}
\instrumentnumber2
\generalsignature{-2}
\generalmeter{\meterfrac22}
\setclef1\bass
\relativeaccid
\setinterinstrument1{11\Interligne}
\songtop2
\songbottom1
\setname2{\vbox{\hsize\parindent\centerline{Sopran}\centerline{Alt}}}
\setname1{\vbox{\hsize\parindent\centerline{Tenor}\centerline{Bass}}}
\sepbarrules\nobarnumbers
\beforeruleskip-2pt
\startpiece
%% bar 1
\znotes&\rlap{\kernm2em\Qrtx 1.|2.|3.|4.*}\en
\NOTes\sslur ILd1\sslur bNu1\zhl I\hu b%
  &\Qtx\ixhf{Oh}|No|No|There'll*\issluru0f\sslur dad1\zhup f\hl d\en
\Notes\zhl L\hu N&\Qtx ~|more|more|~be*\hl{^c}\en
\NOtes&\tsslur0g\qu g\en
%%% bar 2
\bar
\NOtes\zql I\qu b&\Qrtx\thf freedom,|weepin',|moanin',|singin',*\zqu i\ql d\en
\NOTesp\lpt I\zhl I\hup b&\zhup i\hlp d\en
%%% bar 3
\bar
\nspace
\NOTes\sslur JMd1\sslur bau1\zhl J\hu b%
  &\Qtx\ixhf{oh}|no|no|there'll*\issluru0j\sslur edd1\zhup j\hl{^e}\en
\Notes\zhl M\hu a&\Qtx~|more|more|~be*\hl{=e}\en
\NOtes&\tsslur0k\qu k\en
%%% bar 4
\bar
\NOtes\zql I\qu b&\Qrtx\thf freedom,|weepin',|moanin',|singin',*\zqu j\ql d\en
\NOTesp\lpt I\zhl I\hup b&\zhup i\hlp d\en
%%% bar 5
\bar
\NOTesp\sslur IJd1\sslur bau1\lpt I\zhl I\hup b%
  &\Qtx\ixhf{oh}|no|no|~there'll*\isslurd0f\issluru1j\zhup k\hlp f\en
\NOtes\zql J\qu a&\Qtx~|more|more|~be*\tsslur1f\zqu f\roff{\tsslur0e\ql e}\en
%%% bar 6
\bar
\NOtes\zql K\qu b&\Qrtx\thf freedom,|weepin',|moanin',|singin',*\zqu i\ql f\en
\NOtes\zql J\qu b&\zqu i\ql e\en
\NOtes\zql I\qu b&\rlap{\kernm2\Internote\bigrbrace}\rtx~~~over*\zqu i\ql d\en
\NOtes\zql G\qu b&\zqu k\ql f\en
%%% bar 7
\bar
\nspace
\NOTes\zhl J\hu b\caesura&\tx ~me,*\zhu j\hl{^e}\caesura\en
\Notes\zcl J\cu b&\rtx ~over*\zcu j\cl e\en
\NOtesp\zqlp J\qup b&\zqup k\lpt e\ql e\en
\endpiece
\end{music}

\subsection{musixcpt}

Empowers \musixtex\ to run files created under
Musi\textbf{c}TeX, the predecessor of \musixtex, such as some of the examples
provided by Dani\"el {\sc Taupin}. It is not needed for any files created
under \musixtex, and is included mainly for historical completeness.

\subsection{musixdat}
Enables the command \keyindex{today}, which sets the current date in one of
several possible languages. The language is selected by an optional
 preparatory command \verb|\date...|.
The default is \keyindex{dateUSenglish}, but this can changed, either at the
end of \ttxem{musixdat.tex} for a permanant change, or right before issuing
\verb|\today|. Available choices and sample results are summarized below:
\smallskip
\begin{quote}\begin{tabular}{ll}\hline
\verb|\dateUSenglish|&\dateUSenglish\today\\
\verb|\dateaustrian|&\dateaustrian\today\\
\verb|\dateenglish|&\dateenglish\today\\
\verb|\datefrench|&\datefrench\today\\
\verb|\dategerman|&\dategerman\today\\\hline
\end{tabular}\end{quote}

\subsection{musixdbr}
Enables dashed and dotted bar lines (see \ref{musixdbr}).

\subsection{musixdia}\label{diam}
Enables notes with diamond-shaped heads as follows:
\begin{itemize}\setlength{\itemsep}{0ex}
 \item Solid note heads (\raise.5ex\hbox to .6em{\musixchar37}) are obtained
using the macros
 \keyindex{yqu}, \keyindex{yqup},
\keyindex{yqupp}, \keyindex{yql}, \keyindex{yqlp}, \keyindex{yqlpp},
\keyindex{yzq}, \keyindex{yzqp}, \keyindex{yzqpp}, \keyindex{yqb},
\keyindex{ycu}, \keyindex{yccu}, \keyindex{ycccu}, \keyindex{yccccu},
\keyindex{ycl}, \keyindex{yccl}, \keyindex{ycccl}, \keyindex{yccccl},
\keyindex{ycup}, \keyindex{ycupp}, \keyindex{yclp}, \keyindex{yclpp}.
(Think of d{\it y}\kern.5pt amond). A solid diamond with no stem is obtained
with \keyindex{ynq} (spacing) or \keyindex{yznq} (non-spacing).
 \item Open note heads (\raise.5ex\hbox to .6em{\musixchar38}) are obtained
using the macros
\keyindex{dqu}, \keyindex{dqup},
\keyindex{dqupp}, \keyindex{dql}, \keyindex{dqlp}, \keyindex{dqlpp},
\keyindex{dzq}, \keyindex{dzqp}, \keyindex{dzqpp}, \keyindex{dqb},
\keyindex{dcu}, \keyindex{dccu}, \keyindex{dcccu}, \keyindex{dccccu},
\keyindex{dcl}, \keyindex{dccl}, \keyindex{dcccl}, \keyindex{dccccl},
\keyindex{dcup}, \keyindex{dcupp}, \keyindex{dclp}, \keyindex{dclpp}.
(Think of {\it d}\kern.5pt iamond).
An open diamond with no stem is obtained
with \keyindex{dnq} (spacing) or \keyindex{dznq} (non-spacing).
 \end{itemize}

One use of these note heads is for a string part with \itxem{harmonic notes}.
%(see \ref{othernotes})
% DAS removed description which was misplaced in the samll=notes section 2.18 4/30/06
For example,

\begin{music}
\parindent0pt
\generalsignature{-2}
\generalmeter\allabreve
\startextract
\NOTes\dzq o\zh d\hu h\enotes
\Notes\ibu0k0\zq g\yqb0k\qb0j\zq e\yqb0i\tbu0\qb0j\enotes
\bar
\NOTes\dzq g\hu k\enotes
\NOTes\hpause\enotes
\bar
\NOTes\dzq o\zh d\hl h\enotes
\Notes\ibl0e0\zq g\yqb0k\qb0j\zq e\yqb0i\tbl0\qb0j\enotes
\bar
\NOTes\dzq g\hu k\enotes
\NOTes\hpause\enotes
\endextract
\end{music}
\noindent was coded as follows:
\begin{quote}\begin{verbatim}
\generalsignature{-2}
\generalmeter\allabreve
\startextract
\NOTes\dzq o\zh d\hu h\enotes
\Notes\ibu0k0\zq g\yqb0k\qb0j\zq e\yqb0i\tbu0\qb0j\enotes
\bar
\NOTes\dzq g\hu k\enotes
\NOTes\hpause\enotes
\bar
\NOTes\dzq o\zh d\hl h\enotes
\Notes\ibl0e0\zq g\yqb0k\qb0j\zq e\yqb0i\tbl0\qb0j\enotes
\bar
\NOTes\dzq g\hu k\enotes
\NOTes\hpause\enotes
\endextract
\end{verbatim}\end{quote}

Another use is for percussion parts. In fact the file \verb|musixdia.tex|
is automatically loaded if you input {\tt musixper.tex} (see \ref{perc}).

 \subsection{musixeng}
 This package is provided for music typesetters who are allergic to the default
rest names, which are
taken from French, German or Italian. It does not provide new features, only
new command names:
\medskip
 \begin{quote}\begin{tabular}{ll}\hline
\ital{original}&\ital{alternate}\\\hline
\keyindex{PAUSe}&\keyindex{Qwr}\\
\keyindex{PAuse}&\keyindex{Dwr}\\
\keyindex{liftpause}&\keyindex{liftwr}\\
\keyindex{pausep}&\keyindex{wrp}\\
\keyindex{pause}&\keyindex{wr}\\
\keyindex{lifthpause}&\keyindex{lifthr}\\
\keyindex{hpausep}&\keyindex{hrp}\\
\keyindex{hpause}&\keyindex{hr}\\
\keyindex{qp}&\keyindex{qr}\\
\keyindex{ds}&\keyindex{er}\\
\keyindex{qs}&\keyindex{eer}\\
\keyindex{hs}&\keyindex{eeer}\\
\keyindex{qqs}&\keyindex{eeeer}\\\hline
\end{tabular}\end{quote}

\subsection{musixext}
Defines the following two specific macros:

\keyindex{slide}\itbrace{p}\itbrace{x}\itbrace{s}~, which provides a glissando
starting at pitch {\it p} and extending for {\it x} \verb|\internote|s with
slope {\it s} (ranging from -8 to 8).

\keyindex{raggedstoppiece}~, which inhibits right-justification of the last
line of a score.

 \subsection{musixf{}l{}l}
 \input musixfll
 Enables modification of \ixem{ledger lines}. Ledger lines normally exceed the
width of a note head by 25 percent in each direction. If the space between
notes is insufficient, the ledger lines of
consecutive notes may meet, creating visual ambiguities. Therefore,
\musixtex{} shortens the
ledger lines if notes are set so close together that the ledger lines may
meet. But because \musixtex{} does not know whether consecutive notes need
ledger lines, this automatic shortening may be superfluous. The extension
file \ttxem{musixfll.tex} allows this feature to be switched off and on.
Upon inputting \verb|musixfll.tex|, the automatic shortening of ledger lines
is switched off. From then on, it may be switched on again using
\keyindex{autoledgerlines} and switched off again using
\keyindex{longledgerlines}. Both macros have global effect.

 The following example shows that narrowly set scales look better with
\keyindex{autoledgerlines} (the default behavior), while single notes
requiring ledger lines look better with \keyindex{longledgerlines}.
\medskip
\begin{music}
\startextract
\notes\multnoteskip{0.7}\Uptext{autoledgerlines}\autoledgerlines
    \ibbbu0b0\qb0{cba`gfg'a}\tbu0\qb0b%
    \ibbbl0{''b}0\qb0{abcdedc}\tbl0\qb0b%
    \ibbbu0{``b}0\qb0{dad}\tbu0\qb0a%
    \ibbbl0{''b}0\qb0{`g'c`g}\tbl0\qb0{'c}\en
    \bar
\notes\multnoteskip{0.7}\Uptext{longledgerlines}\longledgerlines
    \ibbbu0b0\qb0{cba`gfg'a}\tbu0\qb0b%
    \ibbbl0{''b}0\qb0{abcdedc}\tbl0\qb0b%
    \ibbbu0{``b}0\qb0{dad}\tbu0\qb0a%
    \ibbbl0{''b}0\qb0{`g'c`g}\tbl0\qb0{'c}\en
\endextract
\autoledgerlines
\end{music}

 \subsection{musixgre}\label{gregnotes}\index{gregorian chant}

% \subsection{Gregorian chant: staffs and clefs}
Gregorian chant is often coded using four line staffs
(see
%sections \ref{gregorian} and
section \ref{stafflinenumber}) and using special notes called
\itxem{neumes} (which are described later in this section). It also requires
special clefs. One way to substitute them for the modern ones is for example
with commands like

\keyindex{setaltoclefsymbol}\verb|3\gregorianCclef|

\noindent or

\keyindex{setbassclefsymbol}\verb|3\gregorianFclef| ,

\noindent which will cause instrument number 3 to display the selected gregorian
clef. The standard clefs can be restored for every instrument with
\keyindex{resetclefsymbols}. Note that when using this method you must
specify whether to substitute for the bass or alto clef
symbol (there is no treble clef in gregorian
chant). The reason is that \musixtex\ selects and
raises the F and C clefs differently, according to the arguments of the
\keyindex{setclef} command. Therefore, if one had substituted any F clef
symbol while saying \verb|\setclef1{1000}|, then an F clef would duly appear
on the staff, but it would be set at the position of an alto clef, thus
seriously misleading the musician.

Another method of clef substitution employs \keyindex{setclefsymbol} (see
section  \ref{treblelowoct}), which substitutes the clef given by
the second argument \ital{for all clef symbols} of the instrument given by the first,
regardless of the actual musical meaning of the new clef symbol. This method is
generally appropriate only if you want to change the clef symbol(s) of
an instrument for the whole of the score.

 As an example, the same gregorian scale has been written with a gregorian C
clef on all four lines of the staff:

 \begin{music}\nostartrule
 \parindent 19mm
 \instrumentnumber{4}
 \setname1{1st line} \setname2{2nd line} \setname3{3rd line} \setname4{4th line}
 \setlines1{4}\setlines2{4}\setlines3{4}\setlines4{4}
 \sepbarrules
 \generalmeter{\empty}
 \setclef1{1000} \setclef2{2000} \setclef3{3000} \setclef4{4000}
 \setaltoclefsymbol1\gregorianCclef
 \setaltoclefsymbol2\gregorianCclef
 \setaltoclefsymbol3\gregorianCclef
 \setaltoclefsymbol4\gregorianCclef
\startextract
\Notes\squ{abcdefghi}&\squ{abcdefghi}&\squ{abcdefghi}&\squ{abcdefghi}&\enotes
\zendextract
\end{music}

 The coding was:
 \begin{verbatim}
 \instrumentnumber{4}
 \setname1{1st line} \setname2{2nd line} \setname3{3rd line} \setname4{4th line}
 \setlines1{4}\setlines2{4}\setlines3{4}\setlines4{4}
 \sepbarrules
 \generalmeter{\empty}
 \setclef1{1000} \setclef2{2000} \setclef3{3000} \setclef4{4000}
 \setaltoclefsymbol1\gregorianCclef
 \setaltoclefsymbol2\gregorianCclef
 \setaltoclefsymbol3\gregorianCclef
 \setaltoclefsymbol4\gregorianCclef
\startextract
\Notes\squ{abcdefghi}&\squ{abcdefghi}&\squ{abcdefghi}&\squ{abcdefghi}&\enotes
\zendextract
 \end{verbatim}

All of the special gregorian symbols available in \musixtex\ are described
in the following subsections.

\subsubsection{Clefs}

\begin{itemize}\setlength{\itemsep}{0ex}
 \item Gregorian C clef: \raise 2.5pt\hbox to 1cm{\gregorianCclef\hfil}~=
 \keyindex{gregorianCclef}, normally activated for instrument $n$ with the
command
 \keyindex{setaltoclefsymbol}\itbrace{n}\keyindex{gregorianCclef}
\item Gregorian F clef:  \raise 2.5pt\hbox to 1cm{\gregorianFclef\hfil}~=
\keyindex{gregorianFclef}, normally activated with the command
\keyindex{setbassclefsymbol}\itbrace{n}\keyindex{gregorianFclef}
 \end{itemize}

 \subsubsection{Elementary symbols}


 \begin{itemize}\setlength{\itemsep}{0ex}

 \item Diamond shaped \itxem{punctum} (This has a different shape compared to the
percussion diamond): \raise 2.5pt\hbox{\xgregchar1}~ =
\keyindex{diapunc}\pitchp\ .
 \item Square \itxem{punctum}: \raise 2.5pt\hbox{\xgregchar5}~ =
\keyindex{squ}\pitchp\ or \keyindex{punctum}\pitchp\ .
 \item Left stemmed \itxem{virga} (not in the 1905 gregorian standard): \raise
2.5pt\hbox{\xgregchar6}~ = \keyindex{lsqu}\pitchp\ .
 \item Right stemmed \itxem{virga}: \raise 2.5pt\hbox{\xgregchar7}~ =
\keyindex{rsqu}\pitchp\ or \keyindex{virga}\pitchp\ .
 \item \ital{Apostropha}\index{apostropha}: \raise 2.5pt\hbox{\xgregchar3}~ =
\keyindex{apostropha}\pitchp\ .
 \item \ital{Oriscus}\index{oriscus}: \raise 2.5pt\hbox{\xgregchar10}~ =
\keyindex{oriscus}\pitchp\ .

 \item \ital{Quilisma}\index{quilisma}: \raise 2.5pt\hbox{\xgregchar125}~ =
\keyindex{quilisma}\pitchp\ .
 \item \ital{Punctum auctum} (up)\index{punctum auctum}: \raise
2.5pt\hbox{\xgregchar9}~ =
\keyindex{punctumauctup}\pitchp\ .
 \item \ital{Punctum auctum} (down)\index{punctum auctum}: \raise
2.5pt\hbox{\xgregchar8}~ =
\keyindex{punctumauctdown}\pitchp\ .
 \item Diamond shaped \ital{punctum auctum} (down)\index{punctum auctum}:
\raise 2.5pt\hbox{\xgregchar2}~ = \keyindex{diapunctumauctdown}\pitchp\ .
 \item \ital{Punctum deminutum}\index{punctum deminutum}: \raise
2.5pt\hbox{\xgregchar4}~ = \keyindex{punctumdeminutum}\pitchp\ .
 \item \ital{Apostropha aucta}\index{apostropha aucta}: \raise
2.5pt\hbox{\xgregchar11}~ = \keyindex{apostropha aucta}\pitchp\ .

\end{itemize}
 All non-\ital{liquescens} symbols have non-spacing variants, namely
\keyindex{zdiapunc}, \keyindex{zsqu}, \keyindex{zlsqu}, \keyindex{zrsqu},
\keyindex{zapostropha} and \keyindex{zoriscus}.

\subsubsection{Plain complex neumes}
Other \itxem{neumes} can be obtained by combining two or more of these
symbols. Since \itxem{neumes} have a special note head width, an additional
shifting macro is provided, namely \keyindex{groff}. It is similar to
\verb|\roff|, but the offset is smaller. For use with comples neumes, another
shifting macro is provided, namely \keyindex{dgroff}, which causes an
offset twice the offset of \verb|\groff|.

 Since most of these symbols depend on relative pitches of their components,
we cannot provide all possible compact combinations as single symbols. The ones
that are available in \verb|musixgre| are described below. In the following,
$p_1$, $p_2$, $p_3$, and $p_4$ represent pitches specified as usual. Please refer to
the source file \verb|musixtex.tex| if you wish to see the coding of those
examples for which it is not quoted here.

\def\twop{\itbrace{p_1}\itbrace{p_2}}
\def\threep{\twop\itbrace{p_3}}
\def\fourp{\threep\itbrace{p_4}}

\begin{description}\setlength{\itemsep}{0ex}
 \item[\keyindex{bivirga}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \bivirga ab\enotes
 \notes \bivirga cc\enotes
 \zendextract
 \end{music}

  This example was coded as:
  \begin{quote}\begin{verbatim}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \bivirga ab\enotes
 \notes \bivirga cc\enotes
 \zendextract
  \end{verbatim}\end{quote}

 \item[\keyindex{trivirga}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \trivirga abc\enotes
 \Notes \trivirga cca\enotes
 \zendextract
 \end{music}

 \item[\keyindex{bistropha}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \bistropha ab\enotes
 \notes \bistropha cc\enotes
 \zendextract
 \end{music}

 \item[\keyindex{tristropha}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \tristropha abc\enotes
 \Notes \tristropha cca\enotes
 \zendextract
 \end{music}

  \item[\keyindex{clivis}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \clivis ba\enotes
 \notes \clivis ca\enotes
 \zendextract
 \end{music}

 \item[\keyindex{lclivis}\twop], for example:

 \begin{music}\nostartrule
 \setsize1{\Largevalue}
 \elemskip 10pt
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \lclivis ba\enotes
 \notes \lclivis ca\enotes
 \zendextract
 \end{music}

 \item[\keyindex{podatus}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \podatus ab\enotes
 \notes \podatus ac\enotes
 \notes \podatus cf\enotes
 \zendextract
 \end{music}

 \item[\keyindex{podatusinitiodebilis}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \podatusinitiodebilis ab\enotes
 \notes \podatusinitiodebilis ac\enotes
 \notes \podatusinitiodebilis cf\enotes
 \zendextract
 \end{music}

 \item[\keyindex{lpodatus}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
  \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \lpodatus ab\enotes
 \notes \lpodatus ce\enotes
 \zendextract
 \end{music}

 \item[\keyindex{pesquassus}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \pesquassus ab\enotes
 \notes \pesquassus ae\enotes
 \zendextract
 \end{music}

 \item[\keyindex{quilismapes}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \quilismapes ab\enotes
 \notes \quilismapes ae\enotes
 \zendextract
 \end{music}

  \item[\keyindex{torculus}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \torculus aba\enotes
 \notes \torculus cfd\enotes
 \notes \torculus afc\enotes
 \zendextract
 \end{music}

  \item[\keyindex{torculusinitiodebilis}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \torculusinitiodebilis aba\enotes
 \notes \torculusinitiodebilis cfd\enotes
 \notes \torculusinitiodebilis afc\enotes
 \zendextract
 \end{music}

 \item[\keyindex{Porrectus}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \Porrectus bab\enotes
 \notes \Porrectus bac\enotes
 \notes \Porrectus bNd\enotes
 \notes \Porrectus bMe\enotes
 \notes \Porrectus bLe\enotes
 \zendextract
 \end{music}
\noindent coded:
 \begin{quote}\begin{verbatim}
 \notes \Porrectus bab\enotes
 \notes \Porrectus bac\enotes
 \notes \Porrectus bNd\enotes
 \notes \Porrectus bMe\enotes
 \notes \Porrectus bLe\enotes
 \end{verbatim}\end{quote}

 \verb|\Porrectus| exists in four different shapes, depending on the
difference between first and second argument. The constraint is that
 $$ p_1-4 \leq p_2 \leq p_1-1 $$ otherwise a diagnostic occurs. Note also that
\keyindex{bporrectus} provides the first curved part of the \verb|porrectus|
command, if you should need it. It has two arguments, the starting pitch and the lower
pitch.

 \item[\keyindex{Porrectusflexus}\fourp], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \Porrectusflexus  bacN\enotes
 \notes \Porrectusflexus  bNdb\enotes
 \notes \Porrectusflexus  bMeb\enotes
 \notes \Porrectusflexus  bLea\enotes
 \zendextract
 \end{music}
\noindent coded:
 \begin{quote}\begin{verbatim}
 \notes \Porrectusflexus  bacN\enotes
 \notes \Porrectusflexus  bNdb\enotes
 \notes \Porrectusflexus  bMeb\enotes
 \notes \Porrectusflexus  bLea\enotes
 \end{verbatim}\end{quote}


 \item[\keyindex{climacus}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \climacus cbN\enotes
 \Notes \climacus cba\enotes
 \Notes \climacus dbN\enotes
 \zendextract
 \end{music}

 \item[\keyindex{climacusresupinus}\fourp], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \climacusresupinus cbNa\enotes
 \Notes \climacusresupinus cbab\enotes
 \Notes \climacusresupinus dbNb\enotes
 \zendextract
 \end{music}

 \item[\keyindex{lclimacus}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
  \setsize1{\Largevalue}
\instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \lclimacus cbN\enotes
 \notes \lclimacus cfd\enotes
 \notes \lclimacus afc\enotes
 \zendextract
 \end{music}

 \item[\keyindex{scandicus}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \scandicus abe\enotes
 \notes \scandicus ceg\enotes
 \zendextract
 \end{music}

 \item[\keyindex{salicus}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \salicus abe\enotes
 \Notes \salicus ceg\enotes
 \zendextract
 \end{music}

 \item[\keyindex{salicusflexus}\fourp], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \salicusflexus abec\enotes
 \Notes \salicusflexus cegd\enotes
 \zendextract
 \end{music}

 \item[\keyindex{trigonus}\threep],
%DAS ????????????
%for example\footnote{The second example is in principle irrelevant,
%but it shows the possibilities, in case of.}:
for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \trigonus aaN\enotes
 \Notes \trigonus cef\enotes
 \zendextract
 \end{music}

\end{description}

\subsubsection{Liquescens complex neumes}\index{liquescens neumes}
\begin{description}\setlength{\itemsep}{0ex}
  \item[\keyindex{clivisauctup}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \clivisauctup ba\enotes
 \notes \clivisauctup ca\enotes
 \zendextract
 \end{music}
  \item[\keyindex{clivisauctdown}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \clivisauctdown ba\enotes
 \notes \clivisauctdown ca\enotes
 \zendextract
 \end{music}
 \item[\keyindex{podatusauctup}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \podatusauctup ab\enotes
 \notes \podatusauctup ac\enotes
 \notes \podatusauctup cf\enotes
 \zendextract
 \end{music}
 \item[\keyindex{podatusauctdown}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \podatusauctdown ab\enotes
 \notes \podatusauctdown ac\enotes
 \notes \podatusauctdown cf\enotes
 \zendextract
 \end{music}

 \item[\keyindex{pesquassusauctdown}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \pesquassusauctdown ab\enotes
 \notes \pesquassusauctdown ae\enotes
 \zendextract
 \end{music}

 \item[\keyindex{quilismapesauctdown}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \quilismapesauctdown ab\enotes
 \notes \quilismapesauctdown ae\enotes
 \zendextract
 \end{music}

  \item[\keyindex{torculusauctdown}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \torculusauctdown aba\enotes
 \notes \torculusauctdown cfd\enotes
 \notes \torculusauctdown afc\enotes
 \zendextract
 \end{music}

 \item[\keyindex{Porrectusauctdown}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \Porrectusauctdown bac\enotes
 \notes \Porrectusauctdown bNd\enotes
 \notes \Porrectusauctdown bMe\enotes
 \notes \Porrectusauctdown bLe\enotes
 \zendextract
 \end{music}

 \item[\keyindex{climacusauctdown}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \climacusauctdown cbN\enotes
 \Notes \climacusauctdown caM\enotes
 \Notes \climacusauctdown aNM\enotes
 \zendextract
 \end{music}

 \item[\keyindex{scandicusauctdown}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \scandicusauctdown abe\enotes
 \notes \scandicusauctdown ceg\enotes
 \zendextract
 \end{music}

 \item[\keyindex{salicusauctdown}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \salicusauctdown abe\enotes
 \Notes \salicusauctdown ceg\enotes
 \zendextract
 \end{music}

  \item[\keyindex{clivisdeminut}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \setsize1{\Largevalue}
 \instrumentnumber 1
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \clivisdeminut ba\enotes
 \notes \clivisdeminut ca\enotes
 \zendextract
 \end{music}

 \item[\keyindex{podatusdeminut}\twop], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \podatusdeminut ab\enotes
 \notes \podatusdeminut ac\enotes
 \notes \podatusdeminut cf\enotes
 \zendextract
 \end{music}

  \item[\keyindex{torculusdeminut}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \torculusdeminut aba\enotes
 \notes \torculusdeminut cfd\enotes
 \notes \torculusdeminut afc\enotes
 \zendextract
 \end{music}

  \item[\keyindex{torculusdebilis}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \torculusdebilis aba\enotes
 \notes \torculusdebilis cfd\enotes
 \notes \torculusdebilis afc\enotes
 \zendextract
 \end{music}

 \item[\keyindex{Porrectusdeminut}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \Porrectusdeminut bac\enotes
 \notes \Porrectusdeminut bNd\enotes
 \notes \Porrectusdeminut bMe\enotes
 \notes \Porrectusdeminut bLe\enotes
 \zendextract
 \end{music}

 \item[\keyindex{climacusdeminut}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \Notes \climacusdeminut cbN\enotes
 \Notes \climacusdeminut caM\enotes
 \Notes \climacusdeminut aML\enotes
 \zendextract
 \end{music}

 \item[\keyindex{scandicusdeminut}\threep], for example:

 \begin{music}\nostartrule
 \elemskip 10pt
 \instrumentnumber 1
 \setsize1{\Largevalue}
 \setstaffs 1 1
 \setlines 1 4
 \setclef 1{3000}
 \setaltoclefsymbol 1 \gregorianCclef
 \startextract
 \notes \scandicusdeminut abe\enotes
 \notes \scandicusdeminut ceg\enotes
 \zendextract
 \end{music}
\end{description}

\subsection{musixgui}\ixtt{musixgui.tex} Provides macros for
typesetting modern style \itxem{guitar tablatures}. For example:

\begin{music}
\hsize130mm
\tenrm
\parindent0pt
\generalmeter{\meterfrac34}
\generalsignature1
\startbarno0
\def\txh{-6.5}
\def\tx#1*{\zchar\txh{\lrlap{\kern3\Internote#1}}}
\def\rtx#1*{\zchar\txh{\kern-3\Internote#1}}
\stafftopmarg10\Interligne
\raiseguitar{20}
\nostartrule
\startpiece
\addspace{.5\afterruleskip}%
\NOtes\tx We*\qa d\en
\bar
\NOtes\guitar G{}o-----\gbarre3\gdot25\gdot35\gdot44\tx wish*\qa g\en
\Notes\tx you*\ca g\en
\Notes\tx a*\ca h\en
\Notes\zchar\txh{merry}\ca g\en
\Notes\ca f\en
\bar
\NOtes\guitar C5o-----\gbarre4\gdot26\gdot36\gdot45\rtx christmas,*\qa e\en
\NOtes\qa e\en
\NOtes\guitar {e/H}5o-----\gbarre3\gdot35\gdot45\gdot54\tx we*\qa e\en
\bar
\NOtes\guitar {A$\!^7$}5o-----\gbarre1\gdot23\gdot42\tx wish*\qa h\en
\Notes\tx you*\ca h\en
\Notes\tx a*\ca i\en
\Notes\zchar\txh{merry}\ca h\en
\Notes\ca g\en
\bar
\NOtes\guitar D{}xxo---\gdot42\gdot53\gdot62\rtx christmas,*\qa f\en
\NOtes\qa d\en
\zbar
\NOtes\guitar{D/c}{}xo----\gdot23\gdot42\gdot53\gdot62\tx we*\qa d\en
\bar
\NOtes\guitar{B$^7$}{}xo----\gdot22\gdot31\gdot42\gdot62\tx wish*\qa i\en
\Notes\tx you*\ca i\en
\Notes\tx a*\ca j\en
\Notes\tx ~mer-*\ca i\en
\Notes\tx ry*\ca h\en
\bar
\NOtes\guitar e{}xxo---\gdot32\tx ~christ-*\qa g\en
\NOtes\tx mas*\qa e\en
\Notes\guitar {G/d}{}xxo---\gdot63\tx and*\ca d\en
\Notes\tx a*\ca d\en
\bar
\NOtes\guitar{C$^6$}{}xo----\gdot23\gdot32\gdot42\gdot51\tx ~~hap~-*\qa e\en
\NOtes\tx py*\qa h\en
\NOtes\guitar{D$^7$}{}xo---x\gdot25\gdot34\gdot45\gdot45\gdot53\tx new*\qa f\en
\bar
\NOTes\guitar G{}o-----\gbarre3\gdot25\gdot35\gdot44\tx ~year.*\ha g\en
\setdoublebar\endpiece
\end{music}

\medskip
The macro \keyindex{guitar} sets the grid, chord name, barre type,
and on-off indicators for the strings. For example, the first
chord in above example was coded as

\verb|\guitar G{}o-----\gbarre3\gdot25\gdot35\gdot44|

\noindent where the first argument is the text to be placed above the grid, the
second is empty (relative barre), and the next six characters indicate if the string
is played or not with either \verb|x|, \verb|o| or \verb|-|. The dots are set with
\keyindex{gdot}~$sb$ where the $s$ is the string and $b$ is the barre. The
rule is set with \keyindex{gbarre}~$b$ where $b$ indicates the position of the barre.

The whole symbol may be vertically shifted with
\keyindex{raiseguitar}\onen, where $n$ is a number
in units of \keyindex{internote}. When using guitar tablatures, it might be
useful to reserve additional
space above the chord by advancing \keyindex{stafftopmarg} to
something like \verb|stafftopmarg=10\Interligne|.

For frequently used chords, it might be useful to define your own
macros, e.g.

\verb|\def\Dmajor{\guitar D{}x-----\gdot42\gdot53\gdot62}%|

 \subsection{musixlit}\label{litu}\label{otherbars}
 Provides a notation style intermediate between gregorian and baroque, for
example

\makeatletter
\catcodesmusic
%\def\vnotes#1\elemskip{\noteskip#1\@l@mskip \multnoteskip\scal@noteskip
%  \not@s}

%\def\not@s{\def|{\nextstaff}\def&{\nextinstrument}\normaltranspose\transpose
%  \check@nopen\notes@open\@ne
%  \kern\n@skip\advance\x@skip\n@skip \locx@skip\x@skip
%  \n@skip\noteskip \noinstrum@nt\z@ \begininstrument}

%\def\en{\@ndstaff\notes@open\z@
%  \ifx\@ne\V@sw \widthtyp@\z@\t@rmskip \let\V@sw\empty \fi}

\def\double#1{\roffset{1.2}{\advancefalse#1}#1}
\makeatother

 % Don't know if this example correct ??? But looks nice...
\begin{music}
\parindent0pt
\instrumentnumber{2}
\interstaff{11}
\generalsignature2
\setclefsymbol2\oldGclef
\setstaffs1{2}
\setclef1\bass
\setinterinstrument1{-\Interligne}
\startpiece
\shortbarrules
\addspace\afterruleskip
\hardlyrics{Il nous a sign\'es de son
  }\notes\zw d\wh K|\zw f\wh h&\rtx\thelyrics*\Hpause h1\en
\qspace\qspace
\NOTes\zhl N\hu d|\zhl g\hu i&\tx sang*\double{\cnql i}\en
\bar
\hardlyrics{Et nous avons \'e-
  }\notes\zw d\wh K|\zw f\wh h&\rtx\thelyrics~-*\Hpause h1\en
\qspace\qspace
\NOTes\zhl M\hu c|\zhl f\hu h&\rtx t\'e*\double{\cnql i}\en
\NOtes\zql L\qu e|\zql b\qu g&\tx ~pro-*\cnqu g\en
\NOtes\zql b\qu d|\zql d\qu f&\tx ~t\'e-*\cnqu f\en
\NOTes\zhl a\hu c|\zhl e\hu h&\tx g\'es.*\double{\cnqu h}\en
\bar
\NOtes\zql M\qu d|\zql d\qu h&\tx ~~Al~-*\cnqu h\en
\NOtes\zql K\qu a|\zql f\qu k&\tx ~~le~-*\cnql k\en
\NOTes\zhl H\hu a|\zhl e\hu j&\tx ~~lu~-*\double{\cnql j}\en
\bar
\NOTEs\zhl K\hu a|\zhl f\hu k&\tx ~~ia !*\cnhl k\en
\sepbarrules
\endpiece

\startpiece
\interbarrules
\addspace\afterruleskip
\hardlyrics{Il nous a sign\'es de son
  }\notes\zw d\wh K|\zw f\wh h&\rtx \thelyrics*\Hlonga h1\en
\qspace\qspace
\NOTes\zhl N\hu d|\zhl g\hu i&\tx sang*\chl i\en
\bar
\hardlyrics{Et nous avons \'e
  }\notes\zw d\wh K|\zw f\wh h&\rtx \thelyrics~-*\Hlonga h1\en
\qspace\qspace
\NOTes\zhl M\hu c|\zhl f\hu h&\rtx t\'e*\chl i\en
\NOtes\zql L\qu e|\zql b\qu g&\tx ~pro-*\cqu g\en
\NOtes\zql b\qu d|\zql d\qu f&\tx ~t\'e-*\cqu f\en
\NOTes\zhl a\hu c|\zhl e\hu h&\tx g\'es.*\chu h\en
\bar
\NOtes\zql M\qu d|\zql d\qu h&\tx ~~Al~-*\cqu h\en
\NOtes\zql K\qu a|\zql f\qu k&\tx ~~le~-*\cql k\en
\NOTes\zhl H\hu a|\zhl e\hu j&\tx ~~lu~-*\chl j\en
\bar
\NOTEs\zbreve K\breve a|\zbreve f\breve k&\tx ~~ia !*\zbreve k\en
\sepbarrules
\endpiece
\end{music}

 This package provides:
 \begin{itemize}\setlength{\itemsep}{0ex}
 \item\keyindex{oldGclef} which replaces the ordinary G clef with an old one,
using (for instrument 2 as an example):
 \verb|\settrebleclefsymbol2\oldGclef|

 \item\keyindex{cqu} $p$ provides a square headed quarter note with stem up at
pitch $p$.

 \item\keyindex{cql} $p$ provides a square headed quarter note with stem down at
pitch $p$.

 \item\keyindex{chu} $p$ provides a square headed half note with stem up at
pitch $p$.

 \item\keyindex{chl} $p$ provides a square headed half note with stem down at
pitch $p$.

 \item\keyindex{cnqu} $p$ and \keyindex{cnql} $p$ provide a stemless square
headed
quarter note at pitch $p$.

 \item\keyindex{cnhu} $p$ and \keyindex{cnhl} $p$ provide a stemless square
headed half note at pitch $p$.

 \item\keyindex{Hpause} $p$ $n$ provides an arbitrary length pause at pitch
$p$ and of length $n$ \keyindex{noteskip}. However, in the first of the above
example, this feature has been used to denote an arbitrary length note rather
than a rest!

 \item\keyindex{Hlonga} $p$ $n$ provides an arbitrary length note at pitch
$p$ and of length $n$ \keyindex{noteskip}.
This feature has been used to denote an arbitrary length note in the second of
the above examples.

 \item\keyindex{shortbarrules} has been used to provide bar rules shorter than
the staff vertical width.

 \item\keyindex{interbarrules} has been used to provide bars between the
staffs, rather that over them. This is an arbitrary question of taste...
 \end{itemize}

 \subsection{musixlyr} \ixtt{musixlyr.tex}
 Enables the recommended method for adding lyrics to a score (see \ref{musixlyr}).

 \subsection{musixmad} \ixtt{musixmad.tex} Increases the number of
instruments, slurs and beams up to twelve. When using this extension, it is
not necessary to explicitly input \verb|musixadd.tex|.


\subsection{musixper}\label{perc}

Provides special symbols intended for percussion parts. Included are a
\ital{drum clef}---comprising two vertical parallel lines---and notes with
various specially shaped heads. The note symbols that are available are as
follows:

 \begin{itemize}\setlength{\itemsep}{0ex}
 \item The \raise.5ex\hbox{\musixchar113}~{}~symbol which is obtained using the
\verb|\qu|, \verb|\qb|, \verb|\cu|, etc. macros preceeded with a
``\verb|dc|'' (think of {\it d}iagonal {\it c}ross).
Available are
\keyindex{dcqu},
\keyindex{dcql},
\keyindex{dcqb},
\keyindex{dczq},
\keyindex{dccu},
\keyindex{dcccu},
\keyindex{dccl} and
\keyindex{dcccl}.

 \item The \raise.5ex\hbox{\musixchar112}~{}~symbol which is obtained using the
\verb|\qu|, \verb|\qb|, \verb|\cu|, etc. macros preceeded with a
``\verb|dh|''
(think of {\it d}iagonal cross {\it h}alf open).
Available are
\keyindex{dhqu},
\keyindex{dhql},
\keyindex{dhqb},
\keyindex{dhzq},
\keyindex{dhcu},
\keyindex{dhccu},
\keyindex{dhcl} and
\keyindex{dhccl}.

 \item The \raise.5ex\hbox{\musixchar111}~{}~symbol which is obtained using the
\verb|\qu|, \verb|\qb|, \verb|\cu|, etc. macros preceeded with a
``\verb|do|''
(think of {\it d}iagonal cross {\it o}pen).
Available are
\keyindex{doqu},
\keyindex{doql},
\keyindex{doqb},
\keyindex{dozq},
\keyindex{docu},
\keyindex{doccu},
\keyindex{docl} and
\keyindex{doccl}.

 \item The \raise.5ex\hbox{\musixchar114}~{}~symbol which is obtained using the
\verb|\qu|, \verb|\qb|, \verb|\cu|, etc. macros preceeded by
``\verb|x|'' (e.g.\ for spoken text of songs).
Available are
\keyindex{xqu},
\keyindex{xql},
\keyindex{xqb},
\keyindex{xzq},
\keyindex{xcu},
\keyindex{xccu},
\keyindex{xcl} and
\keyindex{xccl}.

 \item The \raise.5ex\hbox{\musixchar115}~{}~symbol which is obtained using the
\verb|\qu|, \verb|\qb|, \verb|\cu|, etc. macros preceeded by
``\verb|ox|'' .
Available are
\keyindex{oxqu},
\keyindex{oxql},
\keyindex{oxqb},
\keyindex{oxzq},
\keyindex{oxcu},
\keyindex{oxccu},
\keyindex{oxcl} and
\keyindex{oxccl}.

 \item The \raise.5ex\hbox{\musixchar118}~{}~symbol which is obtained using the
\verb|\qu|, \verb|\qb|, \verb|\cu|, etc. macros preceeded by
``\verb|ro|'' (think of {\it r}h{\it o}mbus).
Available are
\keyindex{roqu},
\keyindex{roql},
\keyindex{roqb},
\keyindex{rozq},
\keyindex{rocu},
\keyindex{roccu},
\keyindex{rocl} and
\keyindex{roccl}.

 \item The \raise.5ex\hbox{\musixchar116}~{}~symbol which is obtained using the
\verb|\qu|, \verb|\qb|, \verb|\cu|, etc. macros preceeded by
``\verb|tg|'' (think of {\it t}rian{\it g}le).
Available are
\keyindex{tgqu},
\keyindex{tgql},
\keyindex{tgqb},
\keyindex{tgzq},
\keyindex{tgcu},
\keyindex{tgccu},
\keyindex{tgcl} and
\keyindex{tgccl}.

 \item The \raise.5ex\hbox to 1em{\musixchar117\hfil}~{}~symbol which is obtained
using the
\verb|\qu|, \verb|\qb|, \verb|\cu|, etc.~macros preceeded by
``\verb|k|'' .
Available are
\keyindex{kqu},
\keyindex{kql},
\keyindex{kqb},
\keyindex{kzq},
\keyindex{kcu},
\keyindex{kccu},
\keyindex{kcl} and
\keyindex{kccl}.
 \end{itemize}

The diamond shaped noteheads described in section \ref{diam} are also
available, because \verb|musixper.tex| inputs \verb|musixdia.tex|.

If any of the foregoing notes need to be dotted, you must use the explicit
dotting macros \verb|\pt|, \verb|\ppt|, or \verb|\pppt| as described in
section \ref{dots}.

Since the usage of these note symbols is
not standardized, it would be wise to include in the score a explanation
of which symbol corresponds to which specific percussion instrument.

A special \itxem{drum clef}---comprising two heavy vertical bars---can
be made to replace the normal clef for the $n$-th intrument by saying
\keyindex{setclefsymbol}\onen\keyindex{drumclef} .
To cause this to appear at the right vertical position, the instrument should
previously have been assigned a treble clef (or not explicitly assigned any
clef, thereby giving it a treble clef by default).

Percussion music might be written on a staff with either one or five lines.
If there are several different percussions instruments it may be useful to
use a five-line staff with a drum clef, and differentiate the instruments
by the type of the note heads and the apparent
pitch of the note on the staff. Here is an example of the
latter\footnote{provided by Agusti {\sc Mart\'in Domingo}}:

\medskip
\begin{music}
\generalmeter{\meterfrac44}
\setclefsymbol1\drumclef
\parindent0pt\startpiece
\leftrepeat
\Notes\zql f\rlap\qp\ibu0m0\xqb0{nn}\enotes
\Notes\kzq d\zql f\zq j\xqb0n\tbu0\xqb0n\enotes
\Notes\zql f\rlap\qp\ibu0m0\xqb0{nn}\enotes
\Notes\kzq d\zql f\zq j\xqb0n\tbu0\xqb0n\enotes
\bar
\Notes\zql f\rlap\qp\ibu0m0\kqb0{nn}\enotes
\Notes\xzq d\zql f\zq j\kqb0n\tbu0\kqb0n\enotes
\Notes\zql f\rlap\qp\ibu0m0\kqb0{nn}\enotes
\Notes\xzq d\zql f\zq j\kqb0n\tbu0\kqb0n\enotes
\bar
\Notes\zql f\rlap\qp\ibu0m0\oxqb0{nn}\enotes
\Notes\oxzq d\zql f\zq j\kqb0n\tbu0\oxqb0n\enotes
\Notes\zql f\rlap\qp\ibu0m0\oxqb0{nn}\enotes
\Notes\oxzq d\zql f\zq j\kqb0n\tbu0\oxqb0n\enotes
\setrightrepeat\endpiece
\end{music}
\noindent Its coding is
 \begin{quote}\begin{verbatim}
\begin{music}
\instrumentnumber{1}
\generalmeter{\meterfrac44}
\setclefsymbol1\drumclef
\parindent0pt\startpiece
\leftrepeat
\Notes\zql f\rlap\qp\ibu0m0\xqb0{nn}\enotes
\Notes\kzq d\zql f\zq j\xqb0n\tbu0\xqb0n\enotes
\Notes\zql f\rlap\qp\ibu0m0\xqb0{nn}\enotes
\Notes\kzq d\zql f\zq j\xqb0n\tbu0\xqb0n\enotes
\bar
\Notes\zql f\rlap\qp\ibu0m0\kqb0{nn}\enotes
\Notes\xzq d\zql f\zq j\kqb0n\tbu0\kqb0n\enotes
\Notes\zql f\rlap\qp\ibu0m0\kqb0{nn}\enotes
\Notes\xzq d\zql f\zq j\kqb0n\tbu0\kqb0n\enotes
\bar
\Notes\zql f\rlap\qp\ibu0m0\oxqb0{nn}\enotes
\Notes\oxzq d\zql f\zq j\kqb0n\tbu0\oxqb0n\enotes
\Notes\zql f\rlap\qp\ibu0m0\oxqb0{nn}\enotes
\Notes\oxzq d\zql f\zq j\kqb0n\tbu0\oxqb0n\enotes
\setrightrepeat\endpiece
\end{music}
 \end{verbatim}\end{quote}

Here is an example of a single-line percussion staff using
diamond-shaped note heads:

\begin{music}
\parindent 19mm
\instrumentnumber{3}
\setname1{keyboard} \setname2{drum} \setname3{monks}
\setlines2{1}
\setlines3{4}
\setinterinstrument1{-2\Interligne}% less vertical space above
\setinterinstrument2{-2\Interligne}% and below the percussion
\sepbarrules
\setsign1{-1} % one flat at keyboard
\generalmeter{\meterfrac24}
\setmeter3\empty
\setclef3\alto
\setclef1\bass
\setstaffs12 % 2 staffs at keyboard
\setclefsymbol3\gregorianCclef % gregorian C clef at instrument 3
\setclefsymbol2\drumclef       % cancel G clef at instrument 2
\startextract
\Notes\hu F|\zh c\hu h&\dnq4&\squ{acd}\enotes\bar
\NOtes\qu I|\zq N\qu d&\qp&\diapunc f\enotes
\NOtes\qu J|\zq a\qu e&\ynq4&\diapunc e\enotes\bar
\notes\hu G|\zh b\hu d&\dnq4&\zsqu d\rsqu g\squ{hgh}\enotes
\endextract
\end{music}
\noindent which is coded as follows:

\begin{verbatim}
\parindent 19mm
\instrumentnumber{3}
\setname1{keyboard} \setname2{drum} \setname3{monks}
\setlines2{1}
\setlines3{4}
\setinterinstrument1{-2\Interligne}% less vertical space above
\setinterinstrument2{-2\Interligne}% and below the percussion
\sepbarrules
\setsign1{-1} % one flat at keyboard
\generalmeter{\meterfrac24}
\setmeter3{\empty}
\setclef3{\alto}
\setclef1{\bass}
\setstaffs1{2} % 2 staffs at keyboard
\setclefsymbol3{\gregorianCclef} % gregorian C clef at instrument 3
\setclefsymbol2{\drumclef}       % cancel G clef at instrument 2
\startextract
\end{verbatim}

% (DAS) Sorry, guys, I couldn't figure out how to get the |'s to work in this
% verbatim.
%
\vskip-11pt
\def\Vert{{\tt\char'174}}
\noindent\verb|\Notes\hu F|\Vert\verb|\zh c\hu h&\dnq4&\squ{acd}\enotes\bar|\\
\verb|\NOtes\qu I|\Vert\verb|\zq N\qu d&\qp&\diapunc f\enotes|\\
\verb|\NOtes\qu J|\Vert\verb|\zq a\qu e&\ynq4&\diapunc f\enotes\bar|\\
\verb|\notes\hu G|\Vert\verb|\zh b\hu d&\dnq4&\zsqu d\rsqu g\squ{hgh}\enotes|\\
\verb|\endextract|

 \subsection{musixpoi}
 Adds definitions of less common singly and doubly dotted notes.
Available are
\keyindex{ccup},
\keyindex{zccup},
\keyindex{cclp},
\keyindex{zcclp},
\keyindex{ccupp},
\keyindex{zccupp},
\keyindex{cclpp},
\keyindex{zcclpp},
\keyindex{cccup},
\keyindex{zcccup},
\keyindex{ccclp},
\keyindex{zccclp},
\keyindex{cccupp},
\keyindex{zcccupp},
\keyindex{ccclpp},
\keyindex{zccclpp},
\keyindex{ccccup},
\keyindex{zccccup},
\keyindex{cccclp},
\keyindex{zcccclp},
\keyindex{ccccupp},
\keyindex{zccccupp},
\keyindex{cccclpp} and
\keyindex{zcccclpp}.

 %\check
 \subsection{musixps}\label{musixps}\index{musixps@{\tt musixps.tex}}
 Activates type K postscript slurs, ties,  and hairpins (see \ref{PostscriptSlurs}).

 \subsection{musixstr}\label{musixstr}\index{musixstr@{\tt musixstr.tex}}
 Provides bowing and other symbols for \itxem{string instruments}\footnote{provided
by Werner {\sc Icking}}. The symbol can be posted at the desired position using
 \verb|\zcharnote|\pitchp\verb|{|$command$\verb|}|. The available symbols and
their meanings are as follows:

{\input musixstr
\begin{quote}\begin{description}\setlength{\itemsep}{0ex}

 \item[\hbox to 1em{\AB}~: \keyindex{AB} or  \keyindex{downbow}] down-bow

 \item[\hbox to 1em{\AUF}~: \keyindex{AUF} or \keyindex{upbow}] up-bow

 \item[\hbox to 1em{\SP}~: \keyindex{SP}] at the top of bow

 \item[\hbox to 1em{\FR}~: \keyindex{FR}] at the nut of bow

 \item[\GB\ or \Gb~: \keyindex{GB} or  \keyindex{Gb}] whole bow

 \item[\UH\ or \Uh~: \keyindex{UH} or  \keyindex{Uh}] lower half of bow

 \item[\OH\ or \Oh~: \keyindex{OH} or  \keyindex{Oh}] upper half of bow

 \item[\MI\ or \Mi~: \keyindex{MI} or \keyindex{Mi}] middle of bow

 \item[\UD\ or \Ud~: \keyindex{UD} or  \keyindex{Ud}] lower third of bow

 \item[\OD\ or \Od~: \keyindex{OD} or  \keyindex{Od}] upper third of bow

 \item[\Pizz~: \keyindex{Pizz}] left hand pizzicato or trill

 \end{description}\end{quote}
 }
 %\check
 \subsection{musixsty}\index{musixsty@{\tt musixsty.tex}}

 Provides certain text-handling facilities for titles, footnotes, and other
items not related to lyrics. It should not be used with \LaTeX. It includes
 \begin{itemize}\setlength{\itemsep}{0ex}
 \item definitions for commonly used fonts such as \verb|\tenrm|,
\verb|\eightrm|, etc.;
 \item definitions of \keyindex{hsize}, \keyindex{vsize},
\keyindex{hoffset}, \keyindex{voffset} suitable for A4 paper; those using
other sizes may wish to modify it once and for all;
 \item a set of text size commands:

 \begin{description}\setlength{\itemsep}{0ex}
  \item[\keyindex{eightpoint}] which sets the usual \keyindex{rm},
\keyindex{bf}, \keyindex{sl}, \keyindex{it} commands to 8 point font size;
  \item[\keyindex{tenpoint}] which sets the usual \keyindex{rm},
\keyindex{bf}, \keyindex{sl}, \keyindex{it} commands to 10 point font size;
  \item[\keyindex{twlpoint}] to get 12 point font size;
  \item[\keyindex{frtpoint}] to get 14.4 point font size;
  \item[\keyindex{svtpoint}] to get 17.28 point font size;
  \item[\keyindex{twtypoint}] to get 20.74 point font size;
  \item[\keyindex{twfvpoint}] to get 24.88 point font size;
 \end{description}
 \item commands for creating titles:
  \begin{itemize}\setlength{\itemsep}{0ex} \item \keyindex{author} or
\keyindex{fullauthor} to be put at the right of the first page, below the
title of the piece; the calling sequence is, for example

  \verb|     \author{Daniel TAUPIN\\organiste \`a Gif-sur-Yvette}|

  \noindent where the \verb|\\| causes the author's name to be displayed on
two lines;

  \item \keyindex{shortauthor} to be put at the bottom of each page;
  \item \keyindex{fulltitle} which is the main title of the piece;
  \item \keyindex{subtitle} is displayed below the main title of the piece;
  \item \keyindex{shorttitle} or \keyindex{title}
  which is the title repeated at the bottom of each page;
  \item \keyindex{othermention} which is displayed on the left of the page,
vertically aligned with author's name. It may contain \verb|\\| to display it on
several lines;
  \item \keyindex{maketitle}  which displays all the previous stuff;
  \end{itemize}

 \item  commands for making \itxem{footnotes}:
  \begin{itemize}\setlength{\itemsep}{0ex}
   \item The normal Plain-\TeX\ \keyindex{footnote} command, which has two
arguments---not just one as in \LaTeX\protect\index{LATEX@\LaTeX}---namely
the label of the footnote, which can be any sequence of characters, and
the text of the footnote. This command does not work inside
boxes, so it cannot be issued within music;

 \item The \keyindex{Footnote} command, which counts the footnotes and uses a
number as the label of the footnote (equivalent to \LaTeX's \verb|\footnote|
command). The same restriction as with \verb|\footnote| applies concerning
its use within the music coding;

 \item The \keyindex{vfootnote} command, taken from the Plain-\TeX, which
places a footnote at the bottom of the current page, but does not put
the footnote label at the place the command is entered in the main text. This
also may not be used within music, but if a footnote is needed whose reference
lies inside the music, it can be entered in two steps:
 \begin{enumerate}
  \item manually insert the reference inside the music, using e.g. \verb|zcharnote|;
  \item post the footnote itself with \verb|\vfootnote| outside the music,
either before \keyindex{startpiece} or between \keyindex{stoppiece} and
\keyindex{contpiece} or equivalent commands.
 \end{enumerate}

  \end{itemize}

 \end{itemize}

 \subsection{musixtmr}\index{musixtmr@{\tt musixtmr.tex}}
 Replaces the standard \texttt{musixtex} fonts by the Times series fonts,
 as default (see \ref{musixtmr}).

 \subsection{musixtri}\index{musixtri@{\tt musixtri.tex}}
Provides triply dotted note symbols.
Available are:
\keyindex{lpppt},
\keyindex{whppp},
\keyindex{zwppp},
\keyindex{huppp},
\keyindex{hlppp},
\keyindex{zhppp},
\keyindex{zhuppp},
\keyindex{zhlppp},
\keyindex{quppp},
\keyindex{qlppp},
\keyindex{zquppp},
\keyindex{zqlppp},
\keyindex{zqppp},
\keyindex{cuppp},
\keyindex{zcuppp},
\keyindex{clppp},
\keyindex{zclppp},
\keyindex{qbppp} and
\keyindex{zqbppp}.

 \subsection{tuplet}\index{tuplet@{\tt tuplet.tex}}
 Causes the figure in xtuplets to be printed within a small gap in the bracket
(see \ref{tuplet}).

% DAS Discussed elsewhere
%\section{The \TeX-music Mailing List}
%
%If you decide to learn to use \musixtex, you are likely to wish that there were
%someone to answer your questions. That is exactly what you'll find on the \TeX-music
%mailing list: experts from all over the world with lots of experience with
%\musixtex{} and related software, who are glad to answer questions and help solve
%problems. You can find out more about the list and sign up at
%\href{http://icking-music-archive.org/mailman/listinfo/tex-music}
%{\underline{\tt http://icking-music-archive.org/mailman/listinfo/tex-music}}.


\chapter{Acquiring, Installing, and Using \musixtex}\label{installation}

This chapter will assume that \TeX\
is installed. Most \unix\ or Linux systems come with \TeX\ already installed.
If using MS Windows, you'll need to have manually installed some version of
\TeX. MiK\TeX\ is the most common variant by far and therefore will be assumed. If
you need to install MiK\TeX, you can get the software from
\href{http://www.miktex.org/}{\underline{\texttt{http://www.miktex.org}}}
or from CTAN. The Werner Icking Archive contains excellent
\href{http://icking-music-archive.org/software/musixtex/musixwinstall.pdf}%
{\underline{instructions for installing MiK\TeX}}%
\footnote{Thanks to Eva {\sc Jaksch}}.

\section{Where to get \musixtex: the Werner Icking Archive}\label{getstuff}

As already mentioned, the home base for all matters related to \musixtex\ is
the Werner Icking Music Archive, at
\href{http://icking-music-archive.org}{\underline{http://icking-music-archive.org}}.
The most up-to-date versions of \musixtex\ and friends are located in the
\href{http://icking-music-archive.org/software/indexmt6.html}{\underline{software}}
section of the archive. The stable distribution of \musixtex\ will be contained in
\href{http://icking-music-archive.org/software/musixtex/musixtex.zip}
{\underline{\verb|musixtex.zip|}}, which is intended to serve all operating
systems.
The CTAN servers are official mirrors. The main CTAN server's
web link is\\
\href{http://www.ctan.org/tex-archive/macros/musixtex/taupin/}
{\underline{http://www.ctan.org/tex-archive/macros/musixtex/taupin/}}
and the FTP link is\\
\href{http://ftp.ctan.org/tex-archive/macros/musixtex/taupin/}
{\underline{http://ftp.ctan.org/tex-archive/macros/musixtex/taupin/}}.

\subsection{End of line char in text files}
The files in the Werner Icking Archive have been contributed by such a wide
range of authors that there is no common standard for the line endings in text files.
But the key text files serve as input to programs such as \TeX\ and \MF\
which are insensitive to this. If you use a PC and run into problems using any of
these text files, you might be able to solve them with the program 
\verb|flip.exe| which comes with the \musixtex\ distribution. Run it from a 
command window by typing \verb|flip -m| $<$filename$>$, and it will 
convert line endings from the \unix to MS-DOS convention.

\subsection{Pre-installed \musixtex}
Many versions of \TeX\ include \musixtex\ as a package. The included version is likely
to be out of date and probably should not be used. When an archived version is
downloaded and properly installed, it will supersede the pre-installed version. 

\section{Installing \musixtex}
The most useful \musixtex\ uses Postscript and produces PDF files. 
The installation is very system dependent and therefore beyond the scope of this manual.
You may refer to the installation manual or to the HOWTO files in the archive for either
\href{http://icking-music-archive/software/musixtex/musixwinstall.pdf}
{\underline{Windows}}\ or
\href{http://icking-music-archive/software/musixtex/musixtex-for-unix.html}
{\underline{\unix}}.
Whatever course you choose, there are really just a few
fundamental tasks you must accomplish:
\begin{itemize}\setlength{\itemsep}{0ex}
  \item \musixtex\ comprises some \TeX\ source files (\verb|.tex|, \verb|.sty|),
font files, and the executable \verb|musixflx|. The \TeX\ sources and font
files must be placed in locations where \TeX\ can find them;
  \item \TeX\ must be advised of the locations of those files;
  \item If you are installing any postscript fonts, you'll have to add a map
file somewhere in the \TeX\ file structure, and locate and modify a configuration
file such as \verb|config.ps| to record the addition of the map file.
  \item \verb|musixflx| must be placed in a folder that is in your search path,
so it can be executed from your working directory;
  \item As stated before, to compile a score, you must run in sequence \verb|tex|, \verb|musixflx|,
and \verb|tex| again. This will produce a \verb|.dvi| file;
  \item To view the result, convert the file to
postscript with \textbf{dvips} and then view it with a postscript viewer such
as \textbf{GSview} and \textbf{ghostscript}, or convert the \verb|.dvi|
directly to a PDF file with \textbf{pdftex} and then view it with any PDF viewer
such as \textbf{Adobe Reader}. You also can use a DVI viewer, but if you are using type K postscript slurs, note that DVI viewers will not display the slurs.
\end{itemize}


\section{Running Musix\TeX\ }

In most systems the commands run in a shell. Unix people are familiar with it.
Also in MS Windows systems, there are a large number of editor/shell programs. Although not recommended, you always can use the DOS
\verb|cmd| shell (\verb|cmd.exe|).


In the examples, a file \verb|mymp|
(\textbf{my} \textbf{m}aster\textbf{p}iece) is used, for demonstrating
the batch commands.



\subsection{Batch commands for making DVI and postscript (MS Windows)}

This commands are available in the \musixtex\ distribution. They produce
a DVI file that can be displayed by a viewer
(normally a part of the \TeX\ installation), or/and a Postscript file (normally with GSview).

After running \TeX\ on a music file, \verb|musixflx| must run. The program \verb|musixflx| calculates the number of bars on a system (music line), in order to have a nice layout. Then, \TeX\ must run again.

When the paths to the binaries and the batch files are set properly, then the following commands can be used as is.

\subsubsection{Using \TeX\ }
The \ixem{musixtex.bat} command fulfills the sequence \texttt{\TeX\ $\Rightarrow$ musixflx $\Rightarrow$ \TeX}~.

\begin{quote}\begin{verbatim}
rem musixtex.bat
if not exist %1.tex goto end
if exist %1.mx1 del %1.mx1
if exist %1.mx2 del %1.mx2
tex %1
if errorlevel 2 goto end
musixflx %1
if errorlevel 1 goto end
tex %1
:end
\end{verbatim}\end{quote}
The next command (\verb|mupsgs.bat|) processes \verb|mymp.tex| and makes a Postscript file  and dispays the file.
\begin{quote}\begin{verbatim}
rem mupsgs.bat
call musixtex.bat %1
DVIPS.EXE -e0 -t a4 -P pdf -G0 %1.dvi
gsview32.exe %1.ps
\end{verbatim}\end{quote}
The \verb|dvips| output looks a little bit nicer using the options
\verb|-e0| (character drift value~=~0) and \verb|-G0| (shift low chars
to higher position).
\verb|-t a4| is for a4 paper (\verb|-t letter| for letter format).
If the output is to be converted in Adobe Acrobat pdf format, the option \verb|-P pdf|
(load \verb|config.pdf|) is needed.

If you want to make a PDF output, you may add the line (after \verb+dvips+):

\noindent{\small
\verb+gswin32c -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -r600 -sOutputFile=%1.pdf -c save pop -f %1.ps+
}

\subsubsection{Using La\TeX\ }
Replace ``\verb+tex+'' by ``\verb+latex+'' in the file \verb+musixtex.bat+~.


\subsection{Running \musixtex\ without a shell}
You also may run the commands without a shell.
To forward the argument in the batch file,
use an other batch file which stays in the same directory as your
masterpiece \verb|mymp.tex| and has the same name: \verb|mymp.bat|~.
\verb|mymp.bat| consists of 1 line: \verb|musixtex.bat %~n0|~.

\noindent Thus \verb|mymp.bat| passes his own name (\verb|mymp|) via \verb|%~n0|
to the \verb|musixtex.bat| command.

Here are four examples of batch files, dependent of the method you are using.
\endcatcodesmusic
%\begin{quote}\begin{verbatim}
\begin{center}
\begin{tabular}{|l|l|l|}
\multicolumn{3}{c}{Choose only one batch file}\\[.4ex]\hline
Batch file for&making DVI&making postscript\\\hline
name &\verb+rem mymp.bat+&\verb+rem mymp.bat+\\
contents&\verb+musixtex.bat %~n0+&\verb+mupsgs.bat %~n0+\\\hline
\end{tabular}
%\end{verbatim}\end{quote}
\end{center}

\subsection{Running \musixtex\ without giving a file name}
If you want to process i.e.\ all \texttt{.tex} files in a directory, then you could make a batch file
\texttt{texall.bat} with the following commands:

\begin{quote}\begin{verbatim}
rem texall
for /F %%I in ('dir /B *.tex') do call mupsgs.bat %%~nI
\end{verbatim}\end{quote}

Of course, this command also works if there is only one file in a directory, which means you
may use \texttt{texall.bat} for a single file, without giving an argument.


\chapter{\musixtex\ examples}

The file \verb|musixdoc.tex|, the source for this manual, contains many useful
examples. In the manual, many examples are accompanied by a display of the code
that produced them, while for a few only an image of the extract is included and you'll
have to look in \verb|musixdoc.tex| to see the coding.

Other useful examples cannot be embedded in the source, either because they are
meant to be in \TeX, not La\TeX, or because they are simply to large. For
these the source files also are provided separately.

When compiling or viewing any of the examples, you should keep in mind that
most DVI previewers and laser printers have
their origin one inch below and one inch to the right of the upper right corner
of the paper, while the musical examples have their upper left
corner just one centimeter to the right and below the top left corner of the page.
Therefore, special parameters may have to be given to the DVI transcription
programs unless special \keyindex{hoffset} and \keyindex{voffset} \TeX\
commands have been included within the \TeX\ source.

\section{Small examples}

\begin{itemize}\setlength{\itemsep}{0ex}

\item{\tt ossiaexa.tex}~: This is a stand-alone example of the use of ossia,
provided by Olivier Vogel (section \ref{ossia} on page \pageref{ossia}).

\item{\tt 8bitchar.tex}~: Using 8bit characters. Here, the European
character set is used. See section \ref{8bit} on page \pageref{8bit} for other sets.

\end{itemize}

\section{Full examples}
All of these examples and many others are available in
\href{http://icking-music-archive.org/software/musixtex/musixexa.zip}
{\underline{\texttt{musixexa.zip}}} or
\href{http://icking-music-archive.org/software/musixtex/musixexa-T112.tar.gz}
{\underline{\texttt{musixexa-T112.tar.gz}}}. Some of them require the
presence of \verb|musixcpt.tex| which makes examples created in
Music\TeX\ compatible with \musixtex. Here we only mention a few of
special interest.

\subsection{Examples mentioned in the manual}

\begin{itemize}\setlength{\itemsep}{0ex}
 \item{\tt avemaria.tex}~: the ``M\'editation'' (alias ``Ave Maria'') by
Charles {\sc Gounod} for organ and violin or voice.\index{Gounod, C.@{\sc Gounod, C.}}
To run this five-page example you'll also need \texttt{avemariax.tex}.
It demonstrates the use of separated bar rules (section \ref{avemaria2})
and the use of staves of different sizes (section \ref{avemaria}).
Also, an additional instrument is created for lyrics. This was a common
practice before the \texttt{musixlyr} package was created by Rainer Dunker.

 \item{\tt glorias.tex}~: a local melody for the French version of
\ital{Gloria in excelsis Deo}, a three-page piece demonstrating the use of the hardlyrics
commands (section \ref{glorias}). {\tt gloriab.tex} is the same piece, but with organ accompaniment.

\end{itemize}

\subsection{Other examples, provided by the authors of MusiX\TeX }

\begin{itemize}\setlength{\itemsep}{0ex}

 \item{\tt traeumer.tex}~: the famous ``Tr\"aumerei'' by
Robert {\sc Schumann}\index{Schumann, R.@{\sc Schumann, R.}} for piano, in genuine
\musixtex\ but with some
additions to perform ascending bitmapped \itxem{crescendos}.
There are also S-shaped slurs between 2 staves.

 \item{\tt parnasum.tex}~: the first page of ``Doctor gradus ad
Parnassum'' by Claude {\sc Debussy}\index{Debussy,
C.@{\sc Debussy, C.}} for piano.
It contains a rather complex example of a new command \verb+\Special+
to create staff-jumping doubly beamed notes.
\end{itemize}

\subsection{Additional documentation}

\begin{itemize}\setlength{\itemsep}{0ex}

 \item{\tt sottieng}~:  Notation mistakes, provided by Jean-Pierre Coulon.

\end{itemize}

\section{Compiling musixdoc.tex}
\subsection{Command sequence}

This is an example of a command sequence (in fact this is the normal procedure for La\TeX\ files). \verb|musixdoc.tex| is a large file, if you use an older version of La\TeX, use ``elatex'' in the command file.
\begin{quote}\begin{verbatim}
latex musixdoc
musixflx musixdoc
latex musixdoc
makeindex -l musixdoc
latex musixdoc
(may require several more runs of elatex to get rid of
    "labels may have changed ..." warnings)
dvips -ta4 musixdoc
\end{verbatim}\end{quote}

To produce \verb|musixdoc.pdf|, open \verb|musixdoc.ps| in \texttt{GSview}. Go to
\verb+File|Convert+, select \verb|pdfwrite| at 600 dpi resolution, click
\verb|OK|.

\subsection{Using batch files}
There are
many other files that are required to compile this document but all of them
are included in \verb|musixtex.zip|, and will be placed in the proper locations
if you have followed the installation instructions for \musixtex.

The two following batch files reside in the same dir as \texttt{musixdoc.tex} (or \texttt{musixdoc114.tex}).

This batch file makes a DVI, Postscript and PDF file, then displays the Postscript file.
The full path names are shown as a comment.
{\small
\begin{quote}\begin{verbatim}
rem filename: lapdfview
LATEX.EXE %1 %2.tex
if errorlevel 1 goto end
makeindex -l  %1
rem C:\musixtex\system\musixflx\win32\musixflx %1
musixflx %1
LATEX.EXE %1 %2.tex
if errorlevel 1 goto end
rem C:\"Program Files\MiKTeX 2.7"\miktex\bin\DVIPS.EXE -e0 -t a4 -P pdf -G0 %1.dvi
DVIPS.EXE -e0 -t a4 -P pdf -G0 %1.dvi
rem C:\"program files"\gs\gs8.63\bin\gswin32c -dBATCH ^
rem -dNOPAUSE -sDEVICE=pdfwrite -r600 \
rem -sOutputFile=%1.pdf -c save pop -f %1.ps
gswin32c -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -r600 ^
-sOutputFile=%1.pdf -c save pop -f %1.ps
pause
rem C:\"program files"\Ghostgum\gsview\gsview32.exe %1.ps
gsview32.exe %1.ps
rem pause
:end
\end{verbatim}\end{quote}
}

This batch file searches the folder for tex files and calls \texttt{lapdfview.bat}
{\small
\begin{quote}\begin{verbatim}
rem latexall.bat
rem proces all files with extension tex in this directory
for /F %%I in ('dir /B *.tex') do call lapdfview.bat %%~nI
pause
\end{verbatim}\end{quote}
}

Thus, to produce \texttt{musixdoc.pdf}, double click on \texttt{latexall.bat}.

\clearpage
{\parindent0pt
\hoffset-15.4mm
\voffset-42mm
\hsize190mm
\vsize285mm
\parskip0pt plus 2pt
% not fine, not clean, but works
% !!! don't look at this !!!
%>>>
\makeatletter
\textheight\vsize
\@colht\vsize
\@colroom\vsize
\makeatother
%<<<
\let\MYTEMP\addcontentsline
\def\addcontentsline#1#2#3{}
\chapter{}
\let\addcontentsline\MYTEMP
\addcontentsline{toc}{chapter}{%
  \protect\numberline\thechapter{Summary of denotations}}
\vglue-20mm
\centerline{\bigfont Pitches}
\medskip
\tentt
\def\bs{\tentt\char92}
\setclef1\bass
\afterruleskip2pt
\startpiece
%
% Pitches
%
\addspace\afterruleskip
\notes\wh{`ABCDEFG}\wh{!ABCDEFG}\wh{HIJKLMNabcde}\off{-26\noteskip}%
  \zchar{14}{\llap`A}\sk
  \zchar{14}{\llap`B}\sk
  \zchar{14}{\llap`C}\sk
  \zchar{14}{\llap`D}\sk
  \zchar{14}{\llap`E}\sk
  \zchar{14}{\llap`F}\sk
  \zchar{14}{\llap`G}\sk
  \zchar{14}A\sk
  \zchar{14}B\sk
  \zchar{14}C\sk
  \zchar{14}D\sk
  \zchar{14}E\sk
  \zchar{14}F\sk
  \zchar{14}G\sk
  \zchar{-5}{\llap'A}\zchar{14}H\sk
  \zchar{-5}{\llap'B}\zchar{14}I\sk
  \zchar{-5}{\llap'C}\zchar{14}J\sk
  \zchar{-5}{\llap'D}\zchar{14}K\sk
  \zchar{-5}{\llap'E}\zchar{14}L\sk
  \zchar{-5}{\llap'F}\zchar{14}M\sk
  \zchar{-5}{\llap'G}\zchar{14}N\sk
  \zchar{14}a\sk
  \zchar{14}b\sk
  \zchar{14}c\sk
  \zchar{14}d\sk
  \zchar{14}e\sk\en
\stoppiece\vskip-3\Interligne\setclef1\treble\contpiece
\notes\wh{abcdefg}\wh{hijklmno}\wh{pqrstuvwxyz}\off{-26\noteskip}%
  \zchar{-8}a\sk
  \zchar{-8}b\sk
  \zchar{-8}c\sk
  \zchar{-8}d\sk
  \zchar{-8}e\sk
  \zchar{-8}f\sk
  \zchar{-8}g\sk
  \zchar{-8}h\zchar{-4}{\llap'a}\sk
  \zchar{-8}i\zchar{-4}{\llap'b}\sk
  \zchar{-8}j\zchar{-4}{\llap'c}\sk
  \zchar{-8}k\zchar{-4}{\llap'd}\sk
  \zchar{-8}l\zchar{-4}{\llap'e}\sk
  \zchar{-8}m\zchar{-4}{\llap'f}\sk
  \zchar{-8}n\zchar{-4}{\llap'g}\sk
  \zchar{-8}o\zchar{-4}{\llap{'\kern-2pt'}a}\sk
  \zchar{-8}p\zchar{-4}{\llap{'\kern-2pt'}b}\sk
  \zchar{-8}q\zchar{-4}{\llap{'\kern-2pt'}c}\sk
  \zchar{-8}r\zchar{-4}{\llap{'\kern-2pt'}d}\sk
  \zchar{-8}s\zchar{-4}{\llap{'\kern-2pt'}e}\sk
  \zchar{-8}t\zchar{-4}{\llap{'\kern-2pt'}f}\sk
  \zchar{-8}u\zchar{-4}{\llap{'\kern-2pt'}g}\sk
  \zchar{-8}v\zchar{-4}{\llap{'\kern-2pt'\kern-2pt'}a}\sk
  \zchar{-8}w\zchar{-4}{\llap{'\kern-2pt'\kern-2pt'}b}\sk
  \zchar{-8}x\zchar{-4}{\llap{'\kern-2pt'\kern-2pt'}c}\sk
  \zchar{-8}y\zchar{-4}{\llap{'\kern-2pt'\kern-2pt'}d}\sk
  \zchar{-8}z\zchar{-4}{\llap{'\kern-2pt'\kern-2pt'}e}\sk\en
\stoppiece
\medskip
\centerline{\bigfont Notes, Accidentals, Accents, Clefs and Rests}
\medskip
%
% Notes& Accidentals
%
\contpiece
\Notes
  \zchar{-4}{Accidentals:}%
  \zchar9{\bs maxima}\maxima i\relax
  \zchar{12}{\bs longa}\longa i%
  \zchar9{\bs breve}\breve i%
  \zchar{12}{\bs wq}\wq i%
  \zchar{12}{\bs wqq}\wqq i%
  \zchar{12}{\bs wh}\wh i%
  \zchar{12}{\bs hu}\zchar{-4}>\hu{>f}%
  \zchar{12}{\bs hl}\loff{\zchar{-4}{\bs cdsh}}\cdsh l\hl l%
  \zchar{12}{\bs qu}\zchar{-4}\^\qu{^f}%
  \zchar{12}{\bs ql}\loff{\zchar{-4}{\bs csh}}\csh l\ql l%
  \zchar{12}{\bs cu}\zchar{-4}=\cu{=f}%
  \zchar{12}{\bs cl}\loff{\zchar{-4}{\bs cna}}\cna l\cl l%
  \zchar{12}{\bs ccu}\zchar{-4}\_\ccu{_f}%
  \zchar{12}{\bs ccl}\loff{\zchar{-4}{\bs cfl}}\cfl l\ccl l%
  \zchar{12}{\bs cccu}\zchar{-4}<\cccu{<f}%
  \zchar{12}{\bs cccl}\loff{\zchar{-4}{\bs cdfl}}\cdfl l\cccl l%
\multnoteskip{1.2}%
  \zchar{12}{\bs ccccu}\ccccu f%
  \zchar{12}{\bs ccccl}\ccccl l%
\multnoteskip{.8}%
  \zchar{12}{\bs grcu}\grcu f%
  \zchar{12}{\bs grcl}\grcl l\en
\stoppiece
%
% various note heads
%
\contpiece
\Notes
\multnoteskip{1.1}%
  \zchar{10}{\bs dqu$^{123}$}%
    \zchar{-3}{\eightrm 1 musixdia.tex~~2 musixper.tex~~3 musixgre.tex%
                        ~~4 musixlit.tex~~5 musixext.tex}\dqu g%
  \zchar{10}{\bs yqu$^{123}$}\yqu g%
\multnoteskip{.9}%
  \zchar{10}{\bs dcqu$^2$}\dcqu g%
  \zchar{10}{\bs dhqu$^2$}\dhqu g%
  \zchar{10}{\bs doqu$^2$}\doqu g%
  \zchar{10}{\bs xqu$^2$}\xqu g%
  \zchar{10}{\bs oxqu$^2$}\oxqu g%
  \zchar{10}{\bs roqu$^2$}\roqu g%
  \zchar{10}{\bs tgqu$^2$}\tgqu f%
  \zchar{10}{\bs kqu$^2$}\kqu f%
  \zchar{10}{\bs squ$^3$}\squ g%
  \zchar{10}{\bs lsqu$^3$}\lsqu j%
  \zchar{10}{\bs rsqu$^3$}\rsqu k%
  \zchar{10}{\bs cqu$^4$}\cqu g%
  \zchar{10}{\bs cql$^4$}\cql k%
  \zchar{10}{\bs chu$^4$}\chu g%
  \zchar{10}{\bs chl$^4$}\chl k\en
%
% Pointed Notes and Accents
%
\stoppiece
\medskip
\contpiece
\Notes
  \zchar{-5}{\eightrm Accent on beam with prefix {\tt b} and beam reference
number instead of the pitch}%
  \zchar{13}{\bs lpz}\lpz f\qu f%
  \zchar{13}{\bs upz}\upz l\ql l%
  \zchar{13}{\bs lsf}\lsf f\qu f%
  \zchar{13}{\bs usf}\usf l\ql l%
  \zchar{13}{\bs lst}\lst f\qu f%
  \zchar{13}{\bs ust}\ust l\ql l%
  \zchar{13}{\bs lppz}\lppz f\qu f%
  \zchar{13}{\bs uppz}\uppz l\ql l%
  \zchar{13}{\bs lsfz}\lsfz f\qu f%
  \zchar{13}{\bs usfz}\usfz l\ql l%
  \zchar{13}{\bs lpzst}\lpzst f\qu f%
  \zchar{13}{\bs upzst}\upzst l\ql l%
  \zchar{16}{\bs downbow}\zchar9\downbow\ql l%
  \zchar{13}{\bs upbow}\zchar9\upbow\ql l%
  \zchar{16}{\bs flageolett}\flageolett l\ql l%
  \zchar{13}{\bs whp}\whp i%
  \zchar{13}{\bs qupp}\qupp h\en
\stoppiece
\medskip
%
% clefs
%
\setclefsymbol1\empty
%\setlines 11\relax
\nostartrule\contpiece
\NOtes
  \zchar{13}{\bs trebleclef}\zchar0\trebleclef\sk
  \zchar9{\bs altoclef}\zchar0\altoclef\sk
  \zchar{13}{\bs bassclef}\zchar0\bassclef\sk
  \zchar9{\bs smalltrebleclef}\zchar0\smalltrebleclef\sk
  \zchar{13}{\bs smallaltoclef}\zchar0\smallaltoclef\sk
  \zchar9{\bs smallbassclef}\zchar0\smallbassclef\sk
  \zchar{13}{\bs drumclef$^2$}\zchar0\drumclef\sk
  \zchar9{\bs gregorianCclef$^3$}\zchar0\gregorianCclef\sk
  \zchar{13}{\bs gregorianFclef$^3$}\zchar0\gregorianFclef\sk
  \zchar9{\bs oldGclef$^4$}\zchar0\oldGclef\sk\en
\zstoppiece\smallskip
%
% Rests
%
\setlines 15\relax
\resetclefsymbols\startrule\contpiece
\NOtes
\multnoteskip{.5}%
  \zchar{13}{\bs qqs}\qqs
  \zchar{13}{\bs hs}\hs
  \zchar{13}{\bs qs}\qs
  \zchar{13}{\bs ds}\ds
  \zchar{13}{\bs qp}\qp
\multnoteskip2%
  \zchar{13}{\bs hpause}\hpause
  \zchar{13}{\bs hpausep}\hpausep
  \zchar{9}{\bs lifthpause}\roff{\lifthpause5}\sk
  \zchar{13}{\bs pause}\pause
  \zchar{13}{\bs pausep}\pausep
  \zchar{9}{\bs liftpause}\roff{\liftpause4}\sk
  \zchar{13}{\bs PAuse}\PAuse
  \zchar{13}{\bs PAUSe}\PAUSe
  \zchar{13}{\bs Hpause$^4$}\Hpause i{.8}\sk\en
\stoppiece\vskip-2\Interligne
%
\centerline{\bigfont Other Symbols}
\medskip
%
% more Symbols
%
\contpiece
\NOtes
  \zchar{14}{\bs Trille}\zchar{-4}{\bs allabreve}\Trille n1%
    \zchar0\allabreve\sk
  \zchar{14}{\bs trille}\zchar{-4}{\bs meterC}\trille n1\zchar0\meterC\sk
  \zchar{14}{\bs shake}\zchar{-4}{\bs reverseC}\shake n\zchar0\reverseC\sk
  \zchar{14}{\bs Shake}\zchar{-4}{\bs reverseallabreve}\Shake n%
    \zchar0\reverseallabreve\sk
  \zchar{14}{\bs mordent}\mordent n\sk
  \zchar{14}{\bs Mordent}\Mordent n\zchar{-4}{\bs meterplus}%
    \zchar0{\meterfrac{3\meterplus2\meterplus3}8}\sk
\multnoteskip{.66}%
  \zchar{14}{\bs turn}\turn n\sk
\multnoteskip{1.25}%
  \zchar{14}{\bs backturn}\backturn n\zchar{-4}{\bs duevolte}\duevolte\sk
  \zchar{14}{\bs Shakel}\Shakel n\sk
  \zchar{14}{\bs Shakesw}\Shakesw n\zchar{-4}{\bs l[r]par}%
    \lpar f\rpar f{\stemlength4\qu f}%
  \zchar{14}{\bs Shakene}\Shakene n\sk
  \zchar{14}{\bs Shakenw}\Shakenw n\sk\en
\stoppiece
\medskip
%
% again
%
\contpiece
\NOtes\zchar9{\bs metron}\zchar{13}{\metron\qu{99}}\sk\en
\setvoltabox1\bar
\NOtes\loffset2{\zchar{17}{\bs setvoltabox}}\en
\setvolta2\setendvolta\rightrepeat
\NOtes\loff{\zchar{17}{\bs setvolta}}\en
\doublebar
\notes\zchar{17}{\kern-\afterruleskip\bs coda}\coda n\en\bar
\notes\zchar{17}{\kern-\afterruleskip\bs Coda}\Coda n\en
\NOtes
  \zchar{17}{\bs segno}\segno n\sk
  \zchar{17}{\kern-2\afterruleskip\bs Segno}\Segno\hsk
  \zchar{17}{\bs caesura}\sk\caesura
  \zchar{17}{\bs cbreath}\cbreath\sk
\multnoteskip{.66}%
  \zchar{17}{\bs PED}\PED\sk
  \zchar{17}{\bs sPED}\sPED\sk
  \zchar{17}{\bs DEP}\DEP\sk
  \zchar{17}{\bs sDEP}\sDEP\sk\en
\stoppiece
\medskip
%
% and again ...
%
\contpiece
\Notes
  \zchar{17}{\bs fermataup}\fermataup l%
    \zchar{-8}{\bs fermatadown}\fermatadown f{\stemlength3\ql i}%
  \zchar{13}{\bs Fermataup}\Fermataup l%
    \zchar{-4}{\kern8pt\bs Fermatadown}\Fermatadown f\wh i%
  \loff{\zchar{17}{\bs arpeggio d5}}\arpeggio d5\sk
\multnoteskip{.66}%
  \loff{\zchar{13}{\bs bracket}}\bracket e{10}\zq n\ql e\en
\notes\stemlength3%
  \zchar{17}{\bs uptrio}\uptrio{11}16\ql l\ql n\bsk\bsk
  \zchar{-8}{\bs downtrio}\downtrio{-5}17\qu c\qu e\en
\Notes
  \zchar{17}{\bs octfinup}\octfinup n{.8}%
    \zchar{-4}{\bs octfindown}\octfindown K{.8}\sk\hsk
  \zchar{17}{\bs slide$^5$}%
    \slide i58\slide i57\slide i56\slide i55\slide i54%
    \slide i53\slide i52\slide i51\slide i5{-1}%
    \slide i5{-2}\slide i5{-3}\slide i5{-4}\slide i5{-5}%
    \slide i5{-6}\slide i5{-7}\slide i5{-8}\sk\en
\leftrepeat
\Notes
  \loffset2{\zchar{-4}{\bs leftrepeat}}%
  \boxitsep=2pt\zchar{17}{\bs boxit A}\zchar9{\boxit A}\en
\leftrightrepeat
\Notes
  \loffset2{\zchar{-8}{\bs leftrightrepeat}}%
  \zchar{17}{\bs circleit B}\uptext{\circleit B}\en
\rightrepeat
\NOtes
  \loffset2{\zchar{-4}{\bs rightrepeat}}\en
\endpiece\advance\textheight-40mm\eject%
\endmuflex
}

%\makeatletter
%\renewenvironment{theindex}{\newpage
% \addcontentsline{toc}{chapter}{Index}%
% \pagestyle{plain}
% \let\item\@idxitem
% \parskip\z@ \@plus .3\p@\relax
% \begin{multicols}{2}[{\Huge\bfseries Index} ]
% \par\bigskip}%
%{\end{multicols}}%
%\makeatother
%\printindex

\makeatletter
\renewenvironment{theindex}{\newpage
 \setcounter{secnumdepth}{-1}
 \chapter[Index]{}\vspace*{-3cm}
% \addcontentsline{toc}{chapter}{Index}
  \pagestyle{plain}
 \let\item\@idxitem
 \parskip\z@ \@plus .3\p@\relax
 \begin{multicols}{3}[{\Huge\bfseries Index} ]
 \par\bigskip}%
{\end{multicols}}%
\makeatother
 \printindex

\end{document}