chiark / gitweb /
Merge branch 'arkkra' into shiny
[mup] / mup / docs / uguide / shaped.html
CommitLineData
69695f33
MW
1<HTML>
2<HEAD><TITLE>
3Shaped 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>
13SHAPED NOTES
14</H1>
15<P>
16If you intend to only use the usual system of note heads,
17you can skip over this section on shaped notes.
18If you wish to use less common note head shapes, like X-shaped notes,
19rather than normal note heads, or want &quot;shaped note&quot; music that is often used
20for &quot;Sacred Harp&quot; style music, sometimes also called &quot;fasola notation,&quot;
21then this section will explain how you can do that.
22</P>
23<H2>
24Headshapes context
25</H2>
26<P>
27<A NAME="hdshape">The headshapes context</A>
28is used in conjuction with the
29<A HREF="param.html#notehead">noteheads parameter</A>
30to determine what characters will be used when printing note heads.
31It is rarely necessary to include a headshapes context in your music,
32since Mup already has the most common values built in,
33so generally you just need to use the
34<A HREF="param.html#notehead">noteheads parameter</A>
35to access them. However, it is still important to understand
36what the headshapes context can contain,
37to understand how the builtin values work.
38</P>
39<P>
40The headshapes context defines, for
41a given head shape name, what specific note head characters
42to use for the notes of various durations.
43It contains one or more pairs of strings.
44The first string in the pair gives a name for a set of note head shapes.
45The second string contains a space-separated list of the names
46of 4 note head characters to use for that head shape name.
47The first shape in the list is used for quarter notes and shorter,
48the second for half notes,
49the third for whole notes, and the fourth for double whole notes.
50</P>
51<P>
52If an upside down version of the character is to be used for stem down notes,
53the name is prefixed by &quot;u?&quot; (The &quot;u&quot; stands for &quot;upside-down&quot; and the
54question mark is intended to be mnemonic for the fact
55that the upside down version
56will only be used part of the time, namely for stem-down notes.)
57</P>
58<P>
59As was mentioned above, the most common mappings are already built into Mup.
60Here is the list of the pre-defined values.
61Pay particular attention to the first string on each line,
62since those are the names you will use in the
63<A HREF="param.html#notehead">notehead parameter</A>
64and for
65<A HREF="shaped.html#chord">overriding chord</A>
66and
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>
110You can redefine these or define new ones if you wish.
111The name (the first of the two strings in the pair)
112can be almost anything you want.
113The four names in the second string must be taken from the list of
114valid note head characters given below:
115<BR>
116<PRE>
1174n 2n 1n dblwhole
118filldiamond diamond dwhdiamond
119fillisostriangle isostriangle dwhisostriangle
120fillpiewedge piewedge dwhpiewedge
121fillrectangle rectangle dwhrectangle
122fillrighttriangle righttriangle dwhrighttriangle
123ufillrighttriangle urighttriangle udwhrighttriangle
124fillsemicircle semicircle dwhsemicircle
125fillslashhead slashhead dwhslashhead
126xnote
127blankhead
128</PRE>
129The righttriangle shape names can be prefixed by u? when
130used in the headshapes context, to indicate the upside down version of them should
131be used when the stem is down. Note that u? cannot be used on any other
132note head characters, since none of the others have a corresponding
133upside down version.
134</P>
135<P>
136As an example of how you could use the headshapes context,
137suppose you wished to use xnote for half notes and shorter,
138and diamond for longer notes.
139That is different than either of the builtin values &quot;x&quot; or &quot;allx&quot;
140but you could override one of them:
141<BR><PRE>
142headshapes
143 &quot;x&quot; &quot;xnote xnote diamond diamond&quot;
144</PRE><BR>
145</P>
146<P>
147The blankhead does not print any head at all, it just leaves space as if
148there were a note head. It might be used if for some reason you just want
149stems.
150</P>
151<H2>
152Noteheads parameter
153</H2>
154<P>
155<A HREF="param.html#notehead">The noteheads parameter</A>
156describes which note head shape to use for each pitch
157in the scale. It can be specified in score, staff, or voice contexts.
158If you want to use the same shape for all pitches,
159(as is the case with standard notation), only one shape name is specified.
160Thus the default value for this parameter is
161<BR><PRE>
162noteheads = &quot;norm&quot;
163</PRE><BR>
164</P>
165<P>
166If you want to use different shapes for different pitches,
167the noteheads value needs to be a string containing a list of 7 shape names.
168They are listed from the &quot;tonic&quot; of the major key up the scale,
169with the key based on the number of sharps or flats in the
170<A HREF="param.html#key">key signature.</A>
171The shape names must be from the list of pre-defined head shapes (norm,
172xnote, diam, blank, righttri, isostri, rect, pie, semicirc, slash),
173or names that you have given as the first in a pair of strings
174in the headshapes context.
175</P>
176<P>
177You can get the most common shaped note system using 4 shapes using:
178<BR><PRE>
179noteheads = &quot;righttri norm rect righttri norm rect diam&quot;
180</PRE><BR>
181There are several shaped notes systems using 7 different shapes.
182One such system is specified by:
183<BR><PRE>
184noteheads = &quot;isostri semicirc diam righttri norm rect pie&quot;
185</PRE><BR>
186</P>
187<P>
188Once the noteheads parameter is set,
189you specify your music just like you would for standard notation,
190but Mup will use the appropriate note heads based on your specifications.
191</P>
192<P>
193<BR><PRE>
194score
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
202music
203
204// Do a descending scale in D major
2051: d+;c+;b;a;
206bar
207
2081: g;f;e;d;
209dblbar
210
211score
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
216music
217
218// Do a descending scale in D minor
2191: d+;c+;b;a;
220bar
221
2221: g;f;e;d;
223bar
224</PRE><BR>
225<IMG SRC="mugex60.gif" ALT="Picture of Mup output"><BR>
226</P>
227<H2>
228Overriding 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>
232by giving &quot;hs&quot; followed by a head shape name from the headshapes context,
233inside square brackets.
234Thus
235<BR><PRE>
236 [hs &quot;righttri&quot;]
237</PRE><BR>
238would use the &quot;righttri&quot; headshape. The specific character to use would be
239based on the group's duration. In other words, if the chord was a
240quarter note or shorter, the &quot;fillrighttriangle&quot; note head would be used,
241but if the chord was a half or whole note, a &quot;righttriangle&quot; note head would be
242used, and a &quot;dwhrighttriangle&quot; would be used for a double whole note.
243</P>
244<P>
245The hs specification can be used along with other things that can go in the
246square brackets. For example,
247<BR><PRE>
248 [hs &quot;blank&quot;; len 0]
249</PRE><BR>
250would use blankheads and no stem, resulting in no chord being printed at all!
251</P>
252<H2>
253Overriding 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>
257note in a chord, you use hs followed by the head shape name
258as a string after the note.
259<BR><PRE>
2601: cg e+ hs &quot;diam&quot;; f a hs &quot;x&quot; c+; 2ge+;
261bar
262</PRE><BR>
263<IMG SRC="mugex61.gif" ALT="Picture of Mup output"><BR>
264</P>
265<H2>
266Putting it all together to use shaped notes
267</H2>
268<P>
269In summary,
270note head shapes can be specified in five different places: per note,
271per chord, in voice context, in staff context, and in score context.
272When deciding what note head shape to use, Mup checks for specifications
273in that order, using the first it finds.
274</P>
275<P>
276Since fret numbers are used rather than note heads on
277<A HREF="tabstaff.html">tablature staffs,</A>
278the only head shape name that is allowed is &quot;allx.&quot;
279which is used for &quot;muffled&quot; notes.
280</P>
281<P>
282Here is a simple example of shaped notes, using the common 4-shape system.
283<BR><PRE>
284score
285 noteheads = &quot;righttri norm rect righttri norm rect diam&quot;
286 staffs=4
287 key=2#
288 bracket=1-4
289
290staff 3
291 clef=treble8
292staff 4
293 clef=bass
294music
295
2961: 2c+;4d+;e+;
2972: 2e;4a;f;
2983: 2e;4f;c;
2994: 2a-;4f-;a-;
300bar
301
3021: 1d+;
3032: 1f;
3043: 1d;
3054: 1d;
306endbar
307</PRE><BR>
308<IMG SRC="mugex62.gif" ALT="Picture of Mup output"><BR>
309</P>
310<P>
311Here is an example of using the same note head shape for all pitches,
312illustrating how the proper version--filled or open--of the note head
313is used, based on the note's duration.
314<BR><PRE>
315score
316 time=8/4
317 beamstyle=2,2,2,2
318
319music
3201: 8cf;;4;2;1;
321bar
322
323score noteheads=&quot;isostri&quot;
324music
3251: 4ec+;8;;2;1;
326bar
327
328score noteheads=&quot;rect&quot;
329music
3301: 1gc+;4;2;8;;
331bar
332
333score noteheads=&quot;pie&quot;
334music
3351: 8cf;;4;2;1;
336bar
337
338score noteheads=&quot;x&quot;
339music
3401: 4ec+;8;;2;1;
341bar
342
343score noteheads=&quot;slash&quot;
344music
3451: 1gc+;4;2;8;;
346bar
347</PRE><BR>
348<IMG SRC="mugex63.gif" ALT="Picture of Mup output"><BR>
349</P>
350<P>
351And finally, here is a somewhat silly example that demonstrates how
352you can use the various shaped notes features to get any kind of
353note head that Mup supports anywhere you want.
354<BR><PRE>
355headshapes
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
362score
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
367music
368
3691: c;d;2e;
370bar
371
3721: 2g;f;
373bar
374
3751: {b;a;g;}3;2c+;
376bar
377
3781: 1d;
379bar
380
381// do some shape overrides, both on group and note
3821: [ hs &quot;pie&quot; ]2ce; [hs &quot;isostri&quot;] c e g hs &quot;righttri&quot;;
383endbar
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>