chiark / gitweb /
Import upstream version 5.3.
[mup] / mup / docs / uguide / shaped.html
1 <HTML>
2 <HEAD><TITLE>
3 Shaped notes
4 </TITLE></HEAD>
5 <BODY>
6 <P>
7 &nbsp;&nbsp;&nbsp;<A HREF="tabstaff.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="textstr.html">next page --&gt;</A>
10 </P>
11           
12 <H1>
13 SHAPED NOTES
14 </H1>
15 <P>
16 If you intend to only use the usual system of note heads,
17 you can skip over this section on shaped notes.
18 If you wish to use less common note head shapes, like X-shaped notes,
19 rather than normal note heads, or want &quot;shaped note&quot; music that is often used
20 for &quot;Sacred Harp&quot; style music, sometimes also called &quot;fasola notation,&quot;
21 then this section will explain how you can do that.
22 </P>
23 <H2>
24 Headshapes context
25 </H2>
26 <P>
27 <A NAME="hdshape">The headshapes context</A>
28 is used in conjuction with the
29 <A HREF="param.html#notehead">noteheads parameter</A>
30 to determine what characters will be used when printing note heads.
31 It is rarely necessary to include a headshapes context in your music,
32 since Mup already has the most common values built in,
33 so generally you just need to use the
34 <A HREF="param.html#notehead">noteheads parameter</A>
35 to access them. However, it is still important to understand
36 what the headshapes context can contain,
37 to understand how the builtin values work.
38 </P>
39 <P>
40 The headshapes context defines, for
41 a given head shape name, what specific note head characters
42 to use for the notes of various durations.
43 It contains one or more pairs of strings.
44 The first string in the pair gives a name for a set of note head shapes.
45 The second string contains a space-separated list of the names
46 of 4 note head characters to use for that head shape name.
47 The first shape in the list is used for quarter notes and shorter,
48 the second for half notes,
49 the third for whole notes, and the fourth for double whole notes.
50 </P>
51 <P>
52 If an upside down version of the character is to be used for stem down notes,
53 the name is prefixed by &quot;u?&quot; (The &quot;u&quot; stands for &quot;upside-down&quot; and the
54 question mark is intended to be mnemonic for the fact
55 that the upside down version
56 will only be used part of the time, namely for stem-down notes.)
57 </P>
58 <P>
59 As was mentioned above, the most common mappings are already built into Mup.
60 Here is the list of the pre-defined values.
61 Pay particular attention to the first string on each line,
62 since those are the names you will use in the
63 <A HREF="param.html#notehead">notehead parameter</A>
64 and for
65 <A HREF="shaped.html#chord">overriding chord</A>
66 and
67 <A HREF="shaped.html#note">note shapes.</A>
68 <BR>
69 <TABLE BORDER=4>
70 <TR>
71 <TD>&quot;norm&quot;</TD>       <TD>&quot;4n 2n 1n dblwhole&quot;</TD>
72 </TR>
73 <TR>
74 <TD>&quot;x&quot;</TD>  <TD>&quot;xnote diamond diamond dwhdiamond&quot;</TD>
75 </TR>
76 <TR>
77 <TD>&quot;allx&quot;</TD>       <TD>&quot;xnote xnote xnote xnote&quot;</TD>
78 </TR>
79 <TR>
80 <TD>&quot;diam&quot;</TD>       <TD>&quot;filldiamond diamond diamond dwhdiamond&quot;</TD>
81 </TR>
82 <TR>
83 <TD>&quot;blank&quot;</TD>      <TD>&quot;blankhead blankhead blankhead blankhead&quot;</TD>
84 </TR>
85 <TR>
86 <TD>&quot;righttri&quot;</TD>   <TD>&quot;u?fillrighttriangle u?righttriangle u?righttriangle u?dwhrighttriangle&quot;</TD>
87 </TR>
88 <TR>
89 <TD>&quot;isostri&quot;</TD>    <TD>&quot;fillisostriangle isostriangle isostriangle dwhisostriangle&quot;</TD>
90 </TR>
91 <TR>
92 <TD>&quot;rect&quot;</TD>       <TD>&quot;fillrectangle rectangle rectangle dwhrectangle&quot;</TD>
93 </TR>
94 <TR>
95 <TD>&quot;pie&quot;</TD>        <TD>&quot;fillpiewedge piewedge piewedge dwhpiewedge&quot;</TD>
96 </TR>
97 <TR>
98 <TD>&quot;semicirc&quot;</TD>   <TD>&quot;fillsemicircle semicircle semicircle dwhsemicircle&quot;</TD>
99 </TR>
100 <TR>
101 <TD>&quot;slash&quot;</TD>      <TD>&quot;fillslashhead slashhead slashhead dwhslashhead&quot;</TD>
102 </TR>
103 <TR>
104 <TD>&quot;allslash&quot;</TD>   <TD>&quot;fillslashhead fillslashhead fillslashhead fillslashhead&quot;</TD>
105 </TR>
106 </TABLE>
107
108 </P>
109 <P>
110 You can redefine these or define new ones if you wish.
111 The name (the first of the two strings in the pair)
112 can be almost anything you want.
113 The four names in the second string must be taken from the list of
114 valid note head characters given below:
115 <BR>
116 <PRE>
117 4n                   2n         1n      dblwhole
118 filldiamond          diamond            dwhdiamond
119 fillisostriangle     isostriangle       dwhisostriangle
120 fillpiewedge         piewedge           dwhpiewedge
121 fillrectangle        rectangle          dwhrectangle
122 fillrighttriangle    righttriangle      dwhrighttriangle
123 ufillrighttriangle   urighttriangle     udwhrighttriangle
124 fillsemicircle       semicircle         dwhsemicircle
125 fillslashhead        slashhead          dwhslashhead
126 xnote
127 blankhead
128 </PRE>
129 The righttriangle shape names can be prefixed by u? when
130 used in the headshapes context, to indicate the upside down version of them should
131 be used when the stem is down. Note that u? cannot be used on any other
132 note head characters, since none of the others have a corresponding
133 upside down version.
134 </P>
135 <P>
136 As an example of how you could use the headshapes context,
137 suppose you wished to use xnote for half notes and shorter,
138 and diamond for longer notes.
139 That is different than either of the builtin values &quot;x&quot; or &quot;allx&quot;
140 but you could override one of them:
141 <BR><PRE>
142 headshapes
143         &quot;x&quot; &quot;xnote xnote diamond diamond&quot;
144 </PRE><BR>
145 </P>
146 <P>
147 The blankhead does not print any head at all, it just leaves space as if
148 there were a note head. It might be used if for some reason you just want
149 stems.
150 </P>
151 <H2>
152 Noteheads parameter
153 </H2>
154 <P>
155 <A HREF="param.html#notehead">The noteheads parameter</A>
156 describes which note head shape to use for each pitch
157 in the scale. It can be specified in score, staff, or voice contexts.
158 If you want to use the same shape for all pitches,
159 (as is the case with standard notation), only one shape name is specified.
160 Thus the default value for this parameter is
161 <BR><PRE>
162 noteheads = &quot;norm&quot;
163 </PRE><BR>
164 </P>
165 <P>
166 If you want to use different shapes for different pitches,
167 the noteheads value needs to be a string containing a list of 7 shape names.
168 They are listed from the &quot;tonic&quot; of the major key up the scale,
169 with the key based on the number of sharps or flats in the
170 <A HREF="param.html#key">key signature.</A>
171 The shape names must be from the list of pre-defined head shapes (norm,
172 xnote, diam, blank, righttri, isostri, rect, pie, semicirc, slash),
173 or names that you have given as the first in a pair of strings
174 in the headshapes context.
175 </P>
176 <P>
177 You can get the most common shaped note system using 4 shapes using:
178 <BR><PRE>
179 noteheads = &quot;righttri norm rect righttri norm rect diam&quot;
180 </PRE><BR>
181 There are several shaped notes systems using 7 different shapes.
182 One such system is specified by:
183 <BR><PRE>
184 noteheads = &quot;isostri semicirc diam righttri norm rect pie&quot;
185 </PRE><BR>
186 </P>
187 <P>
188 Once the noteheads parameter is set,
189 you specify your music just like you would for standard notation,
190 but Mup will use the appropriate note heads based on your specifications.
191 </P>
192 <P>
193 <BR><PRE>
194 score
195    // Use a 7-shaped system.
196    noteheads = &quot;isostri semicirc diam righttri norm rect pie&quot;
197
198    // Noteheads are given in order for the major key,
199    // so we'll start out with an example in major.
200    key = d major
201
202 music
203
204 // Do a descending scale in D major
205 1: d+;c+;b;a;
206 bar
207
208 1: g;f;e;d;
209 dblbar
210
211 score
212    // Now we switch to D minor, where the &quot;tonic&quot;
213    // will start at the rect and then wrap around.
214    key = d minor
215
216 music
217
218 // Do a descending scale in D minor
219 1: d+;c+;b;a;
220 bar
221
222 1: g;f;e;d;
223 bar
224 </PRE><BR>
225 <IMG SRC="mugex60.gif" ALT="Picture of Mup output"><BR>
226 </P>
227 <H2>
228 Overriding chord note heads
229 </H2>
230 <P>
231 <A NAME="chord">It is possible to override what note shape to use for a chord,</A>
232 by giving &quot;hs&quot; followed by a head shape name from the headshapes context,
233 inside square brackets.
234 Thus
235 <BR><PRE>
236         [hs &quot;righttri&quot;]
237 </PRE><BR>
238 would use the &quot;righttri&quot; headshape. The specific character to use would be
239 based on the group's duration. In other words, if the chord was a
240 quarter note or shorter, the &quot;fillrighttriangle&quot; note head would be used,
241 but if the chord was a half or whole note, a &quot;righttriangle&quot; note head would be
242 used, and a &quot;dwhrighttriangle&quot; would be used for a double whole note.
243 </P>
244 <P>
245 The hs specification can be used along with other things that can go in the
246 square brackets. For example,
247 <BR><PRE>
248         [hs &quot;blank&quot;; len 0]
249 </PRE><BR>
250 would use blankheads and no stem, resulting in no chord being printed at all!
251 </P>
252 <H2>
253 Overriding individual note heads
254 </H2>
255 <P>
256 <A NAME="note">If you want to override the note head shape to be used for one specific</A>
257 note in a chord, you use hs followed by the head shape name
258 as a string after the note.
259 <BR><PRE>
260 1: cg e+ hs &quot;diam&quot;; f a hs &quot;x&quot; c+; 2ge+;
261 bar
262 </PRE><BR>
263 <IMG SRC="mugex61.gif" ALT="Picture of Mup output"><BR>
264 </P>
265 <H2>
266 Putting it all together to use shaped notes
267 </H2>
268 <P>
269 In summary,
270 note head shapes can be specified in five different places: per note,
271 per chord, in voice context, in staff context, and in score context.
272 When deciding what note head shape to use, Mup checks for specifications
273 in that order, using the first it finds.
274 </P>
275 <P>
276 Since fret numbers are used rather than note heads on
277 <A HREF="tabstaff.html">tablature staffs,</A>
278 the only head shape name that is allowed is &quot;allx.&quot;
279 which is used for &quot;muffled&quot; notes.
280 </P>
281 <P>
282 Here is a simple example of shaped notes, using the common 4-shape system.
283 <BR><PRE>
284 score
285         noteheads = &quot;righttri norm rect righttri norm rect diam&quot;
286         staffs=4
287         key=2#
288         bracket=1-4
289
290 staff 3
291         clef=treble8
292 staff 4
293         clef=bass
294 music
295
296 1: 2c+;4d+;e+;
297 2: 2e;4a;f;
298 3: 2e;4f;c;
299 4: 2a-;4f-;a-;
300 bar
301
302 1: 1d+;
303 2: 1f;
304 3: 1d;
305 4: 1d;
306 endbar
307 </PRE><BR>
308 <IMG SRC="mugex62.gif" ALT="Picture of Mup output"><BR>
309 </P>
310 <P>
311 Here is an example of using the same note head shape for all pitches,
312 illustrating how the proper version--filled or open--of the note head
313 is used, based on the note's duration.
314 <BR><PRE>
315 score
316         time=8/4
317         beamstyle=2,2,2,2
318
319 music
320 1: 8cf;;4;2;1;
321 bar
322
323 score noteheads=&quot;isostri&quot;
324 music
325 1: 4ec+;8;;2;1;
326 bar
327
328 score noteheads=&quot;rect&quot;
329 music
330 1: 1gc+;4;2;8;;
331 bar
332
333 score noteheads=&quot;pie&quot;
334 music
335 1: 8cf;;4;2;1;
336 bar
337
338 score noteheads=&quot;x&quot;
339 music
340 1: 4ec+;8;;2;1;
341 bar
342
343 score noteheads=&quot;slash&quot;
344 music
345 1: 1gc+;4;2;8;;
346 bar
347 </PRE><BR>
348 <IMG SRC="mugex63.gif" ALT="Picture of Mup output"><BR>
349 </P>
350 <P>
351 And finally, here is a somewhat silly example that demonstrates how
352 you can use the various shaped notes features to get any kind of
353 note head that Mup supports anywhere you want.
354 <BR><PRE>
355 headshapes
356         // Make some user-defined head shapes.
357         // These combinations don't really make sense;
358         // they are just to demonstrate what you can do.
359         &quot;reg&quot; &quot;4n 2n 2n 2n&quot;
360         &quot;other&quot; &quot;fillrectangle diamond isostriangle dblwhole&quot;
361
362 score
363         // Set notesheads, using an arbitrary mixture of builtin
364         // and user-defined head shapes.
365         noteheads=&quot;norm reg other reg reg other righttri&quot;
366
367 music
368
369 1: c;d;2e;
370 bar
371
372 1: 2g;f;
373 bar
374
375 1: {b;a;g;}3;2c+;
376 bar
377
378 1: 1d;
379 bar
380
381 // do some shape overrides, both on group and note
382 1: [ hs &quot;pie&quot; ]2ce; [hs &quot;isostri&quot;] c e g hs &quot;righttri&quot;; 
383 endbar
384 </PRE><BR>
385 <IMG SRC="mugex64.gif" ALT="Picture of Mup output"><BR>
386 </P>
387 <HR><P>
388 &nbsp;&nbsp;&nbsp;<A HREF="tabstaff.html">&lt;-- previous page</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="index.html">Table of Contents</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="textstr.html">next page --&gt;</A>
389 </P>
390 </BODY></HTML>