summaryrefslogtreecommitdiffstats
path: root/doc/en/index.docbook
blob: 064dd2b19ba9721d0a874a9f623ddcf473c77f40 (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
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.0//EN" "dtd/kdex.dtd" [
  <!ENTITY rosegarden "<application>Rosegarden</application>">
  <!ENTITY MIDI "<acronym>MIDI</acronym>">
  <!ENTITY % English "INCLUDE" > <!-- change language only here -->
  <!ENTITY % addindex "IGNORE">
]>

<!-- The language must be changed in the <book> tag for translations. -->


<!--

    Notes on style and terminology for Rosegarden handbook
    ======================================================

     * Try to use British spelling and idiom as much as you possibly
       can, so the American bits don't stick out like a sore
       thumb.  Realise, not realize, colour, not color, though of
       course an American is going to miss using colorful (oops)
       British sayings like "a bit naff," and won't have any idea
       what the bloody hell (that was good, but a bit too vulgar, of
       course) words like "heuristic" mean.

     * Aim to be clear, brief and direct, but be informal.

     * Write instructions in the second person.

       Good:     "You can select segments by clicking on them with
                 the arrow tool."

       Bad:      "Segments can be selected by clicking on them with
                 the arrow tool."

       Very bad: "The arrow tool allows the user to select segments
                 by clicking on them."

       If you dislike the first of these because you want to make the
       phrase "the arrow tool" more obvious by placing it at the
       start of the sentence, then perhaps you should be using a
       variablelist instead and making "the arrow tool" a list item.

     * It's perfectly permissible to detour to explain why
       something is the way it is, particularly if it might not be
       obvious.

     * It's also entirely permissible to omit advanced stuff.  This
       document is be about understanding how and why, not about
       knowing every last clever detail.  Initially we were going to
       include a function reference section for the clever details,
       but it proved too hard to keep up to date, and not all that
       useful.  Providing a quick bit of guidance is most of the job.       

     * Bear in mind we can link extensively from any part of
       the handbook to any other.  Unfortunately DocBook won't allow
       you to write a link to a target that doesn't exist yet, so if
       you want to link to something that's not yet been written,
       either make a note of the planned link in an XML comment, or
       go and create a stub for the bit that hasn't been written yet,
       or else just write in a way that allows for a link to be
       easily added later (we could do an editing phase specially for
       links).

     * Be strict about using the correct terminology for
       Rosegarden data structures (segment, event, track, instrument,
       composition), but don't capitalise the words.  Capitalisation
       is useful in technical documents to make it clear that you're
       referring to a precise concept, but you shouldn't have to do
       it to make your meaning clear in user documentation.  If
       something seems ambiguous without, try rewording it instead.


    About Screenshots
    =================

    We recommend saving your current user preferences as a new theme
    using the KDE theme manager, so you can restore your usual
    desktop after your work on this manual is done.  Then we
    recommend that you spare yourself some effort, and use the
    "Rosegarden Handbook" KDE theme I just created, and put here:
    	
	http://rosegarden.sourceforge.net/Rosegarden\ Handbook.kth

    If you can't use the theme for some reason, you must dial in
    these changes by hand.  Screenshots used with this documentation
    should use the following style, colour and font settings:

    (NOTE: These specs are from the KDE 2.x era, surely, and make no
    particular mention of icon themes.  I have no idea what icons
    were used in the original version of this document, since it was
    not specified.  I have used the new default "Crystal SVG" icons
    in creating the theme above.  This will probably result in a
    mis-match, but I find I really don't care.)

    (NOTE in reply to the above: the scheme was originally from
    KDE 2.x, yes.  I suggest we don't worry about icon mismatches too
    much, as most of the screenshots don't have icons in semantically
    meaningful roles anyway.  I use Crystal SVG too now and I don't 
    really intend to change that for the documentation.)

     * KDE Style: "Light Style, 3rd Revision"

     * Colour scheme: "Blue Slate", with high-contrast
       setting and with the standard widget background set to white.
       (I have this saved as a new scheme.)

     * Fonts: Verdana 11px for general use and menus; Verdana
       11px bold for window titles; antialiasing on, but sub-pixel
       antialiasing off.  (For pictures of the segment and instrument
       parameter boxes I usually turn the size up to 13px, which
       perhaps says something about our use of font size in these
       boxes.)  WARNING: This is not a reliable hint any more, as
       the KDE font size is not in pixels but points that depend
       on the detected monitor resolution.  Go for something that
       looks a bit like the existing screenshots; it will probably
       be smaller than 11pt.

       NOTE: switching off sub-pixel antialiasing is quite important,
       as otherwise your text will look weird and fuzzy to any
       readers with CRT monitors or LCDs with a different colour
       ordering.  The exact choice of font is less important: I
       think you can get away with Vera or whatever.

     * Window Decorations: "Quartz"

    None of these would be my first choice for nice-looking
    screenshots now, but we're not here to sell Rosegarden in this
    document, we're here to provide clear and consistent help text.
    So the priority is to make new screenshots look like the existing
    ones, not to make them look fancy.  Also, I think there is an
    advantage to having screenshots in a help document look a bit
    distinct from the user's own window decorations surrounding the
    help text.

    Screenshots of the whole program or of whole matrix or notation
    windows may be taken using different themes if desired, but
    screenshots of individual dialogs or window components must use
    the above scheme.

-->

<!--
    Notes on Usability Defects
    ==========================

    This comment is a place to note anything I find difficult to
    document, or anything where the functions for two necessarily
    linked concepts are not actually linked in the GUI (etc).

    * The audio file directory (in document properties) can't be
      inspected or changed from the audio file manager.  This is
      arguably linked to a need for a project directory.  There
      are various other usability problems with the audio file
      manager as well, e.g. there's no way to tell it to pull all
      imported audio files into a single audio directory.

    * Track buttons showing sometimes-instrument, sometimes-label.

    * Mostly FIXED - Can't usefully double-click / right-click on
      most rulers.  This would be useful for a slower but clearer
      way to set loops; adding and editing markers; etc.  Setting
      loops is particularly opaque especially in notation and
      matrix views.

    * Hideous inconsistency (documented in an RFE already) between
      having to use RG for MIDI routing and being unable to use RG
      for audio routing.

    Troubleshooting
    ===============

    Shall we have a troubleshooting section?

    * I'm not seeing any MIDI outputs
    * I'm not hearing any sound from my MIDI outputs
    * I'm not seeing any audio outputs
    * I'm not hearing any sound from my audio outputs
    * I don't see any synth plugins

-->

<!--
    Still to do (yeah right, in 30 to 75 years)
    ===========

    * Control rulers

    * Controller editing

    * Event list

    * Event editor dialogs

    * Document properties

    * Add images for the tools (move, split &c) when describing them

    * Add images for transport buttons in transport section

    * Update notation menu references

    * Add new notation stuff     <- "new" when this to-do item was added? when was that I wonder?

    * Config dialog

    * Make sure the guimenuitem etc tags are being used for all menu refs

    * Give keyboard shortcuts for menu functions?

    * Go through again changing Rosegarden -> &rosegarden; and double-hyphen ->
      &ndash; or &mdash; and review any uses of "the ... function" to see
      if these words are redundant

    * Troubleshooter

    * Check !!! items

    * Fill gaps in revision history

    * Consistent capitalisation: Instrument Parameter Box or instrument
      parameter box?  Audio Mixer or audio mixer?  Device or device?

    * Finally, review the structure again and adjust the <chapter>/<sect*>
      for balance

-->


<book id="rosegarden" lang="&language;">

  <!-- This header contains all of the meta-information for the document such
  as Authors, publish date, the abstract, and Keywords -->

  <bookinfo>
    <title>The Rosegarden Handbook</title>
    <authorgroup>
      <author>
	<firstname>Chris</firstname>
	<surname>Cannam</surname>
      </author>
      <author>
	<firstname>Richard</firstname>
	<surname>Bown</surname>
      </author>
      <author>
	<firstname>Guillaume</firstname>
	<surname>Laurent</surname>
        <firstname>D. Michael</firstname>
        <surname>McIntyre</surname>
        <firstname>Pedro</firstname>
        <surname>Lopez-Cabanillas</surname>
        <firstname>Heikki</firstname>
        <surname>Junes</surname>
      </author>
      <!-- TRANS:ROLES_OF_TRANSLATORS -->
    </authorgroup>

    <copyright>
      <year>2002-2008</year>
      <holder>Chris Cannam, Richard Bown, Guillaume Laurent, D. Michael
      McIntyre, Pedro Lopez-Cabanillas, Heikki Junes</holder>
    </copyright>

    <date>2008-05-05</date>
    <releaseinfo>1.7.0</releaseinfo>

    <abstract>
      <para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-mainwindow.png" format="PNG"/>
              </imageobject>
	      <textobject>
	      <phrase>&rosegarden;</phrase>
	      </textobject>
	    </mediaobject>
	  </screenshot>

	Rosegarden is an audio and &MIDI; sequencer and musical notation
	editor.  This Handbook describes how to use it.

      </para>
    </abstract>

    <keywordset>
      <keyword>Rosegarden</keyword>
      <keyword>sequencer</keyword>
      <keyword>MIDI</keyword>
      <keyword>audio</keyword>
      <keyword>music</keyword>
      <keyword>notation</keyword>
      <keyword>score</keyword>
      <keyword>KDE</keyword>
    </keywordset>

  </bookinfo>

  <!-- The contents of the documentation begins here.  Label each
  chapter so with the id attribute. This is necessary for two reasons:
  it allows you to easily reference the chapter from other chapters of
  your document, and if there is no ID, the name of the generated HTML
  files will vary from time to time making it hard to manage for
  maintainers and for the CVS system. Any chapter labelled (OPTIONAL)
  may be left out at the author's discretion. Other chapters should
  not be left out in order to maintain a consistent documentation
  style across all KDE apps. -->

  <chapter id="introduction">
    <title>Introduction</title>

    <sect1>
      <title>About Rosegarden</title>
    <para>
      <application>Rosegarden</application> is a &MIDI; and audio
      sequencer and musical notation editor.  Rosegarden allows you to
      record, arrange, and compose music, in the shape of traditional
      score or &MIDI; data, or of audio files either imported or
      recorded from a microphone, guitar or whatever audio source you
      care to specify.  You can use Rosegarden to write, edit, and
      organise music to create a composition, which you can then
      synthesise, add effects to, and mix down for burning to CD or
      distribution on the web.  Rosegarden also contains well-rounded 
      notation editing support for high quality printed output.
    </para>

    <para>
      <application>Rosegarden</application> is designed to look and
      act in a manner familiar to experienced users coming to Linux
      from other platforms, whilst also being accessible and friendly
      to users new to music software generally.
    </para>

    <sect2 id="intro-handbook">
      <title>About this Handbook</title>
    <para>
    This handbook summarises the capabilities of &rosegarden; and
    provides a reference for some of the concepts involved.  It's
    designed to make sense either read in order or used as a reference
    to the concepts and functions available in Rosegarden.  If you
    would like to read a tutorial as well, <ulink
    url="http://rosegarden.sourceforge.net/tutorial/en/chapter-0.html">you
    can find one here</ulink>.</para>

    <para>If there's something else that you
    don't understand or require further help with, please visit
    <ulink url="http://www.rosegardenmusic.com/support/">the
    Rosegarden website</ulink> for Frequently Asked Questions and
    mailing list instructions.
    </para>
    </sect2>

    <sect2 id="intro-menufunctions">
      <title>About Menus and Shortcuts</title> <para>This handbook
      usually refers to the functions you can use in Rosegarden by
      describing where they live on the menus.  For example, the
      function to add a single new track to the main track editor is
	<menuchoice>
	  <guimenu lang="en">Tracks</guimenu>
	  <guimenuitem>Add Track</guimenuitem>
	</menuchoice>.</para>

      <para>In many cases, this is not the only way to reach a
      particular function.  In this case the same function is also
      available through the keyboard shortcut Ctrl+T, and it also
      appears as an icon on one of the main window's toolbars.  Both
      the keyboard shortcut and the icon can quickly be learned,
      because they are shown on the menu in Rosegarden alongside the
      name of the function.  You should bear in mind that although we
      always give the full menu location in this documentation for
      reference purposes, it's not necessarily the best or most usual
      way to use a function, and you should keep an eye on the
      keyboard shortcuts or toolbar icons as well.
      </para>
    </sect2>

    <sect2 id="intro-optional">
      <title>Optional Features</title> <para>This Handbook assumes
      that your Rosegarden installation supports all the features of
      which it is capable.  Some of Rosegarden's features, including
      some very major ones, are actually optional when building a
      Rosegarden installation, depending on which other libraries and
      supporting code is available.  For example, the whole audio
      subsystem is only compiled in if JACK libraries are available;
      synth plugin support depends on a number of other modules;
      etc.</para> <para>These dependencies are documented in the
      Rosegarden README and configuration documentation. If you find
      that this Handbook refers to features not visible in the version
      of Rosegarden you're using, consult your configuration
      documentation or distributor.
      </para>
    </sect2>
    </sect1>
  </chapter>


<!--
  **********************************
 
   PART I:
   Discussion and tutorial material

  **********************************
  -->


  <chapter id="file-operations">
    <title>Rosegarden Files and Documents</title>
    <para>
      &rosegarden; stores each composition in its own document, using
      its own internal format.  When you save a document it is stored
      on disc as a file with the .rg extension.<footnote><para>
	 Many users have complained about our opaque binary file
	 format.  It is, in fact, nothing more than gzipped XML.
     </para></footnote>  &rosegarden; can also
      handle a number of other standard file formats.
    </para>

    <sect1 id="file-creating">
      <title>New compositions</title>
      <para>
	When &rosegarden; starts up, it does so with a new document,
	containing an "empty" composition ready to start editing.
	To put something in that composition, you must either record
	something, or create some blank lengths of music (referred
	to as "segments") that you can then fill in using the
	various editing facilities.
      </para>
      <para>See <link linkend="recording">Recording</link> for details of how to record music, and see the <link
	  linkend="segment-view">Track Editor</link> section for a
	description of how to create, edit, and manage segments of
	music.
      </para>
    </sect1>

    <sect1 id="file-midi">
      <title>Using MIDI files</title>
      <para>
	To import and export MIDI files, use the 
	<menuchoice>
	  <guimenu lang="en">File</guimenu>
	  <guimenuitem>Import</guimenuitem>
	  <guimenuitem>Import MIDI File</guimenuitem>
	</menuchoice>
	and
	<menuchoice>
	  <guimenu lang="en">File</guimenu>
	  <guimenuitem>Export</guimenuitem>
	  <guimenuitem>Export MIDI File</guimenuitem>
	</menuchoice>
	functions.
      </para>
      <para>
	Although &rosegarden; can load and save file formats such as
	MIDI, it does not store MIDI data internally.  You should
	generally prefer to save files in &rosegarden;'s own format,
	as &rosegarden; stores quite a lot of information that will
	be lost when exporting to MIDI.  This also applies if you merely
	import a file, and then immediately export it back out.  &rosegarden;
	translates the raw MIDI to its internal format, and then translates that format
	back into MIDI.  Some details of the file structure can and do get
	lost or rearranged in this translation, but the resulting performances
	should be functionally identical.
      </para>
      <para>
	When a MIDI file is loaded, &rosegarden; splits out the
	music into one track per MIDI track or channel in the file,
	<link linkend="studio-midi-import">sets up the appropriate
	  instrument mappings</link>, and <link
	  linkend="nv-quantization">attempts to calculate plausible
	  notation</link> for the MIDI performance data.
      </para>
    </sect1>

    <sect1 id="file-rgproject">
      <title>Rosegarden Project files</title> <para>A Rosegarden
      composition file (.rg) contains all of the the note information
      for your composition, as well as other data such as MIDI
      controller settings, plugin details, and the names of any audio
      files referred to in your composition.  The audio files
      themselves are not stored in the Rosegarden composition file;
      instead you are expected to keep track of their location on disk
      yourself (see <link linkend="segment-view-audio-segments">Audio
      segments</link>).  When you need to transfer a project from one
      computer to another, or to a friend or colleague, this can be
      inconvenient.  This is where Rosegarden Project files are
      useful.  A Project file contains your composition, all of the
      audio files it uses, any further data files required for plugins
      used in the composition, and any additional files you may want
      to include, all in one big bundle.</para>
      <para>Use <menuchoice>
	  <guimenu>File</guimenu>
	  <guimenuitem>Export</guimenuitem>
	  <guimenuitem>Export Rosegarden Project file...</guimenuitem></menuchoice> to export the current composition and its associated data into a Rosegarden Project file, and  <menuchoice>
	  <guimenu>File</guimenu>
	  <guimenuitem>Import</guimenuitem>
	  <guimenuitem>Import Rosegarden Project file...</guimenuitem></menuchoice> to expand a Rosegarden Project file back into a composition and load it.</para>

      <para>Note that Rosegarden Project format is an interchange
      format, not an archival format.  Although Rosegarden composition
      files are very carefully checked for compatibility from one
      Rosegarden version to the next, no long-term guarantees are made for the
      Project file format.</para>
    </sect1>
    
    <sect1 id="file-other">
      <title>Other file formats</title>
	<para>Rosegarden can export to and import from a number of other file formats.  Some of these are described here; see also <link linkend="file-printing">Printing</link> for information about LilyPond file export.</para>
	<variablelist>
	<varlistentry>
	<term>Csound</term>
	<listitem>
      <para>You can export score files for the Csound synthesis system using 
	<menuchoice>
	  <guimenu>File</guimenu>
	  <guimenuitem>Export</guimenuitem>
	  <guimenuitem>Export Csound score file...</guimenuitem>
	</menuchoice>.  Together with a suitable orchestra file (not supplied), this can be used to play the composition through <ulink url="http://www.csounds.com/">Csound</ulink>. Note that not all data in the Rosegarden composition necessarily can or will be saved in the Csound format.</para>
	</listitem>
	</varlistentry>
	<varlistentry>
      <term>Mup</term>
	<listitem>
	<para>You can use <menuchoice>
	    <guimenu>File</guimenu>
	    <guimenuitem>Export</guimenuitem>
	    <guimenuitem>Export Mup file...</guimenuitem>
	  </menuchoice>
	  to save the contents of the current composition into a new Mup file.  This can then be processed by the <ulink url="http://www.arkkra.com/">Mup</ulink> music publication system, although it is likely that the file may need some tweaking to get really good quality output.  Note that not all data in the Rosegarden composition necessarily can or will be saved in the Mup format.</para>
      </listitem>
	</varlistentry>
	<varlistentry>
      <term>MusicXML</term>
	<listitem>
	<para>The <menuchoice>
	    <guimenu>File</guimenu>
	    <guimenuitem>Export</guimenuitem>
	    <guimenuitem>Export MusicXML file...</guimenuitem>
	  </menuchoice>
	  function saves the contents of the current composition into a new MusicXML file.  This can then be used with any music software that supports the MusicXML format.  Note that MusicXML support is experimental and has not been well tested.  Not all data in the Rosegarden composition necessarily can or will be saved in the MusicXML format.</para>
	</listitem>
	</varlistentry>
	<varlistentry>
      <term>Hydrogen</term>
	<listitem>
	<para>Rosegarden can import h2song files created by the Hydrogen drum machine.  These are imported into a skeletal MIDI-style structure with one track per pattern.  The audio samples they use are not imported.  Use  <menuchoice>
	    <guimenu>File</guimenu>
	    <guimenuitem>Import</guimenuitem>
	    <guimenuitem>Import Hydrogen file...</guimenuitem>
	  </menuchoice> to import a Hydrogen file.</para>
	</listitem>
	</varlistentry>
	<varlistentry>
      <term>Rosegarden 2.1</term>
	<listitem>
	<para>Use the 
	  <menuchoice>
	    <guimenu>File</guimenu>
	    <guimenuitem>Import</guimenuitem>
	    <guimenuitem>Import Rosegarden 2.1 file...</guimenuitem>
	  </menuchoice> function to create a new composition from the contents of an existing X11 Rosegarden v2.1 (.rose) file.
	  </para>
	</listitem>

	</varlistentry>
	</variablelist>
      </sect1>

    <sect1 id="file-merge">
      <title>Merging files</title> <para>As well as loading or
	importing files, you can also merge them into the current
	document, loading or importing the data from the file, as necessary,
	and adding it to the existing composition.
      </para>
      
      <para>To merge a file, just use the relevant option on the
	<menuchoice>
	  <guimenu lang="en">File</guimenu>
	  <guimenuitem>Merge</guimenuitem>
	</menuchoice>
	submenu, instead of using the Open or
	Import option.
      </para>
    </sect1>

    <sect1 id="file-printing">
      <title>Printing</title>
      <para>
	You can print out a composition in the form of a musical
	score, using the
	<menuchoice>
	  <guimenu lang="en">File</guimenu>
	  <guimenuitem>Print</guimenuitem>
	</menuchoice>
	function or the
	<menuchoice>
	  <guimenu lang="en">File</guimenu>
	  <guimenuitem>Print with LilyPond</guimenuitem>
	</menuchoice>
	function.
      </para>

      <para>
	Producing a score from performance data is a hard task, and
	in most cases it's unreasonable to expect a default printout
	based on MIDI data to be very readable.  You should use the
	<link linkend="notation-view">notation editor</link> to tidy
	up the score before printing.  (See also <link
	  linkend="nv-quantization">Notation from performance
	  data</link>.)
      </para>

      <para>&rosegarden; is capable of producing very readable scores.  Even
	  so, it is designed to be a screen editor and not primarily a
	  typesetter.  If you want to produce true print-quality scores you
	  should consider using <ulink
	      url="http://www.lilypond.org">LilyPond</ulink> in conjunction
	  with &rosegarden;.  LilyPond is music typesetting software that
	  reads a specialised text file format and produces high-quality
	  typeset output.  &rosegarden; is capable of writing LilyPond files
	  using the
	  <menuchoice>
	    <guimenu lang="en">File</guimenu>
	    <guimenuitem>Export</guimenuitem>
            <guimenuitem>Export LilyPond</guimenuitem>
          </menuchoice>
          function, and it
	  features special <link linkend="nv-lilypond-directives">exportable
	      directives</link> and <link linkend="track-parameters">track
	      parameters</link> that provide access to LilyPond features for
	  which there is currently no parallel within &rosegarden;'s own
	  native interface.
      </para>

      <para>LilyPond may be conveniently used with the
	  <menuchoice>
	    <guimenu lang="en">File</guimenu>
            <guimenuitem>Preview with LilyPond</guimenuitem>
          </menuchoice>
	  function, which exports the file into a temporary file and processes
	  it directly with LilyPond for preview with a PDF viewer.
	  If you are happy with the preview, you may print the score using the
	  printing capability of the PDF viewer, or use the 
	  <menuchoice>
	    <guimenu lang="en">File</guimenu>
            <guimenuitem>Print with LilyPond</guimenuitem>
          </menuchoice>
	  function.
      </para>

      <para>
	  When Export, Preview, or Printing is done with LilyPond,
	  there is available also a collection of
	  <link linkend="lilypond-options">LilyPond options</link>.
      </para>
      </sect1>

    <sect1 id="lilypond-options">
      <title>LilyPond options</title>
      <para>If one of the LilyPond export functions is invoked, there will
	  appear a dialog in which options specific to LilyPond export may be
	  altered.
      </para>

      <variablelist>
	<varlistentry>
	  <term>LilyPond version</term>
	    <listitem><para>
		LilyPond version installed into the system should be automatically
		detected in the dialog, but it is possible to export to any other
		LilyPond version since 2.6.  Historically, LilyPond's syntax has
		changed somewhat over time, but since LilyPond version 2.6 changes
		have have been less radical and more maintainable.</para>
	    </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Paper size and Landscape</term>
	    <listitem><para>
		Paper size can be A3, A4, A5, A6, Legal, US Letter, and Tabloid.
		All paper sizes may also be used in Landscape mode.</para>
	    </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Font size</term>
	    <listitem><para>
		Font size affects the size of the notes.  If you want to fit more
		staffs into the paper, you should decrease the font size.</para>
	    </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Export content</term>
	    <listitem><para>
		Export content concerns tracks that have segments in them, which
		are the tracks that are not empty.
		It is possible to export All tracks, Non-muted tracks, the current
		Selected track, or Selected segments.  If LilyPond export is
		launched from the Notation view, Selected segments include
		the same selection which was used in opening the Notation view.</para>
	    </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Merge tracks that have the same name</term>
	    <listitem><para>
		It is possible to Merge tracks that have the same name.
		This options allows for example to make a piano score with 
		several independent voices.  You may give first three tracks
		name "Right" and three next tracks "Left" and then merge
		them in LilyPond export.  (This provides an easier way to manage
		overlapping segments with the price that the top and bottom
		parts will have different names on the page.  If you wish both
		of them to be named, eg. "Piano," then you will have to keep all
		of the segments on the same pair of staffs. Consult <ulink
		url="http://rosegarden.sourceforge.net/tutorial/supplemental/piano/">Piano
		by Example</ulink> for a hands-on demonstration of this.) <!--
		this comment makes absolutely no sense to me(dmm):   Sometimes you
		may encounter notes that overlap in printed form, you may avoid
		them by selecting one of the collapsing notes and fine adjust
		its position in Notation view function -->
	  <menuchoice>
	    <guimenu lang="en">Adjust</guimenu>
            <guimenuitem>Fine Positioning</guimenuitem>
            <guimenuitem>Push Right/Left</guimenuitem>
          </menuchoice>.</para>
	    </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Export tempo marks</term>
	    <listitem><para>
		Tempo marks are not exported by default.  If tempo changes
		rarely, you may want to export all tempo marks, but if
		tempo changes too often, you may export only the first mark.</para>
	    </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Export lyrics</term>
	    <listitem><para>
		<link linkend="nv-text-lyrics">Lyrics</link> is exported if this
		option is checked.  Text is entered in Unicode, which
		makes it possible to enter lyrics in all languages.  Multiple
		lines of lyrics per staff is also possible, see the section
		on <link linkend="nv-text-lyrics">Editing lyrics</link>.</para>
	    </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Export beamings</term>
	    <listitem><para>
		<link linkend="nv-beamed-groups">Beams</link> defined in
		&rosegarden; can be exported, or the default
		beam grouping of LilyPond can be used.  Future versions
		of &rosegarden; may support nested note grouping.</para>
	    </listitem>
	</varlistentry>
<!-- deprecated
        <varlistentry>
	  <term>Add staff group bracket</term>
	    <listitem><para>
		Staff group bracket may be added to cover all staffs.
		Future versions of &rosegarden; may support nested staff
		groupings.</para>
	    </listitem>
	</varlistentry> -->
	<varlistentry>
	  <term>Lyrics alignment</term>
	    <listitem><para>
		Lyrics is aligned Left by default.  Sometimes Center or
		Right alignment provides results and more pleasant output.</para>
	    </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Ragged bottom</term>
	    <listitem><para>
		The staffs normally cover the whole page from top to bottom.
		When there are only a few staffs, this option places the
		extra vertical space at the bottom of the page instead.</para>
	    </listitem>
	</varlistentry>	<varlistentry>
	  <term>Enable "point-and-click" debugging</term>
	    <listitem><para>
		If you export the LilyPond source with the 
	  <menuchoice>
	    <guimenu lang="en">File</guimenu>
	    <guimenuitem>Export</guimenuitem>
            <guimenuitem>Export LilyPond</guimenuitem>
          </menuchoice>
		function, you may open the LilyPond source by clicking
		notes in the PDF output.  Consult <ulink url="  http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Point-and-click#Point-and-click">LilyPond documentation</ulink> for more
		information.
</para>
	    </listitem>
	</varlistentry>	<varlistentry>
	  <term>Export \midi block</term>
	    <listitem><para>
		LilyPond is also capable of producing MIDI output.  Check this
		option if you wish the LilyPond source to use this option.
		Note however that MIDI output which you obtain via &rosegarden;
		sequencer, via
	  <menuchoice>
	    <guimenu lang="en">File</guimenu>
	    <guimenuitem>Export</guimenuitem>
            <guimenuitem>Export MIDI file</guimenuitem>
          </menuchoice>,
		and via LilyPond's MIDI output may differ considerably.</para>
	    </listitem>
	</varlistentry>	<varlistentry>
	  <term>Headers</term>
	    <listitem><para>
		Headers can be edited both in LilyPond export dialog and through the
	  <menuchoice>
	    <guimenu lang="en">Composition</guimenu>
	    <guimenuitem>Edit Document Properties</guimenuitem>
          </menuchoice> function.</para><para>Some of the headers will appear
		only in LilyPond output.
		The position of the Printable headers match roughly with
		the positions of the headers in the printed output.
		Below is shown an example with all headers and lyrics
		entered with Unicode text.</para>
	<para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="headers-and-unicode-lyrics.png" format="PNG"/>
	    </imageobject>
	    <textobject>
	      <phrase>LilyPond's output showing all headers and Unicode lyrics.</phrase>
	    </textobject>
	  </mediaobject>
	</screenshot>
	</para>
	    </listitem>
	</varlistentry>
      </variablelist>
      </sect1>

  </chapter>

  <chapter id="segment-view">
    <title>The Track Editor</title>
    <sect1 id="segment-view-overview">
      <title>Overview</title>
      <para>
	&rosegarden;'s main layout is similar to many
	other popular sequencers.  It is based on a track
	structure &mdash; the main window shows a track editor with
	a list of tracks and their associated instruments down the
	left hand side.  You can manipulate and move blocks of
	music data (referred to as &ldquo;segments&rdquo;) on the
	track editor as well as opening the segments themselves in
	specialised editors (<link
	  linkend="notation-view">notation</link>, <link
	  linkend="matrix-view">matrix</link>, <link
	  linkend="percussion-matrix-view">percussion matrix</link>, and <link
	  linkend="event-view">event list</link>).
      </para>
      
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-trackeditor.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s Track Editor showing two segments of music data</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>
	Tracks govern what sort of segment you can create in a particular
	place.  If you create a segment on an audio track, it will be an audio
	segment, no matter where that segment subsequently moves.  If you
	create a segment on a &MIDI; track, it will always be a &MIDI;
	segment.  You can set <link linkend="track-parameters">
	track parameters</link> to pre-select various segment properties at the track
	level, and to exercise fine control over &MIDI; recording.
      </para>
      <para>
	Tracks can be assigned to a range of &MIDI;, plugin synth, or
	audio instruments.  In the picture above we see three segments
	in the track editor on tracks assigned to General MIDI
	instruments.
      </para>
      
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-trackbutton-labels.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s Track buttons showing track labels</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>
	The button area to the left of the segment canvas shows you
	the track number, mute and record status, and the label of the
	track.  You can mute or unmute a track by clicking on the blue
	LED-style button, and select a particular track as a record
	target by clicking on the red one.  To change the track label,
	double-click on it.
      </para>
      
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-trackbutton-instruments.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s Track buttons showing instrument assignments</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>
	Track labels are only shown if the
	<menuchoice>
	  <guimenu lang="en">Settings</guimenu>
	  <guimenuitem>Show Track Labels</guimenuitem>
	</menuchoice>
	menu option is enabled.
	Otherwise, as in this picture, the instrument assignments for
	the tracks are shown instead.</para>

    </sect1>
    <sect1 id="segment-view-instruments">
      <title>Tracks and instruments</title>
      <para>
	Each track must have an instrument assigned to it, in order to
	be heard.  By default the first 16 tracks are assigned to the
	16 instruments of the first available MIDI device, and the
	next 16 tracks are assigned to audio.</para>

      <para>To change the instrument assignment for a track,
      right-click on the track label: a pop-up menu will appear from
      which you can select among all the available instruments.
      </para>
      
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-trackbutton-instrumentmenu.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s Instrument menu</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>
	An instrument can be understood as a single channel on a
	&MIDI; device, or as a mono or stereo audio output or an audio
	synth plugin.  Tracks containing note data should be assigned
	to &MIDI; or synth plugin instruments, and those containing
	audio to audio instruments.  You can assign more than one
	track to the same instrument, in which case the multiple
	tracks will produce sounds in the same way (&MIDI; tracks playing
	panned to the left with a flute, or audio tracks playing with the same
	volume levels, through the same stack of <link linkend="studio-plugins">
	plugins</link>.)
      </para>
      <para>
	You can change various properties of the instrument
	associated with a track using the <link
	  linkend="segment-view-instrumentparameterbox">Instrument
	  Parameter Box</link>.  This is where, for example, you would
	set a MIDI instrument to use a particular patch and so
	produce a particular sound (piano, strings etc).
      </para>
      <para>
	See the
	<link linkend="studio-introduction">Studio</link> section
	for more about instruments.
      </para>
	
    </sect1>
    <sect1 id="segment-view-creating">
      <title>Creating segments</title>

      <para>
	To create an empty segment, in order to begin composing
	something new, you need to use the pencil tool (which is normally the
	default active tool when you first start &rosegarden;).  Click on
	the pencil on the toolbar, and then click at the point where
	you want the segment to start (at the correct height for the
	track you want the segment to be on, and at a distance
	across the editor window corresponding to the correct time)
	and drag rightwards until the segment is the right number of
	bars long.
      </para>

      <para>You can also create segments using the <link
      linkend="segment-view-selector">Select tool</link>, by clicking
      and dragging either with the middle mouse button, or with the
      left button and Ctrl held down.</para>


      <para>If you want to draw a segment longer than the visible
	portion of the canvas, the canvas will scroll automatically once you
	reach its edge.  If you keep dragging past the end of the entire
	composition, you can keep dragging, and will push the end marker right along
	with you.  (This is a welcome contrast to earlier versions of
	&rosegarden;.)
      </para>

      <para>
	Usually each new segment starts on a barline and extends bar
	by bar, but this snap-to-grid effect can be prevented by
	holding down Shift while clicking and dragging.
      </para>

      <para>New segments are created in a yellow colour, with a treble clef by
	  default.  You may wish to jump ahead and have a look at <link
	      linkend="track-parameters">track parameters</link> to explore
	  other possibilities.
      </para>

      <para>If you wish to draw a segment that begins in the middle of an
      existing segment, hold Ctrl and Alt when clicking.  The track will
      automatically expand to accommodate this new segment.  This is especially
      useful for some situations involving music notation.
      </para>

      <para>
	Once you have created a segment, you can then begin editing
	using the <link linkend="matrix-view">matrix</link>, <link linkend="percussion-matrix-view">percussion matrix</link> or <link
	  linkend="notation-view">notation</link> editors.  To use one
	of these editors, either double-click on the segment, or
	else click with the right mouse button and choose the editor
	you want from the context menu.
      </para>

      <para>
	If you are intending to <link
	linkend="recording">record</link> from a MIDI device or audio
	input, you don't need to create a new segment to record into
	first -- each separate recording always goes into a new
	segment, created automatically during recording.
      </para>
    </sect1>

    <sect1 id="segment-view-audio-segments">
      <title>Audio segments</title>
      <para>
	An audio segment contains recorded or sampled audio data,
	instead of editable note-event data.  Rosegarden allows you to
	record, play, arrange and split audio segments, but does not
	contain audio waveform editing facilities.
	</para>
      <para>To create an audio segment, you can <link
      linkend="recording">record</link> from an audio source onto a
      track assigned to an audio instrument, or you can work with
      existing WAV files.  To do this, you need to use the audio
      manager dialog (reached via <menuchoice><guimenu
      lang="en">File</guimenu><guimenuitem>Manage Audio Files</guimenuitem></menuchoice>).
	</para>
      <para>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="rg-audiofilemanager.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>The audio file manager</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>You can drag-and-drop audio files from the KDE file
      browser or your KDE desktop into the audio file manager, or you
      can open them using its File menu.  Then you can either
      drag-and-drop them onto Rosegarden's track canvas, or use the
      audio file manager's <menuchoice><guimenu
      lang="en">Action</guimenu><guimenuitem>Insert into Selected
	    Audio Track</guimenuitem></menuchoice> menu function, provided the current
      selected track in the main window is assigned to an audio
      instrument.  Newly-recorded audio segments also appear in the
      audio file manager dialog.</para>

      <para>Details of the audio files associated with a particular
      composition are saved with that composition, but the audio files
      themselves are not.  You should ensure your document has a
      sensible audio file search path (via <menuchoice><guimenu
      lang="en">Composition</guimenu><guimenuitem>Edit Document
      Properties...</guimenuitem><guimenuitem>Audio</guimenuitem></menuchoice>)
      so as to keep your audio files accessible together.  You can also export
      your project to a &rosegarden; project package file (.rgp) via
      <menuchoice><guimenu lang="en">File</guimenu>
      <guimenuitem>Export</guimenuitem><guimenuitem>Export Rosegarden Project File
      </guimenuitem></menuchoice> to collect any scattered audio files
      together in one place.</para>

      <para>The audio manager dialog also shows the sample-rate and
      other information for each audio file, and marks with an
      asterisk any audio file whose sample rate does not match that of
      the current JACK audio session that Rosegarden is using.
      Rosegarden will resample these files at playback time using a
      very low quality zero order hold resampler.  You are advised to
      resample them separately using a separate dedicated audio editor
      instead.
      </para>

    </sect1>
    
    <sect1 id="segment-view-manipulating">
      <title>Manipulating segments</title>
      <para>
	The main window contains a selection of "tools" for editing
	segments.  These are available from the main toolbar: first
	select the tool you want from the toolbar, and then click
	and drag on the segments on the main canvas.
      </para>

      <sect2 id="segment-view-selector">
	<title>The Select tool</title>
	<para>
	  The select tool	  <inlinemediaobject>
	    <imageobject>
	      <imagedata fileref="rg-select.png"/>
	</imageobject>
	</inlinemediaobject>
          is actually a
	  multipurpose tool: it can be used to select, move, copy,
	  resize and create segments.</para>

	<para>The most obvious use is
	  selection: select a single segment by clicking on it with
	  the select tool, or select several by clicking with Shift
	  held down, or by clicking in an empty area of the window and
	  dragging out an area.
	</para>

	<para>To move segments with the select tool, simply click and
	drag on the segment.  To create copies, click and drag with
	Ctrl held down.  To resize a segment, click and drag on the
	right-hand edge of the segment.  To create new segments, click
	and drag on an empty area either with the middle mouse button
	or with the left mouse button and Ctrl held down.</para>

	<para>
	  The select tool doesn't replace the other tools completely,
	  though &mdash; sometimes you need to be more precise about
	  which operation you intend, particularly when working on small
	  segments.
	</para>

      </sect2>

      <sect2 id="segment-view-move-resize">
	<title>Move and Resize tools</title>
	<para>To move a segment to a different start time or track,
	  use the move tool	  <inlinemediaobject>
	    <imageobject>
	      <imagedata fileref="rg-move.png"/>
	</imageobject>
	</inlinemediaobject>
           and click and drag on the segment you want
	  to move.  If you hold down the Ctrl key while dragging, the
	  segment will be copied instead of moved.</para>

	<para>To resize a segment, use the resize tool	  <inlinemediaobject>
	    <imageobject>
	      <imagedata fileref="rg-resize.png"/>
	</imageobject>
	</inlinemediaobject>
           and click and drag on the right-hand end of the segment.
           Resizing a segment has the effect of extending or
           shortening it, by subtracting some of its contents or adding
           silence at the start or end.  If you hold down the Ctrl
           key, the segment will be <link
           linkend="segment-view-rescale">rescaled</link> (stretched
           or squashed) instead of extended or shortened.</para>

	<para>For both move and resize you can hold Shift for fine
	positioning, to avoid snapping to a particular grid position.
	</para>

      </sect2>

      <sect2 id="segment-view-rescale">
        <title>Stretching and squashing segments</title>
        <para>Resizing a segment normally makes it shorter or longer
        by subtracting content or adding some extra space.  However,
        by holding the Ctrl key while resizing, you can instead
        stretch or squash the contents of the segment.  You can also do this by selecting the segment and then using <menuchoice><guimenu lang="en">Segments</guimenu>
      <guimenuitem>Stretch or Squash...</guimenuitem></menuchoice>.</para>
        <para>
          For segments that contain MIDI events, this re-spaces the
          events so that they are spread across the new segment's
          duration, playing back faster or slower than before but in
          the same relative proportions.
        </para>
        <para>
          For audio segments, this time-stretches the audio, altering
          its played speed without altering its pitch (as would happen
          if the audio was simply played back faster or slower).
          Time-stretching usually adds some audible artifacts as well,
          so the quality of your results may vary.
        </para>
        <para>
          &rosegarden; does not alter the original audio file when
          time-stretching an audio segment, and if you rescale the same
          segment repeatedly it will always work from the original
          file instead of accumulating timestretching artifacts with
          each rescale.  You can rescale both mono and stereo audio.
        </para>
        <para>
          (For reference, &rosegarden; uses a frequency-domain
          time-stretcher based on a phase vocoder with phase-locking
          at percussive transients.  This usually produces good
          results with stable harmonic sounds such as pads and basses
          as well as purely percussive sounds such as drum loops, but
          is less effective for composite material or music with soft
          or breathy note onsets.)
        </para>
      </sect2>

      <sect2 id="segment-view-split-join">
	<title>Split tool</title>
	<para>
	  You can use the split tool
	  <inlinemediaobject>
	    <imageobject>
	      <imagedata fileref="rg-split.png"/>
	</imageobject>
	</inlinemediaobject>
	  to split a single segment
	  into two separate segments.  To split your segment, select the
	  split tool and click on the segment you wish to split.
	</para>
	<para>
	  By default segments are split on the closest barline to the
	  cursor, but this can be prevented by holding down Shift
	  while splitting the segment.
	</para>

      </sect2>

      <sect2 id="segment-view-split-by-pitch">
	<title>Other Split functions</title>
	<para>The Segments menu contains a number of other Split functions.</para>
	<variablelist>
	<varlistentry>
	<term>Split on Silence</term>
	<listitem><para><menuchoice>
		  <guimenu>Segments</guimenu>
		  <guimenuitem>Split</guimenuitem>
		  <guimenuitem>Split on Silence</guimenuitem>
		</menuchoice>
	  splits the selected segments on silences.
		  This function works slightly differently depending
		  on whether the selected segments contain audio or
		  MIDI data.  For audio segments, it offers you a
		  dialog in which you can choose a threshold below
		  which the segment is considered "silent"; it then
		  splits the segment whenever its amplitude falls
		  below this threshold.  For MIDI segments, it simply
		  splits the segment everywhere that a full bar of
		  silence occurs.
	</para>
	</listitem>
	</varlistentry>
	<varlistentry>
	<term>Split by Pitch</term>
	<listitem><para>
		<menuchoice>
		  <guimenu>Segments</guimenu>
		  <guimenuitem>Split</guimenuitem>
		  <guimenuitem>Split by Pitch...</guimenuitem>
		</menuchoice>
		  splits the currently selected segments into higher and
		    lower parts.

		  This function invokes a dialog allowing you to
		  choose a pitch as a "split point", and then splits
		  the selected segments in half with all the notes on
		  or above that split point in the "higher" segment
		  and all the notes below it in the "lower".

		</para>
		<para>
		  If the music in the segment consists of two separate
		  parts (e.g. left and right hand piano parts) that
		  are not always completely on either side of a single
		  split point, you may with to select the "ranging
		  split-point" option.  If this is selected,
		  Rosegarden will attempt to track the two parts as
		  they move up and down, usually doing a slightly
		  better job of separating out notes that were
		  intended to lie in the two separate parts.

		</para>
		<para>
		  The resulting segments are both created on the same
		  track, with one overlapping the other.
		  
		</para>
	</listitem></varlistentry>

	<varlistentry>
<term>Split by Recording Source</term><listitem><para><menuchoice>
		  <guimenu>Segments</guimenu>
		  <guimenuitem>Split</guimenuitem>
		  <guimenuitem>Split by Recording Source...</guimenuitem>
		</menuchoice> splits the currently selected segments according to the MIDI channel and device their events were recorded from.</para><para>If you have recorded events from more than one MIDI channel or device into the a single segment, you can use this function to split them into separate segments afterwards.  Select the channel or device whose events you want to split out, and the segment will be split into two segments, one containing events from the selected channel or device and the other containing the remaining events.  The two segments are both created on the same track, with one overlapping the other.</para><para>See also <link linkend="recording">Recording</link> and <link linkend="track-recording-filters">Track recording filters</link> for more details on how to select the source MIDI channel or device for a recording.</para></listitem></varlistentry>


	<varlistentry>
	<term>Split at Time</term><listitem><para>The <menuchoice>
		  <guimenu>Segments</guimenu>
		  <guimenuitem>Split</guimenuitem>
		  <guimenuitem>Split at Time...</guimenuitem>
		</menuchoice> function simply splits the currently selected segments into two parts at the time you specify.</para></listitem></varlistentry>	

	</variablelist>
	  
	</sect2>
    </sect1>

    <sect1 id="segment-view-tempo-timesig">
      <title>Tempo and Time Signature</title>

      <sect2 id="tempo">
	<title>Tempo in Rosegarden</title>
	<para>
	  &rosegarden; considers a composition to be accompanied by a
	  single stream of "tempo changes" and "time signature
	  changes", which you can edit to adjust the tempo and the
	  number and structure of beats in each bar.</para>

	<para>A tempo change
	  can be to a constant fixed tempo, or it can be "ramped"
	  &mdash; changing smoothly to a different target tempo at a
	  given future time.  Each tempo change takes effect until the
	  following one is reached, so any two consecutive tempo changes
	  together describe a region that will be played at a constant
	  or smoothly ramping tempo.
	</para>

	<para>
	  Tempo and time signature are related, because &rosegarden;
	  displays tempo in beats per minute, and the duration of a
	  beat depends on the time signature.  &rosegarden; only
	  permits a single time signature to be in effect in any given
	  bar (that is, you can't have different time signatures in
	  different tracks).  Each new time signature causes a new bar
	  to start, so you can place two time signatures closer
	  together than the natural bar duration in order to obtain a
	  partial bar.
	</para>
      </sect2>

      <sect2 id="tempo-ruler">
	<title>Tempo rulers</title>
	<para>
	  The &rosegarden; <link linkend="segment-view">track editor</link>, <link
	  linkend="matrix-view">matrix editor</link> and <link
	  linkend="notation-view">notation editor</link> each contain
	  a tempo ruler, which can be optionally displayed at the top
	  of the editing area.</para>

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-temporuler.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s tempo ruler (and the bar and beat ruler beneath it)</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

	<para>The tempo ruler shows changes to tempo and time
	signature throughout the composition, and can be used for
	editing tempo.</para>

	<para>To increase or decrease the tempo within the range of a
	single tempo change, click and drag the horizontal line (or
	sloped line, for ramped tempos) representing that tempo
	upwards or downwards.</para>

	<para>To insert a new tempo change, right-click on the ruler
	for a menu and select <guimenuitem>Insert Tempo
	Change</guimenuitem>.  This will insert a new tempo change
	with the same tempo as the prior one, which you can then drag
	to increase or decrease.</para>

	<para>You can also click and drag the starting point of a
	tempo change left or right to move that tempo change to a
	different time, and you can click and drag the ending point of
	a tempo change up or down to make the tempo ramp gradually
	towards an ending tempo value.</para>

	<para>Double-click on the tempo ruler to open the <link linkend="tempo-timesig">tempo and
	time signature editor</link>.</para>

</sect2>

<sect2 id="tempo-timesig">
	<title>Tempo and time signature editor</title>
	
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-tempotimesig.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s tempo and time signature editor</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

	<para>The tempo and time signature editor window lists all of the tempo and time signature changes in the composition.  You can edit an individual tempo or time signature change by double-clicking on it.</para>

      </sect2>

      <sect2 id="tempo-edit">
	<title>Changing Tempo</title>
	<para>
	You can edit an existing tempo change, or add a new one, by using the <link linkend="tempo-ruler">tempo ruler</link>, by double-clicking on the tempo display in the <link linkend="transport">Transport window</link>, by using the <menuchoice>
		  <guimenu>Composition</guimenu>
		  <guimenuitem>Add Tempo Change...</guimenuitem>
		</menuchoice> menu function, or by double-clicking on an existing tempo in the <link linkend="tempo-timesig">tempo and time signature editor</link>.  Each of these will bring you to some variation of the tempo editing dialog:</para>
	<para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-tempodialog.png" format="PNG"/>
	</imageobject>
	  <textobject>
	    <phrase>&rosegarden;'s tempo dialog</phrase>
	  </textobject>
	</mediaobject>
	</screenshot>
	</para>
	<para>To set a new tempo, either dial it into the numeric tempo spinbox at the top, or else click repeatedly on the Tap button at approximately the speed you want and let &rosegarden; work out the tempo for you.
	  </para>
	<para>By default, a new tempo is "fixed"; that is, the tempo remains constant from the tempo change until the next tempo change is reached.  Alternatively, you can tell &rosegarden; to make the tempo ramp smoothly to a particular value, or to the following tempo value, by the point at which the next tempo change is reached.  See also <link linkend="tempo">Tempo</link> for more details on tempo handling.</para>
      </sect2>
      
      <sect2 id="time-signature">
	<title>Time signature</title>
	<para>
	  To change the time signature, use <menuchoice>
		  <guimenu>Composition</guimenu>
		  <guimenuitem>Add Time Signature Change...</guimenuitem>
		</menuchoice> or double-click on the existing time signature in the <link linkend="transport">Transport window</link> or <link linkend="tempo-timesig">tempo and time signature editor</link>.</para><para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-timesigdialog.png" format="PNG"/>
	</imageobject>
	  <textobject>
	      <phrase>&rosegarden;'s time signature dialog</phrase>
	  </textobject>
	</mediaobject>
	</screenshot>
	</para>
      </sect2>
<sect2 id="tempo-from-segment">
	<title>Setting tempo from an existing segment</title>
	<para>&rosegarden; provides two ways to set tempo from a segment that you have recorded or imported:</para>
	  <variablelist>
	    <varlistentry>
	    <term>Audio Segment Duration</term>
	      <listitem><para>Use the <menuchoice>
		  <guimenu>Composition</guimenu>
		  <guimenuitem>Set Tempo to Audio Segment Duration</guimenuitem></menuchoice> function when you have imported or recorded an audio segment that you know is exactly one bar long, and you want to ensure that the tempo for surrounding note events is set appropriately.</para><para>This function uses the duration of the selected segment (which must be an audio segment of a single bar) to work out a single matching tempo setting.  It does not analyse the content of the audio segment in any way; it simply looks at how long it is.</para>
		</listitem>
	    </varlistentry>
	  <varlistentry>
	    <term>Beat Segment</term>
	    <listitem><para><menuchoice>
		  <guimenu>Composition</guimenu>
		  <guimenuitem>Set Tempos from Beat Segment</guimenuitem></menuchoice> analyses a segment of MIDI events that are assumed to be at beat positions for the current time signature, and sets a series of tempo changes according to the time elapsed between consecutive beats.</para>
	      <para>You can use this to set an overall tempo map for a composition by "tapping" tempo in a recorded segment.  For example, you can record from a MIDI keyboard and tap a series of single notes at approximate beat positions, speeding up and slowing down gradually; then select the recorded segment and use this function to set a tempo map that speeds up and slows down to match your tapping.</para>
	      </listitem>
	    </varlistentry>
	  </variablelist>
	</sect2>
		
    </sect1>

    <sect1 id="markers-ranges-loops">
      <title>Markers, ranges, and loops</title>
      <sect2 id="markers">
	<title>Markers</title>

	<para>Markers are moments in time that have labels.  You can
	create any number of markers in your &rosegarden; composition,
	to define particular points that you wish to remember the
	locations of.  Marker positions and labels will be saved in
	your &rosegarden; file.</para>

	<para>Markers are shown in the main ruler at the top of each
	of &rosegarden;'s editor windows.</para>

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-markerloop.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>A marker and a loop range</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
        <para>To add
	a new marker, double-click on the marker area (top half) of
	the ruler to open the marker editor.  Make sure &rosegarden;'s
	playback pointer (see <link linkend="transport">The
	Transport</link>) is in the location you want to add the
	marker at, and then click the Add button to add a new marker
	at the playback position.  You can then double-click on the
	marker's entry in the marker editor window to edit its name or
	adjust its location.</para>

	<para>Click on the text of a marker in the marker ruler to
	move the playback pointer directly to that marker.</para>

	<para>You can set a <link linkend="ranges-loops">loop range</link>
	between two marker positions, by clicking in the area between
	the markers in the marker ruler with the Shift key
	pressed.</para>
      </sect2>

      <sect2 id="quick_marker">
    <title>Quick Marker</title>

    <para>The quick marker is a special moment in time that can be defined
    on the fly with a single key (by default Ctrl-1) from the main window
    (track editor). Once defined it appears as a red line in the loop ruler 
    (it does not appear among other markers, since it does not have a label).
    At any time when in the track editor you can jump to the quick marker
    position with a single key (by default simply 1).
    <screenshot>
      <mediaobject>
        <imageobject>
          <imagedata fileref="rg-quickmarker.png" format="PNG"/>
      </imageobject>
    <textobject>
      <phrase>Quick Marker at the start of the third bar</phrase>
    </textobject>
      </mediaobject>
      </screenshot>
    </para>
    
    <para>A typical use of the quick marker is when you want to record the same bars
    on different instruments: after setting the quick marker at the first bar of 
    the working interval, it is easy to jump to the quick marker each time you need
    to record a new part.</para>
    
    <para>Note that the quick marker position is not saved in your &rosegarden; file.</para>
      </sect2>
      
      <sect2 id="ranges-loops">
	<title>Ranges and loops</title>
	<para>
	  &rosegarden; allows you to highlight a period of time in the
	  main ruler, which will be used as a "range" for editing
	  operations and which will be looped during playback.
	</para>

	<para>To set the current range, click and drag with the Shift
	key pressed on the subdivided area of the main ruler at the
	top of the editing window.  The range that you drag will be
	highlighted in white as you drag it, and will snap to the
	nearest beat boundary at both ends.  Any subsequent playback
	will then be constrained to looping this range.
	</para>
	
	<para>You can also set a range between two <link
	linkend="markers">markers</link> by shift-clicking between the
	marker positions in the marker ruler, or set a range using the
	<link linkend="transport-overview">Transport</link> window.
	The Transport contains small buttons to set the start and end
	of the current range to the current playback pointer position.
	Either of these methods allows you to set more precise end
	points for your range than you can with click-drag.</para>

	<para>To clear a range and restore normal playback, click on
	the subdivided area of the main ruler with the Shift key
	pressed, or toggle the loop button on the Transport.</para>

	<para>Note that playback looping when a range is defined is
	not the same thing as the <link
	linkend="segment-view-segmentparameterbox">repeating
	segment</link> function available in the segment parameters
	(which seamlessly repeats individual segments rather than
	causing the transport to jump).</para>

	<sect3 id="range-operations">
	  <title>Range editing</title>

	  <para>You can carry out edits
	    on the current range in order to cut and paste sections
	    of music that include the relevant parts of all
	    segments, tempos and time signatures within the range.
	  </para>

	  <para>Set a range and then use the <menuchoice> <guimenu
	  lang="en">Edit</guimenu> <guimenuitem>Cut
	  Range</guimenuitem> </menuchoice> or
	  <menuchoice><guimenuitem>Copy
	  Range</guimenuitem></menuchoice> menu functions to cut or
	  copy the range to the clipboard.</para>

	  <para>You can paste a range using the standard <menuchoice>
	  <guimenu lang="en">Edit</guimenu>
	  <guimenuitem>Paste</guimenuitem></menuchoice> menu function
	  to overlay its contents onto the rest of the composition at
	  the current playback pointer position, or you can use
	  <menuchoice> <guimenu lang="en">Edit</guimenu>
	  <guimenuitem>Paste Range</guimenuitem></menuchoice> to
	  insert the range from the clipboard into the composition at
	  the current playback pointer position.</para>

	</sect3>

	<sect3 id="range-insert">
	  <title>Inserting a range</title>

          <para>You can also insert an empty range at the current
          playback position using the <menuchoice> <guimenu
          lang="en">Edit</guimenu> <guimenuitem>Insert
          Range</guimenuitem> </menuchoice> menu function.  You can
          specify how much space you want to insert, and then all of
          the segment content, tempos and time signatures following
          the playback position will be pushed along in time by that
          duration to leave an empty space.
          </para>
        </sect3>

      </sect2>
    </sect1>

    <sect1 id="triggered-segments">
      <title>Triggered segments</title>

	<para>A triggered segment is a segment that does not appear on
	the main canvas and is not positioned at a particular time or
	on any particular instrument, but is instead triggered during
	playback by one or more notes in other segments.  These
	triggering notes serve as a shorthand for the full triggered
	segment, in the same way as written ornaments such as trills
	in notation serve as shorthand for the notes that make up the
	trill.  One use of triggered segments is in fact for
	<link linkend="nv-ornaments">playing ornaments</link>.</para>

    <para>Rosegarden can optionally stretch or squash each triggered
    segment to match the duration of the note that triggers it, and
    can raise or lower the pitch and velocity of the segment likewise
    to match.  A triggered segment is played on the same instrument as
    its triggering event.</para>

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-triggersegment.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s Trigger Segment dialog, as reached from the matrix editor</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
 
    <para>Triggered segments are managed through a window available
    via the <menuchoice> <guimenu
    lang="en">Segments</guimenu><guimenuitem>Manage Triggered
    Segments</guimenuitem></menuchoice> option in the main segment
    canvas.  To make a new triggered segment, copy a segment or part
    of a segment to Rosegarden's clipboard, then use the <menuchoice>
    <guimenu lang="en">Edit</guimenu> <guimenuitem>Paste as New
    Triggered Segment</guimenuitem></menuchoice> menu option in this
    manager window.  You can then set a particular note to play this
    triggered segment instead of the original note, using the
    <menuchoice> <guimenu lang="en">Adjust</guimenu>
    <guimenuitem>Trigger Segment...</guimenuitem></menuchoice>
    function in the matrix or <menuchoice> <guimenu
    lang="en">Note</guimenu><guimenuitem
    lang="en">Ornaments</guimenuitem> <guimenuitem>Trigger
    Ornament...</guimenuitem></menuchoice> function in the notation
    editor.</para>

    <para>When triggering a segment, you will be offered a choice for
    how it is played in terms of timing, because the triggered segment
    (or ornament) may have a different underlying duration from your
    triggering note.  The options for playback timing are:</para>

    <variablelist>

      <varlistentry>
	<term>As stored</term>
	<listitem>
	  <para>Play the triggered segment with a start time
	  coinciding with that of the note, and at the original speed.
	  Keep playing the triggered segment until it ends, even if it
	  is longer than the triggering note.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Truncate if longer than note</term>
	<listitem>
	  <para>Play the triggered segment with a start time
	  coinciding with that of the note, and at the original speed.
	  If the triggered segment is longer than the triggering note,
	  truncate it so that it ends at the end time of the note.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>End at same time as note</term>
	<listitem>
	  <para>Play the triggered segment with its end time
	  coinciding with the end of the note, and at the original
	  speed.  This means the start of the triggered segment may be
	  chopped off if it is longer than the triggering note.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Stretch or squash segment to note duration</term>
	<listitem>
	  <para>Speed up or slow down the triggered segment so that it
	  fits exactly into the duration of the triggering note.  This
	  is the default.
	  </para>
	</listitem>
      </varlistentry>
 
    </variablelist>
 
    <para>A triggered segment may contain silence at the start or end,
    and this will be "played" (and stretched or squashed if
    appropriate) as well as the notes and other events in the segment.</para>
 
    <para>It is not currently possible to make a triggered segment
    start playing before the start time of its triggering note. You
    also can't trigger a segment from within another triggered
    segment, and you can't trigger audio segments.</para>
 
    <para>To edit the contents of a triggered segment, either
    double-click on it in the Manage Triggered Segments window, or
    double-click on any note that triggers it.  Apart from editing the
    notes in the segment, you can also change the duration of the
    segment itself from the Edit menu of the resulting event list
    view.  Remember that editing a triggered segment will affect all
    the notes that trigger it, not just the one that you
    double-clicked to get to the editing window.</para>

    </sect1>
  </chapter>

  <chapter id="transport">
    <title>The Transport</title>
    <para>
      When you play a composition,
      &rosegarden; sweeps a playback pointer across
      the tracks from left to right playing the contents of the
      segments as it crosses them.  The pointer's position on the
      screen is tracked and controlled by a window called the
      Transport.
    </para>
    
    <sect1 id="transport-overview"><title>Overview</title>
    <para>
      <screenshot>
        <mediaobject>
          <imageobject>
            <imagedata fileref="rg-transport.png" format="PNG"/>
    </imageobject>
      <textobject>
	<phrase>&rosegarden;'s Transport window</phrase>
      </textobject>
    </mediaobject>
    </screenshot>
    </para>

    <para>
      If the Transport isn't visible, you can activate it with <menuchoice> <guimenu lang="en">Settings</guimenu> 
	<guimenuitem>Show Transport</guimenuitem> </menuchoice>.
    </para>
    
    <para>The Transport shows the time reached by the playback
      pointer, in seconds by default.</para>

    <para>You can switch it to show
      musical time (bar and beat counts), musical time with a flashing
      visual metronome, or audio sample frame times, using the topmost
      of the small buttons <inlinemediaobject>
	    <imageobject>
	      <imagedata fileref="rg-button-bar-time.png"/>
	</imageobject>
	</inlinemediaobject> on the left of the transport window.</para>

    <para>The
      button immediately below that <inlinemediaobject>
	    <imageobject>
	      <imagedata fileref="rg-button-from-end.png"/>
	</imageobject>
	</inlinemediaobject> toggles the display so as to show
      time remaining to the end of the composition instead of from the
      start.</para>

    <para>
      The main controls on the transport start the sequencer playing
      and pause it, fast forward the pointer position, rewind it, stop
      it or jump to beginning or end of composition.
    </para>

    <para>
      The transport display also shows the tempo and time signature in
      effect at the current playback position.  Double-click on either
      of these to insert a new tempo or time signature change.  See
      <link linkend="segment-view-tempo-timesig">Tempo and Time
      Signature</link> for more ways to adjust these elsewhere in Rosegarden.
    </para>

    <para>
      You can also double-click anywhere on the main time display on
      the transport window, to enter a precise time that you want the
      playback position to be set to.
    </para>

    <para>Additional controls and a &MIDI; event display are hidden on
    the bottom flap on the transport, which can be toggled on or off
    using the arrow button next to it at the left.  Also on this extra
    portion there are buttons for recording, setting the loop start
    and end (see <link linkend="ranges-loops">Ranges and loops</link>),
    soloing individual tracks, turning on or off the metronome (see
    <link linkend="studio-metronome">Metronomes</link>), and silencing
    your MIDI devices (the panic button).  </para>

    </sect1>
    <sect1 id="recording">
      <title>Recording</title>
      <para>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="rg-trackbuttons.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>Track buttons in various states of recording readiness</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
      <para>
	To record a new segment into a track, first make sure the
	right tracks are armed for recording by selecting the red
	(for audio tracks) or yellow (for MIDI tracks) LED-style
	buttons on the track labels, and then use the <link
	    linkend="transport-overview">Transport's</link> record
	control.  This has the effect of both starting the transport,
	thus playing the existing composition, and recording into the
	appropriate track, or tracks.
      </para>
      <para>
	You can record any number of &MIDI; and audio tracks at once so long
	as your computer is powerful enough, and you have enough disk space.
	Be careful not to accidentally leave tracks selected when you have
	finished using them and are trying to record somewhere else.
      </para>
      <para>
	Alternatively you can use punch-in record to separate the acts
	of starting the transport and entering record mode.  Punch-in
	record is toggled with the <keycap>Space</keycap> bar.  You can press
	<keycap>Space</keycap>
	while playing a composition to switch instantly between
	playback and recording without stopping the transport, or you
	can use <keycap>Space</keycap> to arm for recording when the transport is
	stopped, so that a subsequent Play will in fact record as
	well.  (The latter is handy when synchronising to an <link
	linkend="transport-external">external transport</link>.)
      </para>
      <para>
	If you record to MIDI tracks, you will record from the 
	MIDI devices that are selected for recording in the
	<link linkend="studio-device-editor">MIDI device
        manager</link>, as filtered through the <link
        linkend="track-recording-filters">track level recording filter</link>
        and the global <link linkend="studio-midi-filters">MIDI filters</link>.
      </para>
      <para>
	If you record to audio tracks, your recording to each track
	will be from the input currently selected for that track's
	instrument in the <link
	linkend="segment-view-instrumentparameterbox">instrument
	parameter box</link>.  This will either be an external audio
	input or an audio submaster or master (for performing
	mixdowns).  If it's an external input, it will by default
	record from your soundcard's first available physical record
	in.  You may wish to use a JACK connection tool to
	connect some other JACK audio application to the input
	instead.  See also <link
	linkend="studio-audio-routing">Audio Routing</link>.
      </para>
    </sect1>
    <sect1 id="transport-external">
      <title>Synchronising to external transports</title>
      <sect2 id="transport-jack">
	<title>JACK Transport</title>
	<para>
	  Rosegarden supports the JACK transport mechanism for
	  synchronising its transport with other JACK applications on
	  the same computer.  To activate it, go to
	  <menuchoice>
	    <guimenu lang="en">Settings</guimenu>
	    <guimenuitem>Configure Rosegarden...</guimenuitem>
	  </menuchoice>
	  and check the <guimenuitem>Use JACK transport</guimenuitem> box.</para>
	
	<para>When the JACK transport is in use, all of the applications
	  that are subscribed to it share a common transport control, and
	  you can start, stop, and move the transport from any one of
	  them.</para>

	<para>Many Linux audio applications that use the JACK audio
	server also support JACK transport: consult their
	documentation for details of whether and how.</para>
      </sect2>
      <sect2 id="transport-mtc">
	<title>MIDI Time Code</title>
	<para>
	  Rosegarden supports MIDI Time Code (MTC) synchronisation in
	  master and slave modes.  This is particularly useful for
	  synchronising the Rosegarden transport with a hardware
	  MTC-capable device, or with software running on other
	  computers connected via MIDI.
	</para>
	<para>To make Rosegarden the MTC Master, so that it will
	  control any MTC slave device or application connected to it,
	  go to
	  <menuchoice>
	    <guimenu lang="en">Settings</guimenu>
	    <guimenuitem>Configure Rosegarden...</guimenuitem>
	  </menuchoice>
	  and in the MIDI page's MIDI Sync tab, select "MTC
	  Master" from the MIDI Time Code menu.  To make Rosegarden an
	  MTC Slave so that Rosegarden's transport will automatically
	  be synchronised with incoming MTC events, select "MTC
	  Slave".
	</para>
      </sect2>
    </sect1>
    
    <sect1 id="infrared-remote-controls">
    	<title>Infrared Remote Controls</title>
		<para>
			Rosegarden supports infrared remote controls for 
			almost all transport functions. In order to use it, 
			you need either the internal LIRC client, which is 
			an optional feature at Rosegarden's compile time, 
			or the KDE IRKick application (KDE LIRC daemon) 
			that you can find in your Linux distribution's 
			repositories. In both cases, you need to install 
			and configure the LIRC server daemon. The exact 
			details depend on your remote control and receiver, 
			and you should refer to the <ulink url="http://www.lirc.org/html">
			LIRC web site</ulink> for more information.
		</para>
			
		<para>
			You can find more details online about the internal
			LIRC client configuration file and IRKick basics, at  
			<ulink url="http://www.rosegardenmusic.com/resources/documents/infrared-remotes.shtml">
			Rosegarden's web site</ulink>.
		</para> 
    </sect1>
  </chapter>

  <chapter id="studio">
    <title>The Studio</title>

    <sect1 id="studio-introduction">
      <title>Devices, instruments and connections</title>

      <para>Rosegarden uses the term Studio to refer to everything it
      knows about the sound systems attached to the computer.  This
      may include &MIDI; and audio hardware and other sound software,
      and includes information about connections, configuration,
      &MIDI; patches and so on.  The Studio is built-in to every
      composition you create with Rosegarden.</para>

      <para>Three pieces of terminology are essential here:

	<variablelist>

	  <varlistentry>
	    <term>Device</term>
	    <listitem>
	      <para>A <quote>device</quote>, as far as Rosegarden is
	      concerned, is simply something capable of producing
	      sounds.  This may be a MIDI or audio device.  MIDI
	      devices do not necessarily correspond directly to
	      physical MIDI ports: they are just things with names
	      that you can refer to, expected to work in particular
	      ways.  Configuration information such as MIDI patch maps
	      can be attached to devices.
	      </para>
	    </listitem>
	  </varlistentry>

	  <varlistentry>
	    <term>Instrument</term>
	    <listitem>
	      <para>Each device has a number of
		<quote>instruments</quote>, each of which is assumed
		to make a particular sound.  These are the things that
		you can assign tracks to in order to choose which
		sound they play.  By default, a device contains 16
		instruments, created for you at startup: if the device
		is a MIDI device, then these will each be initialised
		to one of the 16 MIDI channels.  The instrument is
		where you set all the properties of a particular
		voice, such as program settings, reverb, volume etc.
	      </para>
	    </listitem>
	  </varlistentry>

	  <varlistentry>
	    <term>Connection</term>
	    <listitem>
	      <para>While a MIDI device is simply a name and a
	      collection of configuration information, the
	      <quote>connection</quote> specifies which MIDI port it
	      is physically attached to.  This can be configured in
	      the <link linkend="studio-device-editor">MIDI device
	      manager</link>.  (Audio and synth plugin devices do not
	      have connections in the same way.)
	      </para>
	    </listitem>
	  </varlistentry>
	</variablelist>
      </para>

      <para>For example, imagine a setup consisting of a PC with two
	physical MIDI ports, one of which has an external synth
	attached to it.  Here you would normally configure Rosegarden
	so as to have one MIDI device, corresponding to the synth.
	You could then configure this device with the correct name and
	patch map, and then specify a connection for it that
	corresponded to the relevant MIDI port on your soundcard.
	Each of the 16 default instruments on the device could then be
	configured with a suitable program, and you would then assign
	tracks to those.</para>

      <para>
	In practice, Rosegarden will by default create a device for
	each of the available connections on startup.  So in the
	example above, two MIDI devices will be created by default
	even though you only need one.  You would generally then
	rename and apply patch maps to the first, and delete or
	simply not use the second.  Remember that there is no way
	for Rosegarden to know what synths you actually have plugged
	in to the MIDI ports on your computer: for this reason, the
	devices created at startup are just intended to be a default
	set, and it's up to you to ensure that the devices you
	configure match those you are really using.
      </para>

      <para>Once configured, the studio setup is stored with every
	Rosegarden-format file you save.</para>

    </sect1>

    <sect1 id="studio-device-editor">
      <title>Managing MIDI devices</title>

      <para>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="rg-devicemanager.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>The MIDI device manager</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>
	The MIDI device manager dialog shows you the MIDI devices
	that you currently have available to you, and where they are
	connected.  To reach this dialog, use	<menuchoice>
	  <guimenu lang="en">Studio</guimenu>
	  <guimenuitem>Manage MIDI Devices</guimenuitem>
	</menuchoice>.
      </para>

      <para>
	As described in the <link
	  linkend="studio-introduction">Devices, Instruments and
	  Connections</link> section, by default Rosegarden tries to
	provide a plausible set of devices for you at startup, and
	to make sensible connections for those devices.  But the
	default configuration might not always be suitable, and so
	this dialog allows you to rename devices and modify their
	connections and play/record direction.
      </para>
      
      <para>
	Each of the Play devices listed here provides a target for
	MIDI tracks to talk to: if you add a new Play device, you
	will then have 16 new instruments on this device which you
	can assign tracks to.  If you then assign a connection for
	that device, the tracks assigned to it will play to the
	appropriate channel (depending on the instrument) of any
	MIDI synth attached to that connection.
      </para>

      <para> The Record devices listed here represent possible
	sources for recording MIDI.  You can make one or more of them
	current (so that Rosegarden will listen to them when
	recording) using the checkboxes on each line, as shown in this
	dialog.  </para>

    </sect1>

    <sect1 id="studio-bank-editor">
      <title>Managing banks and programs for MIDI devices</title>

      <para>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="rg-bankeditor.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>The MIDI bank and program editor</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>
	Remember that each MIDI device contains a number of
	instruments, and that you can assign tracks to those
	instruments.  In MIDI terms, each instrument corresponds to
	a single channel on your MIDI synth.  You can choose which
	of the available voices (sounds) on your synth each
	instrument uses, but in order to do this, you need to let
	Rosegarden know the names for all of the available voices.
      </para>

      <para>
	This dialog allows you to attach banks of programs (names for
	voices) to your MIDI devices, thus permitting each
	instrument on a device to be set to use one of those voices
	in the <link
	  linkend="segment-view-instrumentparameterbox">Instrument
	  Parameter Box</link>.
      </para>

      <para>
	The usual way to set up the program names for a device is
	simply to import them from one of the supplied device
	(".rgd") files.  To do this, select a device in the list on
	the left of the dialog, then click the Import button below
	the list and choose the .rgd file corresponding to your
	synth.
      </para>

      <para>
        If there is no current .rgd file available for your synth,
        then you can use this dialog to create a new bank.  To do this
        you will have to find the program map in your synth's MIDI
        Implementation Chart and enter all the names by hand: you can
        then Export them to a .rgd file to share with other Rosegarden
        users.  Contact the rosegarden-user mailing list if you have
        made a new .rgd file and would like to share it.  (This is how
        all of the existing .rgd files have come to be included with
        Rosegarden: other users have contributed them.)
      </para>

      <sect2 id="studio-keymappings">
	<title>Percussion Key Mappings</title>

	<para>
	  Many MIDI synthesizers have at least one percussion program,
	  in which each "pitch" plays a different type of sound.
	  Rosegarden contains a dedicated percussion matrix editor to
	  view and edit notes against a scale consisting of the
	  correct names for the pitches, instead of against the
	  conventional piano keyboard pitch scale.
	</para>

	<para>
	  The key mappings available for a particular MIDI device are
	  also defined in the Rosegarden device (".rgd") file.  Each
	  MIDI program that is defined as a percussion program can
	  have a key mapping associated with it; if there is one, then
	  it will be used by default in any track that is assigned to
	  this program.  Like program and bank definitions, key
	  mappings can be imported from and exported to .rgd files.
	</para>
      </sect2>

      <sect2 id="studio-soundfonts">
	<title>SoundFonts</title>

	<para>
	  If you happen to be using a soft-synth or soundcard synth
	  that uses SoundFont (.sf2) files, you can simply load the
	  correct program names directly from your .sf2 file into this
	  dialog.  Just ask to Import as normal, and then choose the
	  .sf2 file that you are using instead of a .rgd file.
	</para>

	<para>Note that the Studio only manages information about
	  existing MIDI devices for Rosegarden, it does not actually
	  handle tasks such as loading a SoundFont to your soundcard in
	  the first place.  If you want to make sure a SoundFont is
	  loaded to your soundcard when Rosegarden starts up, you should
	  use the special "Load SoundFont to SoundBlaster card at
	  startup" option in the sequencer configuration in
	<menuchoice>
	  <guimenu lang="en">Settings</guimenu>
	  <guimenuitem>Configure Rosegarden...</guimenuitem>
	</menuchoice>.
	</para>
      </sect2>

      <sect2 id="studio-variations">
	<title>Variations</title>

	<para>
	  Some MIDI devices (for example, those from Roland)
	  organise their program names using a scheme known as
	  "variations".  For these devices, you generally want to
	  select a program by first selecting the basic program name
	  &mdash; such as a piano &mdash; and then selecting one
	  of a set of variations on that program &mdash; such as an
	  electric piano.  This is in contrast to General MIDI-based
	  synths, which organise their programs into banks and
	  expect you to choose a bank first and then a program from
	  that bank.
	</para>

	<para>
	  Rosegarden can support devices that use variations, but
	  you still have to enter the program names in a bank
	  format.  Internally, devices that use variations still use
	  MIDI bank select controllers to choose between the
	  variations; you need to find out from your synth's
	  documentation whether your device uses the LSB or MSB bank
	  select to choose variations, and which bank number
	  corresponds to which variation.  You can then enter the
	  banks as normal, and use the "Show Variation list based on
	  MSB/LSB" option on the bank dialog to tell Rosegarden to
	  show variations instead of banks when displaying that
	  device in an instrument parameter box.
	</para>
      </sect2>

    <sect2 id="studio-midi-import">
      <title>Program mapping on &MIDI; import</title>
      <para>
	
	When you import a &MIDI; file into a composition, &rosegarden;
	uses the existing studio setup to determine how to map the
	&MIDI; programs onto &rosegarden; instruments.  The aim is to
	ensure that every &MIDI; program gets mapped to an instrument
	that really exists in your studio (and thus is actually
	attached to your computer), so that all the &MIDI; tracks
	can be heard.

      </para><para>

	The &MIDI; program-change and bank-select events found in the
	imported file are used when importing, but only as an aid to
	help find the appropriate instrument for each &MIDI; track
	from the set of instruments in your studio.  So, for
	example, if your studio is currently set up to contain only
	<acronym>GM</acronym> instruments, and you import a &MIDI; file with <acronym>GS</acronym> program
	changes onto it, &rosegarden; will remap the <acronym>GS</acronym> banks back
	onto <acronym>GM</acronym> because they're all it knows that you have at the
	time you import the file.  It doesn't remember the original
	<acronym>GS</acronym> program numbers.

      </para><para>

	This means that you should always ensure that your studio is
	correctly configured for the devices you actually have,
	before you import the &MIDI; file.  Otherwise the program data
	in the &MIDI; file may be lost.

      </para>
    </sect2>
    </sect1>

    <sect1 id="studio-audio-routing">
      <title>Audio Routing</title>
      <para>
	Any Rosegarden track assigned to an audio or synth plugin
	instrument becomes part of Rosegarden's audio routing
	architecture.  There are 16 audio instruments and 16 synth
	plugin instruments, and each of these has a set of adjustable
	parameters including fader level, pan, effects and so on.
	These are generally configurable in the <link
	linkend="segment-view-instrumentparameterbox">Instrument
	Parameter Box</link> or <link
	linkend="studio-audio-mixer">audio mixer</link>.  Each audio
	instrument also has an input connection, and both audio and
	synth plugin instruments have an output connection.
      </para>
      
      <para>An instrument's input connection defines where Rosegarden
      will read audio data from when recording to this instrument.
      The most usual setting would be to one of Rosegarden's external
      audio inputs, the number of which is configurable in the <link
      linkend="studio-audio-mixer">audio mixer</link>.  These
      correspond to JACK audio ports exposed by Rosegarden, to which
      you can connect outputs from any other JACK audio application or
      soundcard capture ports using an external JACK router
      application such as <ulink
      url="http://qjackctl.sf.net/">QJackCtl</ulink>.  You can also
      set an instrument's audio input to the output of one of
      Rosegarden's built-in audio submasters or master output for
      mixdowns.
      </para>
      <para>An instrument's output connection defines where the audio
      goes when played.  Instruments default to sending their audio to
      Rosegarden's master output, which is another (stereo pair of)
      external JACK port(s) that can then be connected up using the
      same external JACK router.  However, Rosegarden also supports up
      to eight internal submaster busses, to which you can send
      instrument outputs instead so as to group instruments into
      related categories.  You can control the number and routing of
      these in the <link linkend="studio-audio-mixer">audio
      mixer</link>.
      </para>
      <para>
	Rosegarden currently supports effects using a set of pre-fader
	insert effects slots for each audio instrument.  You cannot
	yet assign effects to the submaster busses, and Rosegarden
	does not yet support send effects, although you can obtain
	similar results using an external JACK effects and mixing
	architecture.
      </para>
      <para>Some further details of audio routing configuration,
      mixing, and effects are discussed in the <link
      linkend="studio-audio-mixer">audio mixer</link>, <link
      linkend="segment-view-instrumentparameterbox">instrument
      parameter box</link> and <link
      linkend="studio-plugins">audio plugins</link> sections.</para>
    </sect1>

    <sect1 id="studio-midi-routing">
      <title>MIDI Routing</title>
      <para>&rosegarden; is able to instantly send incoming MIDI events to 
      some output device and MIDI channel. This feature is known as MIDI Thru.</para>
      <para>MIDI Thru is enabled by default in &rosegarden;. You may want 
      to globally disable it using the menu option <menuchoice>
      <guimenu lang="en">Studio</guimenu>
      <guimenuitem>MIDI Thru Routing</guimenuitem></menuchoice>, if you prefer 
      to use an external MIDI routing system. There is also a global filter by 
      MIDI event type, which you may use to ignore some event types and let other
      types to be routed. It is explained in the section <link linkend="studio-midi-filters">
      MIDI filters</link>.</para>
      <para>MIDI Thru routing works quite differently when &rosegarden; is playing 
      or stopped than when it is recording.</para>
      <itemizedlist>
        <listitem><para>When &rosegarden; is playing or in stopped state, the MIDI 
        thru function routes events to the selected track instrument. The selected 
        track has its track name highlighted.</para></listitem>
        <listitem><para>When &rosegarden; is recording, the MIDI events are routed 
        to the armed track instruments, based on the <link linkend="track-recording-filters">
        recording filters</link>. It doesn't
        matter which track is selected. Only one instrument is selected for each event,
        corresponding to the first track with a matching record filter.</para>
        </listitem>
      </itemizedlist>
    </sect1>

    <sect1 id="studio-audio-mixer">
      <title>The Audio Mixer</title>
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-audiomixer.png" format="PNG"/>
            </imageobject>
	    <textobject>
	      <phrase>&rosegarden;'s Audio Mixer</phrase>
	    </textobject>
          </mediaobject>
        </screenshot>
      </para>

      <para>
	Rosegarden's audio mixer window, reached through 
	<menuchoice>
	  <guimenu lang="en">Studio</guimenu> <guimenuitem>Audio
	  Mixer</guimenuitem></menuchoice>, resembles a hardware audio
	  mixer and provides a way to see and change the state of a
	  number of audio instruments at once.  It contains many of
	  the same controls as found in the audio and synth plugin
	  <link
	  linkend="segment-view-instrumentparameterbox">instrument
	  parameter boxes</link>, most importantly a playback level
	  meter and fader control for each audio and synth plugin
	  instrument, as well as routing controls, pan, mono/stereo
	  and effects plugin slots.
      </para>
      <para>
	The audio mixer window is also where you see and control the
	master audio output level (at the far right of the picture
	above), as well as the record level (to the left of the master
	fader) and submaster output levels.
      </para>
      <para>
	The audio mixer's <menuchoice> <guimenu
	lang="en">Settings</guimenu></menuchoice> menu is particularly
	relevant.  Apart from controlling what will be shown in the
	mixer window, this menu also contains the <link
	linkend="studio-audio-routing">audio routing</link> settings
	for the number of stereo audio record inputs available and the
	number of submasters.  These are studio settings whose values
	are saved with your Rosegarden format file.</para>

      <para>Note that if you are not actually using any submasters
      (i.e. if there are no instruments configured to route their
      output to a submaster) you may see a small performance
      improvement if you set the number of submasters explicitly to
      None, rather than keeping unused ones in the configuration.
      </para>
    </sect1>

    <sect1 id="studio-midi-mixer">
      <title>The MIDI Mixer</title>
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-midimixer.png" format="PNG"/>
            </imageobject>
	    <textobject>
	      <phrase>&rosegarden;'s MIDI Mixer</phrase>
	    </textobject>
          </mediaobject>
        </screenshot>
      </para>
      <para>
	Rosegarden's MIDI mixer window, reached through 
	<menuchoice>
	  <guimenu lang="en">Studio</guimenu> <guimenuitem>MIDI
	  Mixer</guimenuitem></menuchoice>, provides a way to see and
	  edit the <link
	  linkend="segment-view-instrumentparameterbox-midi">instrument
	  parameter values</link> for a number of MIDI instruments at once.</para>
      
      <para>The window is organised using a tabbed pane.  Along the
	bottom, you will see one tab for each playback MIDI device in
	your studio configuration.  When you select a device tab, the
	rest of the window will update to show the controls for the 16
	instruments of that device.
      </para>

      <para>
	The controls shown for each instrument are those set up in the
	<!-- !!! link linkend="studio-device-controllers" --> control
	parameter manager, as well as volume (corresponding to the
	MIDI volume control change, not to MIDI velocity or audio dB
	levels) and an approximate output level indicator.
      </para>
    </sect1>

    <sect1 id="studio-plugins">
      <title>Audio Plugins</title>
      <para>An audio plugin is a piece of software, separate from
      Rosegarden, that Rosegarden can load and use in order to perform
      a particular audio processing task.  These can be broadly
      divided into effects plugins and synth plugins.  Effects plugins
      take an audio input and manipulate it to produce a different
      audio output; synth plugins take MIDI-like events as input and
      turn them into audio output.  Rosegarden uses the Linux standard
      LADSPA plugin API for effects and the DSSI plugin API for
      synths, permitting the use of large numbers of open-source
      plugins made available by many developers.
      </para>
      <para>The use of plugins has a cost in CPU time, as audio
      processing in real time usually takes a significant amount of
      work even on a modern CPU. It also has a potential cost in
      reliability: when Rosegarden is running a plugin, if the plugin
      hangs or crashes, so does Rosegarden.  Many plugins are very
      reliable, but it's inevitable that some will not be so well
      tested.
      </para>
      <sect2 id="studio-plugins-effects">
	<title>Effects plugins</title> <para>An effects plugin is
	something that you can use to modify an audio signal in a
	controllable way.  Examples include reverb, delay effects,
	dynamic compression and so on.
	</para>
	<para>Every audio or synth-plugin instrument in Rosegarden has
	five associated effects slots.  By default these are empty,
	but you can load plugins into them in order to chain up to
	five effects onto the audio signal before it goes through
	fader level and pan processing.</para>

	<para>To load a plugin to a slot, click its button on the
	<link linkend="segment-view-instrumentparameterbox-audio">instrument
	parameter box</link>:
	</para>
	<para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-pluginbuttons.png" format="PNG"/>
	      </imageobject>
	      <textobject>
	      <phrase>Plugin Slot Buttons</phrase>
	      </textobject>
	    </mediaobject>
          </screenshot>
        </para>
	<para>(These buttons are also optionally available in the <link
	linkend="studio-audio-mixer">audio mixer</link> window.)
	</para>
	<para>Clicking a plugin button will
	pop up the plugin dialog.  This shows you
	the available categories of effects in the first menu; select
	one, and you can then choose your plugin in the second menu.
	</para>
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-plugin-dialog.png" format="PNG"/>
            </imageobject>
	    <textobject>
	      <phrase>A &rosegarden; Plugin Dialog</phrase>
	    </textobject>
          </mediaobject>
        </screenshot>
      </para>

	<para>Below the plugin selection menus, the dialog gives you a
	varying number of rotary controllers showing all the
	modifiable parameters for the plugin you have selected.  To
	change a value, just click a rotary and drag up and down or
	left and right.  (Up or right to raise the value, down or left
	to lower it.)  You can also roll the mouse wheel to change the
	value, or click with the middle mouse button to reset it to
	its initial default.</para>

	<para>It is also possible to copy one plugin with its current
	configuration into another slot, so as to use the same plugin
	settings with more than one instrument, or to base one plugin
	configuration on another.  Just click the Copy button when you
	have the plugin set up the way you want it, and then open
	another plugin slot's plugin dialog and click Paste.</para>

	<para>Finally, you can use the Bypass toggle to remove a
	plugin temporarily from processing while retaining its
	configuration.
	</para>
      </sect2>
      <sect2 id="studio-plugins-synths">
	<title>Synth plugins</title>
	<para>
	  Synth plugins can be used in place of hardware or standalone
	  soft-synth MIDI devices, to generate sounds from your note
	  event segments.</para>

	<para>Using a synth plugin gives you somewhat better control
	and repeatability than using an external MIDI device, because
	Rosegarden will be able to load the correct plugins for you
	and use the correct settings the next time you load your same
	file.  Plugins may also offer better timing resolution than
	external MIDI devices, and synth plugin instruments have the
	advantage of being routable like audio instruments, which also
	means you can add effects plugins on top of them.
	</para>
	
	<para>To make use of a synth plugin, first <link
	linkend="segment-view-instruments">assign a track</link> to a
	synth plugin instrument, and then load a synth plugin by
	clicking on the topmost button in the <link
	linkend="segment-view-instrumentparameterbox-synth">instrument
	parameter box</link>:</para>
	  
	<para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-synthpluginbuttons.png" format="PNG"/>
	      </imageobject>
	      <textobject>
	      <phrase>Synth Plugin Buttons</phrase>
	      </textobject>
	    </mediaobject>
          </screenshot>
        </para>

	<para>This will bring up the same plugin dialog as shown above
	for effects plugins, but with a list of synth plugins instead
	of effects.  Once again, you will be shown the particular set
	of rotary parameters for the synth you have selected.  Synth
	plugins may also have "programs", selectable from a menu --
	this menu will only appear if you have chosen a synth that supports
	them.  When you have selected and configured a synth plugin
	for an instrument, any MIDI data on tracks assigned to that
	instrument should play through that synth, as should
	incoming MIDI data during recording or monitoring.
	</para>
      </sect2>

      <sect2 id="studio-plugins-guis">
	<title>Plugin native editor windows</title>

	<para>Most plugins can be controlled completely using the
	rotary controllers in Rosegarden's plugin dialog.  However, a
	few plugins (generally synths) also have their own editor
	windows which can be switched on or off from Rosegarden and
	which may provide more complete or more organised
	controls.</para>

	<para>When you select a plugin that has its own editor window,
	the button at the lower left of the plugin dialog labelled
	"Editor" will become active:</para>

	<para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-plugineditorbutton.png" format="PNG"/>
	      </imageobject>
	      <textobject>
	      <phrase>A Plugin Editor Button</phrase>
	      </textobject>
	    </mediaobject>
          </screenshot>
        </para>

	<para>(For synth plugins, there is a similar button in the
	instrument parameter box.)  Clicking this button should show
	the plugin's own editor window.  Any changes you make in this
	editor window should also be reflected in Rosegarden's own
	plugin dialog, if visible, and of course should be saved in
	your Rosegarden file as normal.</para>
      </sect2>
    </sect1>

    <sect1 id="studio-metronome">
      <title>Metronomes</title>
      <para>
	Rosegarden has two built-in metronomes, one for use during
	recording and one that can be switched on during normal
	playback.  They work by sending notes to a MIDI instrument,
	and both metronomes use the same instrument, pitch and
	velocity information.
      </para>

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-metronome.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s metronome configuration dialog</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
      <para>
	To configure the metronomes, use
	<menuchoice>
	  <guimenu lang="en">Studio</guimenu>
	  <guimenuitem>Manage Metronome</guimenuitem>
	</menuchoice>
	to bring up the metronome dialog.
	Here you can select a MIDI instrument for the metronome and
	choose the metronome's resolution (whether it should tick
	once per beat, once per subdivision of a beat, or only once
	per bar), pitch, and velocities.  Properties such as the
	actual voice the MIDI synth uses for the metronome tick
	depend on the instrument selected, just as the voice used
	for a MIDI track depends on the instrument that track is
	assigned to.  You can configure the instrument by assigning
	a track to it on the main window and selecting the correct
	program from the instrument parameter box.
      </para>

      <para>
	The record and play metronomes can be switched on or off
	from the Transport window, using the metronome button.  This
	button controls the record metronome when recording is armed
	or in progress, and the play metronome at other times.  By
	default, the record metronome is switched on and the play
	metronome switched off.
      </para>

      <para>
	Rosegarden also has a "visual metronome": the transport window
	can be told to flash brightly to mark each beat.  See <link
	linkend="transport">the Transport section</link> for more
	details.</para>
    </sect1>

    <sect1 id="studio-midi-filters">
      <title>MIDI filters</title>
      <para>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="rg-midifilter.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>The MIDI filter dialog</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>
        Using this dialog you can decide which MIDI events Rosegarden
        will ignore or accept, either when forwarding events using
        MIDI THRU or when simply recording them.  Use the check boxes
        on this dialog to tell Rosegarden which types of MIDI events
        you don't want to forward or record.
      </para>

    </sect1>


    <sect1 id="studio-external-controllers">
      <title>External MIDI control surfaces</title>
      <para>
	Rosegarden's audio and MIDI mixer windows and main canvas can
	also be controlled to some degree by an external MIDI device.
	To set this up, you will need to use an ALSA MIDI connection
	manager such as qjackctl to connect your MIDI controller
	device to Rosegarden's "external controller" input and output
	MIDI ports.
      </para>
      <para>
	Rosegarden accepts MIDI control change messages to adjust the
	mixer track corresponding to the incoming MIDI channel on each
	controller event, and also sends out MIDI messages when
	something is changed in a mixer track in order to support
	controllers with powered faders or knobs.
      </para>
      <para>Rosegarden accepts MIDI controller number 81 to change the
      currently active window.  Send controller 81 with data value 0-9
      to select the main window, 10-19 to select the audio mixer
      window or 20-29 to select the MIDI mixer window.</para>
      <para>Rosegarden accepts MIDI controller number 82 to change the
      currently selected track in the main window.  The stepping of
      this controller depends on the number of tracks in the window --
      the ratio of controller data value to track number will be
      calculated so as to use the full MIDI controller data range,
      provided there are no more than 128 tracks in the window.</para>
    </sect1>

  </chapter>

  <chapter id="segment-instrument-parameters">
    <title>Special Parameters</title>
    
    <sect1 id="track-parameters">
      <title>The Track Parameter Box</title>
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-trackparameterbox.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s track parameter box</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
	<para>
	  The track parameter box can be found at the left side of the
	  &rosegarden; main window.  It displays the parameters for the
	  currently selected track.  (If you can't see it, try using 	<menuchoice>
	  <guimenu lang="en">Settings</guimenu>
	  <guimenuitem>Show Special Parameters</guimenuitem>
	</menuchoice>.)
    </para>
    <para>
	It allows you to assign instruments to tracks, control what
	incoming &MIDI; data from which sources will be recorded to
	particular tracks, control staff attributes (currently only for LilyPond
	export,) make selections that govern how &MIDI; segments
	will be created for each track that is assigned to a non-audio
	instrument, and apply these selections to existing segments (as when
	converting a trumpet part from an imported &MIDI; file to be
	represented as notation playable by a real human on a real instrument,
	for example.)
    </para>
    <para>This box is divided into three sections:</para>
	<sect2 id="track-playback-parameters">
	    <title>Playback parameters</title>
	    <para>
		These provide an alternative mechanism to the <link
		    linkend="segment-view-instruments">menu-based
		    system</link> of instrument assignment.
	    </para>
	</sect2>
	<sect2 id="track-recording-filters">
	    <title>Track recording filters</title>
	    <para>
               These provide you a way to control what events are recorded to this track. If you leave the default values ("all") for both parameters, every received event will be stored in the track. This setting is safe and convenient if you are recording only one MIDI track. Otherwise, you should adjust one or both parameters to select only the desired events for the track.
            </para>
	    <variablelist>
		    <varlistentry>
			<term>Device</term>
			<listitem>
			    <para>You can record from only one of the available devices marked for recording in the  <link linkend="studio-device-editor">device manager</link>, or from all of them simultaneously.</para>
			</listitem>
		    </varlistentry>
		    <varlistentry>
			<term>Channel</term>
			<listitem>
			    <para>You can record from all channels, or limit recording to only one of the 16 available MIDI channels. In this case, only MIDI channel messages matching the channel number will be recorded, and system messages not having a channel (as system exclusive events) will be discarded.</para>
			</listitem>
		    </varlistentry>
	     </variablelist>
	     <para>
               Both parameters are cummulative: you can filter only a device, only a channel, or both a device and a channel simultaneously. It is not mandatory to ensure mutually exclusive selections for all the armed tracks, but if you don't do so you will find duplicated events at several recorded tracks.
             </para>
	     <para>
		The recording filters are also used to <link linkend="studio-midi-routing">route MIDI events </link> to the assigned track instrument when you are recording.
             </para>
	</sect2>
	<sect2 id="track-staff-params">
	    <title>Staff export options</title>
	    <para>
	        These provide you with a means of exporting notation to render
		at either normal, small, or tiny size (eg. for printing certain
		parts at cue size,) and allow you to export a variety of nested
		brackets.
	   </para>
	   <para>
	        You are responsible for creating a series of bracket start and
		end markers that will yield a functional result, and if you make
		a mistake with these, it is likely that your file will not
		export or preview correctly in LilyPond.
	   </para>
	   <para>For a detailed, hands-on demonstration of brackets in action,
	   please see
	   <ulink url="http://rosegarden.sourceforge.net/tutorial/supplemental/fidelio/fidelio.html">this
	   online tutorial.</ulink>
	   </para>
	</sect2>
	<sect2 id="track-create-with">
	    <title>Create segments with</title>
	    <para>
		These provide you with a means of controlling many of
		the <link
		    linkend="segment-view-segmentparameterbox">segment
		    parameters</link> for segments that don't yet
		exist.  They are aimed especially at notation users,
		and they facilitate operations that require you to use
		more than one segment on a track (as when using
		<!-- link -->repeats, or <link
		    linkend="nv-lilypond-directives">alternative
		    endings</link>), by allowing you to create a series of new
		segments that all have the same properties by default.
	    </para>
	    <para>
		<variablelist>

		    <varlistentry>
			<term>Preset</term>
			<listitem>
			    <para>
				The <guimenuitem>Load</guimenuitem> button
				launches a dialog that allows you to pick
				a pre-defined collection of parameters
				that provide guidelines for how you should
				write parts for real-world instruments, and
				optionally convert any existing segments on this
				track to take on these new parameters.
				<!-- needs a tutorial somewhere, and a link to
				that tutorial DMM -->
			    </para>
			    <para>
			    <inlinemediaobject>
				<imageobject>
				    <imagedata fileref="rg-loadpreset.png" format="PNG"/>
				</imageobject>
			    </inlinemediaobject>
			    </para>
			    <para>
				You first pick a Category, then an Instrument,
				and finally choose whether you wish to write a
				part for an amateur or a professional player.
				<footnote><para>This database was compiled by
				Magnus Johansson, who deserves all the special
				mention we can muster for his outstanding effort
				on this.</para></footnote> The Scope controls
				allow you to choose whether these parameters
				will only affect segments that don't yet exist
				(which you will subsequently record, or draw
				with the pencil) or should convert any existing
				segments to take these parameters as well.  (For
				a demonstration of the latter case in action,
				please see
				<ulink url="http://rosegarden.sourceforge.net/tutorial/supplemental/fidelio/fidelio.html">
				this online tutorial.)</ulink>
				Clicking the <guimenuitem>OK</guimenuitem>
				button injects the appropriate parameters into
				the remaining widgets in this part of the track
				parameters box, where you can tweak them if you
				desire.<footnote><para>No facility is provided
				at this time for assembling your own database of
				presets, or customizing the existing ones in a
				permanent way.</para></footnote> </para>
			    <para>
				Once you have loaded a preset, the name of
				your chosen preset will be used as the label
				for any segments you subsequently draw or
				record on this track, even if you change some
				or all of the associated parameters away from
				the values you just loaded.
			    </para>
			</listitem>
		    </varlistentry> 

		    <varlistentry>
			<term>Clef</term>
			<listitem>
			    <para>This lets you choose the clef for any
				segments you subsequently draw or record on
				this track.  Clefs are events, not properties.
				Your segments will be created with an initial
				clef event of the appropriate type (which you
				may subsequently alter or delete, should you
				have some occasion to do so.)
			    </para>
			    <para>
				The clefs available include a variety of named
				clefs representing standard clefs with various
				octave offsets.
			    </para>
			    <!-- !!! I would enumerate this list, but I have
			    no idea how to do it in docbook.  I'm just winging
			    it by the seat of my pants here.  Why do you think
			    I avoided touching this hateful mess until now?  I
			    wrote Rosegarden Companion using OO.o, and didn't
			    touch tag one.  Wah. -->
			</listitem>
		    </varlistentry>

		    <varlistentry>
			<term>Transpose</term>
			<listitem>
			    <para>
				This causes segments on this track to be
				created so that their note events sound at a
				given transposition.  Useful, especially, for
				writing parts for transposing instruments.
			    </para>
			</listitem>
		    </varlistentry>

		    <varlistentry>
			<term>Colour</term>
			<listitem>
			    <para>
				This causes segments on this track to be
				created using a given colour.
			    </para>
			</listitem>
		    </varlistentry>

		    <varlistentry>
			<term>Range</term>
			<listitem>
			    <para>
				The <guimenuitem>Low:</guimenuitem> and 
				<guimenuitem>High:</guimenuitem> buttons,
				launch a dialog that allows you to pick a
				pitch using a staff.  The lowest and highest pitches
				you select will then appear right on these
				buttons.
			    </para>
			    <para>
				These represent the lowest and highest
				playable notes, respectively, on the instrument for which you
				are writing notation.  In some cases, these
				limits will be hard and fast, like the low B
				on a Transverse Flute (B foot).  In others,
				they may only serve as guidelines to help you
				make good choices for instruments with which
				you are not intimately familiar.
			    </para>
			    <para>
				If you enter, record, or import data that has
				pitches exceeding the values specified, the
				note heads will appear in red by default.  You
				can turn this behavior off with
				<menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure
					Rosegarden</guimenuitem><guimenuitem>Notation</guimenuitem><guimenuitem>Show
					notes outside playable range in
					red</guimenuitem></menuchoice>
			    </para>
			</listitem>
		    </varlistentry>

		</variablelist>
	    </para>
	</sect2>

    </sect1>

    <sect1 id="segment-view-segmentparameterbox">
      <title>The Segment Parameter Box</title>

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-segmentparameterbox.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s segment parameter box</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>
	The segment parameter box can be found at the left side of the Rosegarden main window.  (If you can't see it, try using 	<menuchoice>
	  <guimenu lang="en">Settings</guimenu>
	  <guimenuitem>Show Special Parameters</guimenuitem>
	</menuchoice>.)
 It allows you to modify some aspects of the
	selected segments.</para><para>If a single segment is currently selected, its
	parameters will be shown in the segment parameter box and can be
	edited there.  If several segments are selected, the parameter box
	will only show the current values where they are the same for all
	of the selected segments -- but you can still edit them, and your
	changes will apply to the whole selection.

	<variablelist>
	  <varlistentry>
	    <term>Label</term>
	    <listitem>
	      <para>Shows the label of the selected segment (or segments, if
		they all have the same label).  Click the "Edit" button to edit
		the label.</para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>Repeat</term>
	    <listitem>
	      <para>Switches repeat on or off for the selected segments.  A
		repeating segment will repeat until the start of the following
		segment on the same track, or until the end of the composition
		if there is no following segment.</para>

	      <para>The repeated parts of a repeating segment are shown on
		the main canvas in a fainter colour than the original segment.
		You can turn them into real editable copies of the original
		segment either by using
	<menuchoice>
	  <guimenu lang="en">Segments</guimenu>
	  <guimenuitem>Turn Repeats into Copies</guimenuitem>
	</menuchoice>, or simply by double-clicking on the
		individual repeating blocks.</para>
	    </listitem>
	  </varlistentry>

	  <varlistentry>
	    <term>Quantize</term>
	    <listitem>
	      <para>
		Shows the quantization setting for the selected
		segments.  You can change this to quickly quantize
		the start times of all their notes.  For more
		advanced quantization, use <menuchoice>
	  <guimenu lang="en">Segments</guimenu>
	  <guimenuitem>Quantize...</guimenuitem>
	</menuchoice>.  See <link
		  linkend="quantization">Quantization</link> for more
		details.
	      </para>
	    </listitem>
	  </varlistentry>

	  <varlistentry>
	    <term>Transpose</term>
	    <listitem>
	      <para>Shows the transposition (in semitones) currently applied
		to the selected segments.  This transposition is applied when
		the segment is played, and is not shown in the notes displayed
		in the matrix, notation or event list editors.  You can use
		this to quickly change the pitch of part or all of a
		composition, and it is commonly used with segments containing
		notation written for transposing instruments, such as the
		clarinet.</para>
	    </listitem>
	  </varlistentry>

	  <varlistentry>
	    <term>Delay</term>
	    <listitem>
	      <para>Shows the delay currently in effect on the selected
		segments.  You can set a delay here in order to cause an entire
		segment to play later than written.  This delay is applied when
		the segment is played, and is not shown in the notes displayed
		in the matrix, notation or event list editors.
	      </para>
	      <para>
		You can set a delay either in musical time (by
		choosing a note duration from the delay dropdown),
		in which time the exact delay will depend on the
		tempo, or in real time (by choosing a time in
		milliseconds from the dropdown).
	      </para>
	    </listitem>
	  </varlistentry>

	  <varlistentry>
	    <term>Colour</term>
	    <listitem>
	      <para>Shows the colour being used for the display of the
		selected segments.  You can choose another colour from the
		dropdown, or choose the "Add New Colour" option if you want a
		colour not in the dropdown.
	      </para>
	      <para>
		You can also manage and rename colours using
