chiark / gitweb /
Merge branch 'arkkra' into shiny
[mup] / mup / docs / uguide / chordinp.html
CommitLineData
69695f33
MW
1<HTML>
2<HEAD><TITLE>
3Specifying chords
4</TITLE></HEAD>
5<BODY>
6<P>
7&nbsp;&nbsp;&nbsp;<A HREF="music.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="noteattr.html">next page --&gt;</A>
10</P>
11
12<H2>
13Specifying chords
14</H2>
15<H3>
16Staff and voice
17</H3>
18<P>
19The description of the music for one voice begins with the staff and voice
20number, followed by a colon. For example:
21<BR><PRE>
223 1:
23</PRE><BR>
24indicates that the remainder of the line contains musical information for voice
251 of staff 3. If the &quot;voice&quot; number is omitted, voice 1 is assumed. Thus
26<BR><PRE>
273:
28</PRE><BR>
29is equivalent to the previous example.
30Both the staff and voice can be given as a list. This may be useful if
31several staffs have the same notes, or multiple voices on a staff have the
32same notes. For example:
33<BR><PRE>
341-4 2: // voice 2 of staffs 1, 2, 3, and 4
351,2,4: // voice 1 of staffs 1, 2, and 4,
361,3,6-7 1-2: // voices 1 and 2 on staffs 1, 3, 6 and 7
375-8 1,2: // voices 1 and 2 on staffs 5, 6, 7, and 8
38</PRE><BR>
39</P>
40<P>
41If you want notes to go to one voice on some staffs
42and a different voice on others,
43this can be specified using an ampersand. For example:
44<BR><PRE>
451 1 &amp; 3 2:
46</PRE><BR>
47will cause the music to go to voice 1 of staff 1 as well as to voice
482 of staff 3. Various styles can be combined:
49<BR><PRE>
50// Voices 1 and 2 on staff 2,
51// as well as voice 2 on staff 4
52// and voice 1 on staffs 6, 7, and 9
532 1-2 &amp; 4 2 &amp; 6-7,9 1:
54</PRE><BR>
55</P>
56<P>
57It is possible to have up to
5840
59<A HREF="param.html#staffs">staffs</A>
60and up to
61<A HREF="param.html#vscheme">three voices per staff.</A>
62While there can be voice crossings, in general voice 1 should be the &quot;top&quot;
63voice, voice 2 the &quot;bottom&quot; voice, and voice 3 the &quot;middle&quot; or &quot;extra&quot; voice.
64With the first two voices, Mup tries hard to avoid any &quot;collisions&quot;
65between notes, rests, and other things. Since voice 3 is an extra voice,
66there are some cases when overlap with the other voices
67is basically unavoidable, but there are some techniques
68discussed later that let you
69<A HREF="chrdattr.html">tweak placement</A>
70when necessary.
71</P>
72<P>
73As an alternative to this voice-at-a-time input style, there is
74also a chord-at-a-time input style, which will be covered
75<A HREF="altinp.html">later.</A>
76</P>
77<H3>
78Chord duration information
79</H3>
80<P>
81The rest of the line contains a list of chords, with a semicolon at the
82end of each chord. Each chord has a
83<A NAME="duration">time value.</A>
84The time values of all
85the chords in the line must add up to the
86<A HREF="param.html#time">time signature.</A>
87Time values are given as follows:
88<TABLE BORDER=4>
89<TR>
90<TD><B>Input</B></TD> <TD><B>Meaning</B></TD>
91</TR>
92<TR>
93<TD>1/4</TD> <TD>quadruple whole (not valid for notes)</TD>
94</TR>
95<TR>
96<TD>1/2</TD> <TD>double whole</TD>
97</TR>
98<TR>
99<TD>1</TD> <TD>whole</TD>
100</TR>
101<TR>
102<TD>2</TD> <TD>half</TD>
103</TR>
104<TR>
105<TD>4</TD> <TD>quarter</TD>
106</TR>
107<TR>
108<TD>8</TD> <TD>eighth</TD>
109</TR>
110<TR>
111<TD>16</TD> <TD>sixteenth</TD>
112</TR>
113<TR>
114<TD>32</TD> <TD>thirty-second</TD>
115</TR>
116<TR>
117<TD>64</TD> <TD>sixty-fourth</TD>
118</TR>
119<TR>
120<TD>128</TD> <TD>128th</TD>
121</TR>
122<TR>
123<TD>256</TD> <TD>256th</TD>
124</TR>
125</TABLE>
126
127</P>
128<P>
129Any of these time values can be followed by one or more dots, to indicate
130a dotted note. Each dot increases the time value by 50% of the preceding
131note or dot.
132</P>
133<P>
134It is also possible to specify time as two or more times to be added together.
135For example, 2+8 would indicate the time of a half note plus the time of
136an eighth note, or in other words, a half note tied to an eighth note.
137The expression can also include subtractions, like 2.-16. When subtractions
138are present, it isn't clear what time values you want Mup to use,
139so it will start with the largest possible time value and add enough
140additional chords to add up to the total. For example, if you were to use
1411-4, indicating a whole note minus a quarter note,
142Mup will use a dotted half note, even though there are a number of
143other ways to represent that total time, such as a half note tied to a
144quarter note.
145</P>
146<P>
147If a time value is not specified for the first chord in a measure for a
148given voice, the default timeunit value
149is used. You can set the default value using the
150<A HREF="param.html#timeunit">"timeunit" parameter</A>
151as described in the
152<A HREF="param.html">"Parameters" section.</A>
153If that parameter is not set, the default is the denominator (bottom
154number) of the
155<A HREF="param.html#time">time signature.</A>
156For chords after the first, if a time value is not specified, the time
157value for the previous chord is used.
158</P>
159<H3>
160Notes, rests, or spaces
161</H3>
162<P>
163<A NAME="letter">There are three kinds of "chords."</A>
164The first type consists of one or more
165pitches, given by the letters &quot;a&quot; through &quot;g&quot;.
166<A NAME="pitchpar">Parentheses</A>
167can be placed around the pitch if you want
168the note to be printed in parentheses.
169(If the pitch is modified by an
170<A HREF="chordinp.html#acc">accidental</A>
171or
172<A HREF="chordinp.html#oct">octave,</A>
173which will be
174discussed later, those must also be included inside the parentheses.)
175<A NAME="restspc">The second is a rest, which</A>
176is designated by the letter r. The third type is a &quot;space,&quot; designated
177by the letter s. Space is basically
178a placeholder that takes up time, but doesn't print anything. It is useful
179when a certain voice only has notes during part of the measure. It can also
180be useful for specifying &quot;pickup&quot; measures to account for the time before
181the first note in the measure. For example:
182<BR><PRE>
183// a pickup measure
1841: 2.s;8.c;16d;
185bar
1861: e;g;e;c;
187endbar
188</PRE><BR>
189<IMG SRC="mugex9.gif" ALT="Picture of Mup output"><BR>
190</P>
191<P>
192If all voices contain spaces, no space is actually taken up on output.
193Most of the time, this will be what you want. For example,
194when you are using space for a pickup, the
195space is just to add up to a measure, and you don't want any actual blank space
196at the beginning of the piece. Once in a while, however, you
197may want space to actually be allocated on output, perhaps
198to be able to allow space for some special notation. In that case,
199you prefix the &quot;s&quot; with a &quot;u&quot; to indicate an uncollapseable space.
200</P>
201<P>
202If a given voice is omitted for a particular measure,
203Mup defaults to a measure of space.
204</P>
205<H4>
206Measure duration
207</H4>
208<P>
209<A NAME="measdur">There is a special duration of "m," which means an entire measure.</A>
210It can only be used with a rest, space, or &quot;rpt&quot; (repeat). For example:
211<BR><PRE>
2121 1: mr;
2131 2: ms;
214</PRE><BR>
215</P>
216<P>
217A measure rest looks like a whole rest, but is centered in the measure.
218It should be used when a whole measure is a rest, regardless of the time
219signature.
220However, if you want to force use of a symbol other than the whole rest
221symbol, you can specify a duration before the mr, and the rest symbol for that
222duration will be drawn instead.
223<BR><PRE>
2244mr; // use a quarter rest symbol
2251/4mr; // use a quadruple whole rest symbol
2262.. mr; // use a double-dotted half rest
227</PRE><BR>
228</P>
229<P>
230Using &quot;m rpt&quot; will cause the
231measure repeat symbol to be printed, indicating
232the measure is just like the previous measure. Measures repeats
233will automatically be numbered, unless the
234<A HREF="param.html#nummrpt">numbermrpt parameter</A>
235is set to n. If there is more than one voice, you only need to
236specify the mrpt on voice 1. If you do specify other voices as well,
237they must be either a mrpt or ms.
238<BR><PRE>
2391: c;d;e;f;
240bar
241
242// another measure just like the first
2431: m rpt;
244bar
245
246// the space between m and rpt is optional
2471: mrpt;
248bar
249</PRE><BR>
250<IMG SRC="mugex10.gif" ALT="Picture of Mup output"><BR>
251</P>
252<H4>
253Accidentals
254</H4>
255<P>
256<A NAME="acc">Each pitch letter in a chord may be followed by an accidental.</A>
257Valid accidentals are:
258<TABLE BORDER=4>
259<TR>
260<TD><B>Input</B></TD> <TD><B>Meaning</B></TD>
261</TR>
262<TR>
263<TD><TT>#</TT></TD> <TD>sharp</TD>
264</TR>
265<TR>
266<TD><TT>&amp;</TT></TD> <TD>flat</TD>
267</TR>
268<TR>
269<TD><TT>x</TT></TD> <TD>double sharp</TD>
270</TR>
271<TR>
272<TD><TT>&amp;&amp;</TT></TD> <TD>double flat</TD>
273</TR>
274<TR>
275<TD><TT>n</TT></TD> <TD>natural</TD>
276</TR>
277</TABLE>
278
279</P>
280<P>
281The accidental can be placed inside
282parentheses if you want it to be printed
283within parentheses.
284</P>
285<H4>
286Octave
287</H4>
288<P>
289<A NAME="oct">An octave indicator may be specified after the pitch letter</A>
290or optional accidental.
291The octave can be specified in either of two ways:
292absolute or relative. A number from 0 to 9 is
293used to specify an absolute octave. Octaves run from C up to B. Octave 4 is
294the octave starting on middle C. Octave 3 is the octave below that, etc.
295A relative octave is specified by one or more plus or minus signs, and
296indicates that number of octaves above or below the default octave. For
297example:
298<BR><PRE>
299c // c in the default octave
300e++ // e two octaves above default octave
301f#--- // f# three octaves below default octave
302b&amp;6 // b flat in octave 6
303</PRE><BR>
304</P>
305<P>
306The default octave can be set using the
307<A HREF="param.html#defoct">"defoct" parameter,</A>
308which is described in the
309<A HREF="param.html">"Parameters" section.</A>
310If that parameter is not
311set, the default octave is the octave containing the note associated with
312the middle line of the staff, based on the current
313<A HREF="param.html#clef">clef.</A>
314In other words, the default octaves are:
315<TABLE BORDER=4>
316<TR>
317<TD><B>Clef</B></TD> <TD><B>Octave</B></TD>
318</TR>
319<TR>
320<TD>frenchviolin</TD> <TD>5</TD>
321</TR>
322<TR>
323<TD>8treble</TD> <TD>5</TD>
324</TR>
325<TR>
326<TD>treble</TD> <TD>4</TD>
327</TR>
328<TR>
329<TD>soprano</TD> <TD>4</TD>
330</TR>
331<TR>
332<TD>mezzosoprano</TD> <TD>4</TD>
333</TR>
334<TR>
335<TD>alto</TD> <TD>4</TD>
336</TR>
337<TR>
338<TD>treble8</TD> <TD>3</TD>
339</TR>
340<TR>
341<TD>tenor</TD> <TD>3</TD>
342</TR>
343<TR>
344<TD>baritone</TD> <TD>3</TD>
345</TR>
346<TR>
347<TD>bass</TD> <TD>3</TD>
348</TR>
349</TABLE>
350
351</P>
352<H3>
353Shorthand notations
354</H3>
355<P>
356<A NAME="shorthnd">If a chord is omitted, the values for the previous chord are reused. This</A>
357works for pitches, rests, and spaces. For normal,
358<A HREF="param.html#stlines">5-line staffs,</A>
359the pitches for the first chord of every measure
360must always be specified, since there is no previous chord.
361</P>
362<P>
363Putting all these things together, here are some examples:
364<BR><PRE>
365// Two eighth notes, each b#, followed by an eighth
366// note d, eighth note e, and half note e, with the
367// last 3 notes being in the next higher octave.
3681 1: 8b#; ; d+; e+; 2;
369
370// Whole note C-E-G chord in default octave
371// for voice 2 of staff 1
3721 2: 1ceg;
373
374// Four quarter notes on staff 2, voice 1.
375// The last is in the octave above the default octave.
3762: 4g; a; b; c+;
377</PRE><BR>
378<IMG SRC="mugex11.gif" ALT="Picture of Mup output"><BR>
379</P>
380<P>
381For
382<A HREF="param.html#stlines">1-line staffs,</A>
383it is never necessary to specify a pitch, since all notes
384go on the single staff line. You can, however, specify a pitch if you wish.
385The pitch will be ignored for the purposes of printing, but will be
386used for
387<A HREF="midi.html">MIDI output.</A>
388If you don't specify a pitch, it is arbitrarily set to middle C.
389</P>
390<HR><P>
391&nbsp;&nbsp;&nbsp;<A HREF="music.html">&lt;-- previous page</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="index.html">Table of Contents</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="noteattr.html">next page --&gt;</A>
392</P>
393</BODY></HTML>