Commit | Line | Data |
---|---|---|
69695f33 MW |
1 | <HTML> |
2 | <HEAD><TITLE> | |
3 | Bracketing notes across staffs | |
4 | </TITLE></HEAD> | |
5 | <BODY> | |
6 | <P> | |
7 | <A HREF="manual.html"><-- previous page</A> | |
8 | ||
9 | <A HREF="index.html">Table of Contents</A> <A HREF="crossbar.html">next page --></A> | |
10 | </P> | |
11 | ||
12 | <H2> | |
13 | Bracketing notes across staffs | |
14 | </H2> | |
15 | <P> | |
16 | In keyboard music, sometimes a bracket is drawn to indicate that | |
17 | notes from two staffs are to be played | |
18 | with the same hand. The bracket is really just a vertical line with short | |
19 | horizontal lines at each end. But if you need to make lots of brackets, | |
20 | a macro with parameters can be very helpful. | |
21 | <BR><PRE> | |
22 | score | |
23 | staffs=2 | |
24 | ||
25 | staff 2 | |
26 | clef=bass | |
27 | vscheme=2f | |
28 | ||
29 | // Define a macro to draw a bracket to show that notes on two | |
30 | // different staffs are to be played with the same hand. | |
31 | // The parameters are location tags for the top and bottom notes | |
32 | // to be included in the bracket. | |
33 | define BRACK(TOP, BOT) | |
34 | // Draw a short horizontal line 0.5 stepsizes above the top note | |
35 | line (TOP.w - 2, TOP.n + 0.5) to (TOP.w - 1, TOP.n + 0.5) | |
36 | // Draw a vertical line from 0.5 stepsizes above the top note | |
37 | // to 0.5 stepsizes below the bottom note. | |
38 | // Do all the 'x' coordinates relative to the same note (in | |
39 | // this case the top), so that if the top and bottom chord happen | |
40 | // to be different widths, the line will still be vertical. | |
41 | line (TOP.w - 2, TOP.n + 0.5) to (TOP.w - 2, BOT.s - 0.5) | |
42 | // Draw short horizontal line just below and left of the bottom note. | |
43 | line (TOP.w - 2, BOT.s - 0.5) to (TOP.w - 1, BOT.s - 0.5) | |
44 | @ | |
45 | ||
46 | music | |
47 | ||
48 | // For each chord that is to get a bracket, add some padding to | |
49 | // make sure there is enough room, and set a location tag | |
50 | // on the top and bottom notes. | |
51 | 1: [pad 2] ce =a;[] df =b; [] d =c; [] ce =d; | |
52 | 2: [pad 2] g =e; [] a =f; [] af =g; [] g =h; | |
53 | 2 2: 2cc-; 4g-; cc-; | |
54 | // Now draw the brackets, using the tags as parameters | |
55 | BRACK (a, e) | |
56 | BRACK (b, f) | |
57 | BRACK (c, g) | |
58 | BRACK (d, h) | |
59 | bar | |
60 | </PRE><BR> | |
61 | <IMG SRC="mugex92.gif" ALT="Picture of Mup output"><BR> | |
62 | </P> | |
63 | <P> | |
64 | Note that Mup supports | |
65 | <A HREF="crossst.html">cross-staff stems, which is another way to notate a chord that is split</A> | |
66 | across two staffs, and may often be a better choice. | |
67 | </P> | |
68 | <HR><P> | |
69 | <A HREF="manual.html"><-- previous page</A> <A HREF="index.html">Table of Contents</A> <A HREF="crossbar.html">next page --></A> | |
70 | </P> | |
71 | </BODY></HTML> |