chiark / gitweb /
Import upstream version 5.3.
[mup] / mup / docs / uguide / ichdattr.html
CommitLineData
69695f33
MW
1<HTML>
2<HEAD><TITLE>
3Inter-chord attributes
4</TITLE></HEAD>
5<BODY>
6<P>
7&nbsp;&nbsp;&nbsp;<A HREF="crossst.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="tuplets.html">next page --&gt;</A>
10</P>
11
12<H3>
13Inter-chord attributes
14</H3>
15<P>
16In addition to the
17<A HREF="chrdattr.html">chord attributes</A>
18that can appear in the square brackets
19before time and pitch information, there are a few attributes that are
20specified after the time and pitch information. These are attributes that
21start or end on the chord but also affect other chords. There are several
22such attributes:
23<UL>
24<LI>
25<A HREF="ichdattr.html#tie">chord ties</A>
26<LI>
27<A HREF="ichdattr.html#slur">chord slurs</A>
28<LI>
29<A HREF="ichdattr.html#custbeam">custom beaming</A>
30<LI>
31<A HREF="ichdattr.html#crossbm">cross-staff beams</A>
32<LI>
33<A HREF="ichdattr.html#alt">alternation</A>
34<LI>
35<A HREF="ichdattr.html#slope">slope</A>
36</UL>
37</P>
38<P>
39If several of these are specified on a single chord, they may be in any
40order, separated by commas.
41</P>
42<H4>
43Chord ties
44</H4>
45<P>
46<A NAME="tie">If all notes in a chord are to be tied to the following chord,</A>
47the keyword &quot;tie&quot;
48can be placed at the end of the chord. As was mentioned earlier,
49<A HREF="noteattr.html#ntie">individual notes can be tied using a "~" symbol.</A>
50Thus:
51<BR><PRE>
52ceg tie;
53</PRE><BR>
54is equivalent to
55<BR><PRE>
56c~e~g~;
57</PRE><BR>
58The word &quot;tie&quot; may be preceded by the word &quot;dotted&quot; or &quot;dashed&quot; to
59produce dotted or dashed ties, otherwise normal, solid ties are drawn.
60The word &quot;tie&quot; may be followed by the word &quot;up&quot; or &quot;down&quot; to specify the
61direction of each curve's bulge. If neither is specified, Mup will
62determine an appropriate direction, so you only need to give a direction
63if you wish to override Mup's choice.
64</P>
65<P>
66You can also produce the effect of tying chords by using additive time
67values. For example, the following lines produce the same output:
68<BR><PRE>
691: 2ceg tie;8;;4; // explicit tie
70
711: 2+8ceg;8;4; // tie implied by added time values
72</PRE><BR>
73</P>
74<H4>
75Chord slurs
76</H4>
77<P>
78<A NAME="slur">The keyword "slur" can be placed at the end of a chord to indicate</A>
79that each note in the chord is to be slurred to the corresponding
80note in the following chord. In other words, the top note of the chord
81is slurred to the top note of the following chord, the second from the
82top note in the first chord to the second from the top note in the
83second chord, etc.
84Thus the following 2 measures give equivalent output:
85<BR><PRE>
861: 2f&lt;d&gt; a&lt;b&gt; c+&lt;d+&gt;; dbd+;
87bar
88
891: 2fac+ slur; dbd+;
90bar
91</PRE><BR>
92<IMG SRC="mugex22.gif" ALT="Picture of Mup output"><BR>
93</P>
94<P>
95The chord with the &quot;slur&quot; keyword
96and the chord that follows it must have the same number of notes.
97The word &quot;slur&quot; may be preceded by the word &quot;dotted&quot; or &quot;dashed&quot; to
98produce dotted or dashed slurs, otherwise normal, solid slurs are drawn.
99The word &quot;slur&quot; may be followed by the word &quot;up&quot; or &quot;down&quot; to specify the
100direction of each curve's bulge. If neither is specified, Mup will
101determine an appropriate direction, so you only need to give a direction
102if you wish to override Mup's choice.
103</P>
104<H4>
105Custom beaming
106</H4>
107<P>
108Normally, notes of eighth or shorter duration are automatically beamed
109according to the specification of
110<A HREF="param.html#beamstyl">the "beamstyle" parameter.</A>
111<A NAME="custbeam">Occasionally, you may wish to</A>
112override the default beaming style for a particular situation.
113This is done using the &quot;bm&quot; and &quot;ebm&quot; keywords. The &quot;bm&quot; (short for &quot;beam&quot;)
114is placed at the end of the chord which is the first to be beamed.
115The &quot;ebm&quot; (short for &quot;end beam&quot;) is placed at the end of the last chord.
116Both chords must be in the same measure. If there is any custom beaming
117specified for a given voice in a given measure, the default beamstyle
118is turned off for that voice for the entire measure, meaning that only
119what you explicitly specify to be beamed will be beamed.
120An example:
121<BR><PRE>
122// The d, e, and f will be beamed together,
123// but other 8th notes will not be.
1241: 4c; 8; d bm; e; f ebm; g; a;
125bar
126
127// First two chords beamed together.
128// Second chord is tied to third chord.
1291: 8.fa bm; 16gc+ tie, ebm; 2; 8a; g;
130bar
131</PRE><BR>
132<IMG SRC="mugex23.gif" ALT="Picture of Mup output"><BR>
133</P>
134<P>
135In the absence of custom beaming, Mup will beam notes together
136using the
137<A HREF="param.html#beamstyl">beamstyle parameter,</A>
138if that parameter is set.
139The beamstyle parameter is a list of time values that add up to
140a measure. Each time value tells how many chords to beam together.
141For example, a 2 means to beam a half note worth of chords together,
142whereas 1.. would indicate that a double dotted whole note worth of
143chords should be beamed together.
144Here are some examples of how the beamstyle parameter works.
145<BR><PRE>
146// beam each quarter note worth of notes together,
147// breaking the beaming at each quarter note boundary
148score beamstyle = 4,4,4,4
149music
1501: 8c;d;e;f;g;a;b;c+;
151bar
1521: 8c;d;4e;f;8g;c;
153bar
154
155// beam each half note worth of notes together,
156// breaking the beaming at each half note boundary
157score beamstyle = 2,2
158music
1591: 8c;d;e;f;g;a;b;c+;
160bar
161// the middle two eighth notes will not be beamed together,
162// because they are on opposite sides of the half note boundary
1631: 8c;4d;8e;f;4g;8c;
164bar
165
166// beam each whole note worth of notes together
167score beamstyle = 1
168music
1691: 8c;d;e;f;g;a;b;c+;
170bar
1711: 8c;4d;8e;f;4g;8c;
172bar
173
174// in 9/8 time, beam each dotted quarter note worth of notes together
175score time = 9/8 ; beamstyle = 4., 4., 4.
176music
1771: 8c;d;e;d;e;f;e;f;g;
178bar
179// the eight notes will not be beamed together,
180// because they are on opposite side of the dotted quarter boundary
1811: 4.c;4d;8e;8f;4g;
182bar
183
184// in each measure, beam the first dotted half worth of notes together,
185// then beam the remaining dotted quarter worth of notes together
186score beamstyle = 2., 4.
187music
1881: 8c;d;e;d;e;f;e;f;g;
189bar
190
191// in each measure, beam the first dotted quarter worth of notes together
192// then beam the remaining dotted half worth of notes together
193score beamstyle = 4., 2.;
194music
1951: 8c;d;e;d;e;f;e;f;g;
196bar
197</PRE><BR>
198<IMG SRC="mugex24.gif" ALT="Picture of Mup output"><BR>
199</P>
200<P>
201The value of the beamstyle parameter is remembered for
202any later changes back to the same time signature.
203For example, suppose you set
204<BR><PRE>
205time=4/4
206beamstyle=4,4,4,4
207</PRE><BR>
208then later in the piece switched to
209<BR><PRE>
210time=3/4
211beamstyle=4,4,4
212</PRE><BR>
213Then any time you went back to 4/4 or 3/4, the beamstyle you had set for that
214time signature would automatically be set as well.
215You could, of course, override the automatic setting
216with a new beamstyle if you wished.
217</P>
218<P>
219Normally Mup will break beams whenever it encounters a rest or space,
220but if you or specify an &quot;r&quot; at the end of the
221beamstyle parameter, it will beam across rests
222of eighth note or shorter duration. Similarly, specifying an &quot;s&quot; at the
223end of the beamstyle parameter will cause it to beam across spaces of
224eighth note or shorter. Specifying both (in either order) will result
225in beaming across both. Mup will also beam across eighth note or
226shorter rests or spaces inside of custom beams.
227</P>
228<P>
229Sometimes, if there are many short notes beamed together, you may wish to
230subdivide the beams into smaller groupings, where the outer, or primary
231beam remains unbroken, but the inner, or secondary beams are broken
232periodically. When using custom beaming, this is specified by &quot;esbm&quot;
233(&quot;end subbeam&quot; or &quot;end secondary beam&quot;)
234on the chord after which you want the break to occur.
235When using beamstyle, parentheses are used to indicate what sets of
236secondary beams are to be included in a given outer beam.
237<BR><PRE>
238score
239beamstyle=(4,4),(4,4)
240music
241
242// use the beamstyle parameter
2431: 16c;d;e;f; g;a;b;c+; c+;b;a;g; 32f;e;f;e;d;c;d;c;
244bar
245
246// use custom beaming
2471: 16c bm;d;e;f;g;a esbm;b;c+;c+;b;a;g esbm;f;e;d;c ebm;
248bar
249</PRE><BR>
250<IMG SRC="mugex25.gif" ALT="Picture of Mup output"><BR>
251</P>
252<H4>
253Cross-staff beams
254</H4>
255<P>
256In keyboard music,
257<A NAME="crossbm">sometimes notes on adjacent staffs are beamed together.</A>
258Mup will do this with a variation on
259<A HREF="ichdattr.html#custbeam">custom beaming.</A>
260A bm and ebm must be specified on both staffs, and in each case the
261bm is followed by a qualifier:
262on the first of the two staffs, &quot;bm with staff below&quot; must
263be specified, while on the second staff you use &quot;bm with staff above&quot;.
264For every point in time for the duration of the beam, one staff
265must have a chord with notes in it, and the other staff must have
266a space chord. (This is somewhat different than ordinary,
267non-cross-staff beams controlled by the
268<A HREF="param.html#beamstyl">beamstyle parameter,</A>
269where spaces are not allowed unless beaming across spaces
270is specifically requested.)
271The two &quot;bm&quot; marks must occur at the same time in the
272measure. Similarly, the two &quot;ebm&quot; marks must
273occur at the same time in each staff.
274Grouping subbeams using &quot;esbm&quot; is not supported on cross-staff beams.
275</P>
276<P>
277Some examples:
278<BR><PRE>
2791: 8f bm with staff below; a; 4s ebm; 4s bm with staff below; 8b; d ebm;
2802: 4s bm with staff above; 8a; b ebm; b bm with staff above; d; 4s ebm;
281bar
282</PRE><BR>
283<IMG SRC="mugex26.gif" ALT="Picture of Mup output"><BR>
284</P>
285<P>
286Normally the beam will be drawn between the staffs, but
287you can force the beam to be above or below all the notes by specifying a
288<A HREF="chrdattr.html#stemdir">stem direction.</A>
289You can also adjust the appearance of the beam by giving
290<A HREF="chrdattr.html#stemlen">stems lengths</A>
291for the first and last chords in the beam.
292<BR><PRE>
2931: [up]8f bm with staff below;a;4s ebm;4s bm with staff below;8b;[len 11]d ebm;
2942: 4s bm with staff above;8a;b ebm;[down;len 14]b bm with staff above;d;4s ebm;
295bar
296</PRE><BR>
297<IMG SRC="mugex27.gif" ALT="Picture of Mup output"><BR>
298</P>
299<P>
300If a cross-staff beam includes
301<A HREF="tuplets.html">tuplets,</A>
302the tuplet numbers will not
303be printed. You would have to print them yourself using either
304<A HREF="prnttext.html">a "print" statement</A>
305or
306<A HREF="stuff.html">a "boldital" statement.</A>
307</P>
308<P>
309It is possible for cross-staff beams to collide with other items, such as
310<A HREF="stuff.html">dynamic marks.</A>
311In these cases, you may need to move the other items. Another
312thing you might try is
313<A HREF="chrdattr.html#stemlen">specifying stem lengths</A>
314to alter where the beams get placed, or
315<A HREF="prnttext.html">printing</A>
316a blank string between the staffs to cause them to get placed further apart.
317If you specify a
318<A HREF="ichdattr.html#slope">slope,</A>
319you have to specify it on the staff having notes in the first chord,
320not the staff with space.
321<A HREF="chrdattr.html#slashes">Slashes</A>
322are not allowed on cross-staff beams.
323</P>
324<P>
325Mup doesn't directly allow cross-staff grace note beams.
326However, you may be able simulate the effect by using cue note chords
327along with invisible time signature changes and possibly invisible bar lines.
328See the
329<A HREF="invisbar.html">section on "Special uses of invisbar"</A>
330for more details.
331</P>
332<P>
333You may want to also look at the section on
334<A HREF="crossst.html">cross-staff stems,</A>
335for an alternate way to handles some cases where you might
336use cross-staff beams.
337</P>
338<H4>
339Alternation
340</H4>
341<P>
342<A NAME="alt">Alternation pairs</A>
343can be specified using &quot;alt <I>N</I>&quot; where <I>N</I>
344is a number. An alternation
345pair is two chords that are to played alternately in quick succession
346but are not written out as such. This is shown by drawing <I>N</I> beams
347between the stems of the chords. The note value you specify for each
348chord must be the same, and the time value of each must equal the time
349taken by the pair. For example, if the pair takes up the time of a half
350note, each chord would be a half note.
351Here is an example:
352<BR><PRE>
353// Alternate between c and c an octave
354// higher. Total time taken is that of
355// a half note. Two &quot;beam&quot;-like lines
356// will be drawn to show the alternation.
3571: 2c alt 2; 2c+;2g;
358bar
359</PRE><BR>
360<IMG SRC="mugex28.gif" ALT="Picture of Mup output"><BR>
361</P>
362<P>
363Alternation is not allowed on cross-staff beams.
364</P>
365<H4>
366Slope
367</H4>
368<P>
369<A NAME="slope">On the first chord of a set of chords that are beamed together,</A>
370you can specify a
371beam angle from -45 to 45 degrees.
372This will override whatever angle Mup would have used.
373<BR><PRE>
3741: 8g slope 11; b; g slope 0; b; g slope -5.75; b;
375bar
376</PRE><BR>
377<IMG SRC="mugex29.gif" ALT="Picture of Mup output"><BR>
378</P>
379<HR><P>
380&nbsp;&nbsp;&nbsp;<A HREF="crossst.html">&lt;-- previous page</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="index.html">Table of Contents</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="tuplets.html">next page --&gt;</A>
381</P>
382</BODY></HTML>