<menuchoice>
	  <guimenu lang="en">Composition</guimenu>
	  <guimenuitem>Edit Document Properties...</guimenuitem>
	</menuchoice>
		(then choose the Colour page on the document properties
		dialog).  The modified colour palette will be saved
		with the composition in the Rosegarden file.
		<screenshot>
		  <mediaobject>
		    <imageobject>
		      <imagedata fileref="rg-colours.png" format="PNG"/>
	      </imageobject>
		<textobject>
		  <phrase>&rosegarden;'s colour manager</phrase>
		</textobject>
	      </mediaobject>
	      </screenshot>
	      </para>
	    </listitem>
	  </varlistentry>
	  
	</variablelist>
      </para>
    </sect1>

    <sect1 id="segment-view-instrumentparameterbox">
      <title>The Instrument Parameter Box</title>
      <para>
	The instrument parameter box can be found at the left side of
	the Rosegarden main window, near the <link
	linkend="segment-view-segmentparameterbox">Segment Parameter
	Box</link>.  (If you can't see it, try using
	<menuchoice> <guimenu lang="en">Settings</guimenu>
	<guimenuitem>Show Special
	Parameters</guimenuitem> </menuchoice>.)</para>

      <para>It shows you
	which instrument is assigned to the current selected track,
	and contains all of the editable controls for that instrument.
	Remember that because any number of tracks can be assigned to
	the same instrument, the settings in this box may affect more
	than one track at a time.</para>

      <para>The layout and contents of the instrument
	parameter box depend on the type of instrument: MIDI, audio,
	or synth plugin.
      </para>

      <sect2 id="segment-view-instrumentparameterbox-midi">
	<title>MIDI Instrument Parameters</title>
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-ipb-midi.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s instrument parameter box for a MIDI instrument</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
	<para>When you select a track assigned to a MIDI instrument,
	the instrument parameter box shows MIDI parameters.
	</para>
	<para>At the top, this box
	shows the name of the instrument and the connection that its
	device is using.
	</para>
	<para>Below that, you can see and edit the MIDI
	channel number and the <link linkend="studio-bank-editor">bank
	and program</link> settings that should be sent to the
	instrument at the start of playback (including a "percussion"
	toggle that controls whether only percussion programs should
	be offered in these settings).</para>

	<para>Finally this box shows you the <!-- !!! link
	linkend="studio-device-controllers" --> controllers available
	for this device (those for a General MIDI device are shown
	above).  Any settings you make here will be sent to this
	instrument's channel at the start of playback.</para>
      </sect2>

      <sect2 id="segment-view-instrumentparameterbox-audio">
	<title>Audio Instrument Parameters</title>
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-ipb-audio.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s instrument parameter box for an audio instrument</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
	<para>
	  When you select an audio track, the instrument parameter
	  box shows audio parameters.
	</para>
	<para>
	  The box has two main faders, one with a blue surround for
	  playback level and the other with a red surround for the
	  record level when recording to this instrument.  Between
	  them is a playback level meter.
	</para>
	<para>The two menus at the top of the box are used to select
	the input and output <link linkend="studio-audio-routing">audio routing</link> for this
	instrument.  Below them you can select whether the instrument
	is mono or stereo, and the pan setting for position in the
	stereo field.  (Audio instruments are always ultimately
	stereo, because the pan setting is always applied.  But if you
	set the instrument to mono, it will reduce any audio data and
	effect outputs to mono before applying pan.)
	  </para>
	<para>The column of five buttons at lower left are the effects
	slots.  Click on them to select and activate plugin effects
	for this audio instrument, and to control them using the <link linkend="studio-plugins">plugin editor dialog</link>.  These are insert effects,
	applied in order from top to bottom before the fader and pan.
	</para>
      </sect2>

      <sect2 id="segment-view-instrumentparameterbox-synth">
	<title>Synth Plugin Instrument Parameters</title>
      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-ipb-synth.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s instrument parameter box for a synth plugin instrument</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
	<para>When you select a track assigned to a synth plugin
	instrument, the instrument parameter box shows synth
	parameters.  You will notice that although a synth plugin
	track uses segments with MIDI data in them, in terms of
	control and routing it behaves more like an audio track.
	</para>
	<para>The most important control here is the button at top
	left (saying Xsynth in the above picture) which shows the name
	of the synth plugin in use for this instrument.  Click this to
	select a particular synth and control it in the standard
	Rosegarden <link linkend="studio-plugins">plugin editor dialog</link>.  Once
	you've selected a plugin, you may also be able to click the
	Editor button below it in order to open a dedicated GUI editor
	for the particular plugin (if the plugin has one).
	</para>
	<para>The remaining controls here are the same as for audio
	instruments: the playback fader, playback level, output
	routing, mono/stereo and pan settings and effects slots are
	all exactly the same.</para>
      </sect2>

    </sect1>
  </chapter>

  <chapter id="quantization">
    <title>Quantization</title>
    <para>
      "Quantization" is the process of repositioning notes and other
      events so that they start or finish on exact beat divisions.  It
      is traditionally used to make an approximate performance into a
      precise but rather mechanical-sounding one -- either because
      precision is the desired effect, or for reasons such as making
      the notes clearer in notation.
    </para>

    <para>
      For general quantization, use
      	<menuchoice>
	  <guimenu lang="en">Segments</guimenu>
	  <guimenuitem>Quantize</guimenuitem>
	</menuchoice>
      in the main window or
	<menuchoice>
	  <guimenu lang="en">Adjust</guimenu>
	  <guimenuitem>Quantize</guimenuitem>
	</menuchoice>
      in matrix or notation editors.  This shows you a dialog in which
      you can select the precise quantization parameters you need, and
      then it applies these to all of the selected segments or notes.
      (You can also quickly reach this dialog by pressing the "="
      key.)
    </para>

    <para>
      <screenshot>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="rg-gridquantizer.png" format="PNG"/>
    </imageobject>
      <textobject>
	<phrase>&rosegarden;'s quantize dialog</phrase>
      </textobject>
    </mediaobject>
    </screenshot>
    </para>

    <para>
      The quantize dialog offers a selection of quantizers, each with
      its own set of parameters.  The quantizers available are:
    </para>
    <variablelist>

      <varlistentry>
	<term>Grid quantizer</term>
	<listitem>
	  <para>The grid quantizer moves the start times of notes so
	  that they start at the nearest point on some grid (defined
	  by various parameters of the quantizer).  Thus notes that
	  initially vary slightly in start time will be aligned by the
	  quantizer, making for a more precise and mechanical
	  performance.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Legato quantizer</term>
	<listitem>
	  <para>The legato quantizer carries out a simple grid
	  quantization, and also adjusts the note durations so as to
	  remove any gaps between notes by extending each note so as
	  to (at least) continue until the start of the following one.
	  You can also obtain this legato effect without the
	  accompanying grid quantization using the
	<menuchoice>
	  <guimenu lang="en">Adjust</guimenu>
	  <guimenuitem>Quantize</guimenuitem>
	  <guimenuitem>Legato</guimenuitem>
	</menuchoice> function in the Matrix editor.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Heuristic notation quantizer</term>
	<listitem>
	  <para>The notation quantizer attempts to adjust note start
	  times and durations so as to produce readable notation.  See
	  <link linkend="nv-quantization">Notation from performance
	  data</link> for a description of this quantizer and its
	  uses.</para>
	</listitem>
      </varlistentry>

    </variablelist>

    <para>The grid quantizer has the following adjustable parameters:</para>
    <variablelist>

      <varlistentry>
	<term>Base grid unit</term>
	<listitem>
	  <para>This is the size of the grid used for quantization.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Swing</term>
	<listitem>
	  <para>This is a percentage figure which adjusts the degree
	  by which alternate beats are quantized "late".</para>
	  <para>If set to
	  None (the default), quantization will be to an even grid
	  spaced according to the base grid unit.</para>
	  <para>If set to 100%,
	  every second grid line will be placed two-thirds of the distance
	  between the previous and next ones, instead of only half.
	  This will result in notes being quantized to the first and
	  third triplets of a swing beat.
	  </para>
	  <para>Other settings will produce proportionately varying degrees of
	  swinginess.  You can also set this parameter to negative
	  figures (for alternate beats to start early) or to figures
	  greater than 100%.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Iterative amount</term>
	<listitem>
	  <para>The default behaviour of the grid quantizer is to move
	  each note exactly onto its nearest grid line.  But if you
	  set the iterative amount to something less than 100% (the
	  "Full quantize" default), each note will only be moved that
	  percentage of the distance toward its nearest grid line,
	  resulting in a nearly-but-not-quite quantized effect.</para>
	  <para>This quantizer may be applied repeatedly so as to try
	  out gradually increasing degrees of quantization, hence the
	  name "iterative".  Use 
	<menuchoice>
	  <guimenu lang="en">Adjust</guimenu>
	  <guimenuitem>Quantize</guimenuitem>
	  <guimenuitem>Repeat Last Quantize</guimenuitem>
	</menuchoice> in the Matrix editor to do so.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Quantize durations as well as start times</term>
	<listitem>
	  <para>If this option is enabled, the quantizer will quantize
	  the notes' end times to the same grid as their start times.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>

    <para>The quantize dialog also has an optional Advanced section
      containing further options for 
	  <link linkend="nv-quantization">notation quantization</link>.
    </para>
    
    <para>
      Another simple way to apply a grid quantizer is to do it in the
      main window, using the <guimenuitem>Quantize</guimenuitem> menu
      on the <link linkend="segment-view-segmentparameterbox">Segment
      Parameter Box</link>.  If you select some segments and change
      the value shown in the menu, the segments will immediately be
      grid-quantized to the resolution shown in the menu.
    </para>

    <para>
      Finally, there is also a <link
      linkend="matrix-grid-quantize">quantize control</link> in the matrix
      view.</para>
    
  </chapter>
  
  <chapter id="matrix-view">
    <title>The Matrix editor</title>
    <para>
      The &rosegarden; matrix editor enables you to view and edit
      music in a simple, logical format: each note represented as a
      block in a grid, at a height corresponding to the pitch.
    </para>
    <para>
      <screenshot>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="rg-matrixview.png" format="PNG"/>
    </imageobject>
      <textobject>
	<phrase>&rosegarden;'s matrix editor</phrase>
      </textobject>
    </mediaobject>
    </screenshot>
      Each matrix editor window shows a single segment.  To edit a
      segment, just right-click on it in the main canvas and select
      the matrix editor from the menu.  Alternatively, you can
      configure Rosegarden to make the matrix editor the default
      editor available when you double-click on a segment.
    </para>

    <sect1 id="matrix-grid-quantize">
      <title>The Grid and Quantize controls</title>
      <para>
	The matrix view contains Grid and Quantize menus in its main
	toolbar.
      </para>
      <para>The Grid menu controls the size of the visible grid in the
      background of the matrix view, as well as the time resolution
      used when entering and moving notes.  After you set it to a
      particular time value, the normal note insertion and drag
      operations will then snap automatically to grid points spaced at
      that time width.  You can override the snap-to-grid effect
      temporarily by holding down Shift during editing, or you can
      disable it by setting the Grid menu to None.
      </para>
      <para>The Quantize menu works rather differently.  Rather than
      controlling the behaviour of other editing tools, it actually
      performs an action.  When you change the value in this menu, the
      selected notes -- or the whole segment if nothing is selected
      -- will immediately be quantized using a grid quantizer of the
      chosen resolution.
      </para>
      <para>The Quantize menu also shows you continuously what
      resolution the current segment or selection is quantized to.
      For example, if you select a set of notes that start on
      consecutive quarter-note beats, the Quantize menu will update
      itself to show 1/4, as this is the coarsest resolution
      consistent with the existing quantization of the current
      selection.
      </para>
    </sect1>

    <sect1 id="matrix-insertion">
      <title>Inserting notes</title>
      <para>
	The simplest way to enter a note in the matrix view is to
	use the mouse.  To do this, select the pencil tool on the
	toolbar, and then click and drag on the matrix editor.  The
	note will be entered at the time and pitch corresponding to
	the point you click at, and will have a duration
	corresponding to the distance you drag before releasing the
	mouse button.</para>

	<para>You can also draw notes using the Select tool (the
	arrow), by clicking and dragging either with the middle mouse
	button, or with the left mouse button and Ctrl pressed.</para>

      <para>By default, the time and duration are snapped to a
	particular grid unit, according to the Grid setting on the
	View menu or the toolbar.  You can prevent this effect by
	holding down Shift while clicking and dragging.
      </para>

      <sect2 id="matrix-insertion-keyboard">
	<title>Typing notes with the PC keyboard</title>

	<sect3>
	  <title>Duration</title>

	  <para>The durations of notes entered from the keyboard are
	    controlled by the Grid setting on the View menu or
	    toolbar.  You can set this using the number keys:</para>

	  <itemizedlist>
	    <listitem><para><keycap>5</keycap> &ndash; Whole bar</para></listitem>
	    <listitem><para><keycap>1</keycap> &ndash; Beat</para></listitem>
	    <listitem><para><keycap>2</keycap> &ndash; Half note (minim)</para></listitem>
	    <listitem><para><keycap>4</keycap> &ndash; Quarter note (crotchet)</para></listitem>
	    <listitem><para><keycap>8</keycap> &ndash; Eighth note (quaver)</para></listitem>
	    <listitem><para><keycap>6</keycap> &ndash; Sixteenth note (semiquaver)</para></listitem>
	    <listitem><para><keycap>3</keycap> &ndash; Thirty-second note (demisemiquaver)</para></listitem>
	    <listitem><para><keycap>0</keycap> &ndash; Sixty-fourth note (hemidemisemiquaver)</para></listitem>
	  </itemizedlist>
	  
	</sect3>

	<sect3>
	  <title>Pitch</title>

	  <para>Once the correct duration is selected in the Grid
	    menu, you can insert a note at the current position of the
	    <link linkend="nv-rulers">insert cursor</link> by pressing
	    one of the pitch keys:</para>

	  <itemizedlist>
	    <listitem><para><keycap>A</keycap> &ndash; Do (the tonic of the current key in the current clef)<!-- !!! FIXME: no clef in matrix view --></para></listitem>
	    <listitem><para><keycap>S</keycap> &ndash; Re</para></listitem>
	    <listitem><para><keycap>D</keycap> &ndash; Mi</para></listitem>
	    <listitem><para><keycap>F</keycap> &ndash; Fa</para></listitem>
	    <listitem><para><keycap>J</keycap> &ndash; So</para></listitem>
	    <listitem><para><keycap>K</keycap> &ndash; La</para></listitem>
	    <listitem><para><keycap>L</keycap> &ndash; Ti</para></listitem>
	  </itemizedlist>

	  <para>Holding <keycap>Shift</keycap> while pressing a key
	    will sharpen the note (except for Mi and Ti, which don't
	    have sharpened versions) and holding <keycap>Shift</keycap>
	    and <keycap>Ctrl</keycap> together will flatten it (except
	    for Fa and Do).</para>

	  <para>To enter notes an octave higher, use the corresponding
	    keys on the next row up: <keycap>Q</keycap>,
	    <keycap>W</keycap>, <keycap>E</keycap>, <keycap>R</keycap>,
	    <keycap>U</keycap>, <keycap>I</keycap>, and
	    <keycap>O</keycap>.  Likewise to enter notes an octave
	    lower, use <keycap>Z</keycap>, <keycap>X</keycap>,
	    <keycap>C</keycap>, <keycap>V</keycap>, <keycap>B</keycap>,
	    <keycap>N</keycap> and <keycap>M</keycap>.</para>

	</sect3>

	<sect3>
	  <title>Other remarks</title>

	  <para>All of the insertion commands are also available on a
	    submenu of the Tools menu.  It's unlikely you'd ever want to
	    navigate the menus just to insert a single note, but the
	    menus show the keyboard shortcuts and so provide a useful
	    reference in case you forget which key is which.</para>

	  <para>The keyboard shortcuts are currently designed for use
	    with a QWERTY-layout keyboard.  There is not yet any way to
	    remap the keys for another layout, short of reassigning each
	    key individually using <menuchoice>
	  <guimenu lang="en">Settings</guimenu>
	  <guimenuitem>Configure Shortcuts...</guimenuitem>
	</menuchoice>.</para>

	</sect3>

      </sect2>

      <sect2 id="matrix-insertion-midi">
	<title>Entering notes using a MIDI keyboard</title>

	<para>
	  You can enter notes into the matrix editor one at a time
	  using a MIDI keyboard or other MIDI control device.  The
	  matrix editor uses the pitches you play on the keyboard,
	  but the durations you have selected in the Grid setting of
	  the editor itself.  This is known as "step recording".
	</para>

	<para>
	  To start entering notes from a MIDI keyboard, first make
	  sure the keyboard is configured as a MIDI
	  record device.  Then make sure you have the right Grid
	  setting in the View menu or toolbar, as this controls the
	  note duration.  Then press the <!-- !!!  image of button
	  --> step recording button on the matrix editor's toolbar,
	  or select Step Recording from the Tools menu.  From that
	  point on all notes pressed on the MIDI keyboard will be
	  inserted at the current insertion time in that window,
	  until step recording is switched off again or activated in
	  a different window or the window is closed.
	</para>

	<para>
	  You can change the Grid setting while step recording is in
	  progress, in order to insert notes of different durations.
	</para>
      </sect2>
    </sect1>

    <sect1 id="matrix-selection">
      <title>Selecting notes</title> <para>To select notes in the
	matrix editor, switch to the Select (arrow) tool and then
	outline a rectangular area containing the notes you want to
	select.  The selected events will then be highlighted in blue.
	If you instead click on a single event, just that event will
	be selected.

      </para><para>If you hold <keycap>Shift</keycap> while dragging
	out a rectangle or clicking on a note, the new selection will
	be added to any existing selection instead of replacing it.
      </para>

      <para>
	To clear a selection, click in an empty space on the matrix
	editor, or hit the Escape key.</para>
      
      <para>You can also select all of the notes of a given pitch,
	by shift-clicking on a key in the piano keyboard down the left
	side of the matrix editor.  You can also shift-click and drag
	to select a range of pitches.  This selection is added to any
	existing selection you have, so if you want a clean new
	selection, clear the old one first.
      </para>

	  <sect2 id="matrix-selectionfilter">
          <title>Filtering the selection</title>
		  <para>The <menuchoice>
		  <guimenu>Edit</guimenu>
		  <guimenuitem>Filter Selection</guimenuitem>
		</menuchoice> function offers you the ability to filter a range of events in
		  any of several categories out of your selection.  You can use this to refine the selection, if you want some action to apply to only certain events in it.
	        </para>
		<para>
		  <screenshot>
		    <mediaobject>
		      <imageobject>
			<imagedata fileref="rg-eventfilter.png" format="PNG"/>
		</imageobject>
		  <textobject>
		    <phrase>The event filter dialog</phrase>
		  </textobject>
		</mediaobject>
		</screenshot>
	        </para>
		<para>
		  All ranges may be either inclusive or exclusive.
		</para>
	        <para>
		  An inclusive range will remove events on either side of it
		  from the selection.  You can use this, for example, to
		  filter everything below middle C and above the A above
		  middle C out of your selection.
		</para>
	        <para>
		  An exclusive range will remove the events within the range
		  itself, leaving everything on either side of it selected.
		  Using the same search points as in the previous example,
		  you would use an exclusive range to remove everything
		  between middle C and the A above middle C from your
		  selection, while leaving everything above and below that
		  range selected.
		</para>
		<para>
		  Once your selection has been filtered, you can manipulate
		  it by any conventional means.
		</para>
 	</sect2>
    </sect1>

    <sect1 id="matrix-editing">
      <title>Moving and copying notes</title>
      <para>
	You can move notes in both time and pitch on the matrix
	editor by either clicking and dragging them with the Move
	tool, or selecting them and then dragging them with the
	Select tool.
      </para>
      <para>
	To copy notes, select them and then use the standard copy
	and paste functions.  After the paste the pasted notes will
	be selected instead, and you can then drag them wherever you
	need them.  You may also copy notes by selecting them with
	the Select tool, then keeping Ctrl pressed click-and-drag
	the selected notes in a new position.
      </para>
    </sect1>

  </chapter>
  
  <chapter id="percussion-matrix-view">
    <title>The Percussion Matrix editor</title>
    
    <para>The Percussion Matrix editor is identical to the <link
    linkend="matrix-view">Matrix editor</link>, except that it shows
    pitch names on the vertical scale instead of a piano keyboard, and
    it does not show the duration for each note.  This is intended for
    use with percussion programs on MIDI instruments, in which each
    note pitch plays a different percussion sound.</para>

    <para>
      <screenshot>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="rg-percussionmatrix.png" format="PNG"/>
    </imageobject>
      <textobject>
	<phrase>&rosegarden;'s percussion matrix editor</phrase>
      </textobject>
    </mediaobject>
    </screenshot>
      The pitch names are only shown if the segment being edited is
      playing through a percussion instrument that has an associated
      key mapping to define the names; otherwise the standard matrix
      view piano keyboard will appear instead.  See <link
      linkend="studio-keymappings">Percussion Key Mappings</link> for
      more information about key mappings.</para>
  </chapter>

  <chapter id="notation-view">
    <title>The Notation editor</title>

    <!-- Introduction, purpose -->

    <sect1 id="nv-introduction">
      <title>Introduction</title>

      <para>

	The &rosegarden; notation editor enables you to view and edit
	one or more staffs in traditional score notation.

      </para><para>

	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-notationview.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s notation editor</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
	</para>
      <para>
	&rosegarden; aims to present scores with the best possible
	layout compatible with its primary focus as a sequencer
	application.  This means that although the editor supports
	chords, overlapping and nested beamed groups, triplets and
	arbitrary tuplets, grace notes, dynamics, accents, text and so
	on, it does not provide as much fine control over layout
	(especially in contrapuntal music) as a dedicated score
	editing program might. &rosegarden; does not aim to produce
	typeset-quality score, although it can export LilyPond files,
	which may form a good basis for typesetting.

      </para>
    </sect1>

    <!-- Single and multiple staffs, and "current staff" -->

    <sect1 id="nv-staffs">
      <title>Single and multiple staffs</title>

      <para>
	There are three ways to open a notation editor from the
	&rosegarden; main window.  (They all require that you
	have some existing segments in the main window first,
	so if you're starting a new composition, you should
	create your segments before you start thinking about
	how to edit them.)

	<variablelist>

	  <varlistentry>
	    <term>Double-clicking on segments</term>
	    <listitem>
	      
	      <para>The most obvious way is just to double-click on
		a segment in the main canvas.  This opens the segment
		in whatever you have configured <!-- !!!Link --> as
		the default editor (notation, matrix, or event list),
		and by default this is the notation editor.  So
		double-clicking a single segment will open it as a
		single staff in a Notation editor window.</para>
	      
	      <para>You can also open a multi-staff editor this way:
		holding down the Shift key, select (with a single
		mouse click) each of the segments on the main view
		that you want to open, but double-click on the last
		one.  All of the selected segments will then be opened
		together in a single notation window.</para>

	    </listitem>
	  </varlistentry>

	  <varlistentry>
	    <term>The Open in Default Editor menu function (the Return key)</term>
	    <listitem>

	      <para>The Return key is a shortcut for the Open in
		Default Editor menu function, which does much the same
		thing as double-clicking: opens all of the currently
		selected segments together in a notation editor, or in
		whichever other editor you have configured as your
		default. </para>
	    </listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>The Open in Notation Editor menu functions</term>
	    <listitem>

	      <para>Alternatively, you can use the main window's
		Open in
		Notation Editor menu function, either on
		the Segments menu or on the right-button popup menu on
		a segment in the canvas.  Select the segments you want
		to edit (by shift-clicking as above, or by using the
		Select All Segments function) and
		then select Open in
		Notation Editor.</para>
	    </listitem>
	    
	  </varlistentry>
	</variablelist>

      </para>

      <para>
	If you have more than one staff (i.e. segment) visible in the notation
	editor, only one of them can be "current" at once.  The
	current staff can be distinguished because it has the insert
	cursor on it (see <link linkend="nv-rulers">Rulers and
	  Cursors</link>), and this is the staff on which any editing
	operations that use the insert cursor will take place.  The
	topmost staff is the current one by default, but you can
	switch to a different staff by ctrl-clicking on it, or by using the
	<menuchoice><guimenu>Tools</guimenu><guimenuitem>Local
	  Cursor</guimenuitem><guimenuitem>Cursor Up Staff</guimenuitem></menuchoice> and
	<menuchoice><guimenuitem>Cursor Down Staff</guimenuitem></menuchoice> menu functions.
      </para>

    </sect1>

    <!-- Linear and page layouts -->

    <sect1 id="nv-layout">
      <title>Linear and page layouts</title>

      <para>
	The usual way the notation editor displays staffs is known
	as Linear layout: one staff on top of another, with each
	staff as a single, horizontally scrollable long line.  Some
	of the functions of the editor (such as the <link
	  linkend="nv-rulers">Rulers</link>) are only available in
	Linear layout.
      </para>

      <para>
	However, you can also display staffs in two different
	page-based layouts: Continuous Page and Multiple Page.</para>

      <para>In Continuous Page layout, the music is arranged in one
	infinitely-tall page of the same width as the window.  Each
	staff breaks at the end of a line, starting a new line below
	the remaining staffs.</para>

      <para>In Multiple Page layout, the music is divided up into
	real pages much as it will be when printed.  The size of each
	page is calculated so that approximately the same amount of
	music will fit on each line as it will when actually printed
	(according to the point size specified for the printing
	resolution in the configuration dialog).  The printed version
	is unlikely to be exactly the same, as it depends on the
	precise paper size and margins in use when printing, but it
	should be fairly close if you happen to be using A4
	paper.</para>

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-notationview-multipage.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s notation editor in Multiple Page layout</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
	</para><para>
        Most, but not all, of the display and editing functions
	work in the page layout modes as well as in linear layout.
      </para>

      <para>
	To switch between these layout modes, use the Linear Layout, Continuous Page Layout and Multiple Page Layout menu functions.
      </para>
    </sect1>

    <!-- Rulers and Cursors -->

    <sect1 id="nv-rulers">
      <title>Rulers and cursors</title>

      <para>
	The &rosegarden; Notation editor window includes two graduated rulers,
	each associated with its own cursor.  The rulers are the horizontal strips
	divided up with tickmarks at top and bottom of the main
	notation canvas, and the cursors are the coloured vertical
	lines shown initially at the start of the top staff in the
	editor.  In addition to these main two, there are the <guimenuitem>chord
	    name</guimenuitem> ruler, the <guimenuitem>tempo</guimenuitem> ruler,
	and the <guimenuitem>raw note</guimenuitem> ruler.
    </para>
      <para>
	Note that the rulers are only shown in <link
	  linkend="nv-layout">Linear layout</link> mode, and several of them
      are not displayed by default.
      </para>


    <para>
      <screenshot>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="rg-cursors.png" format="PNG"/>
    </imageobject>
      <textobject>
	<phrase>The notation editor's two cursors</phrase>
      </textobject>
    </mediaobject>
    </screenshot>
    </para>

      <para>
	The purple cursor is the insert cursor.  It shows the point
	at which operations such as insert and paste will take
	place.  You can reposition the insert cursor by clicking or
	dragging on the top ruler, or by clicking with the Select
	tool on an empty part of the staff (avoiding any events), or
	by clicking anywhere with <keycap>Ctrl</keycap> held down.
      </para>

      <para>You can also use the left and right arrow keys to move
	the insert cursor one event at a time.  If you hold <keycap>Ctrl</keycap> while
	pressing the arrow keys, the cursor will move a whole bar at a
	time; if you hold Shift, the cursor will <link
	  linkend="nv-tools-selections">select the events</link> as it
	passes over them.
      </para>

      <para>
	The blue cursor is the playback pointer.  Just like the
	similar cursors in the main window and the matrix views,
	this shows the location of the current playback or record
	position, and it sweeps across the notation while the transport is
	rolling.  It can be repositioned using the bottom ruler.
      </para>
      <sect2 id="nv-raw-note-ruler">
	  <title>The raw note ruler</title>
	  <para>The raw note ruler is particularly
	      useful when editing <link linkend="nv-quantization">quantized
		  notation</link> where the display duration on the page
	      differs from the duration of the actual performance.
	      Enabled via
	      <menuchoice>
	        <guimenu>Settings</guimenu>
                <guimenuitem>Rulers</guimenuitem>
                <guimenuitem>Show Raw Note Ruler</guimenuitem>
              </menuchoice>, it draws a small bar above
	      each note, similar to the way notes appear in the matrix.  In this
	      example screenshot, you can see how interpreted, quantized notes
	      appear on this ruler.  The tenuto notes have full performance
	      durations, while the staccato notes are considerably shorter, and
	      the accented notes have a higher velocity (more red colour) than
	      their neighbors.
	  </para>
	  <para>
	      Raw note ruler marks only notes in the selected segment in the track.
	      The colour of the selected segment is used in the background of
	      the raw note ruler between the start and end time of the segment.
	  </para>
	  <para>
	      <screenshot>
		  <mediaobject>
		      <imageobject>
			  <imagedata
			    fileref="rg-rawnoteruler.png" format="PNG"/>
		      </imageobject>
		      <textobject>
			  <phrase>The raw note ruler,
			showing notation whose performance duration value differs
			from what appears on the staff</phrase>
		      </textobject>
		  </mediaobject>
	      </screenshot>
	  </para>
      </sect2>
      <sect2 id="nv-chord-name-ruler">
	  <title>The chord name ruler</title>
	<para>The chord name ruler analyzes the tonality of the piece, and
	    attempts to display which chords are sounding.  This is for
	    informational purposes only, and you can neither print nor edit the
	    contents of this ruler.
	    <!-- !!! throw in a link to how to do proper chords with text, and
	    should probably get into fretboards too, but I'm not going to mention
	    fretboards in this manual at this time (for 1.3) because it's too
	    rough, and I just don't care to get into that yet -->
	</para>
    </sect2>
    <sect2 id="nv-tempo-ruler">
	<title>The tempo ruler</title> <para>The tempo ruler displays
	the global tempo, and provides a vehicle for entering,
	editing, and manipulating it.  It works the same way as the
	tempo rulers in the main window and the matrix editor.  See
	<link linkend="tempo-ruler">Tempo Rulers</link> for more
	information.</para>
    </sect2>

    </sect1>

    <!-- Display conventions (annotated picture with some selected notes,
    some quantized notes, a bar of incorrect length etc) -->

    <!-- Tools and Selections -->

    <sect1 id="nv-tools-selections">
      <title>Tools and selections</title>
      <para>
	Most of the menu and toolbar editing functions in the
	&rosegarden; Notation editor fall into one of three
	categories: <quote>tools</quote>, <quote>functions that
	  operate on selections</quote>, and <quote>drag
	  operations</quote>.
      </para>

      <variablelist>
	<varlistentry>
	  <term>Tools</term>
	  <listitem>
	    <para>
	      The basic tools are the selection tool, the erase
	      tool, and those for inserting notes, rests, text and so
	      on, which are usually accessed from the toolbar buttons.
	  </para>
	  <para>
	      <screenshot>
		  <mediaobject>
		      <imageobject>
			  <imagedata
			    fileref="rg-notationtools.png" format="PNG"/>
		      </imageobject>
		      <textobject>
			  <phrase>The insert, erase, text, and guitar chord tools</phrase>
		      </textobject>
		  </mediaobject>
	      </screenshot>
	  </para>

	    <para>
	      Choosing a tool changes the default behaviour of the
	      mouse buttons on the main notation canvas, at least
	      until another tool is chosen instead.  For example,
	      choosing the selection tool allows you to make
	      selections and so to use the selection-based functions
	      (below); choosing an insertion tool (such as one of the
	      notes) switches the <acronym>GUI</acronym>'s behaviour so as to insert
	      notes by clicking on the canvas; choosing the erase tool
	      allows you to remove events by clicking on them.
	    </para>
	    <para>
	      You can also change the current tool using the Tools menu.
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Functions that operate on selections</term>
	  <listitem>
	    <para>
	      The majority of the remaining menu functions require a
	      selection to be made on the canvas before they can be
	      used. Some of them (such as <guimenuitem>Cut</guimenuitem> 
	      or the <guimenuitem>Note Style</guimenuitem>
	      functions) will operate on any selected events; others
	      (<guimenuitem>Stem Directions</guimenuitem> function)
	      will refuse to work unless the selection contains 
	      some notes.
	    </para>
	    <para>
	      To select some events on the canvas, switch to the
	      Select (arrow) tool and then outline a rectangular area
	      containing the events you want to select. The selected
	      events will then be highlighted in blue. If you click
	      on a single event, just that event will be selected <footnote> 
		<para> You can also double-click on a single event to open an
		  editing dialog for that event, but that's got nothing to
		  do with selections.</para> </footnote>).
	    </para><para>If you hold 
	      <keycap>Shift</keycap> while dragging
	      out a rectangle, its contents will be added to any
	      existing selection instead of replacing it.
	    </para>
	    <para>
	      To select a whole bar, double-click with the Select tool
	      on some empty space within that bar; to select the whole
	      staff, click three times. The Edit menu carries
	      functions for selecting extended areas based on the
	      location of the insert cursor, and you can also select
	      events around the insert cursor by holding Shift and
	      pressing the left or right arrow keys.
	    </para>
	    <para>
	      It is not possible to select events from more than
	      one staff at once.
	    </para>
		  <para>After selecting some events, you can filter your selection further using the <menuchoice>
		  <guimenu>Edit</guimenu>
		  <guimenuitem>Filter Selection</guimenuitem>
		</menuchoice> function.  For more details, refer to <link linkend="matrix-selectionfilter">the corresponding function in the matrix editor</link>.
	        </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Drag operations</term>
	  <listitem>
	    <para>
	      You can also do a certain amount of editing just by
	      dragging things around.  Switch to the Select (arrow)
	      tool, and then you can change the pitch of notes by
	      just click-and-dragging their heads up or down, and
	      change the times of notes and other events by dragging
	      them left or right.  (You can't drag rests or time
	      signatures, but you can drag everything else.  If you
	      have more than one event selected, the whole selection
	      will be dragged at once.)
	    </para>
	    <para>
	      Dragging is usually a less accurate way of editing
	      things than using the menu or toolbar functions, but
	      it can be easier.
	    </para>
	  </listitem>
	</varlistentry>
      </variablelist>

      <sect2>
	<title>Transposing</title>
	
	<para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
	        <imagedata fileref="transpose-by-interval.png" format="PNG"/>
		  </imageobject>
	  	  <textobject>
	        <phrase>Transposing by interval</phrase>
	      </textobject>
	    </mediaobject>
	  </screenshot>
	</para>
	<para>
	  In Notation view menu there are two functions which can be
	  used to transpose notes by an arbitrary interval, namely
	    <menuchoice>
	      <guimenu lang="en">Adjust</guimenu>
	      <guimenuitem>Transpose</guimenuitem>
	      <guimenuitem>Transpose by Semitones</guimenuitem>
	    </menuchoice>
	  function which asks just the number of semitones to be
	  transposed, and
	    <menuchoice>
	      <guimenu lang="en">Adjust</guimenu>
	      <guimenuitem>Transpose</guimenuitem>
	      <guimenuitem>Transpose by Interval</guimenuitem>
	    </menuchoice>
	  function which shows a neat dialog that can be used to 
	  transpose notes. In the latter, the dialog shows an example 
	  notes before and after transposing and expresses the
	  interval in written form. The interval may be changed either
	  by dragging the notes shown by the dialog or by changing
	  separately the base note, its octavation and accidentals.
	</para>
	<para>
	  In Segment view, Notation view, and Track view there is also
	    <menuchoice>
	      <guimenu lang="en">Segment(s)</guimenu>
	      <guimenuitem>Transpose by Interval</guimenuitem>
	    </menuchoice>
	  function which makes a transpose to entire segment. In this
	  dialog you may also choose whether only the notes are
	  transposed or the keys of the segment are transposed also.
	</para>
      </sect2>
    </sect1>

    <!-- Insertion: notes, auto-ties, accidentals -->

    <sect1 id="nv-insertion">
      <title>Inserting notes and rests</title>

      <para>To insert a note, select one of the note tools by clicking
      on a particular duration of note on the toolbar, and then click
      on the staff at the point where you want to add the note.</para>
      <para>
	  <screenshot>
	      <mediaobject>
		  <imageobject>
		      <imagedata
			fileref="rg-notation-toolbars.png" format="PNG"/>
		  </imageobject>
		  <textobject>
		      <phrase>The duration, rests, and accidentals toolbars</phrase>
		  </textobject>
	      </mediaobject>
	  </screenshot>
      </para>

      <para>You can also select one of the accidentals on the toolbar
      to insert sharpened or flattened notes.  If no accidental is
      selected, the note inserted will follow the key signature.
      Alternatively, you can select the "Follow previous accidental"
      icon (shown as a note with an arrow pointing back from where the
      accidental would appear) to make the note follow whatever
      accidental was last used at the same height on the staff.</para>

      <para>If you add a note at the same time as an existing note of
	different duration, the editor will generally assume that you
	want to create chords and will split the existing or new note
	accordingly so as to create one or more chords with ties.  If
	you really do want to chord two different durations, you can
	select the tied noteheads and use the Collapse Equal-Pitch Notes
	function to merge them together. Alternatively, the default
	behaviour can be changed in the &rosegarden; configuration dialog
	so as not to do the split at all.</para>

      <para>If you add a note exactly over an existing note of
	different duration (i.e. at the same pitch), the duration of the
	existing note will be changed to that of the new one.</para>

      <para>If you add a rest at the same time as an existing note,
	the note will be silenced for the duration of the rest,
	shortening or possibly removing it altogether.</para>

      <sect2 id="nv-insertion-keyboard">
	<title>Typing notes and rests with the PC keyboard</title>

	<sect3>
	  <title>Duration</title>

	  <para>First, ensure a notation tool is selected to indicate
	    the duration of note (or rest) you wish to insert.  You can
	    select the various note types using the number keys:</para>

	  <itemizedlist>
	    <listitem><para><keycap>5</keycap> &ndash; Breve</para></listitem>
	    <listitem><para><keycap>1</keycap> &ndash; Whole note (semibreve)</para></listitem>
	    <listitem><para><keycap>2</keycap> &ndash; Half note (minim)</para></listitem>
	    <listitem><para><keycap>4</keycap> &ndash; Quarter note (crotchet)</para></listitem>
	    <listitem><para><keycap>8</keycap> &ndash; Eighth note (quaver)</para></listitem>
	    <listitem><para><keycap>6</keycap> &ndash; Sixteenth note (semiquaver)</para></listitem>
	    <listitem><para><keycap>3</keycap> &ndash; Thirty-second note (demisemiquaver)</para></listitem>
	    <listitem><para><keycap>0</keycap> &ndash; Sixty-fourth note (hemidemisemiquaver)</para></listitem>
	  </itemizedlist>
	  
	  <para>You can switch to a triplet version of the note
	    duration by pressing the <keycap>G</keycap> key.  Pressing it
	    again will switch back to the normal duration.  The status
	    bar at the bottom of the window will notify you of when a
	    triplet duration is active.</para>
	</sect3>

	<sect3>
	  <title>Pitch</title>

	  <para>Once a notation tool is selected, you can insert a
	    note at the current position of the <link
	      linkend="nv-rulers">insert cursor</link> by pressing one of
	    the pitch keys:</para>

	  <itemizedlist>
	    <listitem><para><keycap>A</keycap> &ndash; Do (the tonic of the current key in the current clef)</para></listitem>
	    <listitem><para><keycap>S</keycap> &ndash; Re</para></listitem>
	    <listitem><para><keycap>D</keycap> &ndash; Mi</para></listitem>
	    <listitem><para><keycap>F</keycap> &ndash; Fa</para></listitem>
	    <listitem><para><keycap>J</keycap> &ndash; So</para></listitem>
	    <listitem><para><keycap>K</keycap> &ndash; La</para></listitem>
	    <listitem><para><keycap>L</keycap> &ndash; Ti</para></listitem>
	  </itemizedlist>

	  <para>Press the "." key to togggle between dotted and
	  undotted durations.</para>

	  <para>Holding <keycap>Shift</keycap> while pressing a key
	    will sharpen the note (except for Mi and Ti, which don't
	    have sharpened versions) and holding <keycap>Shift</keycap>
	    and <keycap>Ctrl</keycap> together will flatten it (except
	    for Fa and Do).</para>

	  <para>To enter notes an octave higher, use the corresponding
	    keys on the next row up: <keycap>Q</keycap>,
	    <keycap>W</keycap>, <keycap>E</keycap>, <keycap>R</keycap>,
	    <keycap>U</keycap>, <keycap>I</keycap>, and
	    <keycap>O</keycap>.  Likewise to enter notes an octave
	    lower, use <keycap>Z</keycap>, <keycap>X</keycap>,
	    <keycap>C</keycap>, <keycap>V</keycap>, <keycap>B</keycap>,
	    <keycap>N</keycap> and <keycap>M</keycap>.</para>

	</sect3>

	<sect3>
	  <title>Rests</title>
	  
	  <para>To insert a rest instead of a note, press
	    <keycap>P</keycap>.  Alternatively, you can use the
	    <keycap>T</keycap> and <keycap>Y</keycap> keys to switch the
	    current tool to a rest tool and back to a note tool again.</para>

	</sect3>

	<sect3>
	  <title>Chords</title>

	  <para>The default behaviour of the notation editor is to
	    move the insert cursor forward after inserting a note, so as
	    to be ready to insert another note after it in a melody;
	    this can be changed using the <keycap>H</keycap> key, which
	    switches to chord mode so that subsequent insertions occur
	    at the same time as the last one.  Pressing
	    <keycap>H</keycap> again switches back to the melody
	    insertion behaviour.</para>

	</sect3>

	<sect3>
	  <title>Changing note durations</title>

	  <para>You can use the keyboard to change the durations of
	  notes that you've already entered.  Make sure the notes you
	  want to change are selected, and then press
	  <keycap>Ctrl</keycap> plus the number key for the note you
	  want.  You can also add or remove dots, by pressing
	  <keycap>Ctrl</keycap> plus "." &mdash; use this repeatedly to
	  select between one dot, two dots and no dots.</para>

	  <para>If you also hold <keycap>Alt</keycap> as well as
	  <keycap>Ctrl</keycap>, you will change the durations of the
	  notes as displayed in the notation editor without changing
	  their performed durations.  This can be very useful for
	  tidying up a score: see also <link
	  linkend="nv-quantization">notation from performance
	  data</link>.
	  </para>
	</sect3>

	<sect3>
	  <title>Other remarks</title>

	  <para>All of the insertion commands are also available on a
	    submenu of the Tools menu.  It's unlikely you'd ever want to
	    navigate the menus just to insert a single note, but the
	    menus show the keyboard shortcuts and so provide a useful
	    reference in case you forget which key is which.</para>

	  <para>The keyboard shortcuts are currently designed for use
	    with a QWERTY-layout keyboard.  There is not yet any way to
	    remap the keys for another layout, short of reassigning each
	    key individually using the "Configure Shortcuts..." option
	    on the Settings menu.</para>

	  <para>Holding the <keycap>Ctrl</keycap> key while pressing a
	    number will select the corresponding dotted-note
	    tool.</para>

	</sect3>

      </sect2>

      <sect2 id="nv-insertion-midi">
	<title>Entering notes using a MIDI keyboard</title>

	<para>
	  You can enter notes into the notation editor one at a time
	  using a MIDI keyboard or other MIDI control device &mdash; a
	  process known as step recording.  The notation editor uses
	  the pitches you play on the keyboard, but the durations you
	  have selected in the editor itself.
	</para>

	<para>
	  To start entering notes from a MIDI keyboard, first make
	  sure the keyboard is configured as your default MIDI
	  record device.  Then make sure a notation tool is selected
	  to set a duration.  Then press the <!-- !!!  image of
	  button --> step recording button on the notation editor's
	  toolbar, or select Step Recording from the Tools menu.
	  From that point on all notes pressed on the MIDI keyboard
	  will be inserted at the current insertion time in that
	  notation window, until step recording is switched off
	  again or activated in a different window or the window is
	  closed.
	</para>

	<para>
	  You can select another notation tool while step recording
	  is in progress, in order to insert notes of different
	  durations; and you can also switch into Chord mode <!--
	  !!! link --> to insert chords.
	</para>
      </sect2>
      
    </sect1>

    <!-- Keys, Clefs and Time Signatures -->

    <sect1 id="nv-signatures">
      <title>Clef and key</title>

