chiark / gitweb /
Merge branch 'arkkra' into shiny
[mup] / mup / docs / uguide / bars.html
CommitLineData
69695f33
MW
1<HTML>
2<HEAD><TITLE>
3Bar Lines
4</TITLE></HEAD>
5<BODY>
6<P>
7&nbsp;&nbsp;&nbsp;<A HREF="altinp.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="multirst.html">next page --&gt;</A>
10</P>
11
12<H2>
13Bar lines
14</H2>
15<P>
16Each measure must be ended with a &quot;bar&quot; of some kind. There are several kinds:
17<TABLE BORDER=4>
18<TR>
19<TD><B>Keyword</B></TD> <TD><B>Meaning</B></TD>
20</TR>
21<TR>
22<TD>bar</TD> <TD>ordinary bar line</TD>
23</TR>
24<TR>
25<TD>dblbar</TD> <TD>double bar</TD>
26</TR>
27<TR>
28<TD>repeatstart</TD> <TD>beginning of repeated section</TD>
29</TR>
30<TR>
31<TD>repeatboth</TD> <TD>end of one repeated section and beginning of another</TD>
32</TR>
33<TR>
34<TD>repeatend</TD> <TD>end of repeated section</TD>
35</TR>
36<TR>
37<TD>endbar</TD> <TD>heavy double bar line used at end of song</TD>
38</TR>
39<TR>
40<TD>invisbar</TD> <TD>no bar line printed</TD>
41</TR>
42<TR>
43<TD>restart</TD> <TD>end staffs and begin anew</TD>
44</TR>
45</TABLE>
46
47</P>
48<P>
49In addition, the bar and dblbar types can be preceded
50by the word &quot;dashed&quot; or &quot;dotted&quot; to produce dashed or dotted bar lines.
51</P>
52<P>
53<BR><PRE>
541: mr;
55bar
561: mr;
57dblbar
581: mr;
59dashed bar
601: mr;
61dotted dblbar
621: mr;
63repeatstart
641: mr;
65repeatboth
661: mr;
67repeatend
681: mr;
69endbar
70</PRE><BR>
71<IMG SRC="mugex36.gif" ALT="Picture of Mup output"><BR>
72</P>
73<P>
74When a repeatstart would end up at the end of a score,
75it will automatically get moved to the beginning of the following score.
76In that case, it isn't clear what kind of bar line you would like to
77have put at the end of the original score. By default, Mup will use
78an ordinary bar, but in some cases--like if the repeatstart begins
79a new section, or there is also a key change--you might want to have
80a dblbar instead. You can get a dblbar there by specifying dblbar in
81parentheses before the repeatstart:
82<BR><PRE>
83(dblbar) repeatstart
84</PRE><BR>
85Actually, you are allowed to specify any bar type in the parentheses,
86but dblbar or possibly invisbar are probably the only ones likely to be useful.
87If the repeatstart ends up in the middle of a score, so that it doesn't
88need to get moved to the beginning of the next score, the parenthesized
89bar type is not needed, so it is just ignored.
90</P>
91<P>
92Sometimes music is printed without bar lines. The &quot;invisbar&quot; can be used in
93this case, to fulfill Mup's requirement to specify some sort of bar after
94every measure without actually printing bar lines.
95</P>
96<P>
97<A NAME="restart">The restart is a special kind of bar. It follows immediately after another</A>
98bar line without any intervening music data. (That is, you can't have
99any notes. You can use score or staff context things, like changing time or
100key signature.) It would be most commonly used for something like a short coda.
101<BR><PRE>
102score
103 staffs=2
104 brace=1-2
105staff 2
106 clef=bass
107music
108
1091-2: c;d;e;f;
110rom above 1: 3 &quot;D.C. al Coda&quot;;
111dblbar
112
113// The restart follows a bar
114// without any music data in between.
115restart
116
117rom above 1: 1 &quot;Coda&quot;;
1181-2: f;e;d;c;
119endbar
120</PRE><BR>
121<IMG SRC="mugex37.gif" ALT="Picture of Mup output"><BR>
122</P>
123<P>
124There are several optional directives that can follow the bar line keyword.
125They can be specified in any order and are described below.
126</P>
127<H3>
128Bar line padding
129</H3>
130<P>
131<A NAME="bpad">One optional directive is padding.</A>
132It can be used to force Mup to place extra white space to
133the left of the bar line. It is specified by the keyword &quot;pad&quot; followed
134by a number of stepsizes of padding to add. For example:
135<BR><PRE>
136dblbar pad 3
137</PRE><BR>
138would add 3 stepsizes of padding.
139</P>
140<H3>
141Bar line location tag
142</H3>
143<P>
144<A NAME="btag">It is also possible to associate a</A>
145<A HREF="tags.html">location tag</A>
146with a bar line.
147For example:
148<BR><PRE>
149// Associate tag &quot;_bar6&quot; with bar line
150bar =_bar6
151
152// Do double bar with an extra stepsize of
153// padding, and associate tag &quot;q&quot;
154// with the bar line
155dblbar pad 1 =q
156</PRE><BR>
157</P>
158<P>
159The y coordinate of a bar line is not very useful. Special rules apply if
160a bar line happens to be placed at the end of a score. Any locations taken
161relative to the bar that would be to the right of the bar are treated as
162if the bar line were at the beginning of the following score,
163just beyond the clef and time and key signatures, if any.
164</P>
165<H3>
166Endings
167</H3>
168<P>
169<A NAME="endings">First and second endings, etc. can be designated at bar lines.</A>
170This is done with the keyword &quot;ending,&quot; followed by a
171quoted string to use as the label for the ending that should begin at the
172bar line. An ending will span bars until either another ending is specified,
173the piece ends, or the
174special keyword &quot;endending&quot; is used. Examples:
175<BR><PRE>
176bar ending &quot;1.&quot;
177repeatend ending &quot;2-3&quot;
178endbar endending
179</PRE><BR>
180</P>
181<P>
182The ending label will always be
183forced into 12 point times roman font. If you change font or size or include
184special characters in the ending label,
185the output is not likely to be aligned properly.
186</P>
187<P>
188<A HREF="param.html#endingst">The "endingstyle" parameter</A>
189controls where endings are placed.
190Endings cannot start at or cross over a restart bar.
191</P>
192<H3>
193Rehearsal marks
194</H3>
195<P>
196<A NAME="reh">Rehearsal letters or numbers</A>
197can be specified on any bar line. There are four formats:
198<BR>
199<B>rehearsal let</B>
200<BR>
201<B>rehearsal num</B>
202<BR>
203<B>rehearsal mnum</B>
204<BR>
205<B>rehearsal &quot;</B><I>label</I><B>&quot;</B>
206</P>
207<P>
208In the first example, a rehearsal letter will be placed on the bar. The
209first occurrence of this will become rehearsal &quot;A&quot;, the next &quot;B&quot;, and so
210forth. The second format works in a similar fashion except that numbers are
211used rather than letters. With the third format, the current measure
212number is used. With the last format, any arbitrary string
213within the quotes will be used. The keyword &quot;rehearsal&quot; can be
214abbreviated to &quot;reh&quot; if you wish. Only one rehearsal mark is allowed on
215any one bar, but the types can be mixed throughout the composition.
216(Note that mixing &quot;num&quot; with &quot;mnum&quot; is likely to be very confusing, however.)
217The rehearsal marks can be intermixed with other bar options:
218<BR><PRE>
2191: 1c;
220dblbar reh num ending &quot;1&quot;
2211: 1e;
222repeatend pad 1 =_xyz reh let ending &quot;2.&quot;
2231: 1g;
224bar rehearsal &quot;Duet&quot;
2251: 1ce;
226endbar endending
227</PRE><BR>
228<IMG SRC="mugex38.gif" ALT="Picture of Mup output"><BR>
229</P>
230<P>
231The rehearsal marks are normally put directly above the bar
232line. However, if the bar line falls at the end of a score, the rehearsal
233mark will be placed at the beginning of the following score, after the
234<A HREF="param.html#clef">clef,</A>
235<A HREF="param.html#key">key signature,</A>
236and
237<A HREF="param.html#time">time signature.</A>
238<A HREF="param.html#endingst">The "endingstyle" parameter</A>
239is used to determine which staffs get rehearsal marks.
240<A HREF="param.html#rehstyle">The "rehstyle" parameter</A>
241specifies whether to put rehearsal marks inside a box or a circle
242or leave them plain.
243</P>
244<P>
245The rehearsal keyword may be followed by a specification for <I>fontfamily</I>,
246<I>font</I>, and/or <B>(</B><I>size</I><B>)</B>.
247Once specified, these remain in effect
248for any future rehearsal marks, until explictly changed. Some examples:
249<BR><PRE>
250bar rehearsal helvetica bold (14) let
251repeatend reh newcentury num
252invisbar reh rom (10) mnum
253</PRE><BR>
254</P>
255<P>
256After all the options listed above, you may specify &quot;dist <I>N</I>&quot; where
257<I>N</I> is some number of stepsizes. This will override the
258<A HREF="param.html#dist">dist parameter</A>
259for determining how close to the staff to place the rehearsal mark.
260If the number is followed by a &quot;!&quot; Mup will place the mark exactly
261that far from the top of the staff, even if it overwrites other things;
262otherwise the value specifies a minimum distance.
263<BR><PRE>
264rehearsal num dist 5 // at least 5 stepsizes away
265reh bold &quot;A1&quot; dist 2 ! // exactly 2 stepsizes away
266</PRE><BR>
267</P>
268<H3>
269Setting the measure number
270</H3>
271<P>
272<A NAME="setmnum">Mup keeps track of</A>
273<A HREF="param.html#measnum">measure numbers</A>
274automatically, but sometimes you may want
275to override this to set the current measure number to some specific value.
276This is done by adding mnum=<I>number</I> on a bar line,
277which will set the current measure number to the given <I>number</I>.
278<BR><PRE>
279// Set the current measure number to 50
280dblbar mnum=50
281</PRE><BR>
282</P>
283<H3>
284Setting rehearsal letter or number
285</H3>
286<P>
287<A NAME="setreh">If you are using the "rehearsal let" or "rehearsal num" styles,</A>
288you can set those to specific values too, similarly to how mnum can be set.
289This might be useful, for example, if you have a single input file that
290contains multiple songs or movements, and you want the rehearsal marks
291to start over at the beginning of each song or movement.
292</P>
293<P>
294The rehearsal number can be set on any bar line using num=<I>N</I>, where
295<I>N</I> is a number, typically 1.
296<BR><PRE>
297bar num=1
298</PRE><BR>
299The rehearsal letter can be set in a similar way, using let=&quot;<I>X</I>&quot; where
300<I>X</I> is either a single upper case letter, A to Z, or two upper case
301letters, AA to ZZ.
302<BR><PRE>
303dblbar let=&quot;A&quot; reh let
304</PRE><BR>
305</P>
306<H3>
307Hiding time/key signature and clef changes
308</H3>
309<P>
310<A NAME="hide">Generally in printed music, when a</A>
311<A HREF="param.html#time">time signature</A>
312<A HREF="param.html#key">or key signature</A>
313change occurs at the beginning of a score, these changes are also printed at
314the very end of the previous score,
315to make it clear there is a change coming up.
316Mup normally does this, but occasionally you may not want that behavior.
317Sometimes you may want to make a new score appear like the beginning
318of a new piece. If you wish to suppress the printing of time signature,
319key signature, and clef
320changes at the end of the preceding score,
321you can use the &quot;hidechanges&quot;
322keyword on the bar line at which the changes occur.
323Hidechanges cannot be used on a restart bar.
324<BR><PRE>
3251: c;d;e;f;
326bar
327// change time/key with normal treatment
328
329newscore
330score time=5/4 ; key = 1&amp;
331music
3321: d;e;f;2g;
333// don't show changes at end of previous score
334bar hidechanges
335
336newscore
337
338score time=6/4 ; key = 2#
339music
3401: d;e;f;2.g;
341bar
342</PRE><BR>
343<IMG SRC="mugex39.gif" ALT="Picture of Mup output"><BR>
344</P>
345<HR><P>
346&nbsp;&nbsp;&nbsp;<A HREF="altinp.html">&lt;-- previous page</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="index.html">Table of Contents</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="multirst.html">next page --&gt;</A>
347</P>
348</BODY></HTML>