1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Running MMA</TITLE>
<META NAME="description" CONTENT="Running MMA">
<META NAME="keywords" CONTENT="mma">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="mma.css">
<LINK REL="next" HREF="node3.html">
<LINK REL="previous" HREF="node1.html">
<LINK REL="up" HREF="mma.html">
<LINK REL="next" HREF="node3.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html283"
HREF="node3.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/usr/lib/latex2html/icons/next.png"></A>
<A NAME="tex2html281"
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="file:/usr/lib/latex2html/icons/up.png"></A>
<A NAME="tex2html275"
HREF="node1.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="file:/usr/lib/latex2html/icons/prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html284"
HREF="node3.html">Tracks and Channels</A>
<B> Up:</B> <A NAME="tex2html282"
HREF="mma.html">Reference Manaul</A>
<B> Previous:</B> <A NAME="tex2html276"
HREF="node1.html">Overview and Introduction</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<LI><A NAME="tex2html285"
HREF="node2.html#SECTION00210000000000000000">Command Line Options</A>
<LI><A NAME="tex2html286"
HREF="node2.html#SECTION00220000000000000000">Lines and Spaces</A>
<LI><A NAME="tex2html287"
HREF="node2.html#SECTION00230000000000000000">Programming Comments</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H1><A NAME="SECTION00200000000000000000"></A>
<A NAME="sec-running"></A>
<BR>
Running <I><B>MMA</B></I>
</H1>
<P>
<I><B>MMA</B></I> is a command line program. To run it, simply type the program name followed by the required options. For example,
<P>
<TABLE CELLSPACING=0 CELLPADDING=5" BGCOLOR="OldLace" BORDER=3><TR> <TD>
<BLOCKQUOTE><B>mma test </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
processes the file ``test''<A NAME="tex2html8"
HREF="#foot551"><SUP>2.1</SUP></A> and creates the MIDI file ``test.mid''.
<P>
<H1><A NAME="SECTION00210000000000000000">
Command Line Options</A>
</H1>
<P>
The following command line options are available:
<P>
<A NAME="cmd-summary"></A>
<P>
<TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="LEFT"><I>Option</I></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400><I>Description</I></TD>
</TR>
<TR><TD ALIGN="LEFT">-v</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Show program's version number and exit.</TD>
</TR>
<TR><TD ALIGN="LEFT">-d</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Enable LOTS of debugging messages. This option is mainly designed for program development and may not be useful to users.</TD>
</TR>
<TR><TD ALIGN="LEFT">-o</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>A debug subset. This option forces the display of complete filenames/paths as they are opened for reading. This can be quite helpful in determining which library files are being used.</TD>
</TR>
<TR><TD ALIGN="LEFT">-p</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Display patterns as they are defined. The result of this output is not exactly a duplicate of your original definitions. Most notable are that the note duration is listed in MIDI ticks, and symbolic drum note names are listed with their numeric equivalents.</TD>
</TR>
<TR><TD ALIGN="LEFT">-s</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Display sequence info during run. This shows the expanded lists used in sequences. Useful if you have used sequences shorter (or longer) than the current sequence length.</TD>
</TR>
<TR><TD ALIGN="LEFT">-r</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Display running progress. The bar numbers are displayed as they are created complete with the original input line. Don't be confused by multiple listing of ``*'' lines. For example the line
<TABLE CELLSPACING=0 CELLPADDING=5" BGCOLOR="OldLace" BORDER=3><TR> <TD>
<B><BLOCKQUOTE>
33 Cm * 2
</BLOCKQUOTE></B>
</TD></TR></TABLE> would be displayed as:
<P>
<TABLE CELLSPACING=0 CELLPADDING=5" BGCOLOR="OldLace" BORDER=3><TR> <TD>
<B><BLOCKQUOTE>
88: 33 Cm *2
<BR>
89: 33 Cm *2
</BLOCKQUOTE></B>
</TD></TR></TABLE>
<P>
This makes perfect sense if you remember that the same line was used to create both bars 88 and 89.</TD>
</TR>
<TR><TD ALIGN="LEFT">-n</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Disable generation of MIDI output. This is useful for doing a test run or to check for syntax errors in your script.</TD>
</TR>
<TR><TD ALIGN="LEFT">-e</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Show parsed/expanded lines. Since <I><B>MMA</B></I> does some internal fiddling with input lines, you may find this option useful in finding mismatched <I>Begin</I> blocks, etc.</TD>
</TR>
<TR><TD ALIGN="LEFT">-c</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Display the tracks allocated and the MIDI channel assignments after processing the input file. No output is generated.</TD>
</TR>
<TR><TD ALIGN="LEFT">-mBARS</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Set the maximum number of bars which can be generated. The default setting is 500 bars (a long song!<A NAME="tex2html9"
HREF="#foot528"><SUP>2.2</SUP></A>). This setting is needed since you can create infinite loops by improper use of the <I>goto</I> command. If your song really is longer than 500 bars use this option to increase the permitted size.</TD>
</TR>
<TR><TD ALIGN="LEFT"><A NAME="g-option"></A>
<P>
-g</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Update the library database for the files in the <I>LibPath</I>. You should run this command after installing new library files or adding a new groove to an existing library file. If the database (stored in the file <TT><A NAME="tex2html10"
HREF="MMADIR">MMADIR</A></TT>) is not updated, <I><B>MMA</B></I> will not be able to auto-load an unknown groove.
<P>
<BR>
<P>
The current installation of <I><B>MMA</B></I> does not set directory permissions. It simply copies whatever is in the distribution. If you have trouble using this option, you will probably have to reset the permissions on the lib directory.
<P>
<BR>
<P>
<I><B>MMA</B></I> will update the groove database with all files in the current <I>LibPath</I>. All files <I>must</I> have a ``.mma'' extension. Any directory containing a file named MMAIGNORE will be ignored. Note, that MMAIGNORE consists of all uppercase letters and is usually an empty file.</TD>
</TR>
<TR><TD ALIGN="LEFT">-G</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Same as the ``-g'' option (above), but the uppercase version forces the creation of a new database file--an update from scratch just in case something really goes wrong.</TD>
</TR>
<TR><TD ALIGN="LEFT">-fFILE</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Set output to FILE. Normally the output is sent to a file with the name of the input file with the extension ``.mid'' appended to it. This option lets you set the output MIDI file to any filename.</TD>
</TR>
<TR><TD ALIGN="LEFT">-Mx</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Generate type 0 or 1 MIDI files. The paramater ``x'' must be set to the single digit ``0'' or ''1''. For more details, see the <I>MidiSMF</I> section on <A HREF="node16.html#midismf"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]"
SRC="file:/usr/lib/latex2html/icons/crossref.png"></A>.</TD>
</TR>
<TR><TD ALIGN="CENTER" COLSPAN=2>
<TABLE CELLSPACING=0 CELLPADDING=10" BGCOLOR="#dddddd" BORDER=3><TR> <TD>
The following commands are used to create the documentation. As a user you should probably never have a need for any of them.
</TD></TR></TABLE></TD>
</TR>
<TR><TD ALIGN="LEFT">-Dx</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Expand and print <I>Doc</I> commands used to generate the standard library reference. No MIDI output is generated when this command is given. Doc strings in RC files are not processed. Files included in other files are processed.</TD>
</TR>
<TR><TD ALIGN="LEFT">-Dn</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Create a table of the available chord types.</TD>
</TR>
<TR><TD ALIGN="LEFT">-Dda</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Create a table of the MIDI drum note names, arranged alphabetically.</TD>
</TR>
<TR><TD ALIGN="LEFT">-Ddm</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Create a table of the MIDI drum note names, arranged by MIDI value.</TD>
</TR>
<TR><TD ALIGN="LEFT">-Dia</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Create a table of the MIDI instrument names, arranged alphabetically.</TD>
</TR>
<TR><TD ALIGN="LEFT">-Dim</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=400>Create a table of the MIDI instrument names, arranged by MIDI value.</TD>
</TR>
</TABLE>
<P>
A number of the debugging commands can also be set dynamically in a
song. See the debug section (<A HREF="node17.html#debug"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]"
SRC="file:/usr/lib/latex2html/icons/crossref.png"></A>) for details.
<P>
<H1><A NAME="SECTION00220000000000000000">
Lines and Spaces</A>
</H1>
<P>
When <I><B>MMA</B></I> reads a file it processes the lines in various places. The first reading strips out blank lines and comments of the ``//'' type.
<P>
On the initial pass though the file any continuation lines are joined. A continuation line is any line ending with a single `` \''--simply, the next line is concatenated to the current line to create a longer line.
<P>
Unless otherwise noted in this manual, the various parts of a line are delimited from each other by runs of whitespace. Whitespace can be tab characters or spaces. Other characters may work, but that is not recommended, and is really determined by Python's definitions.
<P>
<H1><A NAME="SECTION00230000000000000000">
Programming Comments</A>
</H1>
<P>
<I><B>MMA</B></I> is designed to read and write files; it is not a filter (this could be changed, but we're not sure why this would be needed).
<P>
As noted earlier in this manual, <I><B>MMA</B></I> has been written entirely in Python.There were some initial concerns about the speed of a ``scripting language'' when the project was started, but Python's speed appears to be entirely acceptable. On an AMD Athlon 1900+ system running Mandranke Linux 10.1, most of songs compile to MIDI in well under one second. If you need faster results, you're welcome to recode this program into C or C++, but it would be cheaper to buy a faster system, or spend a bit of time tweaking some of the more time intensive Python loops.
<P>
The manual has been prepared with the L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X typesetting system. Once life and the program settle down the source files may be released as well. Currently, there are two versions available: a PDF file intended for printing or on-screen display (generated with dvipdf) and a HTML version (transformed with L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X2<TT>HTML</TT>) for electronic viewing. If other formats are needed ...please offer to volunteer.
<BR><HR><H4>Footnotes</H4>
<DL>
<DT><A NAME="foot551">... ``test''</A><A
HREF="node2.html#tex2html8"><SUP>2.1</SUP></A></DT>
<DD>Actually, the file ``test'' or ``test.mma'' is processed. Please read section <A HREF="node20.html#file-extensions">20.1</A> (<A HREF="node20.html#file-extensions"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]"
SRC="file:/usr/lib/latex2html/icons/crossref.png"></A>).
</DD>
<DT><A NAME="foot528">... song!</A><A
HREF="node2.html#tex2html9"><SUP>2.2</SUP></A></DT>
<DD>500 bars with 4 beats per bar at 200 BPM is about 10 minutes.
</DD>
</DL><HR>
<!--Navigation Panel-->
<A NAME="tex2html283"
HREF="node3.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/usr/lib/latex2html/icons/next.png"></A>
<A NAME="tex2html281"
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="file:/usr/lib/latex2html/icons/up.png"></A>
<A NAME="tex2html275"
HREF="node1.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="file:/usr/lib/latex2html/icons/prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html284"
HREF="node3.html">Tracks and Channels</A>
<B> Up:</B> <A NAME="tex2html282"
HREF="mma.html">Reference Manaul</A>
<B> Previous:</B> <A NAME="tex2html276"
HREF="node1.html">Overview and Introduction</A>
<!--End of Navigation Panel-->
<ADDRESS>
Bob
2004-12-02
</ADDRESS>
</BODY>
</HTML>
|