chiark / gitweb /
Merge branch 'arkkra' into shiny
[mup] / mup / docs / uguide / crossbar.html
CommitLineData
69695f33
MW
1<HTML>
2<HEAD><TITLE>
3Cross-bar beaming
4</TITLE></HEAD>
5<BODY>
6<P>
7&nbsp;&nbsp;&nbsp;<A HREF="brackmac.html">&lt;-- previous page</A>
8
9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="index.html">Table of Contents</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="mixtsig.html">next page --&gt;</A>
10</P>
11
12<H2>
13Cross-bar beaming
14</H2>
15<P>
16Generally, beams do not cross bar lines, and Mup follows that rule.
17However, if you want beams to cross a bar line, there are at least two
18possible approaches to getting the
19desired effect. The first is to explicitly specify
20<A HREF="chrdattr.html#stemlen">stem lengths</A>
21such that all the beams in the various measures will lie on the same line.
22You can then use the
23<A HREF="linecurv.html">line command</A>
24to fill in the gaps in the beams across the bar lines.
25</P>
26<P>
27The other approach is to draw in the bar line using the &quot;line&quot; construct.
28To do this you first tell Mup that a measure is twice as long as is really
29is, so that you can put two actual measures inside what Mup thinks is a
30single measure. Here is an example.
31<BR><PRE>
32// First make an empty measure ending with an
33// invisible bar. This is for the sole purpose
34// of allowing the real time signature to be
35// printed and would not be necessary if we
36// wanted to cross a bar line other than
37// the very first bar line of the piece.
381: ms;
39invisbar
40
41// Now, make the effective time signature twice
42// as long as the real time signature, but use 'n' so this fake
43// time signature is not actually printed.
44// Set up for beaming across the entire double-length measure.
45// (You could could use other beamstyles if you wish, or custom beaming.)
46score time=8/4n
47beamstyle=1/2
48music
49
50// Now do the double-length measure. On the chord
51// just after where we want a bar line, add some extra
52// padding and set a location tag so that we can draw
53// a bar line relative to the tag.
541: 8c;e;f;d;g;e;f;a; [pad 3; =a]g;e;f;a;g;d+;4c+;
55// Also set a location tag on the next bar line,
56// so that we can get the vertical endpoints of the
57// bar line that we draw from the endpoints of the
58// normal Mup-supplied bar line.
59bar =b
60
61// Now draw the bar line that goes through the beam.
62// Use the horizontal position relative to the &quot;a&quot;
63// location tag on the chord in the second actual measure,
64// and get the vertical endpoints from the &quot;b&quot; tag
65// associated with the next bar line.
66line (a.w + 1, b.y + 4) to (a.w + 1, b.y - 4)
67</PRE><BR>
68<IMG SRC="mugex93.gif" ALT="Picture of Mup output"><BR>
69</P>
70<HR><P>
71&nbsp;&nbsp;&nbsp;<A HREF="brackmac.html">&lt;-- previous page</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="index.html">Table of Contents</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="mixtsig.html">next page --&gt;</A>
72</P>
73</BODY></HTML>