3 Bracketing notes across staffs
7 <A HREF=
"manual.html"><-- previous page
</A>
9 <A HREF=
"index.html">Table of Contents
</A> <A HREF=
"crossbar.html">next page --
></A>
13 Bracketing notes across staffs
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.
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)
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;
54 // Now draw the brackets, using the tags as parameters
61 <IMG SRC=
"mugex92.gif" ALT=
"Picture of Mup output"><BR>
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.
69 <A HREF=
"manual.html"><-- previous page
</A> <A HREF=
"index.html">Table of Contents
</A> <A HREF=
"crossbar.html">next page --
></A>