MMA is a command line program. To run it, simply type the program name followed by the required options. For example,
mma test |
processes the file ``test''2.1 and creates the MIDI file ``test.mid''.
The following command line options are available:
Option | Description | ||
-v | Show program's version number and exit. | ||
-d | Enable LOTS of debugging messages. This option is mainly designed for program development and may not be useful to users. | ||
-o | 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. | ||
-p | 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. | ||
-s | 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. | ||
-r | 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
This makes perfect sense if you remember that the same line was used to create both bars 88 and 89. |
||
-n | Disable generation of MIDI output. This is useful for doing a test run or to check for syntax errors in your script. | ||
-e | Show parsed/expanded lines. Since MMA does some internal fiddling with input lines, you may find this option useful in finding mismatched BEGIN blocks, etc. | ||
-c | Display the tracks allocated and the MIDI channel assignments after processing the input file. No output is generated. | ||
-mBARS | Set the maximum number of bars which can be generated. The default setting is 500 bars (a long song!2.2). This setting is needed since you can create infinite loops by improper use of the goto command. If your song really is longer than 500 bars use this option to increase the permitted size. | ||
-g |
Update the library database for the files in the LibPath. 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 MMADIR) is not updated, MMA will not be able to auto-load an unknown groove.
The current installation of MMA 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.
MMA will update the groove database with all files in the current LibPath. All files must 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. |
||
-G | 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. | ||
-fFILE | 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. | ||
-Mx | 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 MidiSMF section on ![]() |
||
|
|||
-Dx | Expand and print Doc 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. | ||
-Dn | Create a table of the available chord types. | ||
-Dda | Create a table of the MIDI drum note names, arranged alphabetically. | ||
-Ddm | Create a table of the MIDI drum note names, arranged by MIDI value. | ||
-Dia | Create a table of the MIDI instrument names, arranged alphabetically. | ||
-Dim | Create a table of the MIDI instrument names, arranged by MIDI value. |
A number of the debugging commands can also be set dynamically in a
song. See the debug section () for details.
When MMA reads a file it processes the lines in various places. The first reading strips out blank lines and comments of the ``//'' type.
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.
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.
MMA 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).
As noted earlier in this manual, MMA has been written entirely in Python. I was a bit concerned about speed when I started this project, but I've found the result of Python to be entirely acceptable. On my already ancient Pentium III (600 megahertz) system running Mandranke Linux 9.0, I find that most of my songs compile to MIDI in 1 to 2 seconds. 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.
When I first started this project the ``actual'' source code was maintained in several files which I combined into a large file to generate the executable. Much too late, I decided this wasn't the smartest way to write Python code. The current version of MMA makes fairly liberal use of modules. This programming method permits faster code execution and development. The only niggling I have with it is that modules have to be placed at some, agreed upon, location on the hard-disk--having all the code in one file is a bit cleaner from that perspective.
The manual has been prepared with the LATEX typesetting system. Once life and the program settle down I'll release the source files as well. Currently, there are two versions available: a postcript file intended for printing and a HTML version (transformed with LATEX2HTML) for electronic viewing. If other formats are needed I'm going to ask for volunteers.