chiark / gitweb /
Merge branch 'arkkra' into shiny
[mup] / mup / docs / uguide / chrdattr.html
CommitLineData
69695f33
MW
1<HTML>
2<HEAD><TITLE>
3Chord attributes
4</TITLE></HEAD>
5<BODY>
6<P>
7&nbsp;&nbsp;&nbsp;<A HREF="noteattr.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="midmeas.html">next page --&gt;</A>
10</P>
11
12<H3>
13Chord attributes
14</H3>
15<P>
16<A NAME="attrib">There are optional attributes that are associated with an entire chord</A>
17rather than an individual note. These are put inside square brackets
18before the list of notes and the time value.
19There are several classes of information:
20<UL>
21<LI>
22<A HREF="chrdattr.html#chstyle">chord style (grace, cue, diam, or xnote)</A>
23<LI>
24<A HREF="chrdattr.html#shaped">head shape</A>
25<LI>
26<A HREF="chrdattr.html#withlist">symbols to be printed with a chord</A>
27<LI>
28<A HREF="chrdattr.html#slashes">slashes</A>
29<LI>
30<A HREF="chrdattr.html#stemdir">stem direction</A>
31<LI>
32<A HREF="chrdattr.html#stemlen">stem length</A>
33<LI>
34<A HREF="chrdattr.html#pad">padding</A>
35<LI>
36<A HREF="chrdattr.html#ctag">chord location tag</A>
37<LI>
38<A HREF="chrdattr.html#hoffset">horizontal offset</A>
39<LI>
40<A HREF="chrdattr.html#dist">rest distance</A>
41</UL>
42</P>
43<P>
44Each class of information is
45separated from the other by a semicolon. All classes are optional, and can
46occur in any order.
47</P>
48<H4>
49Chord style
50</H4>
51<P>
52<A NAME="chstyle">Several chord styles can be specified.</A>
53<A NAME="cue">Grace note chords are designated by the word "grace," or cue note chords by "cue."</A>
54Grace notes can be specified as any undotted time value of eighth note or
55shorter, but are treated as taking no time. The time value given is merely used
56to specify how many flags or beams to put on the grace note.
57You can also specify a quarter note grace note, which will be printed as a
58small, stemless note, as is used to show
59<A HREF="tabstaff.html#prebend">a "prebend" in guitar music.</A>
60(Actually, you can force a stem if you want, by specifying a
61<A HREF="chrdattr.html#stemlen">len, as is described later.)</A>
62Cue notes have time like regular notes, but they are printed smaller.
63If there are several grace notes in a row, they will be beamed automatically.
64However, you cannot mix quarter (stemless) grace notes with shorter ones.
65Cue notes follow the same beaming rules as regular notes.
66</P>
67<P>
68It is also possible to specify &quot;diam,&quot; or &quot;xnote.&quot;
69In the case of &quot;diam,&quot; the chords will be drawn with diamond-shaped notes,
70while with &quot;xnote,&quot; the chords will be
71drawn with X-shaped notes. A diamond shaped
72note head will be used for xnotes that are half note or longer.
73Here are some examples:
74<BR><PRE>
75[grace]
76<BR>
77[xnote]
78<BR>
79[cue; xnote]
80<BR>
81[diam]
82</PRE><BR>
83</P>
84<H4>
85Head shape
86</H4>
87<P>
88If you want to have the
89<A NAME="shaped">note heads in a chord</A>
90use a shape other than the
91normal shapes, you use hs followed by the name of the head shape in quotes.
92There is an entire
93<A HREF="shaped.html">section on shaped notes,</A>
94so only the basics are covered here. The xnote and diam
95<A HREF="chrdattr.html#chstyle">described above</A>
96are really just shorthands for two common head shapes.
97The method using hs lets you use many other note head styles,
98such as a slash, or triangle.
99<BR><PRE>
1001: [hs &quot;righttri&quot;]cf; [hs &quot;slash&quot;]fa;
101</PRE><BR>
102</P>
103<P>
104The
105<A HREF="shaped.html">section on shaped notes</A>
106lists all the builtin head shape names,
107and explains how you can define your own.
108</P>
109<H4>
110Symbols to be printed with a chord
111</H4>
112<P>
113<A NAME="withlist">It is possible to specify one or more musical symbols or text strings to be printed with a chord.</A>
114This is typically used for
115things like staccato and accent marks. The word &quot;with&quot;
116is followed by one or more things to print. If there are more than one, they
117are separated by commas. They will be printed outwards from the notes in
118the order specified.
119The &quot;with&quot; list is only allowed on note groups, not rests.
120The list can include symbols from the following table:
121<TABLE BORDER=4>
122<TR>
123<TD><B>Symbol</B></TD> <TD><B>Meaning</B></TD>
124</TR>
125<TR>
126<TD><TT>.</TT></TD> <TD>staccato</TD>
127</TR>
128<TR>
129<TD><TT>-</TT></TD> <TD>legato</TD>
130</TR>
131<TR>
132<TD><TT>&gt;</TT></TD> <TD>accent</TD>
133</TR>
134<TR>
135<TD><TT>^</TT></TD> <TD>accent</TD>
136</TR>
137</TABLE>
138
139</P>
140<P>
141<A HREF="textstr.html">A quoted string</A>
142can also be specified (e.g., &quot;ff&quot;, &quot;adagio&quot;, etc.).
143This will be printed in the font and size specified by the
144<A HREF="param.html#fontfam">"fontfamily,"</A>
145<A HREF="param.html#font">"font,"</A>
146and
147<A HREF="param.html#size">"size"</A>
148parameters. Any of the
149<A HREF="textstr.html#symlist">special music characters can be printed by using the usual convention,</A>
150e.g., \(ferm) for a fermata.
151(This is described in a
152<A HREF="textstr.html">later section.)</A>
153However, it is usually preferable to use the printing of
154<A HREF="textmark.html">text strings relative to beats.</A>
155</P>
156<P>
157Here are some examples:
158<BR><PRE>
159[with ., -]
160[with ^, &quot;\(ferm)&quot;]
161[with &quot;sfz&quot;; cue]
162</PRE><BR>
163</P>
164<P>
165If the symbols acc_hat, ferm, or wedge are used by themselves in a &quot;with&quot;
166list item, they are handled specially. If the stem direction is such that
167the upside down versions of these characters should be used, the upside down
168version will be used.
169</P>
170<H4>
171Slashes
172</H4>
173<P>
174<A NAME="slashes">Diagonal lines to be drawn through the stem of the group</A>
175can be specified using
176<BR><PRE>
177slash <I>N</I>
178</PRE><BR>
179where <I>N</I> is the number of slashes to draw. In the case of
180<A HREF="chrdattr.html#chstyle">grace notes,</A>
181<I>N</I> can only be 1, which will produce a grace note with a slash through it.
182In the case of other notes, <I>N</I> can be 1 or greater, and is used to
183specify tremolo or repetition of the note group. Examples:
184<BR><PRE>
185[slash 2]
186[grace; slash 1]
187</PRE><BR>
188</P>
189<H4>
190Stem direction
191</H4>
192<P>
193The chord stem direction can be specified as &quot;up&quot; or &quot;down&quot;.
194<A NAME="stemdir">Normally Mup chooses the stem direction, but once in a while you</A>
195may want to override its choice. There are some restrictions.
196You cannot specify a direction on grace notes. All chords beamed
197together and the pair of chords in an
198<A HREF="ichdattr.html#alt">alternation pair</A>
199(described later)
200must have the same stem direction.
201Examples:
202<BR><PRE>
203[up]
204[down]
205</PRE><BR>
206</P>
207<P>
208For voice 3, stem direction works a little differently. By default, the
209stem direction for voice 3 is up,
210but for voice 3 on any given staff, when you specify a stem
211direction, that direction will remain in effect until explicitly changed.
212Thus, for example, if you want all voice 3 stems on a given staff
213in an entire song to
214be down, you only need to specify &quot;[down]&quot; on the first chord.
215</P>
216<H4>
217Stem len
218</H4>
219<P>
220<A NAME="stemlen">Normally, Mup sets stem lengths as appropriate, but sometimes you might</A>
221want to make a stem longer or shorter than normal. This is done with
222the keyword &quot;len&quot; followed by a length in stepsizes.
223Some examples:
224<BR><PRE>
225[ len 14 ]
226[ len 7; up ]
227</PRE><BR>
228</P>
229<P>
230You cannot specify stem length on chords inside of beams.
231The len can be set to 0 to produce a note head with no stem at all.
232</P>
233<P>
234There is a
235<A HREF="param.html#stemlen">stemlen parameter</A>
236that can be used to set the default stem length.
237If you don't want any stems, setting that parameter to 0 is more
238convenient than setting len to 0 on each chord individually.
239</P>
240<P>
241On beamed chords, Mup will sometimes shorten a stem slightly
242from its normal minimum length. By default it will never shorten by
243more than one stemsize, but there is a
244<A HREF="param.html#sshorten">stemshorten parameter</A>
245that lets you adjust how much it will shorten. If you don't want Mup
246to ever shorten stems, you can set this parameter to zero.
247</P>
248<H4>
249Padding
250</H4>
251<P>
252Sometimes it may be desirable to space notes somewhat differently than
253Mup would normally place them.
254<A NAME="pad">It is possible to specify "padding" before any note group.</A>
255This is done by specifying the word &quot;pad&quot; followed
256by a number of stepsizes of white space padding to add before the chord.
257The number can be fractional, as in 0.5 or 2.25.
258For example:
259<BR><PRE>
260[ pad 2.5 ]
261</PRE><BR>
262</P>
263<P>
264The padding can also be negative. Padding affects the minimum amount of
265width allocated to a chord, so you can use positive padding values to
266force additional room in front of a chord, or negative padding to allow
267things closer together.
268</P>
269<H4>
270Chord location tag
271</H4>
272<P>
273<A NAME="ctag">It is possible to set a location tag</A>
274which is
275associated with an entire chord
276rather than an individual note. This
277<A HREF="tags.html">tag</A>
278is specified like
279<A HREF="noteattr.html#ntag">location tags for notes,</A>
280with an &quot;=&quot; followed by a name, but is inside
281the square brackets rather than after a note.
282<BR><PRE>
2833: 2cf; [=h] egc+;
2841: [cue; with &gt;; =_ch] fa;
285</PRE><BR>
286</P>
287<H4>
288Horizontal offset
289</H4>
290<P>
291<A NAME="hoffset">A horizontal offset can be applied to a chord by specifying "ho" followed</A>
292by a number of stepsizes. The number can be positive or negative,
293and can include a fractional part. A positive number will cause the chord to
294be placed that far right of where the horizontal center of the chord
295would normally be; a negative number will place it that far to the left.
296It is also possible to simply specify a &quot;+&quot; or &quot;-&quot; which says to place the
297chord to the right or left,
298as close as possible without running into something.
299</P>
300<P>
301A horizontal offset is most commonly used on the third voice of a staff,
302although it can be used on other voices too.
303By default, Mup places third
304voice chords as close as it thinks is safe for avoiding
305most collisions. Sometimes it may actually be okay visually
306to place the chord a little closer than that,
307or perhaps there is a better &quot;nook&quot; to tuck it into on the left side.
308By specifying a horizontal offset, you can place chords anywhere you want.
309Mup makes no checks to avoid collisions when you specify a horizontal
310offset, so this attribute needs to be used with some care.
311</P>
312<P>
313Here is an example of the use of horizontal offset and stem direction
314on voice 3.
315<BR><PRE>
316score
317 vscheme=3f
318
319music
3201 1: c+;b;a;c+;
3211 2: e;d;e;f;
3221 3: [ho+1] g; [ho-5.2; down]; [ho-] f; [ho+; up] a;
323bar
324</PRE><BR>
325<IMG SRC="mugex16.gif" ALT="Picture of Mup output"><BR>
326</P>
327<H4>
328Rest distance
329</H4>
330<P>
331<A NAME="dist">Usually Mup's placement of rests is satisfactory, but once in a while</A>
332you might want to force a rest to be placed a little higher or lower
333than Mup would place it. You can specify a &quot;dist&quot; which is the number
334of stepsizes from the center of the staff to place the rest symbol,
335with positive numbers being above the center and negative numbers below.
336If the staff is
337<A HREF="param.html#xpose">transposed,</A>
338the placement of the rest symbol will be adjusted accordingly.
339<BR><PRE>
340// The first and last rests are in normal position.
341// The second is forced higher, the third is forced lower.
3421: r; [dist 6]; [dist -4]; r;
343bar
344</PRE><BR>
345<IMG SRC="mugex17.gif" ALT="Picture of Mup output"><BR>
346</P>
347<H4>
348Repeated attributes
349</H4>
350<P>
351<A NAME="rptattr">If two or more chords in a row have the same bracketed attributes,</A>
352there are two shorthand notations. Specifying an empty set of brackets &quot;[]&quot;
353means to use the same attributes as were specified on the previous chord.
354The previous chord must be within the same measure.
355Some examples:
356<BR><PRE>
3571: [cue] 4c;[]d;[grace; slash 1] 8f;2e;
358bar
359
3601: d; [with .,-]d; []e; []f;
361bar
362</PRE><BR>
363<IMG SRC="mugex18.gif" ALT="Picture of Mup output"><BR>
364</P>
365<P>
366The other shorthand is to put 3 dots after a set of bracketed items.
367This means to repeat the same bracketed items on all chords for the
368rest of the measure, or until a new set of bracketed items is specified.
369If you wish to cancel this before the end of a measure but without
370specifying a new set, the special set &quot;[-]&quot; can be used.
371<BR><PRE>
372// put staccato marks on all notes
3731: [with .]... c; d; e; g;
374bar
375// put several cue size notes in the middle of a measure
3761: c; [cue]... 8d; f; e; g; [-] 4c+;
377bar
378</PRE><BR>
379<IMG SRC="mugex19.gif" ALT="Picture of Mup output"><BR>
380</P>
381<P>
382You can use more than one set of backets on a single chord.
383For example &quot;[len 5][down]&quot; and &quot;[len 5;down]&quot; are equivalent.
384However, [-] can only be used by itself, and if you want to use [] along
385with another backeted set of items (to duplicate the items on the previous
386chord plus add some more), the empty [] needs to be first, before the
387other set of items.
388</P>
389<HR><P>
390&nbsp;&nbsp;&nbsp;<A HREF="noteattr.html">&lt;-- previous page</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="index.html">Table of Contents</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="midmeas.html">next page --&gt;</A>
391</P>
392</BODY></HTML>