<!-- !!! rework -->      
      <para>The first thing to know about the way &rosegarden; handles
	these is that time-related changes (tempos and time
	signatures) are treated entirely differently from clefs and
	keys. In order to simplify managing playback and recording as
	well as notation, &rosegarden; requires that when the tempo or
	time signature changes, it does so in all staffs at once.  You
	can't have one staff in 2/4 and another in 6/8 simultaneously,
	or one staff playing at 120 to the beat and another at 90.
	This applies only to time: there is no such restriction on the
	use of clef and key changes.  See also <link linkend="tempo">Tempo in Rosegarden</link>.</para>

      <para>To change the clef, key, tempo or time signature within a
      notation editor window, position the <link
      linkend="nv-rulers">insert cursor</link> at the point where you
      want the change to happen, and use one of the Edit menu's Add
      Clef Change..., Add Key Change..., Add Tempo Change... and Add
      Time Signature Change... functions.  You will then see a dialog
      box in which you can choose the particular clef, key, tempo or
      time signature setting you want to apply, as follows.</para>

      <sect2 id="nv-signatures-clef">
	<title>Clef</title>
	<para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-clefdialog.png" format="PNG"/>
	</imageobject>
	  <textobject>
	    <phrase>&rosegarden;'s clef dialog</phrase>
	  </textobject>
	</mediaobject>
	</screenshot>
	</para>

	<para>The dialog allows you to choose a clef, but also
	  to choose how you want the clef to be applied, in
	  cases where there are already some notes following
	  the point where the clef is to be inserted.  You
	  must choose one of the following:

	  <variablelist>

	    <varlistentry>
	      <term>Maintain current pitches</term>
	      <listitem>
		<para>
		  Any notes following the clef will keep
		  their current performance pitches.
		</para>
		<para>
		  For example, inserting a
		  tenor clef in the middle of a previously
		  treble-clef section will cause the notes following
		  the clef to be moved an octave
		  higher up the staff, because they will still have
		  their treble-clef pitches.
		</para>
	      </listitem>
	    </varlistentry>
	    
	    <varlistentry>
	      <term>Transpose into appropriate octave</term>
	      <listitem>
		<para>
		  Any notes following the clef will
		  retain their pitch within the octave, but
		  may be moved into a different octave to
		  match the new clef, and therefore will play
		  at a new pitch.
		</para>
		<para>
		  For example, inserting a tenor clef in the
		  middle of a previously treble-clef section
		  will cause the notes following the clef to
		  move by one staff line only to adjust to the new
		  clef, but to play an octave lower than before.
		</para>
	      </listitem>
	    </varlistentry>
	    
	  </variablelist>
	  
	</para>
      </sect2>
      
      <sect2 id="nv-signatures-key">
	<title>Key</title>
	<para>
	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-keysigdialog.png" format="PNG"/>
	</imageobject>
	  <textobject>
	    <phrase>&rosegarden;'s key signature dialog</phrase>
	  </textobject>
	</mediaobject>
	</screenshot>
	</para>
	<para>The dialog allows you to choose a key signature, but also
	  to choose how you want the key signature to be applied.  You
	  must choose among the following:
	</para>

	  <variablelist>

	    <varlistentry>
	      <term>Key signature</term>
	      <listitem>
		<para>
		  Used to dial up the actual key signature.  The dialog will
		  attempt to analyze the tonality of the piece, and guess at
		  the key signature if no key is already in effect at that
		  point in the notation.
		</para>
	      </listitem>
	    </varlistentry>
	    
	    <varlistentry>
	      <term>Key transposition</term>
	      <listitem>
		<para>You must choose whether to transpose the key according
		    to segment transposition, or to use the key exactly as
		    specified.
		</para>
		<para>
		  For example, if you are inserting a key of Bb major into a
		  transposed Bb trumpet part that's sounding at a
		  transposition of -2, you use this option to tell
		  &rosegarden; whether the key of Bb you have entered should
		  be written as a Bb (concert Ab), or should be transposed
		  against the segment to result in the trumpet key of C major
		  (concert Bb).
		</para>
	      </listitem>
            </varlistentry>

	    <varlistentry>
		<term>Scope</term>
		<listitem>
		    <para>
			You must choose whether to apply this key signature to
			the current segment only, or to all segments, on all
			tracks, at this time.
		    </para>
		    <para>
			If you elect to apply the change to all segments at
			this time, the previous key transposition choice will
			govern whether all segments receive the specified key,
			or a key appropriately transposed segment by segment.
			(This is a convenient way to deal with notation for
			transposing instruments, because it frees you to think
			of all keys in concert pitch, and allow &rosegarden;
			to work out what key is used for what transposition.)
		    </para>
		</listitem>
	    </varlistentry>

	    <varlistentry>
		<term>Existing notes following key change</term>
		<listitem>
		    <para>
			You must choose whether any existing notes following
			this key change will maintain their current pitches,
			maintain their current accidentals in the key, or
			whether Rosegarden should make an attempt to transpose
			the part into the new key.
		    </para>
		</listitem>
	    </varlistentry>
	    
	  </variablelist>
      </sect2>
      
    </sect1>

    <!-- Text -->

    <sect1 id="nv-text">
      <title>Text, Lyrics, and LilyPond directives</title>
      
      <para>A staff can contain various sorts of text, in text
	events.  There are two basic classes of user-editable text event: single
	text items used for point annotations etc., and lyrics, plus a third
	type used especially for tweaking LilyPond export.  User-editable
	types can be created (and so associated with a particular
	time in the staff) using the Text tool, which is available on
	the
	<inlinemediaobject>
	    <imageobject>
		<imagedata fileref="rg-text-cursor.png" format="PNG"/>
      	    </imageobject>
  	</inlinemediaobject>
	button in the toolbar.  Lyrics can
	also be created this way, but are more easily created using
	the <link linkend="nv-text-lyrics">lyric editor</link>.</para>

      <para>To add a piece of text, select the Text tool and click
	at the point where you want to add it.  If you want the text
	associated with a particular note or rest, it may be helpful to click
	the T cursor directly on that note, so as to ensure proper placement
	in time.  A dialog box will appear, into which you can type the text
	and choose its intended purpose.  (Rosegarden prefers to store what
	the text is for, rather than how it should look; this is so that in
	future we may be able to configure how the various sorts of text are
	presented for each individual user.)

	  <screenshot>
	    <mediaobject>
	      <imageobject>
		<imagedata fileref="rg-textdialog.png" format="PNG"/>
	</imageobject>
	  <textobject>
	    <phrase>&rosegarden;'s text dialog</phrase>
	  </textobject>
	</mediaobject>
	</screenshot>
	
	The available
	purposes (or styles) are:</para>

    <variablelist>

	<!-- NOTE: I have removed the "by default" in the following
	descriptions.  There is no "by default" to this.  It does
	what it does, and there is no changing it without editing
	source code. (dmm) -->

	<varlistentry><term>Dynamic</term><listitem><para> Used for
	      minor local indications such as the dynamic marks "p", "mf"
	      etc. Shown below the staff in small italic
	      type.  </para></listitem></varlistentry>

	<varlistentry><term>Direction</term><listitem><para> Used
	      when indicating significant changes in style or mood.  Shown
	      above the staff in large roman type.
	    </para></listitem></varlistentry>

	<varlistentry><term>Local Direction</term><listitem><para>
	      Used to indicate less significant changes in style or mood.
	      Shown below the staff in a smaller bold-italic roman
	      type. </para></listitem></varlistentry>

	<varlistentry><term>Tempo</term><listitem><para> Used to
	      indicate significant changes in tempo.  Shown above the
	      staff in large bold roman type.
	    </para></listitem></varlistentry>

	<varlistentry><term>Local Tempo</term><listitem><para> Used
	      to indicate more minor or local changes in tempo.  Shown
	      above the staff in a small bold roman type.
        </para></listitem></varlistentry>

	<varlistentry><term>Chord</term><listitem><para> Used
	      to indicate chord changes for guitarists, etc.  Shown
	      above the staff in a small bold roman type.
	    </para></listitem></varlistentry>

	<varlistentry><term>Lyric</term><listitem><para> Although
	      lyrics are usually created in the <link
		linkend="nv-text-lyrics">lyric editor</link>, they can also
	      be entered word by word if necessary using this style.  This
	      style is shown below the text in a small roman typet.
	      (Warning: if you enter lyrics this way and later
	      edit the staff's lyrics using the lyric editor, any lyrics
	      entered this way may be modified or moved if their
	      positioning is not compatible with that expected by the
	      lyric editor.)  </para></listitem></varlistentry>

	<varlistentry><term>Annotation</term><listitem><para> Used
	      for helpful text that is not strictly considered part of the
	      score.  Shown below the staff, boxed-out in a yellow
	      sticky-label-style box.  These may not be visible
	      initially, and can be turned on via
	      <guimenu>Settings</guimenu>
	      <guimenuitem>Show Annotations</guimenuitem>
	    </para></listitem></varlistentry>

	<varlistentry><term>LilyPond Directive</term><listitem><para> Used
	      as the mechanism for exporting special tags that are
	      only understood by the LilyPond exporter.  These
	      provide a means to extend &rosegarden;'s capabilities
	      beyond what it can do within its own native interface.
	      Shown above the staff, in a green box.  These may not be visible
	      initially, and can be turned on via
	      <guimenu>Settings</guimenu>
	      <guimenuitem>Show LilyPond Directives</guimenuitem>
	    </para></listitem></varlistentry>
	</variablelist>

      <para>For many of the styles, a new combo box will appear that allows
	  you to select from a variety of commonly-used texts appropriate for
	  that style, such as "Allegro" and "ritardando."  Selecting one of
	  these texts saves typing, but in no way impedes your ability to type
	  your own text by hand, should you so desire.
      </para>

      <para>You can also edit text after creating it, by clicking on
	the existing text with the text tool.</para>
      
      <sect2 id="nv-text-lyrics">
	<title>Editing lyrics</title>
	
	<para>The Lyric editor, available from the 
	  <menuchoice>
	    <guimenu lang="en">View</guimenu>
            <guimenuitem>Open Lyric Editor</guimenuitem>
          </menuchoice>
	  function, allows you to edit all of
	  the lyric events for a single staff at once, using a fairly
	  rudimentary textual editing system.  To use it, just
	  activate the menu option, edit the lyric text in the
	  resulting dialog, and then hit OK.</para>

	<para>The lyrics you enter should follow a particular
	  format.  Bar lines are vital to avoid the editor getting
	  confused, and are represented with a slash ("/").  Within
	  each bar the individual syllables are separated by spaces
	  (at least one space: the editor doesn't care about any extra
	  whitespace). Each syllable in turn will be attached to the
	  next subsequent note or chord within that bar (although at
	  the moment the editor can get quite confused by chords that
	  are not exact, i.e. that require smoothing or
	  quantizing).</para>

	<para>If you want a note to have no syllable attached to it,
	  you need to provide a dot (".") as the syllable for that
	  note.  (This is why the default lyric text for a segment is
	  usually full of dots.)  Remember to separate the dots with
	  spaces, so that they are clearly separate syllables.</para>
	
	<para>If you want more than one syllable on the same note,
	  with a space between them, use a tilde ("~") instead of the
	  space.  It will be shown as a space on the score.</para>

	<para>If you want to split a syllable across two notes, with
	  a hyphen, you need to enter a space following the hyphen so
	  the editor knows to treat it as two syllables.  (Hyphens get
	  no special treatment within syllables.)</para>

	<para>Syllables consisting only of numbers surrounded by
	  square brackets (like "[29]") will be ignored; this is the
	  format used for the automatically-generated bar numbers
	  shown in the editor.</para>

	<para>You should also be aware that the textual format of
	  lyrics is only used for editing:  the lyrics are actually
	  stored as distinct text events (one per syllable).  This
	  means that the text format may potentially change in the
	  future to accommodate more advanced editing capabilities,
	  although the event format should not change and so your
	  saved files should continue to be compatible.</para>

	<para>&rosegarden; supports also multiple lines of lyrics.
	  You may always attach one more verse into a single staff
	  by clicking Add Verse in the lyrics editor.  All the verses
	  are entered with the same syntax.  If you leave the last verse
	  without syllables, or make it empty, it is removed from
	  the list of verses next time you open the lyrics editor.
	  </para>

      </sect2>
      <sect2 id="nv-lilypond-directives">
	  <!-- text has a link here because the reading chain is:
	  intro -> lilypond directives, which puts you at a point well away
	  from any explanation of the whole text dialog and whatnot -->
	  <title>Using special LilyPond directives</title>
	  <para>LilyPond directives are a special kind of <link
		  linkend="nv-text">text</link> that you can
	      use to export .ly files that take advantage of
	      functionality not yet available directly through &rosegarden;'s
	      own native interface.
	  </para>
	  <para>Some of these are a bit fiddly with respect to how their
	      placement in time affects their function.  It is not always
	      immediately apparent at a glance just where they are, or what notes
	      or barlines they will affect, so I have made placement suggestions
	      to help ease the process of getting them in the right spot.
	  </para>
	  <para>
	  	These directives are:
	  </para>

	  <variablelist>
	      <varlistentry>
		  <term>Segno</term><listitem><para>used to export a 
		    <inlinemediaobject>
			<imageobject>
			    <imagedata fileref="rg-segno.png" format="PNG"/>
			</imageobject>
		    </inlinemediaobject>
		   </para></listitem>
	      </varlistentry>

	      <varlistentry>
		  <term>Coda</term><listitem><para>used to export a 
		    <inlinemediaobject>
			<imageobject>
			    <imagedata fileref="rg-coda.png" format="PNG"/>
			</imageobject>
		    </inlinemediaobject>
		   </para></listitem>
	       </varlistentry>

	      <varlistentry>
		  <term>Alt1</term><listitem><para>Placed anywhere in a
			  measure, designates that the measure(s)
			  that follow this one should be exported as the
			  first alternate ending (see file 
			  lilypond-alternative-endings.rg for example)
		   </para></listitem>
	      </varlistentry>

	      <varlistentry>
		  <term>Alt2</term><listitem><para>Placed anywhere in a
			  measure, designates that the measure(s)
			  that follow this one should be exported as the
			  second alternate ending (see file 
			  lilypond-alterantive-endings.rg for example)
		   </para></listitem>
	       </varlistentry>

	      <varlistentry>
		  <term>|| -></term><listitem><para>Placed anywhere in a
			  measure, designates that the next calculated barline will be
			  rendered as a double barline (see file
			  lilypond-directives.rg for example)
		   </para></listitem>
	       </varlistentry>

	      <varlistentry>
		  <term>|. -></term><listitem><para>Placed anywhere in a
			  measure, designates that the next calculated barline will be
			  rendered as a terminating barline (see file
			  lilypond-directives.rg for example)
		   </para></listitem>
	      </varlistentry>

	      <varlistentry>
		  <term>: -></term><listitem><para>Placed anywhere in a
			  measure, designates that the next calculated barline will be
			  rendered as a dashed barline (see file
			  lilypond-directives.rg for example)
		   </para></listitem>
	       </varlistentry>

	      <varlistentry>
		  <term>Gliss.</term><listitem><para>Placed by clicking
			  directly on a notehead, draws a glissando between
			  the target note and the note immediately following (see file
			  lilypond-directives.rg for example)
		   </para></listitem>
	       </varlistentry>

	      <varlistentry>
		  <term>Arp.</term><listitem><para>Placed by clicking
			  directly on a chord, draws a wavy line arpeggio
			  symbol immediately to the left of the affected chord (see file
			  lilypond-directives.rg for example)
		   </para></listitem>
	       </varlistentry>

	      <varlistentry>
		  <term>Tiny ->.</term><listitem><para>Placed anywhere,
			  designates that notation immediately following this
			  directive should be rendered at the "tiny" size (see file
			  lilypond-directives.rg for example)
		   </para></listitem>
	       </varlistentry>

	      <varlistentry>
		  <term>Small ->.</term><listitem><para>Placed anywhere,
			  designates that notation immediately following this
			  directive should be rendered at the "small" size (see file
			  lilypond-directives.rg for example)
		   </para></listitem>
	       </varlistentry>

	      <varlistentry>
		  <term>Norm. ->.</term><listitem><para>Placed anywhere,
			  designates that notation immediately following this
			  directive should be rendered at the normal size;
			  usually used to cancel a Tiny -> or Small ->. (see file
			  lilypond-directives.rg for example)
		   </para></listitem>
	       </varlistentry>
	   </variablelist>
      </sect2>
    </sect1>

    <!-- Indications -->

    <sect1 id="nv-guitarchords">
      <title>Guitar Chords</title>

      <para>
      	Like text, it is possible to add guitar chord diagrams to a
      	notation track (or to edit previously added ones). This is
      	done by toggling the
      	<guimenuitem>Guitar Chord</guimenuitem>
      	button, and then clicking on the same area as for adding text.
      	This will open the Guitar Chord dialog. With it you can select
      	which guitar chord diagram you want to add from a chord
      	dictionary which comprises most of the common chord fingerings
      	by specifying a chord's root and its extension. For
      	convenience, the fingerings are sorted in three different
      	categories :
      	<guimenuitem>beginner</guimenuitem>
      	,
      	<guimenuitem>common</guimenuitem>
      	and
      	<guimenuitem>all</guimenuitem>
      	. These categories are actually based on the chord extension
      	(A7 is a beginner chord, while A13 isn't), not on the
      	fingering itself, so you can still see "advanced" chord
      	fingerings listed, even in beginner mode.
      </para>


      <para>
      	<screenshot>
      		<mediaobject>
      			<imageobject>
      				<imagedata fileref="rg-guitarchorddialog.png"
      					format="PNG" />
      			</imageobject>
      			<textobject>
      				<phrase>&rosegarden;'s chord selector dialog
      				</phrase>
      			</textobject>
      		</mediaobject>
      	</screenshot>
      </para>

      <para>
      	It is also possible to add your own fingerings if needed. To
      	do this, click on the 'New' button. This will pop up a chord
      	editor, where you can "draw" which fingering you want to add,
      	and specify its root, chord extension, and starting fret
      	number.
      	<screenshot>
      		<mediaobject>
      			<imageobject>
      				<imagedata
      					fileref="rg-guitarchordeditordialog.png" format="PNG" />
      			</imageobject>
      			<textobject>
      				<phrase>&rosegarden;'s chord editor dialog
      				</phrase>
      			</textobject>
      		</mediaobject>
      	</screenshot>

      	Note that while you can choose the extension from a list of
      	predefined values, you can also type whatever value you want.
      	However, in that case, the new fingering will only be
      	available in the 'all' list. Also, you can only delete and
      	edit your own chords. Those from the predefined dictionary
      	cannot be changed. If you spot a mistake in one of them,
      	please report it to the development team.
      </para>

    </sect1>

    <!-- Indications -->

    <sect1 id="nv-indication">
      <title>Slurs and hairpins</title>

      <para>Slur and hairpin (crescendo/decrescendo) dynamic markings are stored as events,
	just like notes or rests.  To create one, select the area you
	want it to cover (a series of notes or whatever), and then use
	the <guimenuitem>Add Slur</guimenuitem>, 
	<guimenuitem>Add Crescendo</guimenuitem> or 
	<guimenuitem>Add Decrescendo</guimenuitem> options from
	the <guimenu>Phrase</guimenu> menu.</para>

     <para>Placement of hairpins can be somewhat tricky, and this is
	 especially so with haripins that run in line with dynamic markings.
	 It is commonly the case that a hairpin that doesn't quite look right
	 in &rosegarden;'s own notation editor will nevertheless come out just
	 fine once exported to LilyPond.  &rosegarden;'s slurs generally come
	 out best when all the stems are running in the same direction, and
	 occasionally need to be <link
	     linkend="nv-microposition">repositioned</link> by hand to achieve
	 better placement.  Slurs also tend to fare slightly better once
	 exported to LilyPond.
     </para>

      <para>You remove a slur or hairpin in the same way as any
	other event: either select it with the selection tool and then
	hit <keycap>Delete</keycap>, or click on it with the erase tool active.</para>

    </sect1>

    <!-- Stem direction, slashes etc -->

    <sect1 id="nv-note-qualities">
      <title>Note stems and slashes</title>

      <para>You can set the stem direction of any selected notes
	(provided they are a sort that have stems) using the three
	Stem Direction options on the Notes menu.  The options allow
	you to either fix the stems up or down, or revert to the stem
	direction that &rosegarden; would otherwise have chosen.  See
	also <link linkend="nv-beamed-groups">Beams</link>.</para>

      <para>The <guimenu>Note</guimenu> menu also contains options for adding slashes
	across note stems, for example to indicate short repeated
	notes or drum rolls.  These are currently purely notational;
	&rosegarden; will not take them into account when playing the
	staff or generating &MIDI;.</para>
    </sect1>
    
    <!-- Beamed groups, including overlapping and nesting them -->

    <sect1 id="nv-beamed-groups">
      <title>Beams</title>
      
      <para>Adding beams to notes is considered a grouping operation
	in the &rosegarden; Notation editor, available on the <guimenu>Phrase</guimenu>
	menu.  Select the notes you want to beam, and use the
	<guimenuitem>Beam Group</guimenuitem> menu option.  To remove a beam, select the notes and use
	the <guimenuitem>Unbeam</guimenuitem> menu option.</para>

      <para>It is possible to have more than one beamed group
	happening at the same time &mdash; you just select and beam the
	separate groups one at a time &mdash; but Rosegarden is usually not
	yet clever enough to work out which notes should have stems up
	and which should have stems down for simultaneous beamed
	groups, so you will probably have to set the stem directions
	of the notes in the groups explicitly as well as beaming them.</para>

      <para>&rosegarden; can attempt to guess a sensible beaming for a
	piece of music, provided it's not too complicated.  To invoke
	this, select the notes you want to calculate the beaming for
	(for example by triple-clicking to select a whole staff) and
	then use the <guimenuitem>Auto-Beam</guimenuitem> option on the 
	<guimenu>Phrase</guimenu> menu.  Auto-beaming
	is also done automatically when loading a &MIDI; file, for
	example, and the editor also does some automatic beaming as
	you enter notes (this can be disabled by changing the
	"Auto-Beam when appropriate" setting on the configuration
	dialog or the insertion tool's right-button menu).</para>

    </sect1>

    <!-- Tuplets -->

    <sect1 id="nv-tuplets">
      <title>Triplets and other tuplets</title>

      <para>A triplet group consists of three notes or chords played
	in the time of two.  (More precisely, it consists of notes
	with a total duration of three arbitrary units played in the
	time of two of those units.)</para>

      <para>We use the word <quote>tuplet</quote> to describe the general
	situation in which notes with a total duration of any given
	number of units are played in the time of a different number
	of those units: nine notes in the time of eight, or six in the
	time of four, or a crotchet and a quaver in the time of a
	single crotchet, or even two notes in the time of three.  (At
	present &rosegarden; does not support the last example &mdash; tuplet
	groups must always be played with a shorter duration than
	written.)</para>

      <para>The triplet and tuplet menu functions work by taking an
	existing series of notes or rests and squashing them so they
	play quicker, filling in the left-over space at the end of the
	series with a final rest and drawing the whole as a tuplet
	group.  You can therefore create a new series of triplets by
	entering the first two notes of the series (in their normal
	form), making them into triplets, and then filling in the rest
	left over by the triplet operation with the final note of the
	triplet.  Or you can apply the triplet operation before you
	enter any notes, thus turning the original rest itself into
	triplet form, and then insert the notes of the triplet on top
	of it.  Some examples may help:</para>

      <!-- Need examples and screenshots -->
      
      <!-- Then discuss general tuplet dialog... -->

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-tupletdialog.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s general tuplet dialog</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>To specify a general tuplet group, we need to know what
	the base note is (for example, if we play three crotchets in
	the time of two then the base is a crotchet) and the ratio of
	the number of base notes written to the number played.</para>

      <!-- Then discuss "tuplet mode": with a subtitle? -->

    </sect1>

    <!-- Grace notes -->

    <!-- Paste -->

    <sect1 id="nv-paste-types">
      <title>Paste types</title>

      <para>
	The meaning of <quote>cut and paste</quote> is less obvious for a music
	editing program than it is for something like a word
	processor in which the letters and words go in a simple
	linear order.  Accordingly, &rosegarden;'s Notation editor
	offers several different types of Paste operation, as well
	as separate Cut and Cut and
	  Close functions.
      </para>

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-pastedialog.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s paste-type dialog</phrase>
	</textobject>
      </mediaobject>
      </screenshot>

	The types of Paste operation are:</para>

      <variablelist>

	<varlistentry>
	  <term>Restricted</term>
	  <listitem>
	    <para>Requires an existing gap (containing nothing but
	      rests) of enough duration to completely contain the
	      clipboard's contents.  The contents are pasted into
	      the gap.  If there is no gap long enough, the paste
	      is not carried out.
	    </para>
	    <para>
	      This is the default paste type.
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Simple</term>
	  <listitem>
	    <para>Erases enough events to make a gap long enough to
	      paste into, and then pastes into that.  The pasted 
	      events therefore completely replace any existing ones 
	      in the time covered by the paste.
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Open and Paste</term>
	  <listitem>
	    <para>The opposite of Cut and
		Close. <!-- !!! define that --> Makes room for the paste by moving all of the
	      subsequent events further towards the end of the
	      composition.
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Note Overlay</term>
	  <listitem>
	    <para>Carries out a paste in the way that it would
	      happen if you entered each of the notes in the clipboard
	      yourself using the notation editor: if there are other
	      notes overlapping with them, the new or existing notes
	      will be split into ties appropriately.
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Matrix Overlay</term>
	  <listitem>
	    <para>Carries out a paste in the way that it would
	      happen if you entered each of the notes in the clipboard
	      yourself using the matrix editor: the notes presently
	      in the way of the paste will be ignored, allowing the new 
	      notes to overlap arbitrarily with them.
	    </para>
	  </listitem>
	</varlistentry>

      </variablelist>

      <para>All of these take effect at the current position of the 
	insert cursor on the current staff.  To choose between the various 
	paste types, use the Paste...
	menu option (with dots) on the Edit menu.
      </para>

    </sect1>

    <sect1 id="nv-adjustments">
      <title>Adjusting Notation</title>


      <sect2 id="nv-adjustments-note-rest-durations">
	<title>Adjusting note and rest durations</title>
	
	<sect3 id="nv-normalize-rests">
	  <title>Normalizing rests</title>

	  <para>Sometimes as a result of editing or quantization
	  operations, a piece of notation can end up with incorrect
	  rest durations for the current time signature.  You can use
	  the <menuchoice><guimenu>Adjust</guimenu><guimenuitem>Rests</guimenuitem><guimenuitem>Normalize Rests</guimenuitem></menuchoice> function to
	  fix these.  This examines each sequence of
	  consecutive rests found in the selection, and adjusts,
	  splits and merges rests as necessary to ensure that the
	  rests have theoretically correct durations and fall on the
	  correct boundaries.
	  </para>
	  
	  <para>For example, a 4/4 bar containing a crotchet
	    (quarter-note), then a minim (half-note) rest and a
	    crotchet rest will be rearranged to place the crotchet
	    rest first, as the minim rest should not cross the
	    central beat boundary of the bar.
	  </para>
	</sect3>

	<sect3 id="nv-make-viable">
	  <title>Splitting very long notes</title> <para>The
	  <menuchoice> <guimenu>Adjust</guimenu>
	  <guimenuitem>Notes</guimenuitem> <guimenuitem>Tie Notes at
	  Barlines</guimenuitem> </menuchoice> is intended to deal
	  with notes that have excessively long durations, and
	  therefore overflow barlines or are too long to be
	  displayed as a single note.  It takes any such notes and
	  splits them into shorter, tied notes.
	  </para>
	</sect3>

	<sect3 id="nv-de-counterpoint">
	  <title>Splitting overlapping notes</title>
	  <para>The 
<menuchoice> <guimenu>Adjust</guimenu>
	  <guimenuitem>Notes</guimenuitem> <guimenuitem>Split-and-Tie Overlapping Chords</guimenuitem> </menuchoice> function can be used to turn "counterpoint" notes into a series of split-and-tied notes and chords.</para>

	  <para>It can be applied to a selection that contains
	  overlapping notes.  It will split overlapping notes at the
	  point where they overlap, and tie together the resulting
	  split notes, ensuring that the music takes the form of a
	  series of chords and/or single notes starting and ending in
	  neat blocks, with some notes possibly tied.
	  </para>
	</sect3>

	<sect3 id="nv-rescale">
	  <title>Rescaling note durations</title>
	  <para>The 
	  <menuchoice> <guimenu>Adjust</guimenu>
	  <guimenuitem>Rescale</guimenuitem> <guimenuitem>Halve
	  Durations</guimenuitem> </menuchoice> and
	  <menuchoice> <guimenu>Adjust</guimenu>
	  <guimenuitem>Rescale</guimenuitem> <guimenuitem>Double
	  Durations</guimenuitem> </menuchoice> functions can be
	  used to perform the most simple rescaling functions.
	  </para>

	  <para>For more elaborate rescalings, use the
	  <menuchoice> <guimenu>Adjust</guimenu>
	  <guimenuitem>Rescale</guimenuitem> <guimenuitem>Stretch
	  or Squash...</guimenuitem> </menuchoice> function with
	  which you scale the total lenth of the selection.
	  </para>
	</sect3>

<!-- need a proper section for this and diatonic transpose
	    <varlistentry id="nv-transpose">
	    <title>Transpose</title>
		<para><action>Alters the pitch of the selected
		    notes.</action> This submenu contains basic
		  transposition functions which move the selected notes
		  up or down a semitone or a whole octave in pitch, as
		  well as a general transpose function that allows you
		  to choose how far up or down you want to transpose the
		  selection.
		</para>

		<para>These functions simply change the stored pitches
		of the notes in the selection, so that they both play
		and appear at the new pitches.  They do not deal with
		performance transposition (displaying one pitch and
		playing another), for which see the main window's
		segment parameter box; nor do they help you with
		transposing from one key into another, for which see
		<link linkend="nv-signatures-key">Key
		Signatures</link>.
		</para>
	    </varlistentry>
-->
      </sect2>

      <sect2>
	  <title id="nv-microposition">Repositioning notation elements</title>
	  <para>
	      You may occasionally wish to to nudge the positioning of some
	      element of notation that Rosegarden's layout algorithm has not
	      placed in an optimal location.  Use Ctrl-click and drag to move slurs, hairpins,
	      text events, and several other sorts of events.  You may not reposition notes in
	      this fashion.
	  </para>
      </sect2>



    </sect1>

    <sect1 id="nv-interpret">
      <title>Interpreting Performance Cues in Notation</title>
      <!-- !!! -->
      <para>
	  You can use the Interpret function<menuchoice>
	      <guimenu>Adjust</guimenu><guimenuitem>Interpret...</guimenuitem>
	  </menuchoice>
	  to modify the velocities and timings of notes according to any
	  written or indicated dynamics found. The selection of
	  interpretations available is as follows:
	
	<variablelist>
	  <varlistentry>
	    <term>Apply text dynamics (p, mf, ff etc)
	    </term>
	    <listitem><para> Sets a velocity to each note
		based on the last piece of text of "Dynamic"
		type seen on the same staff (only texts of the
		form pp, p, mp, mf, f, ff, fff, etc., are matched; these are
		the texts that are available by default when entering text events
		of this style).
	      </para></listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>Apply hairpin dynamics
	    </term>
	    <listitem><para> Makes the notes gradually
		increase or decrease in velocity during a
		crescendo or decrescendo hairpin.
	      </para></listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>
	      Stress beats
	    </term>
	    <listitem><para> Makes notes that land on bar or
		beat boundaries slightly louder (greater
		velocity) than the surrounding notes.
	      </para></listitem>
	  </varlistentry>
	  
	  <varlistentry>
	    <term>
	      Articulate slurs, staccato, tenuto etc
	    </term>
	    <listitem><para> Shortens unslurred notes,
		shortens staccato notes more, and gives notes
		inside slurs and tenuto notes their full length.
	      </para></listitem>
	  </varlistentry>
	</variablelist>
	
      </para>
      
    </sect1>

    <!-- Quantization, smoothing, and display of quantized notes -->

    <sect1 id="nv-quantization">
      <title>Notation from performance data</title>

      <para>
	&rosegarden; is a multi-purpose program: it is a notation
	editor, but it is primarily a sequencer and editor for
	performed music.  And in performance, of course, the times
	and durations of notes are rarely as precise as they are on
	a printed score.
      </para>

      <para>
	This means that it's often desirable for &rosegarden; to do
	a lot of tidying of the basic note times and durations when
	attempting to make meaningful notes to show in the notation
	editor.  This is a kind of quantization, but a kind that
	requires a surprising amount of guesswork to do well.
	&rosegarden; includes a quantizer designed to do a slightly
	better job of this than the plain grid quantizer.
      </para>

      <para>Applying
	quantization strictly for notation is rather unimaginatively
	referred to as <quote>notation quantization</quote>: it only
	applies to the notes you see and edit in notation, and
	doesn't affect the notes that play, or that you edit in
	other views such as the matrix.  This quantization is
	automatically applied to music imported or recorded from
	MIDI, although not all of its possible capabilities are
	enabled by default.
      </para>

      <para>
	There are two ways to see which notes have been quantized
	for notation.  By default, each notation view contains a <link
	    linkend="nv-raw-note-ruler">raw
	    note ruler</link> (in the group of rulers above the score) showing
	a rectangular block for each note.  This block is positioned
	so as to represent the time and duration of the note as
	performed, but with the top and bottom edges of the
	rectangle extended or shortened to represent the time after
	notation quantization.  If this is too much information for
	you, you can alternatively choose (in the configuration
	dialog) to show in a green colour all note heads in the
	score that have had their timings altered by notation
	quantization.
      </para>

      <para>

	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-notationquantizer.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s notation quantize dialog</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
	</para><para>
	If the quantization &rosegarden; has used is not suitable,
	either for the entire score or for a selection of notes, you
	can choose to use a different level of quantization or none
	at all.  To apply a different quantization to some notes,
	select the notes and use the Quantize...
	menu function (tick the box labelled <quote>Quantize for
	  notation only</quote>).  The quantization level or type used
	by default can be changed in the configuration dialog.
      </para>

      <sect2 id="nv-quantization-parameters">
	<title>Configurable parameters for the heuristic notation quantizer</title>

	<sect3 id="nv-quantization-parameters-during">
	  <title>Parameters for quantization itself</title>
	  
	  <variablelist>

	    <varlistentry>
	      <term>Complexity</term>
	      <listitem>
		<para>The "complexity" of a notation quantizer is its
		  most fundamental parameter.  A "complex" quantizer
		  will be more prepared to accept that complex-looking
		  music is in fact intended to be complex, whereas a
		  "simple" quantizer is more likely to assume that
		  complex-looking music results from an imprecise
		  performance of simple music.
		</para>
		<para>The default setting is intended to produce
		  reasonable results for a fairly wide range of music.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>Base grid unit</term>
	      <listitem>
		<para>The base grid unit (set to a note duration
		  value) specifies the absolute minimum unit of note
		  that will be permitted to remain in the score after
		  quantization.  For example, if set to a semiquaver,
		  all notes will be placed on boundaries of a multiple
		  of a semiquaver, with durations also a multiple of a
		  semiquaver.
		</para>
		<para>The setting of the base grid unit is not quite
		  as significant for a notation quantizer as it is for a
		  plain grid quantizer, because all it does is impose an
		  absolute limit on the level of precision permitted by
		  the complexity parameter.  Mostly, when you find a
		  case in which increasing the grid unit produces better
		  results, you've actually found a case in which the
		  quantizer simply didn't do as good a job as it should
		  have been able to with the smaller unit.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>Tuplet level</term>
	      <listitem>
		<para>The notation quantizer is capable of identifying
		  tuplets (triplets and other time-squashed groups),
		  within reasonable limits.  This parameter controls how
		  ambitious it will attempt to be when looking for
		  tuplets, by setting a limit on how many notes per
		  tuplet group it will attempt to identify.  If it is
		  set to <quote>None</quote>, the quantizer will not
		  attempt to identify tuplets at all.
		</para>
	      </listitem>
	    </varlistentry>

	  </variablelist>

	</sect3>

	<sect3 id="nv-quantization-parameters-after">
	  <title>Parameters that control tidying up after quantization</title>

	  <variablelist>

	    <varlistentry>
	      <term>Re-beam</term>
	      <listitem>
		<para>
		  Causes the notes to be re-beamed into groups
		  appropriately after quantization.  This is usually
		  desirable.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>Add articulations (staccato, tenuto,
		slurs)</term>
	      <listitem>
		<para>
		  Causes the quantizer to attempt to identify, based
		  on the durations of individual and consecutive
		  notes, which notes should be notated with staccato
		  marks (for notes that fall significantly short of
		  the following note, but not apparently short
		  enough to merit a rest), tenuto (for notes that
		  almost or just overlap the following note) and
		  slurs (for series of notes that meet or overlap).
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>Tie notes at barlines etc</term>
	      <listitem>
		<para>Causes any notes that are still found after
		  quantization to overlap barlines or to have
		  durations not exactly expressible with single note
		  heads to be split into multiple notes appropriately,
		  and tied.  This has the same effect as applying the
		  <!-- !!! link --> "Tie Notes at Barlines" function
		  in the notation view.
		</para>
		<para>
		  This parameter is not set by default because it
		  changes the number of note events, which is
		  undesirable when using &rosegarden; partly or
		  principally as a MIDI sequencer.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>Split-and-tie overlapping chords</term>
	      <listitem>
		<para>
		  Causes overlapping notes to be split and tied, so
		  as to make strict chords with individual noteheads
		  tied as necessary.  This has the same effect as
		  applying the <!-- !!! link --> "Split-and-Tie
		  Overlapping Chords" function in the notation view.
		</para>
		<para>
		  This parameter is not set by default partly because
		  it changes the number of note events, which is
		  undesirable when using &rosegarden; partly or
		  principally as a MIDI sequencer.
		</para>
	      </listitem>
	    </varlistentry>
	  </variablelist>
	</sect3>
      </sect2>
    </sect1>

    <sect1 id="nv-ornaments">

      <title>Playing ornaments</title>

      <para>Rosegarden supports playback of ornaments using its <link
      linkend="triggered-segments">triggered segments</link>
      mechanism.  You can create triggered segments containing any of
      the various types of trill or ornament you might want, and
      associate them with the notes that want to play them.</para>
 
      <para>To create a new type of ornament, first write out the
      notes "in longhand" that you want the ornament to play, and then
      select the notes and use <menuchoice>
      <guimenu>Note</guimenu><guimenuitem>Ornaments</guimenuitem><guimenuitem>Make
      Ornament...</guimenuitem></menuchoice>.  This cuts the notes to
      the clipboard, pastes them into a new triggered segment, and
      replaces them with a single note of the same duration that
      triggers this segment.</para>
 
      <para>To make a note play an existing ornament, select it and
      use <menuchoice>
      <guimenu>Note</guimenu><guimenuitem>Ornaments</guimenuitem><guimenuitem>Trigger
      Ornament...</guimenuitem></menuchoice>.</para>

      <para>
	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-useornament.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s Trigger Ornament dialog</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>

      <para>To edit the notes played in a triggered ornament, you can
      double-click on the note that triggers it.  This will
      change all uses of that ornament, not just the one that you
      double-clicked on.</para>

      <para>Note that while Rosegarden can shift triggered segments up
      and down in pitch to match their triggering notes, it is not
      clever enough to perform transposition into a different
      key or scale position.</para>

      <para>See <link linkend="triggered-segments">triggered
      segments</link> for more details about ornaments and other uses
      of triggered segments.</para>
    </sect1>

    <sect1 id="nv-note-styles">
      <title>Note styles</title>

      <para>
	&rosegarden; also allows you to change various aspects of the
	way the various types of notes are drawn, such as the choice
	of note heads, the number of tails, whether notes are filled
	or unfilled and so on.
      </para>

      <para>
	A set of standard styles (Classical, Cross, Triangle and
	Mensural) is provided, and you can change the style used for
	individual notes by selecting them and then using the Note
	Style menu options.  Each note remembers which
	style has been chosen for it, and this information is saved
	as part of the composition.  You can also change the default
	style for new notes using the 
	<guimenuitem>Configure Rosegarden...</guimenuitem> option in the 
	<guimenu>Settings</guimenu> menu.
      </para>

      <para>
	It is also possible to create your own note styles by
	describing them in <acronym>XML</acronym> files.  (Even the
	standard styles are defined this way: the only reason the
	editor knows that a Classical semiquaver has a tilted oval
	filled head, a stem, two flags, etc., is that the description
	in Classical.xml says so.)  See <link
	linkend="developers-note-styles">Customising Rosegarden</link>
	for more information.
      </para>
    </sect1>

    <sect1 id="nv-note-fonts">
      <title>Note fonts</title>
      <para>
	&rosegarden; is supplied with a single scalable notation
	font, the Feta font developed by the LilyPond project.  Feta
	is an extremely high quality font that should be suitable
	for nearly all classical work.
      </para>

      <para>&rosegarden; also includes support as standard for a
	number of other notation fonts.  You will need to provide the
	fonts themselves in TrueType (.ttf) or PostScript Type-1
	(.pfb, .pfa) format, and you will need the relevant
	permissions to install them to the same place as &rosegarden;
	was installed.  To install a supported notation font, locate
	the share directory for the &rosegarden; installation (usually
	a subdirectory of the KDE desktop installation tree, such as
	/opt/kde/share/apps/rosegarden).  You will find that this
	directory has a subdirectory called "fonts": copy the font
	files into there, and restart &rosegarden;.  If your font is
	supported, it should now appear on the font menu in the
	notation editor.</para>

      <para>Complete or partial support is currently provided for
	the following fonts: Fughetta, by Blake Hodgetts; Petrucci,
	the "original" Finale font; Maestro, the "new" Finale font;
	Opus, the Sibelius font; Inkpen, the Sibelius jazz font;
	Sonata from Adobe; Steinberg, from the Cubase sequencer; and
	Xinfonia.  (Most of the above font names are registered
	trademarks of the respective companies.)  THE ROSEGARDEN TEAM
	MAKES NO REPRESENTATION AS TO THE LEGAL STATUS OF ANY USE OF
	THESE FONTS WITH ROSEGARDEN.  It is your responsibility to
	ensure you are in compliance with the licence (if any) under
	which a font was provided to you, before attempting to use it.
	If you are not sure whether you have the right to use a font,
	don't: apart from anything else, the standard Feta font is
	better than most of these anyway.</para>

      <para>It is also possible to provide new mapping files so as
	to use new fonts.  For some fonts that have similar mappings
	or metrics to fonts in the above list, this may be as simple
	as editing the name of the font in the mapping file.  See
	<link linkend="developers-note-fonts">Customising Rosegarden</link>
	for more information.

      </para>
  </sect1>
  </chapter>

  <chapter id="event-view">
    <title>The Event List editor</title>
    <sect1 id="ev-introduction">
      <title>Introduction</title>

      <para>

	The &rosegarden; Event List editor shows the events in a
	single segment in a raw form, and enables you to edit the
	precise properties of those events individually.

	<screenshot>
	  <mediaobject>
	    <imageobject>
	      <imagedata fileref="rg-eventlisteditor.png" format="PNG"/>
      </imageobject>
	<textobject>
	  <phrase>&rosegarden;'s event list editor</phrase>
	</textobject>
      </mediaobject>
      </screenshot>
      </para>
    </sect1>
  </chapter>




  <!--
  **********************************
  
  PART III:
  Technical material

  **********************************
  -->

  <chapter id="developers">
    <title>Customising Rosegarden</title>

    <sect1 id="developers-note-fonts">
      <title>Configuring custom notation fonts</title>

      <para>If you have a notation font installed on your system in a
	scalable format (TrueType or Type-1) but it is not currently
	supported by Rosegarden, you can create your own mapping XML
	file to describe the font's character map and metrics in a way
	Rosegarden can use.  These files are installed in the
	fonts/mappings subdirectory of the Rosegarden installation
	directory, and a number of samples are included with the
	distribution.</para>

      <para>You can also use these mapping files to define new
	pixmap-based fonts, in which every shape in a particular size is
	loaded from a separate pixmap file.  The two standard notation
	fonts supplied with Rosegarden are pixmap fonts defined in
	exactly this way.
      </para>

      <para>It is even possible to define a notation font as using one
	or more scalable system fonts, augmented with pixmaps for
	particular sizes or for characters not found in the scalable
	fonts.  This is because most of the mapping file format is the
	same for scalable and pixmap fonts, and where there are
	different elements for the different sorts of fonts, it is
	usually possible to include both of them.  Rosegarden will
	usually use pixmaps where available and scalable fonts
	otherwise.
      </para>

      <para>You may also wish to edit the mapping files supplied with
	Rosegarden if you find their measurements for alignment or
	sizing are not to your liking.  (If you believe that any of the
	supplied files are actually wrong, please let us know.)
      </para>

      <sect2 id="developers-note-fonts-codes-glyphs">
        <title>Codes and Glyphs</title>

        <para></para>
      </sect2>

      <sect2 id="developers-note-fonts-mapping-format">
	<title>Notation font mapping XML format</title>

	<para>Here is a summary of the XML elements that may be used
	  in the font mapping file.</para>

	<sect3 id="developers-note-fonts-mapping-format-font-encoding">
	  <title>rosegarden-font-encoding</title>

	  <para>This element must exist in every mapping file, and
	    should contain all the other elements.  The only attribute
	    is "name", which contains the font's name as shown in the
	    font selection dropdown.  Although the file format will
	    permit any name to be used here, Rosegarden will only pick
	    up the font corectly if the XML file has the same name as
	    the contents of this attribute (except that the XML file
	    should be named in lower-case and should end in ".xml").
	  </para>
	</sect3>

	<sect3 id="developers-note-fonts-mapping-format-font-information">
	  <title>font-information</title>

	  <para>This should normally be the first child element of
	    "rosegarden-font-encoding".  It may have any of the
	    following attributes, all of which are optional:

	    <variablelist>
	      <varlistentry>
		<term>origin</term>
		<listitem>
		  <para>A textual description of the likely origin of
		    the mapped font (not the origin of the mapping
		    file).</para>
		</listitem>
	      </varlistentry>

	      <varlistentry>
		<term>copyright</term>
		<listitem>
		  <para>A textual description of the likely copyright
		    status of the mapped font (not the copyright status
		    of the mapping file).  Note that because the mapping
		    file contains information such as origin and
		    copyright of the font itself, it is usually
		    advisable to make separate mapping files for
		    separate fonts where practical, even if the fonts
		    share other mapping data.</para>
		</listitem>
	      </varlistentry>

	      <varlistentry>
		<term>mapped-by</term>
		<listitem>
		  <para>The name of the creator of the mapping file
		    (i.e. you, presumably).</para>
		</listitem>
	      </varlistentry>

	      <varlistentry>
		<term>type</term>
		<listitem>
		  <para>The type of the font.  This attribute should
		    contain one of the values "pixmap" or "scalable".
		    Fonts that are loaded into the windowing system and
		    are available to Rosegarden as standard system fonts
		    have type "scalable"; fonts that need to be loaded
		    from pixmap files corresponding to individual sizes
		    of pixmap (such as the feta and rg21 fonts included
		    with Rosegarden) have type "pixmap".</para>

		  <para>This information is only intended for the user
		    reference; it isn't actually used by Rosegarden.  It is
		    legitimate in practice for a font to be a mixture of the
		    two, but in general we will assume in this documentation
		    that a font is either scalable or pixmap.</para>
		</listitem>
	      </varlistentry>

	      <varlistentry>
		<term>smooth</term>
		<listitem>
		  <para>A boolean attribute indicating whether the
		    font is antialiased (smooth) or not.  Should have
		    the value "true" or "false".  If the font is smooth,
		    other display elements such as beams and slurs that
		    are not generated from the font will also be
		    antialiased.</para>
		</listitem>
	      </varlistentry>

	      <varlistentry>
		<term>autocrop</term>
		<listitem>
		  <para>Only relevant for scalable (system) fonts.
		    Rosegarden usually expects the metrics for a font to
		    contain the vertically smallest bounding boxes for
		    elements such as note heads and accents, rather than
		    including empty space above or below these elements
		    for alignment purposes.  Most fonts do not do what
		    Rosegarden expects.  Therefore for these fonts you
		    should set the autocrop attribute to "true"; then
		    Rosegarden will crop any unnecessary space from the
		    top and bottom of these elements when rendering
		    them.</para>
		</listitem>
	      </varlistentry>

	    </variablelist>

	  </para>
	</sect3>

	<sect3 id="developers-note-fonts-mapping-format-font-requirements">
	  <title>font-requirements</title>
	  <para>
	    This element is only relevant for scalable fonts.  It is
	    used to specify that this font should only be offered if
	    certain system fonts are available, as well as to
	    associate IDs with those system fonts to refer to in the
	    <link
	      linkend="developers-note-fonts-mapping-format-font-symbol-map">font-symbol-map</link>
	    element.  This scheme is used to decide which notation
	    fonts should be offered to the user, and also allows you
	    to compose a Rosegarden notation font from more than one
	    system font if desired.
	  </para>
	  <para>The "font-requirements" element should contain a list
	    of "font-requirement" child elements.  Each of these has two
	    attributes: "font-id", containing a numerical ID of your
	    choice for reference elsewhere in the file, and either a
	    "name" or a "names" attribute.  If "name" is provided, it
	    will be used as the name of a single system font to be
	    associated with the font id; if "names" is provided, it will
	    be treated as a comma-separated list of system fonts and the
	    first one found will be associated with the font id.
	  </para>
	</sect3>

	<sect3 id="developers-note-fonts-mapping-format-font-sizes">
	  <title>font-sizes</title>

	  <para>The "font-sizes" element specifies which notation font
	    sizes are available, and how the nominal font size relates
	    to the dimensions of non-font elements such as stems, staff
	    lines and beams.  The "size" of a notation font is assumed
	    to be the distance in pixels between staff lines, or more
	    precisely, the height of a conventional note head that
	    completely fills the space between lines: the size therefore
	    does not include the thickness of either of the neighbouring
	    staff lines.
	  </para>

	  <para>
	    <!-- !!! TODO throughout this section: how to mark up XML element/attribute names? equiv of <code> in HTML would do -->
	    There are two possible child elements of "font-sizes":
	    "font-scale" and "font-size".  Their use depends on the
	    type of font being described.</para>

	  <para>
	    For pixmap (non-scalable) fonts, the "font-sizes" element
	    should contain a list of "font-size" elements, one for
	    each size of pixmaps available.  The pixmaps themselves
	    must be installed in the
	    fonts/&lt;font-name&gt;/&lt;font-size&gt; subdirectory of
	    the Rosegarden installation directory, where
	    &lt;font-name&gt; is the name of the font (as specified in
	    the "rosegarden-font-encoding" element at the start of the
	    mapping file), or a lower-case version of the name, and
	    &lt;font-size&gt; is the pixel size of the font.  A font
	    size will only be made available to the user if it has an
	    entry in the "font-sizes" list and the pixmap directory is
	    found.
	  </para>
	  
	  <para>
	    For scalable fonts, the "font-sizes" element should
	    contain one "font-scale" element that defines the
	    relationships between font and non-font elements in a
	    general way, and also defines the relationship between
	    Rosegarden's nominal font size and the size of the
	    corresponding system font.  If this "font-scale" element
	    is found, then Rosegarden will assume the font is
	    available in any size.  You can however still include one
	    or more "font-size" elements to define precise proportions
	    for any particular size for which the general proportions
	    do not quite work correctly, for example because of
	    rounding error.
	  </para>

	  <para>
	    The attributes of "font-scale" and "font-size" are very
	    similar.  The main difference is that all attributes of
	    "font-scale" are floating-point values relative to the
	    font size, where 1.0 is the base font size (i.e. the
	    distance between staff lines), whereas attributes of
	    "font-size" are integer pixel values.  The attributes
	    available are as follows.  (Those marked "optional" have
	    vaguely sensible defaults, so it's a good idea to try not
	    setting them first.)
	  </para>
	  
	  <variablelist>

	    <varlistentry>
	      <term>note-height</term>
	      <listitem>
		<para>This attribute is only available for the
		  "font-size" element, and it is mandatory in that
		  element.  It defines the base size of font to which the
		  other attributes in this element apply, and a size that
		  will be offered to the user and used when looking up
		  pixmaps for this font.</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>font-height</term>
	      <listitem>
		<para>May be used in either "font-size" or "font-scale".
		  This is only relevant for scalable fonts, but is
		  mandatory for them if used in the "font-scale" element.
		  This defines the size of the system font used to draw a
		  given size of notation font.</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>beam-thickness</term>
	      <listitem>
		<para>Optional.  Defines the thickness of a beam.</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>staff-line-thickness</term>
	      <listitem>
		<para>Optional.  Defines the thickness of a staff line.</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>stem-thickness</term>
	      <listitem>
		<para>Optional.  Defines the thickness of a note stem.</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>flag-spacing</term>
	      <listitem>
		<para>Optional.  Defines the gap between note flags in
		  cases where multiple flags are drawn by drawing a single
		  flag several times.</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>border-x</term>
	      <listitem>
		<para>Optional.  Specifies that the note head pixmaps
		  have a fixed area to left and right that should not be
		  considered part of the note head.  This attribute gives
		  the thickness of that area.</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>border-y</term>
	      <listitem>
		<para>Optional.  Specifies that the note head pixmaps
		  have a fixed area to top and bottom that should not be
		  considered part of the note head.  This attribute gives
		  the thickness of that area.</para>
	      </listitem>
	    </varlistentry>

	  </variablelist>
	</sect3>

	<sect3 id="developers-note-fonts-mapping-format-font-symbol-map">
	  <title>font-symbol-map</title>
	  <para>
	    This element lists the symbols available in this notation
	    font, and which pixmap files or system font code points
	    they should be drawn from.</para>

	  <para>It should contain a list of "symbol" elements.  These
	    have several possible attributes, the choice of which will
	    normally depend on whether the font is based on pixmaps or
	    system fonts:
	  </para>

	  <variablelist>
	    <varlistentry>
	      <term>name</term>
	      <listitem>
		<para>Mandatory.  This attribute should contain the
		  name of the notation symbol.  If the symbol exists in
		  the <ulink
		    url="http://www.unicode.org/charts/PDF/U1D100.pdf">Unicode
		    3.2 standard</ulink>, the name should be that used to
		  identify the symbol in the standard.</para>

		<para>Most of the symbols Rosegarden expects to find
		  are in the standard; one exception is that many fonts
		  have a special version of the flag symbol that is
		  intended to be used when composing multiple flags from
		  individual single flags.  Rosegarden refers to this as
		  "MUSICAL SYMBOL COMBINING FLAG-0", a name not used in
		  the Unicode standard (which has flags 1-5 only).</para>

		<para>For a definitive set of the symbol names
		  Rosegarden knows about, see the file
		  "gui/notecharname.cpp" in the Rosegarden source
		  distribution.  Note however that it is possible to use
		  additional symbol names by introducing them in a <link
		    linkend="developers-note-styles">notation
		    style</link>.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>src</term>
	      <listitem>
		<para>The name of the pixmap file from which this
		  symbol should be loaded, without a directory or
		  extension.  This is the usual way of describing a
		  symbol in a pixmap font.  The file itself should be
		  installed to
		  fonts/&lt;font-name&gt;/&lt;font-size&gt;/&lt;src&gt;.xpm
		  under the Rosegarden installation directory.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>inversion-src</term>
	      <listitem>
		<para>The name of a pixmap file from which an inverted
		  version of this symbol may be loaded, without a
		  directory or extension.  If this attribute is absent
		  and an inverted version of the symbol is required, it
		  will be generated simply by loading the normal version
		  and reflecting it in a central x-axis.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>code</term>
	      <listitem>
		<para>The code point at which this symbol may be found
		  in the relevant system font, as a decimal integer.
		  This is a way of describing a symbol in a scalable
		  font.  This attribute will only be referred to if no
		  pixmap file is supplied, or if the pixmap file fails
		  to load.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>inversion-code</term>
	      <listitem>
		<para>The code point at which an inverted version of
		  this symbol may be found in the relevant system font.
		  If this attribute is absent and an inverted version of
		  the symbol is required, it will be generated simply by
		  loading the normal version and reflecting it in a
		  central x-axis.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>glyph</term>
	      <listitem>
		<para>The raw glyph index at which this symbol may be found
		  in the relevant system font, as a decimal integer.
		  This is a way of describing a symbol in a scalable
		  font.  This attribute will only be referred to if no
		  pixmap file is supplied, or if the pixmap file fails
		  to load.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>inversion-glyph</term>
	      <listitem>
		<para>The raw glyph index at which an inverted version of
		  this symbol may be found in the relevant system font.
		  If this attribute is absent and an inverted version of
		  the symbol is required, it will be generated simply by
		  loading the normal version and reflecting it in a
		  central x-axis.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>font-id</term>
	      <listitem>
		<para>The id of the system font from which this symbol
		  should be loaded, as defined in the <link
		    linkend="developers-note-fonts-mapping-format-font-requirements">font-requirements</link>
		  element.  The default is 0.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>codebase</term>
	      <listitem>
		<para>This (decimal integer) attribute may be of use
		  if many of the symbols in a scalable font cover a
		  short range of code points starting at a relatively
		  high code page.  If supplied, the codebase value will
		  be added to each of the subsequent code and
		  inversion-code values when looking up a symbol.
		</para>
	      </listitem>
	    </varlistentry>

	  </variablelist>

	  <para>
	    Although none of these attributes is mandatory except for
	    the name, a symbol obviously needs to supply at least one
	    of "src", "inversion-src", "code", "inversion-code",
	    "glyph", or "inversion-glyph" to stand any chance of being
	    rendered at all.  It is of course perfectly legitimate to
	    supply several or all of these attributes.
	  </para>

	</sect3>

	<sect3 id="developers-note-fonts-mapping-format-font-hotspots">
	  <title>font-hotspots</title>
	  <para>&nbsp;
	  </para>
	</sect3>

      </sect2>
      
    </sect1>
    
    <sect1 id="developers-note-styles">
      <title>Creating new notation styles</title>

      <para>
	Rosegarden's notation editor has the ability to display and
	edit notes in various standard styles: classical, diamond
	heads and so on.  These styles are all defined in XML style
	definition files installed along with the application, and
	it's possible to create a new one by writing a simple XML
	file.  Rosegarden simply looks at the set of installed files
	to determine which styles to offer the user.  You can refer to
	the default set of files in the styles subdirectory of the
	Rosegarden installation directory for examples.
      </para>

      <para>
	The file format is not yet especially comprehensive; at the
	moment it has been designed to be powerful enough to describe
	the standard styles that come with Rosegarden, but not much
	more.  If you should try to create new styles this way, we'd
	be very interested in your feedback on the Rosegarden
	mailing-lists.
      </para>
      
      <sect2 id="developers-note-styles-format">
	<title>Notation style XML format</title>

	<para>
	  Here is a summary of the XML elements that may be used in
	  a style definition file.
	</para>

	<sect3 id="developers-note-styles-note-style">
	  <title>rosegarden-note-style</title>

	  <para>This element must exist in every style file, and
	    should contain all the other elements.  It has one optional
	    attribute, "base-style", which may be used to name a style
	    from which this style takes the default values for any
	    parameters not specified elsewhere in the present file.
	    It's often good practice to define a style in terms of the
	    minimal difference from a given base style: see the supplied
	    Cross.xml for a particularly simple example.
	  </para>

	  <para>Note that the "rosegarden-note-style" element does not
	    give the name of the style being defined, which is instead
	    currently drawn from the name of the file.  At some point in
	    the future we may add internationalizable style name
	    attributes to this element.</para>
	</sect3>

	<sect3 id="developers-note-styles-global-note">
	  <title>global, note</title>
	  
	  <para>Within the "rosegarden-note-style" element, there may
	    be one "global" element and any number of "note" elements.
	    We describe these together, as they have almost identical
	    sets of attributes.  The "global" element simply provides
	    default values for those parameters not specified for a
	    particular note type in any following "note" element.
	  </para>

	  <para>The attributes for these elements are as follows.  All
	    of these are optional except as described:</para>

	  <variablelist>

	    <varlistentry>
	      <term>type</term>
	      <listitem>
		<para>Only relevant to the "note" element, and
		  mandatory for that element.  This attribute specifies
		  which sort of note is being styled.  Legal values are
		  textual American or British note names (from "64th",
		  "sixth-fourth note", "hemidemisemiquaver" etc to
		  "double whole note").
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>shape</term>
	      <listitem>
		<para>Defines a note head shape for this style.  Any
		  string is a legal value, but the only values
		  implemented so far are "angled oval", "level oval",
		  "breve", "cross", "triangle up", "triangle down",
		  "diamond" and "rectangle".  The value "number" is also
		  recognised but not yet implemented.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>charname</term>
	      <listitem>
		<para>Defines a note font character name to be used as
		  the note head for this style.  An element may supply a
		  "shape" or "charname" attribute, but not both.  The
		  name should be one of those defined in the current
		  notation font's <link
		    linkend="developers-note-fonts-mapping-format-font-symbol-map">symbol
		    map</link> (in a "name" attribute).
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>filled</term>
	      <listitem>
		<para>Specifies whether this note should have a filled
		  head (where applicable, i.e. where the shape attribute
		  supplies a shape that is available both filled and
		  unfilled).  Must be "true" or "false".
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>stem</term>
	      <listitem>
		<para>Specifies whether this note should have a stem.
		  Must be "true" or "false".
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>flags</term>
	      <listitem>
		<para>Defines how many flags or beams this note should
		  have.  The valid range is 0 to 4.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>slashes</term>
	      <listitem>
		<para>Defines how many slashes this note should have
		  across its stem.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>hfixpoint</term>
	      <listitem>
		<para>Specifies in which x position the stem fixes to
		  the note head.  Acceptable values are "normal" (the
		  right side when the stem points up, the left when it
		  points down), "central", and "reversed" (left side
		  when the stem points up, right when it points down).
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term>vfixpoint</term>
	      <listitem>
		<para>Specifies in which y position the stem fixes to
		  the note head.  Acceptable values are "near" (the stem
		  fixes to the top when pointing up, the bottom when
		  pointing down), "middle", or "far".
		</para>
	      </listitem>
	    </varlistentry>

	  </variablelist>
	</sect3>
      </sect2>
    </sect1>
    

    <!-- (OPTIONAL) A Programming/Scripting reference chapter should be
    used for apps that use plugins or that provide their own scripting hooks
    and/or development libraries. -->

    <!-- cc: I think we should document the DCOP API here, but I don't
    think we should include extensive developer docs, although we should
    point to where they can be found in the source tree or online. -->
    <!--
    <para>
    Programming <application>Rosegarden</application> plugins is 
    a joy to behold. Just read through the next
    66 pages of <acronym>API</acronym>'s to learn how!
  </para>
    -->
    <!-- Use refentries to describe APIs.  Refentries are fairly
    complicated and you should consult the docbook reference for
    further details. The example below was taken from that reference
    and shortened a bit for readability. -->
    <!--
    <refentry id="re-1007-unmanagechildren-1">
    <refmeta>
    <refentrytitle>XtUnmanageChildren</refentrytitle>
    <refmiscinfo>Xt &ndash; Geometry Management</refmiscinfo>
  </refmeta>
    <refnamediv>
    <refname>XtUnmanageChildren
  </refname>
    <refpurpose>remove a list of children from a parent widget's managed list.
  </refpurpose>
  </refnamediv>
    <refsynopsisdiv>
    <refsynopsisdivinfo>
    <date>4 March 1996</date>
  </refsynopsisdivinfo>
    <synopsis>
    void XtUnmanageChildren(<replaceable>children</replaceable>, <replaceable>num_children</replaceable>)
    WidgetList <replaceable>children</replaceable>;
    Cardinal <replaceable>num_children</replaceable>;
  </synopsis>

    <refsect2 id="r2-1007-unmanagechildren-1">
    <title>Inputs</title>
    <variablelist>
    <varlistentry>
    <term><replaceable>children</replaceable>
  </term>
    <listitem>
    <para>
    Specifies an array of child widgets. Each child must be of
    class RectObj or any subclass thereof.
  </para>
  </listitem>
  </varlistentry>
    <varlistentry>
    <term><replaceable>num_children</replaceable>
  </term>
    <listitem>
    <para>Specifies the number of elements in <replaceable>children</replaceable>.
  </para>
  </listitem>
  </varlistentry>
  </variablelist>
  </refsect2></refsynopsisdiv>

    <refsect1 id="r1-1007-unmanagechildren-1">
    <title>Description
  </title>
    <para>
    <function>XtUnmanageChildren()</function> unmaps the specified widgets
    and removes them from their parent's geometry management.
    The widgets will disappear from the screen, and (depending
    on its parent) may no longer have screen space allocated for
    them.
  </para>
    <para>Each of the widgets in the <replaceable>children</replaceable> array must have
    the same parent.
  </para>
    <para>See the &ldquo;Algorithm&rdquo; section below for full details of the
    widget unmanagement procedure.
  </para>
  </refsect1>

    <refsect1 id="r1-1007-unmanagechildren-2">
    <title>Usage</title>
    <para>
    Unmanaging widgets is the usual method for temporarily
    making them invisible.  They can be re-managed with
    <function>XtManageChildren()</function>.
  </para>
    <para>
    You can unmap a widget, but leave it under geometry
    management by calling <function>XtUnmapWidget()</function>.  You can
    destroy a widget's window without destroying the widget by
    calling <function>XtUnrealizeWidget()</function>.  You can destroy a
    widget completely with <function>XtDestroyWidget()</function>.
  </para>
    <para>
    If you are only going to unmanage a single widget, it is
    more convenient to call <function>XtUnmanageChild()</function>.  It is
    often more convenient to call <function>XtUnmanageChild()</function>
    several times than it is to declare and initialize an array
    of widgets to pass to <function>XtUnmanageChildren()</function>.  Calling
    <function>XtUnmanageChildren()</function> is more efficient, however,
    because it only calls the parent's <function>change_managed()</function>
    method once.
  </para>
  </refsect1>

    <refsect1 id="r1-1007-unmanagechildren-3">
    <title>Algorithm
  </title>
    <para><function>XtUnmanageChildren()</function> performs the following:
  </para>
    <variablelist>
    <varlistentry>
    <term>-
  </term>
    <listitem>
    <para>Ignores the child if it already is unmanaged or is being
    destroyed.
  </para>
  </listitem>
  </varlistentry>
    <varlistentry>
    <term>-
  </term>
    <listitem>
    <para>Otherwise, if the child is realized, it makes it nonvisible
    by unmapping it.
  </para>
  </listitem>
  </varlistentry>
  </variablelist>
    <para>
  </para>
  </refsect1>

    <refsect1 id="r1-1007-unmanagechildren-4">
    <title>Structures</title>
    <para>
    The <type>WidgetList</type> type is simply an array of widgets:
  </para>
    <screen id="sc-1007-unmanagechildren-1">
    typedef Widget *WidgetList;
  </screen>
  </refsect1>
  </refentry>
    -->
  </chapter>


  <chapter id="credits">

    <title>Credits and License</title>

    <para>
      <application>Rosegarden</application>
    </para>
    <para>
      <itemizedlist>
	<listitem>
	  <para>

	    Rosegarden is Copyright 2000-2008 Guillaume Laurent,
	    Chris Cannam and Richard Bown.  The moral rights of
	    Guillaume Laurent, Chris Cannam and Richard Bown to be
	    identified as the authors of this work have been asserted.

	  </para>
	</listitem>

	<listitem>
	  <para>

	    Parts of Rosegarden are derived from X11 Rosegarden 2.1,
	    which is Copyright 1994 &ndash; 2001 Chris Cannam, Andrew Green,
	    Richard Bown and Guillaume Laurent.

	  </para>
	</listitem>

	<listitem>
	  <para>

	    For musical notation display Rosegarden uses pixmaps
	    derived from the Feta font, part of the <ulink
	      url="http://lilypond.org/">LilyPond</ulink> software,
	    which is Copyright 1997 &ndash; 2001 Jan Nieuwenhuizen and
	    Han-Wen Nienhuys.

	  </para>
	</listitem>

	<listitem>
	  <para>

	    Other major contributors include Randall Farmer, Ron
	    Kuris, Hans Kieserman, Michael McIntyre, and Pedro
            Lopez-Cabanillas.

	  </para>
	</listitem>

	<listitem>
	  <para>

  The Rosegarden splash-screen image is Copyright 2006 Carolyn H. McIntyre,
  used by permission.

	  </para>
	</listitem>

      </itemizedlist>
    </para>

    <para>
      Documentation copyright 2002-2006 Chris Cannam, Richard Bown, Guillaume Laurent
    </para>
    <!--
    <para>
    Translations done by:
    <itemizedlist>
    <listitem>
    <para>Babel D. Fish <email>babelfish@kde.org</email> (Sanskrit)</para>
  </listitem>
  </itemizedlist>
  </para>
    -->
    <!-- For URL links to common stuff like the one below,
    always use paths like "common/gpl-licence".
    In this path, "common" will be a symbolic link built at "make install" time.
    This link will normally point to $KDEDIR/share/doc/HTML/en/common,
    where "en" should be replaced with the current language. -->

    <para>
      This program is licensed under the terms of the
      <ulink url="common/gpl-license.html">GNU General Public License</ulink>.
    </para>
  </chapter>

    <!-- Note that the revhistory tags apply to the documentation
    version and not to the app version. That is why we use an
    ItemizedList instead for this list of revisions to the app. -->

    <chapter id="rosegarden-revhistory">
      <title>Rosegarden Revision History</title>
      <para>
        <itemizedlist>
          <listitem><para>
              1.7.0 &ndash; May 2008: notation track headers, nested brackets in
              LilyPond export, grace notes finally functional, quick playback
              position marker, ties can be flipped, variable-height tracks allow
              access to all previously overlapping segments, take track
              transpose into account while recording, convert existing segments
              when loading an instrument preset, etc., bug fixes galore
          </para></listitem>
	  <listitem><para>
	      1.6.0 &ndash; November 2007: fretboards, diatonic transpose, multiple lines of lyrics, marker ruler improvements, overlapping notes visibility, LilyPond export enhancements and new dialog, better infrared remote control support, better configuration dialog, fixes
	  </para></listitem>
	  <listitem><para>
	      1.5.1 &ndash; March 2007: bug fixes
	  </para></listitem>
	  <listitem><para>
	      1.5 &ndash; February 2007: audio timestretching and input format conversion, matrix usability improvements, tempo tapping, context help, some features, code reorganisation and new build system (again)
	  </para></listitem>
	  <listitem><para>
              1.4 &ndash; September 2006: LilyPond export vastly improved,
	      exportable LilyPond directives, cut/copy/paste by ranges that
	      include tempo and time data, tempo entry and manipulation vastly
	      improved, multi-track MIDI recording, MIDI recording filters,
	      track paramter box, create segments using preset parameters from
	      a database of over 300 real-world instruments, texts like
	      "Allegro" offered as a parallel alternative to typing, LilyPond
	      preview, assorted smaller features, many bug fixes
          </para></listitem>
	  <listitem><para>
	      1.2.4 &ndash; July 2006: bug fixes
	  </para></listitem>
	  <listitem><para>
	      1.2.3 &ndash; February 2006: new segment canvas, percussion matrix, multi-track audio recording, project packager, external MIDI controllers, MTC sync, proper ALSA MIDI ports, new icons, new build system
	  </para></listitem>
	  <listitem><para>
	      1.0 &ndash; February 2005: many fixes, DSSI effects, latency compensation
	  </para></listitem>
	  <listitem><para>
	      0.9.9 &ndash; July 2004: plugin synths, triggered segments, notation improvements
	  </para></listitem>
	  <listitem><para>
	      0.9.8 &ndash; May 2004: better audio subsystem
	  </para></listitem>
	  <listitem><para>
	      0.9.7 &ndash; February 2004: 
	  </para></listitem>
	  <listitem><para>
	      0.9.6 &ndash; December 2003: bug fixes
	  </para></listitem>
	  <listitem><para>
	      0.9.5 &ndash; November 2003: a great lot of stuff
	  </para></listitem>
	  <listitem><para>
	      0.9.1 &ndash; May 2003: step recording, Mup export, many many bug fixes
	  </para></listitem>
	  <listitem><para>
	      0.9 &ndash; April 2003: many notation improvements, improved bank editor, audio enhancements and refinements, translations
	  </para></listitem>
	  <listitem><para>
	      0.8.5 &ndash; December 2002: bank editor, MIDI filters, panic button
	  </para></listitem>
	  <listitem><para>
	      0.8 &ndash; October 2002: printing, LADSPA plugins, improved Matrix View
	  </para></listitem>
	  <listitem><para>
	      0.2.0 &ndash; August 2002: WAV file support, sweep selections, contrapuntal staves
	  </para></listitem>
	  <listitem><para>
	      0.1.6 &ndash; June 2002: configuration dialog, LilyPond support, quantize dialog
	  </para></listitem>
	  <listitem><para>
	      0.1.5 &ndash; May 2002: KDE 3, ALSA support, JACK audio support
	  </para></listitem>
	  <listitem><para>
	      0.1.4 &ndash; March 2002: more undo, segment editing, audio playback
	  </para></listitem>
	  <listitem><para>
	      0.1.3 &ndash; January 2002: piano-roll/matrix view, &MIDI; recording
	  </para></listitem>
	  <listitem><para>
	      0.1.2 &ndash; November 2001: notation undo, transport dialog, position pointer
	  </para></listitem>
	  <listitem><para>
	      0.1.1 &ndash; October 2001: scalable notation
	  </para></listitem>
	  <listitem><para>
	      0.1   &ndash; June 2001: first public release of Rosegarden-4
	  </para></listitem>
	</itemizedlist>
      </para>
    </chapter>

  &documentation.index; 
</book>