chiark / gitweb /
Merge branch 'arkkra' into shiny
[mup] / mup / docs / uguide / cmdargs.html
CommitLineData
69695f33
MW
1<HTML>
2<HEAD><TITLE>
3Mup Options
4</TITLE></HEAD>
5<BODY>
6<P>
7&nbsp;&nbsp;&nbsp;<A HREF="running.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="utilpgms.html">next page --&gt;</A>
10</P>
11
12<H2>
13Mup Options
14</H2>
15<P>
16Mup accepts a number
17of options.
18When invoking Mup from a command line,
19the options are specified by a dash followed by a letter.
20On Windows/MS-DOS
21systems, you can substitute a slash instead of the dash.
22If you are using Mupmate, you will use the &quot;Set Options&quot; form off
23of the &quot;Run&quot; menu to set the options.
24You just fill values into the form, and Mupmate will
25take care of the details of running Mup with your values,
26so you won't use the dash and letter shown below at all.
27Some of the options listed below are not available from Mupmate,
28either because they are meant for debugging, and thus not generally
29of interest to most users, or because Mupmate handles the appropriate
30details automatically.
31The options to the mup command (in alphabetical order) are:
32<HR>
33<CODE>Command line:&nbsp;</CODE>
34<A NAME="coption"><B>-c</B> <I>N</I></A>
35<BR>
36<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
37Run &gt; Set Options &gt; Enable Auto Multirest and Min Measures to Combine
38<BR>&nbsp;&nbsp;<BR>
39
40Combine consecutive measures of all rests or spaces into
41<A HREF="multirst.html">multirests</A>
42(multiple measures of rest printed as a single measure,
43usually with the number of
44<A HREF="param.html#prmultn">measures of rest printed</A>
45above the staff).
46Any time there
47are <I>N</I> or more measures in a row that consist entirely of rests or spaces,
48they will be replaced by a multirest. The combining of measures
49stops when there is a visible staff that contains notes
50or lyrics, or that contain
51<A HREF="textmark.html">text</A>
52or
53<A HREF="mussym.html">musical symbols</A>
54after the first beat of the measure,
55or when there are
56<A HREF="param.html">parameter changes</A>
57on a visible staff or in score context that
58<A HREF="param.html#visible">change</A>
59<A HREF="param.html#clef">clef,</A>
60<A HREF="param.html#key">key,</A>
61or
62<A HREF="param.html#time">time signature,</A>
63or when there is a
64<A HREF="bars.html">bar line</A>
65other than an ordinary bar.
66This option is most likely to be useful when printing a subset of staffs,
67where the particular staff(s) you are printing have long periods of rests.
68See information about
69<A HREF="cmdargs.html#soption">the -s option</A>
70and the
71<A HREF="param.html#visible">"visible" parameter</A>
72below.
73This option overrides the
74<A HREF="param.html#restcomb">restcombine parameter.</A>
75<HR>
76<CODE>Command line:&nbsp;</CODE>
77<B>-C</B>
78<BR>
79<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
80Option not available (only used for debugging).
81<BR>&nbsp;&nbsp;<BR>
82
83This option is only used in connection with
84<A HREF="cmdargs.html#Eoption">the -E option.</A>
85It specifies that comments
86are to be passed through rather than deleted.
87<HR>
88<CODE>Command line:&nbsp;</CODE>
89<A NAME="dbgoption"><B>-d</B> <I>N</I></A>
90<BR>
91<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
92Option not available (only used for debugging).
93<BR>&nbsp;&nbsp;<BR>
94
95Print debugging information. <I>N</I> is a bitmap, so you can turn on multiple
96debugging levels by adding up the flag values. For example, if you want to
97turn on both level 2 and level 4 tracing, <I>N</I> would be 6 (because 2+4=6).
98<DL>
99<DT>1
100<DD>
101input syntax/grammar analysis tracing
102<DT>2
103<DD>
104high level parse phase tracing
105<DT>4
106<DD>
107low level parse phase tracing
108<DT>8
109<DD>
110reserved
111<DT>16
112<DD>
113high level placement phase tracing
114<DT>32
115<DD>
116low level placement phase tracing
117<DT>64
118<DD>
119reserved
120<DT>128
121<DD>
122contents of the main internal list
123<DT>256
124<DD>
125high level print or MIDI phase tracing
126<DT>512
127<DD>
128low level print or MIDI phase tracing
129</DL>
130<I>N</I> can be specified in decimal, octal
131(by using a leading zero), or hex (by using a leading 0x).
132This information is intended for debugging of
133Mup itself and thus is not likely to be of use to the average user,
134and is not available from Mupmate.
135<HR>
136<CODE>Command line:&nbsp;</CODE>
137<A NAME="doption"><B>-D</B> <I>MACRO[=macro-def]</I></A>
138<BR>
139<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
140Run &gt; Set Options &gt; Macro Definitions
141<BR>&nbsp;&nbsp;<BR>
142
143Define
144the
145<A HREF="macros.html">macro</A>
146<I>MACRO</I>. The macro name must consist of
147upper case letters, digits, and underscores, beginning
148with an upper case letter. The <I>macro_def</I> is optional, and gives the
149text of the macro. On UNIX, Linux, or similar
150systems, if it contains any white space
151or other special characters, it must be quoted. On other systems, white
152space may not be allowed.
153The -D option can be specified multiple times, if you wish to
154define more than one macro.
155<HR>
156<CODE>Command line:&nbsp;</CODE>
157<B>-e</B> <I>errfile</I>
158<BR>
159<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
160Option not needed. Mupmate automatically saves and displays error output.
161<BR>&nbsp;&nbsp;<BR>
162
163Place the error message output into <I>errfile</I> instead of writing it to
164the standard error output stream.
165<HR>
166<CODE>Command line:&nbsp;</CODE>
167<A NAME="Eoption"><B>-E</B></A>
168<BR>
169<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
170Option not needed (only used for debugging).
171<BR>&nbsp;&nbsp;<BR>
172
173Rather than produce PostScript or MIDI output, just expand
174macros
175and includes,
176and write the result to the standard output stream.
177Comments in the input are deleted, unless the -C option is also specified.
178<HR>
179<CODE>Command line:&nbsp;</CODE>
180<B>-f</B> <I>outfile</I>
181<BR>
182<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
183Option not needed. Mupmate automatically creates appropriate output file.
184<BR>&nbsp;&nbsp;<BR>
185
186Place the PostScript output into <I>outfile</I> instead of writing to
187the standard output.
188<HR>
189<CODE>Command line:&nbsp;</CODE>
190<A NAME="Foption"><B>-F</B></A>
191<BR>
192<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
193Run &gt; Write PostScript File
194<BR>&nbsp;&nbsp;<BR>
195
196This is like the <B>-f</B> option, except the name of the output file is
197derived from the name of the Mup input file. If the name of the Mup input
198file ends with a &quot;.mup&quot; suffix, the generated PostScript output
199file will end with a &quot;.ps&quot; suffix instead.
200If the name of the Mup input file ends with
201a &quot;.MUP&quot; suffix, the PostScript file will end with a &quot;.PS&quot; suffix.
202Otherwise, a &quot;.ps&quot; suffix will be appended to the end of the Mup
203input file name. If multiple input files are listed, the last is used.
204If none are specified (input is read from standard input),
205the name &quot;stdin.ps&quot; will be used for the output file.
206<HR>
207<CODE>Command line:&nbsp;</CODE>
208<A NAME="moption"><B>-m</B> <I>midifile</I></A>
209<BR>
210<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
211Option not needed. Mupmate automatically creates appropriate output file.
212<BR>&nbsp;&nbsp;<BR>
213
214Instead of generating PostScript output,
215generate standard
216<A HREF="midi.html">MIDI (Musical Instrument Digital Interface) output,</A>
217and put it in <I>midifile</I>.
218This option also causes the
219<A HREF="macros.html">macro</A>
220&quot;MIDI&quot; to become defined.
221<HR>
222<CODE>Command line:&nbsp;</CODE>
223<B>-M</B>
224<BR>
225<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
226Run &gt; Write MIDI File
227<BR>&nbsp;&nbsp;<BR>
228
229This is like the <B>-m</B> option, except the name of the MIDI file is
230derived from the name of the Mup input file. If the name of the Mup input
231file ends with a &quot;.mup&quot; suffix, the generated MIDI file will end with
232a &quot;.mid&quot; suffix instead. If the name of the Mup input file ends with
233a &quot;.MUP&quot; suffix, the MIDI file will end with a &quot;.MID&quot; suffix.
234Otherwise, a &quot;.mid&quot; suffix will be appended to the end of the Mup
235input file name. If multiple input files are listed, the last is used.
236If none are specified (input is read from standard input),
237the name &quot;stdin.mid&quot; will be used for the MIDI file.
238<HR>
239<CODE>Command line:&nbsp;</CODE>
240<A NAME="ooption"><B>-o</B> <I>pagelist</I></A>
241<BR>
242<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
243Run &gt; Set Options &gt; Pages to Display
244<BR>&nbsp;&nbsp;<BR>
245
246Print only the pages
247given in <I>pagelist</I>. The <I>pagelist</I> can be
248a comma-separated list of numbers or ranges, where a range is two numbers
249separated by a dash. For example, -o1,7-9,12-14 would print pages 1, 7, 8,
2509, 12, 13, and 14. Alternately, the <I>pagelist</I> can be the special
251keyword &quot;odd&quot; or &quot;even&quot; which will cause all odd or even numbered pages
252to be printed. This may be useful if you have a printer that only makes
253single-sided copies, but you wish to print Mup output double-sided. You could
254print odd-numbered pages, then turn the paper over and feed the pages
255through again for the even-numbered pages.
256Pages will be printed in the order specified, so you can print pages in
257other than ascending order if you wish, or even print the same page
258more than once. Printing pages in non-ascending order is most likely to
259be useful when printing more than one page of music on a single physical
260page, using the
261<A HREF="param.html#panels">panelsperpage parameter.</A>
262<HR>
263<CODE>Command line:&nbsp;</CODE>
264<A NAME="poption"><B>-p</B> <I>N</I></A>
265<BR>
266<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
267Run &gt; Set Options &gt; First Page's Page Number
268<BR>&nbsp;&nbsp;<BR>
269
270Start numbering pages
271at <I>N</I> instead of at 1.
272This can be set inside the Mup input file
273with
274<A HREF="param.html#firstpg">the "firstpage" parameter,</A>
275but the command line option will override the parameter.
276If <B>-o</B> and <B>-p</B> are used together, the page numbers given in the
277<B>-o</B><I>pagelist</I> must be the printed page numbers. For example, if you
278use -p10 and want to print just the second page,
279you would need to specify -o11.
280<HR>
281<CODE>Command line:&nbsp;</CODE>
282<B>-r</B>
283<BR>
284<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
285Config &gt; Registration Form
286<BR>&nbsp;&nbsp;<BR>
287
288Print a copy of the
289<A HREF="register.html">Mup shareware registration form</A>
290to standard output.
291<HR>
292<CODE>Command line:&nbsp;</CODE>
293<A NAME="soption"><B>-s</B> <I>stafflist</I></A>
294<BR>
295<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
296Run &gt; Set Options &gt; Staffs to Display/Play
297<BR>&nbsp;&nbsp;<BR>
298
299Only print the staffs that are included in <I>stafflist</I>.
300The <I>stafflist</I> can be a
301comma-separated list of staff numbers or ranges, such as &quot;1,5&quot; or &quot;1-3,7-8&quot;
302but no spaces are allowed in the list.
303If the -m or -M option is also used, to produce
304<A HREF="midi.html">MIDI output,</A>
305this option controls which staffs are played rather than which
306are printed.
307If you want only a single voice to be printed or played, you can follow
308a staff number or range with <B>v1</B> or <B>v2</B> or <B>v3</B>
309to restrict to voice 1, 2 or 3
310respectively, such as &quot;1v2&quot; or &quot;1-4v1,5-6v2&quot;. Otherwise
311all voices on the staff are printed or played.
312You can't specify a list or range for voices;
313if you only want to make two out of three voices visible,
314you have to specify them separately, like &quot;1v2,1v3&quot;.
315<A HREF="param.html#visible">See also the "visible" parameter.</A>
316<HR>
317<CODE>Command line:&nbsp;</CODE>
318<B>-v</B>
319<BR>
320<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
321Help &gt; About Mupmate
322<BR>&nbsp;&nbsp;<BR>
323
324Print the Mup version number. When invoked from command line,
325Mup will then exit. This document is for version 5.3.
326<HR>
327<CODE>Command line:&nbsp;</CODE>
328<A NAME="xoption"><B>-x</B><I>M</I><B>,</B><I>N</I></A>
329<BR>
330<CODE>Mupmate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>
331Run &gt; Set Options &gt; Extract Measures
332<BR>&nbsp;&nbsp;<BR>
333
334Extract measures <I>M</I> through <I>N</I> of the song. This allows you to print
335or play a part of a song. The comma and second value are optional;
336if not specified, the default is to go to the end of the piece.
337Positive values specify the number of measures from the beginning of the piece,
338while negative values are relative to the end, with -1 referring to the
339last measure of the song.
340So -x1,-1 means the entire song, if the song doesn't have a pickup measure.
341If the song has a pickup measure, that is specified by 0.
342So for a song with a pickup, -x0,-1 would mean the entire song,
343and -x0,0 would mean just the pickup measure.
344As other examples, -x-1,-1 means just the final measure of the song,
345-x2 means starting after the first full measure, -x3,4 means only
346measures 3 and 4, and -x6,6 means just measure 6.
347The starting measure is not allowed to be inside an ending.
348A common use for this option might be to
349<A HREF="midi.html">generate a MIDI file</A>
350for just a few measures. For example, if you were
351trying to tweak tempo values for a ritard in the last 2 measures of a song,
352you could use -x-2 to listen to just those measures.
353<HR>
354</P>
355<P>
356When invoked from command line, the options, if any,
357can be followed by one or more <I>files</I> in the format
358described in this User's Guide. If no <I>files</I> are specified,
359standard input is read.
360If several <I>files</I> are listed, they are effectively concatenated together
361and treated as one big file. Since there are some things (such as
362<A HREF="headfoot.html">header and footer)</A>
363that are only allowed to occur once, if you have several independent
364pieces, Mup should be called on each individually rather than trying to
365print them all with one command.
366If a specified file does not exist, and its name does not already end
367with .mup or .MUP, then Mup will append .mup to the specified name and
368attempt to open that.
369</P>
370<P>
371If you just want to create a PostScript output file, for printing on a
372PostScript printer, or viewing with a tool such as GSview, you can
373use the -f option, as in
374<BR><PRE>
375 mup -f outfile.ps infile.mup
376</PRE><BR>
377Or on Unix, Linux or MS-DOS command window,
378you could redirect the output into a
379file using the &gt; character, as in:
380<BR><PRE>
381 mup infile.mup &gt; outfile.ps
382</PRE><BR>
383</P>
384<P>
385For more debugging, in addition to the
386<A HREF="cmdargs.html#dbgoption">-d option,</A>
387if the environment variable MUP_BB is set to &quot;bcfgnsu&quot; or any subset
388of those letters, the generated output will include &quot;bounding
389boxes&quot; for the things Mup internally calls bars (b), chords (c), feeds (f),
390grpsyls (g), header/footer and top/bottom (h),
391notes (n), staffs (s), and stuff (u).
392While this is intended for use in debugging Mup itself, it may also
393help you understand why Mup places things the way it does,
394since in general, Mup only allows bounding boxes to overlap according
395to specific rules. If viewed with a color PostScript viewer (not
396<A HREF="utilpgms.html">mupdisp,</A>
397which is covered below), these boxes will be in color.
398<BR>
399<HR>
400* UNIX is a registered trademark of X/Open Company Limited
401<BR>
402MS-DOS and Windows are registered trademarks of Microsoft Corporation
403<BR>
404PostScript is a trademark of Adobe Systems Incorporated
405</P>
406<HR><P>
407&nbsp;&nbsp;&nbsp;<A HREF="running.html">&lt;-- previous page</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="index.html">Table of Contents</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="utilpgms.html">next page --&gt;</A>
408</P>
409</BODY></HTML>