2009-05-17 22:34:44 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
|
|
|
|
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>
|
2009-05-17 22:34:44 +00:00
|
|
|
<TITLE>Paths, Files and Libraries</TITLE>
|
|
|
|
<META NAME="description" CONTENT="Paths, Files and Libraries">
|
2006-11-10 08:07:56 +00:00
|
|
|
<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="node27.html">
|
|
|
|
<LINK REL="previous" HREF="node25.html">
|
|
|
|
<LINK REL="up" HREF="mma.html">
|
|
|
|
<LINK REL="next" HREF="node27.html">
|
|
|
|
</HEAD>
|
|
|
|
|
|
|
|
<BODY bgcolor="#ffffff">
|
2009-05-17 22:34:44 +00:00
|
|
|
|
|
|
|
<DIV CLASS="navigation"><!--Navigation Panel-->
|
|
|
|
<A NAME="tex2html763"
|
2006-11-10 08:07:56 +00:00
|
|
|
HREF="node27.html">
|
|
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
2009-05-17 22:34:44 +00:00
|
|
|
<A NAME="tex2html761"
|
2006-11-10 08:07:56 +00:00
|
|
|
HREF="mma.html">
|
|
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
2009-05-17 22:34:44 +00:00
|
|
|
<A NAME="tex2html755"
|
2006-11-10 08:07:56 +00:00
|
|
|
HREF="node25.html">
|
|
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
|
|
|
<BR>
|
2009-05-17 22:34:44 +00:00
|
|
|
<B> Next:</B> <A NAME="tex2html764"
|
|
|
|
HREF="node27.html">Creating Effects</A>
|
|
|
|
<B> Up:</B> <A NAME="tex2html762"
|
2006-11-10 08:07:56 +00:00
|
|
|
HREF="mma.html">Reference Manual</A>
|
2009-05-17 22:34:44 +00:00
|
|
|
<B> Previous:</B> <A NAME="tex2html756"
|
|
|
|
HREF="node25.html">Documentation Strings</A>
|
2006-11-10 08:07:56 +00:00
|
|
|
<BR>
|
2009-05-17 22:34:44 +00:00
|
|
|
<BR></DIV>
|
2006-11-10 08:07:56 +00:00
|
|
|
<!--End of Navigation Panel-->
|
|
|
|
<!--Table of Child-Links-->
|
|
|
|
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
|
|
|
|
|
2009-05-17 22:34:44 +00:00
|
|
|
<UL CLASS="ChildLinks">
|
|
|
|
<LI><A NAME="tex2html765"
|
|
|
|
HREF="node26.html#SECTION002610000000000000000">File Extensions</A>
|
|
|
|
<LI><A NAME="tex2html766"
|
|
|
|
HREF="node26.html#SECTION002620000000000000000">Tilde Expansion</A>
|
|
|
|
<LI><A NAME="tex2html767"
|
|
|
|
HREF="node26.html#SECTION002630000000000000000">Eof</A>
|
|
|
|
<LI><A NAME="tex2html768"
|
|
|
|
HREF="node26.html#SECTION002640000000000000000">LibPath</A>
|
|
|
|
<LI><A NAME="tex2html769"
|
|
|
|
HREF="node26.html#SECTION002650000000000000000">AutoLibPath</A>
|
|
|
|
<LI><A NAME="tex2html770"
|
|
|
|
HREF="node26.html#SECTION002660000000000000000">MIDIPlayer</A>
|
|
|
|
<LI><A NAME="tex2html771"
|
|
|
|
HREF="node26.html#SECTION002670000000000000000">OutPath</A>
|
|
|
|
<LI><A NAME="tex2html772"
|
|
|
|
HREF="node26.html#SECTION002680000000000000000">Include</A>
|
|
|
|
<LI><A NAME="tex2html773"
|
|
|
|
HREF="node26.html#SECTION002690000000000000000">IncPath</A>
|
|
|
|
<LI><A NAME="tex2html774"
|
|
|
|
HREF="node26.html#SECTION0026100000000000000000">Use</A>
|
|
|
|
<LI><A NAME="tex2html775"
|
|
|
|
HREF="node26.html#SECTION0026110000000000000000">MmaStart</A>
|
|
|
|
<LI><A NAME="tex2html776"
|
|
|
|
HREF="node26.html#SECTION0026120000000000000000">MmaEnd</A>
|
|
|
|
<LI><A NAME="tex2html777"
|
|
|
|
HREF="node26.html#SECTION0026130000000000000000">RC Files</A>
|
|
|
|
<LI><A NAME="tex2html778"
|
|
|
|
HREF="node26.html#SECTION0026140000000000000000">Library Files</A>
|
2006-11-10 08:07:56 +00:00
|
|
|
<UL>
|
2009-05-17 22:34:44 +00:00
|
|
|
<LI><A NAME="tex2html779"
|
|
|
|
HREF="node26.html#SECTION0026141000000000000000">Maintaining and Using Libraries</A>
|
|
|
|
</UL>
|
|
|
|
<BR>
|
|
|
|
<LI><A NAME="tex2html780"
|
|
|
|
HREF="node26.html#SECTION0026150000000000000000">Paths on Windows Platforms</A>
|
2007-04-29 06:47:40 +00:00
|
|
|
</UL>
|
2006-11-10 08:07:56 +00:00
|
|
|
<!--End of Table of Child-Links-->
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION002600000000000000000"></A>
|
2009-05-17 22:34:44 +00:00
|
|
|
<A NAME="sec-paths"></A>
|
2006-11-10 08:07:56 +00:00
|
|
|
<BR>
|
2009-05-17 22:34:44 +00:00
|
|
|
Paths, Files and Libraries
|
2006-11-10 08:07:56 +00:00
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
This chapter covers
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> filenames, extensions and a variety of
|
|
|
|
commands and/or directives which effect the way in which files are
|
|
|
|
read and processed.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
But, first a few comments on the location of the
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> Python modules.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The Python language (which was used to write
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> ) has a very useful
|
|
|
|
feature: it can include other files and refer to functions and data
|
|
|
|
defined in these files. A large number of these files or modules are
|
|
|
|
included in every Python distribution. The program
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> consists of a
|
|
|
|
short ``main'' program and several ``module'' files. Without these
|
|
|
|
additional modules
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> will not work.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The only sticky problem in a program intended for a wider audience is
|
|
|
|
where to place these modules. Hopefully, it is a ``good thing'' that
|
|
|
|
they should be in one of three locations:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">/usr/local/share/mma/MMA</SPAN></TT>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">/usr/share/mma/MMA</SPAN></TT>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">./MMA</SPAN></TT>
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
</LI>
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If, when initializing itself,
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> cannot find one of the above
|
|
|
|
directories, it will terminate with an error message.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
2009-05-17 22:34:44 +00:00
|
|
|
<P>
|
|
|
|
If you are using
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> on a Windows platform please see the comments about
|
|
|
|
the default paths <A HREF="#window-paths">(here)</A>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION002610000000000000000"></A> <A NAME="file-extensions"></A>
|
|
|
|
<BR>
|
|
|
|
File Extensions
|
2006-11-10 08:07:56 +00:00
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
For most files the use of a the file name extension ``.mma'' is
|
|
|
|
optional. However, it is suggested that most files (with the exceptions
|
|
|
|
listed below) have the extension present. It makes it much easier to
|
|
|
|
identify
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> song and library files and to do selective processing
|
|
|
|
on these files.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
In processing an input song file
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> can encounter several different
|
|
|
|
types of input files. For all files, the initial search is done by
|
|
|
|
adding the file name extension ``.mma'' to file name (unless it is
|
|
|
|
already present), then a search for the file as given is done.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
2009-05-17 22:34:44 +00:00
|
|
|
<P>
|
|
|
|
For files included with the U<SMALL>SE</SMALL> directive, the directory set
|
|
|
|
with <SMALL>SET</SMALL>L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL> is first checked, followed by the current
|
|
|
|
directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
For files included with the I<SMALL>NCLUDE</SMALL> directive, the directory
|
|
|
|
set with <SMALL>SET</SMALL>I<SMALL>NC</SMALL>P<SMALL>ATH</SMALL> is first checked, followed by the current
|
|
|
|
directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Following is a summary of the different files supported:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<DL>
|
|
|
|
<DT><STRONG>Song Files</STRONG></DT>
|
|
|
|
<DD>The input file specified on the command line should
|
|
|
|
always be named with the ``.mma'' extension. When
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> searches for
|
|
|
|
the file it will automatically add the extension if the file name
|
|
|
|
specified does not exist and doesn't have the extension.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</DD>
|
|
|
|
<DT><STRONG>Library Files</STRONG></DT>
|
|
|
|
<DD>Library files <SPAN CLASS="textit">really should</SPAN> all be named
|
|
|
|
with the extension.
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> will find non-extension names when used in
|
|
|
|
a U<SMALL>SE</SMALL> or I<SMALL>NCLUDE</SMALL> directive. However, it will not
|
|
|
|
process these files when creating indexes with the ``-g'' command
|
|
|
|
line option--these index files are used by the G<SMALL>ROOVE</SMALL>
|
|
|
|
commands to automatically find and include libraries.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</DD>
|
|
|
|
<DT><STRONG>RC Files</STRONG></DT>
|
|
|
|
<DD>As noted in the RC-File discussion
|
|
|
|
<A HREF="#sec-rc">(here)</A>
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> will
|
|
|
|
automatically include a variety of ``RC'' files. You can use the
|
|
|
|
extension on these files, but common usage suggests that these files
|
|
|
|
are probably better without.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</DD>
|
|
|
|
<DT><STRONG>MMAstart and MMAend</STRONG></DT>
|
|
|
|
<DD>
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> will automatically include a file at
|
|
|
|
the beginning or end of processing (<A HREF="#sec-mmaend">start/end
|
|
|
|
details</A>). Typically these files are
|
|
|
|
named MMA<SMALL>START</SMALL> and MMA<SMALL>END</SMALL>. Common usage is to
|
|
|
|
<SPAN CLASS="textit">not</SPAN> use the extension if the file is in the current
|
|
|
|
directory; use the file if it is in an ``includes'' directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</DD>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
One further point to remember is that filenames specified on the
|
|
|
|
command line are subject to wild-card expansion via the shell you are
|
|
|
|
using.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
|
|
|
|
2007-04-29 06:47:40 +00:00
|
|
|
<H1><A NAME="SECTION002620000000000000000">
|
2009-05-17 22:34:44 +00:00
|
|
|
Tilde Expansion</A>
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
On Unix-like systems all filenames may be prefaced with tilde or a
|
|
|
|
tilde with a user name. All file operations in
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> honor this
|
|
|
|
convention. This includes the setting of library and include paths.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The result of this operation is system dependent. See the entry for
|
|
|
|
<SPAN CLASS="textit">os.path.expanduser</SPAN> in the Python library reference.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION002630000000000000000">
|
|
|
|
Eof</A>
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Normally, a file is processed until its end. However, you can
|
|
|
|
short-circuit this behavior with the E<SMALL>OF</SMALL> directive. If
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> finds a line starting with E<SMALL>OF</SMALL> no further processing will be
|
|
|
|
done on that file ... it's just as if the real end of file was
|
|
|
|
encountered. Anything on the same line, after the E<SMALL>OF</SMALL> is also
|
|
|
|
discarded.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
You may find this handy if you want to test process only a part of a
|
|
|
|
file, or if you making large edits to a library file. It is often used
|
|
|
|
to quit when using the L<SMALL>ABEL</SMALL> and G<SMALL>OTO</SMALL> directives to
|
|
|
|
simulate constructs like <SPAN CLASS="textit">D.C. al Coda</SPAN>, etc.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION002640000000000000000"></A> <A NAME="libpath"></A>
|
|
|
|
<BR>
|
|
|
|
LibPath
|
2007-04-29 06:47:40 +00:00
|
|
|
</H1>
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
The search for library files can be set with the LibPath variable. To
|
|
|
|
set L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL>:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>SetLibPath PATH </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
You can have only one path in the S<SMALL>ET</SMALL>L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL> directive.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
When
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> starts up it sets the library path to the first valid
|
|
|
|
directory in the list:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">/usr/local/share/mma/lib</SPAN></TT>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">/usr/share/mma/lib</SPAN></TT>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">./lib</SPAN></TT>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The last choice lets you run
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> directly from the distribution
|
|
|
|
directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
You are free to change this to any other location in a
|
|
|
|
<A HREF="#sec-rc">RCFile</A>.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL> is used by the routine which auto-loads grooves from
|
|
|
|
the library, and the U<SMALL>SE</SMALL> directive. The -g command line option
|
|
|
|
is used to maintain the library <A HREF="node2.html#g-option">database</A>).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The current setting can be accessed via the macro $_LibPath.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION002650000000000000000">
|
|
|
|
AutoLibPath</A>
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The sub-directory containing the current library files to automatically
|
|
|
|
load is determined by the current setting of A<SMALL>UTO</SMALL>L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL>.
|
|
|
|
Please see the library file discussion <A HREF="#lib-files">here</A> for details.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
You can change the automatic include directory by resetting this
|
|
|
|
variable. It must be a sub-directory of L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL> for it to work.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The command to reset the variable is:
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
|
|
|
|
2007-04-29 06:47:40 +00:00
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
2009-05-17 22:34:44 +00:00
|
|
|
<B>SetAutoLibPath mydir </B>
|
2006-11-10 08:07:56 +00:00
|
|
|
|
2007-04-29 06:47:40 +00:00
|
|
|
</td></tr>
|
|
|
|
</Table>
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
The current setting can be accessed via the macro $_AutoLibPath. By
|
|
|
|
default the setting is ``stdlib''.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
Any existing G<SMALL>ROOVE</SMALL> definitions are deleted from memory when
|
|
|
|
this command is issued (this it to avoid name conflicts between
|
|
|
|
libraries).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION002660000000000000000"></A> <A NAME="midiplayer"></A>
|
|
|
|
<BR>
|
|
|
|
MIDIPlayer
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
When using the -P command line option
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> uses the MIDI file player
|
|
|
|
defined with S<SMALL>ET</SMALL>MIDI<SMALL>PLAYER</SMALL> to play the generated file. By
|
|
|
|
default the program is set to ``aplaymidi''. You can change this to
|
|
|
|
anything you want.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
|
|
|
|
2007-04-29 06:47:40 +00:00
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
2009-05-17 22:34:44 +00:00
|
|
|
<B>SetMIDIplayer /usr/local/kmid </B>
|
2007-04-29 06:47:40 +00:00
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
You will probably want to use this command in an RC file.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
|
|
|
|
2009-05-17 22:34:44 +00:00
|
|
|
<H1><A NAME="SECTION002670000000000000000"></A> <A NAME="setoutpath"></A>
|
|
|
|
<BR>
|
|
|
|
OutPath
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
MIDI file generation is to an automatically generated filename
|
|
|
|
(<A HREF="node2.html#sec-running">more details</A>). If the
|
|
|
|
O<SMALL>UT</SMALL>P<SMALL>ATH</SMALL> variable is set, that value will be prepended to the
|
|
|
|
output filename. To set the value:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>SetOutPath PATH </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Just make sure that ``PATH'' is a simple path name with <SPAN CLASS="textit">no</SPAN>
|
|
|
|
spaces in it. The variable is case sensitive (assuming that your
|
|
|
|
operating system supports case sensitive filenames). This is a common
|
|
|
|
directive in a RC file (<A HREF="#sec-rc">more details</A>). By default, it has no value.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
You can disable the O<SMALL>UT</SMALL>P<SMALL>ATH</SMALL> variable quite simply: just issue
|
|
|
|
the command without an argument.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If the name set by this command begins with a ``.'', ``/'' or
|
|
|
|
`` \'' it is prepended to the complete filename specified on
|
|
|
|
the command line. For example, if you have the input filename
|
|
|
|
<TT><SPAN CLASS="textbf">test.mma</SPAN></TT> and the output path is
|
|
|
|
<TT><SPAN CLASS="textbf">~/mids</SPAN></TT>
|
|
|
|
--the output file will be <TT><SPAN CLASS="textbf">/home/bob/mids/test.mid</SPAN></TT>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If the name doesn't start with the special characters noted in the
|
|
|
|
preceding paragraph the contents of the path will be inserted before
|
|
|
|
the filename portion of the input filename. Again, an example: the
|
|
|
|
input filename is <TT><SPAN CLASS="textbf">mma/rock/crying</SPAN></TT> and the output path is
|
|
|
|
``midi''--the output file will be <TT><SPAN CLASS="textbf">mma/rock/midi/crying.mid</SPAN></TT>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The current setting can be accessed via the macro $_OutPath.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Note that this option is ignored if you use the <A HREF="node2.html#f-option">-f
|
|
|
|
command line option</A> or
|
|
|
|
if an absolute name for the input file (one starting with a ``/'' or
|
|
|
|
a ``~'') is used.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION002680000000000000000"></A>
|
|
|
|
<A NAME="sec-include"></A>
|
|
|
|
<BR>
|
|
|
|
Include
|
2006-11-10 08:07:56 +00:00
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
Other files with sequence, pattern or music data can be included at
|
|
|
|
any point in your input file. There is no limit to the level of
|
|
|
|
includes.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>Include Filename </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
A search for the file is done in the I<SMALL>NC</SMALL>P<SMALL>ATH</SMALL> directory (see
|
|
|
|
below) and the current directory. The ``.mma'' filename extension is
|
|
|
|
optional (if a filename exists both with and without the ``.mma''
|
|
|
|
extension, the file with the extension will be used).
|
2006-11-10 08:07:56 +00:00
|
|
|
|
2009-05-17 22:34:44 +00:00
|
|
|
<P>
|
|
|
|
The use of this command should be quite rare in user files; however,
|
|
|
|
it is used extensively in library files to include standard
|
|
|
|
patterns.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
|
|
|
|
<H1><A NAME="SECTION002690000000000000000"></A> <A NAME="incpath"></A>
|
|
|
|
<BR>
|
|
|
|
IncPath
|
|
|
|
</H1>
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
The search for include files can be set with the I<SMALL>NC</SMALL>P<SMALL>ATH</SMALL>
|
|
|
|
variable. To set I<SMALL>NC</SMALL>P<SMALL>ATH</SMALL>:
|
2006-11-10 08:07:56 +00:00
|
|
|
|
2009-05-17 22:34:44 +00:00
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>SetIncPath PATH </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
You can have only one path in the S<SMALL>ET</SMALL>I<SMALL>NC</SMALL>P<SMALL>ATH</SMALL> directive.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
When
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> initializes it sets the include path to first found directory in:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">/usr/local/share/mma/includes</SPAN></TT>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">/usr/share/mma/includes</SPAN></TT>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">./includes</SPAN></TT>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The last location lets you run
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> from the distribution directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If this value is not appropriate for your system, you are free to
|
|
|
|
change it in a RC File.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The current setting can be accessed via the macro $_IncPath.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION0026100000000000000000"></A> <A NAME="lib-use"></A>
|
|
|
|
<BR>
|
|
|
|
Use
|
2007-04-29 06:47:40 +00:00
|
|
|
</H1>
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
Similar to I<SMALL>NCLUDE</SMALL>, but a bit more useful. The U<SMALL>SE</SMALL>
|
|
|
|
command is used to include library files and their predefined grooves.
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
Compared to I<SMALL>NCLUDE</SMALL>, U<SMALL>SE</SMALL> has important features:
|
2006-11-10 08:07:56 +00:00
|
|
|
|
|
|
|
<P>
|
2009-05-17 22:34:44 +00:00
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI>The search for the file is done in the paths specified by the LibPath variable,
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>The current state of the program is saved before the library
|
|
|
|
file is read and restored when the operation is complete.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Let's examine each feature in a bit more detail.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
When a U<SMALL>SE</SMALL> directive is issued, eg:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>use stdlib/swing </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> first attempts to locate the file ``stdlib/swing'' in the
|
|
|
|
directory specified by L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL> or the current directory. As
|
|
|
|
mentioned above,
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> automatically added the ``.mma'' extension to
|
|
|
|
the file and checks for the non-extension filename if that can't be
|
|
|
|
found.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If things aren't working out quite right, check to see if the filename
|
|
|
|
is correct. Problems you can encounter include:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI>Search order: you might be expecting the file in the current
|
|
|
|
directory to be used, but the same filename exists in the
|
|
|
|
L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL>, in which case that file is used.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>Not using extensions: Remember that files <SPAN CLASS="textit">with</SPAN> the
|
|
|
|
extension added are first checked.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>Case: The filename is <SPAN CLASS="textit">case sensitive</SPAN>. The files ``Swing''
|
|
|
|
and ``swing'' are not the same. Since most things in
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> are case
|
|
|
|
insensitive, this can be an easy mistake to make.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>The file is in a sub directory of the L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL>. In a
|
|
|
|
standard distribution the actual library files are in
|
|
|
|
<TT><SPAN CLASS="textbf">/usr/local/share/mma/lib/stdlib</SPAN></TT>, but the libpath is set to
|
|
|
|
<TT><SPAN CLASS="textbf">/usr/local/share/mma/lib</SPAN></TT>. In this case you must name the file
|
|
|
|
to be used as <TT><SPAN CLASS="textbf">stdlib/rhumba</SPAN></TT> <SPAN CLASS="textit">not</SPAN> <TT><SPAN CLASS="textbf">rhumba</SPAN></TT>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
As mentioned above, the current state of the compiler is saved during
|
|
|
|
a U<SMALL>SE</SMALL>.
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> accomplishes this by issuing a slightly modified
|
|
|
|
D<SMALL>EF</SMALL>G<SMALL>ROOVE</SMALL> and G<SMALL>ROOVE</SMALL> command before and after the
|
|
|
|
reading of the file. Please note that I<SMALL>NCLUDE</SMALL> doesn't do this.
|
|
|
|
But, don't let this feature fool you--since the effects of defining
|
|
|
|
grooves are cumulative you <SPAN CLASS="textit">really should</SPAN> have S<SMALL>EQ</SMALL>C<SMALL>LEAR</SMALL>
|
|
|
|
statements at the top of all your library files. If you don't you'll
|
|
|
|
end up with unwanted tracks in the grooves you are defining.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<SPAN CLASS="textit">In most cases you will not need to use the U<SMALL>SE</SMALL> directive
|
|
|
|
in your music files.</SPAN> If you have properly installed
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> and keep
|
|
|
|
the database up-to-date by using the command:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>$ mma -g </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
grooves from library files will be automatically found and loaded.
|
|
|
|
Internally, the U<SMALL>SE</SMALL> directive is used, so existing states are
|
|
|
|
saved.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If you are developing new or alternate library files you will find the
|
|
|
|
U<SMALL>SE</SMALL> directive handy.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION0026110000000000000000"></A> <A NAME="MMAstart"></A>
|
|
|
|
<BR>
|
|
|
|
MmaStart
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If you wish to process a certain file or files before your main input
|
|
|
|
file, set the M<SMALL>MA</SMALL>S<SMALL>TART</SMALL> filename in an RCFile. For example, you
|
|
|
|
might have a number of files in a directory which you wish to use
|
|
|
|
certain P<SMALL>AN</SMALL> settings. In that directory, you just need to have
|
|
|
|
a file <TT><SPAN CLASS="textbf">mmarc</SPAN></TT> which contains the following command:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>MmaStart setpan </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The actual file <TT><SPAN CLASS="textbf">setpan</SPAN></TT> has the following directives:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>Bass Pan 0
|
|
|
|
<BR>
|
|
|
|
Bass1 Pan 0
|
|
|
|
<BR>
|
|
|
|
Bass2 Pan 0
|
|
|
|
<BR>
|
|
|
|
Walk Pan 0
|
|
|
|
<BR>
|
|
|
|
Walk1 Pan 0
|
|
|
|
<BR>
|
|
|
|
Walk2 Pan 0 </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
So, before each file in that directory is processed, the P<SMALL>AN</SMALL>
|
|
|
|
for the bass and walking bass voices are set to the left channel.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If the file specified by a M<SMALL>MA</SMALL>S<SMALL>TART</SMALL> directive does not exist a
|
|
|
|
warning message will be printed (this is not an error).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Also useful is the ability to include a generic file with all the MIDI
|
|
|
|
files you create. For example, you might like to have a MIDI reset at the
|
|
|
|
start of your files--simple, just include the following in your <TT><SPAN CLASS="textbf">mmarc</SPAN></TT> file:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>MMAstart reset </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
This includes the file <TT><SPAN CLASS="textbf">reset.mma</SPAN></TT> located in the ``includes''
|
|
|
|
directory (<A HREF="#incpath">IncludePath</A>).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Multiple MMA<SMALL>START</SMALL> directives are permitted. The files are
|
|
|
|
processed in the order declared. You can have multiple filenames on a
|
|
|
|
MMA<SMALL>START</SMALL> line.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
One caution with MMA<SMALL>START</SMALL> files: the file is processed after
|
|
|
|
the RC file, just before the actual song file.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION0026120000000000000000"></A> <A NAME="sec-mmaend"></A>
|
|
|
|
<BR>
|
|
|
|
MmaEnd
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Just the opposite of M<SMALL>MA</SMALL>S<SMALL>TART</SMALL>, this command specifies a file to
|
|
|
|
be included at the end of a main input file. See the comments above
|
|
|
|
for more details.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To continue this example, in your <TT><SPAN CLASS="textbf">mmarc</SPAN></TT> file you would have:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>MmaEnd nopan </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
and in the file <TT><SPAN CLASS="textbf">nopan</SPAN></TT> have:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>Bass Pan 64
|
|
|
|
<BR>
|
|
|
|
Bass1 Pan 64
|
|
|
|
<BR>
|
|
|
|
Bass2 Pan 64
|
|
|
|
<BR>
|
|
|
|
Walk Pan 64
|
|
|
|
<BR>
|
|
|
|
Walk1 Pan 64
|
|
|
|
<BR>
|
|
|
|
Walk2 Pan 64 </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If the file specified by a M<SMALL>MA</SMALL>E<SMALL>ND</SMALL> directive does not exist a
|
|
|
|
warning message will be printed (this is not an error).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Multiple MMA<SMALL>END</SMALL> directives are permitted and processed in the
|
|
|
|
order declared. You can have multiple filenames on a MMA<SMALL>END</SMALL> line.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION0026130000000000000000"></A>
|
|
|
|
<A NAME="sec-rc"></A>
|
|
|
|
<BR>
|
|
|
|
RC Files
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
When
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> starts it checks for initialization files. Only the first
|
|
|
|
found file is processed. The following locations/files are checked (in order):
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<OL>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">mmarc</SPAN></TT> -- this is a normal file in the current directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">~/.mmarc</SPAN></TT> -- this is an ``invisible'' file in the users
|
|
|
|
home directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">/usr/local/etc/mmarc</SPAN></TT>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI><TT><SPAN CLASS="textbf">/etc/mmarc</SPAN></TT>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</OL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<SPAN CLASS="textbf"> <SPAN CLASS="textit">Only the first</SPAN></SPAN> found file will be processed. This means you can
|
|
|
|
override a ``global'' RC file with a user specific one. If you just
|
|
|
|
want to override some specific commands you might want to:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<OL>
|
|
|
|
<LI>Create the file <TT><SPAN CLASS="textbf">mmarc</SPAN></TT> in a directory with
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> files,
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>As the first line in that file have the command:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>include <TT><SPAN CLASS="textbf">~/.mmarc</SPAN></TT> </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
to force the inclusion of your global stuff,
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>Now, place your directory specific commands in your custom RC file.
|
|
|
|
</LI>
|
|
|
|
</OL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
By default, no RC files are installed. You may want to create an empty
|
|
|
|
<TT><SPAN CLASS="textbf">~/.mmarc</SPAN></TT> file to eliminate a warning message.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
An alternate method for using a different RC file is to specify the
|
|
|
|
name of the file on the command line by using the <SPAN CLASS="textit">-i</SPAN> option
|
|
|
|
<A HREF="node2.html#i-option">(here)</A>. Using this option
|
|
|
|
you can have several RC files in a directory and compile your songs
|
|
|
|
differently depending on the RC file you specify.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The RC file is processed as a
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> input file. As such, it can
|
|
|
|
contain anything a normal input file can, including music commands.
|
|
|
|
However, you should limit the contents of RC files to things
|
|
|
|
like:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>SetOutPath
|
|
|
|
<BR>
|
|
|
|
SetLibPath
|
|
|
|
<BR>
|
|
|
|
MMAStart
|
|
|
|
<BR>
|
|
|
|
MMAEnd </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
A useful setup is to have your source files in one directory and MIDI
|
|
|
|
files saved into a different directory. Having the file <TT><SPAN CLASS="textbf">mmarc</SPAN></TT>
|
|
|
|
in the directory with the source files permits setting O<SMALL>UT</SMALL>P<SMALL>ATH</SMALL>
|
|
|
|
to the MIDI path.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION0026140000000000000000"></A> <A NAME="lib-files"></A>
|
|
|
|
<BR>
|
|
|
|
Library Files
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Included in this distribution are a number of predefined patterns,
|
|
|
|
sequences and grooves. They are in different files in the ``lib''
|
|
|
|
directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The library files should be self-documenting. A list of standard file
|
|
|
|
and the grooves they define is included in the separate document,
|
|
|
|
supplied in this distribution as ``<TT><SPAN CLASS="textbf">mma-lib.ps</SPAN></TT>''.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H2><A NAME="SECTION0026141000000000000000"></A> <A NAME="library-maint"></A>
|
|
|
|
<BR>
|
|
|
|
Maintaining and Using Libraries
|
|
|
|
</H2>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The basic
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> distribution comes with a set of pattern files which
|
|
|
|
are installed in the <TT><SPAN CLASS="textbf">mma/lib/stdlib</SPAN></TT> directory. Each one of
|
|
|
|
these files has a number of G<SMALL>ROOVE</SMALL>s defined in them. For
|
|
|
|
example, the file <TT><SPAN CLASS="textbf">mma/lib/stdlib/rhumba.mma</SPAN></TT> contains the
|
|
|
|
grooves <SPAN CLASS="textit">Rhumba</SPAN>, <SPAN CLASS="textit">RhumbaEnd</SPAN> and many more.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If you are writing G<SMALL>ROOVE</SMALL>s with the intention of adding them to
|
|
|
|
the standard library you should ensure that none of the names you
|
|
|
|
choose duplicate existing names already used.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If you are creating a set of alternate grooves to duplicate the
|
|
|
|
existing library you might do the following:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<OL>
|
|
|
|
<LI>Create a directory with your name or other short id in the
|
|
|
|
<TT><SPAN CLASS="textbf">mma/lib/</SPAN></TT> hierarchy. For example, if your name is ``Bob van
|
|
|
|
der Poel'' you might create the directory <TT><SPAN CLASS="textbf">mma/lib/bvdp</SPAN></TT>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>Place all your files (or modified files) in that directory.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>Now, when your song wants to use a groove, you have two choices:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<OL>
|
|
|
|
<LI>Include the file with the U<SMALL>SE</SMALL> directive. For example,
|
|
|
|
if you have created the file <TT><SPAN CLASS="textbf">rock.mma</SPAN></TT> and want to use the
|
|
|
|
<SMALL>GROOVE</SMALL> <SPAN CLASS="textit">rock8</SPAN> you would:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<OL>
|
|
|
|
<LI>place the directive U<SMALL>SE BVDP/ROCK</SMALL> near the top of the
|
|
|
|
song file. Note: it might not be apparent from the typeface here, but the
|
|
|
|
filename here is all <SPAN CLASS="textit">lowercase</SPAN>. In Unix/Linux case is important, so
|
|
|
|
please make sure of the case of the filenames in commands like U<SMALL>SE</SMALL>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>enable the groove with the directive G<SMALL>ROOVE ROCK8</SMALL> (and here the
|
|
|
|
case is not important since
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> thinks that upper and lower case are the same).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</OL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>Force
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> to use <SPAN CLASS="textit">your</SPAN> groove directory by resetting
|
|
|
|
the auto-lib directory (again, the case for the path is important):
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>SetAutoLibPath bvdp </B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
You will have to update the
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> database with the -g or -G
|
|
|
|
command line options for this to work. If you elect this route,
|
|
|
|
please note that the files in the standard library will not be
|
|
|
|
available, but you can use both with something like this:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
|
|
|
|
<tr><td>
|
|
|
|
<B>Groove Metronome2-4
|
|
|
|
<BR>
|
|
|
|
z * 2
|
|
|
|
<BR>
|
|
|
|
SetAutoLibPath bvdp
|
|
|
|
<BR>
|
|
|
|
Groove BossaNova // the bossa from lib/bvdp, not stdlib!
|
|
|
|
<BR>
|
|
|
|
chords ...</B>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</Table>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The nice thing about this method is that you can have multiple
|
|
|
|
sets of library files <SPAN CLASS="textit">all using the same G<SMALL>ROOVE</SMALL>
|
|
|
|
names</SPAN>. To create a different version you just need to change
|
|
|
|
the S<SMALL>ET</SMALL>A<SMALL>UTO</SMALL>L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL> variable in your song file ...or,
|
|
|
|
for a collection of songs put the variable in your <SMALL>MMARC</SMALL>
|
|
|
|
file.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</OL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</OL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
For those who ``really need to know'', here are the steps that
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> takes when it encounters a G<SMALL>ROOVE</SMALL> command:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<OL>
|
|
|
|
<LI>if the named groove has been loaded/created already
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> just
|
|
|
|
switches to the internal version of that groove.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
<LI>if the groove can't be found in memory, a search of the groove
|
|
|
|
database (created with the -g command line option) is done. If no
|
|
|
|
database is in memory it is loaded from the directory pointed to by
|
|
|
|
the L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL> and A<SMALL>UTO</SMALL>L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL> variables. This database
|
|
|
|
is then searched for the needed G<SMALL>ROOVE</SMALL>. The database contains
|
|
|
|
the filenames associated with each G<SMALL>ROOVE</SMALL> and that file is
|
|
|
|
then read with the U<SMALL>SE</SMALL> code.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</OL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The database is a file <TT><SPAN CLASS="textbf">.mmaDB</SPAN></TT> stored in each sub directory of
|
|
|
|
L<SMALL>IB</SMALL>P<SMALL>ATH</SMALL>. This is a ``hidden'' file (due to the leading ``.'' in
|
|
|
|
the filename). You cannot change the name of this file. If there are
|
|
|
|
sub-directories the entries for them will be stored in the database
|
|
|
|
file for the main tree.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
By using a <SMALL>USE</SMALL> directive or by resetting A<SMALL>UTO</SMALL>L<SMALL>IB</SMALL>D<SMALL>IR</SMALL> you
|
|
|
|
force the loading of your set of grooves.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION0026150000000000000000"></A>
|
|
|
|
<A NAME="window-paths"></A>
|
|
|
|
<BR>
|
|
|
|
Paths on Windows Platforms
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To make
|
|
|
|
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> as platform independent as possible a number of additional paths have been
|
|
|
|
defined. When starting up, in addition to the standard Linux paths discussed above, the
|
|
|
|
following are also checked:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI>Modules can be in <TT><SPAN CLASS="textbf">c:
|
|
|
|
<BR>
|
|
|
|
mma</SPAN></TT>,
|
|
|
|
</LI>
|
|
|
|
<LI>Include files can be in <TT><SPAN CLASS="textbf">c:
|
|
|
|
<BR>
|
|
|
|
mma
|
|
|
|
<BR>
|
|
|
|
includes</SPAN></TT>,
|
|
|
|
</LI>
|
|
|
|
<LI>Library files can be in <TT><SPAN CLASS="textbf">c:
|
|
|
|
<BR>
|
|
|
|
mma
|
|
|
|
<BR>
|
|
|
|
lib</SPAN></TT>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</LI>
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<DIV CLASS="navigation"><HR>
|
2006-11-10 08:07:56 +00:00
|
|
|
<!--Navigation Panel-->
|
2009-05-17 22:34:44 +00:00
|
|
|
<A NAME="tex2html763"
|
2006-11-10 08:07:56 +00:00
|
|
|
HREF="node27.html">
|
|
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
2009-05-17 22:34:44 +00:00
|
|
|
<A NAME="tex2html761"
|
2006-11-10 08:07:56 +00:00
|
|
|
HREF="mma.html">
|
|
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
2009-05-17 22:34:44 +00:00
|
|
|
<A NAME="tex2html755"
|
2006-11-10 08:07:56 +00:00
|
|
|
HREF="node25.html">
|
|
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
|
|
|
<BR>
|
2009-05-17 22:34:44 +00:00
|
|
|
<B> Next:</B> <A NAME="tex2html764"
|
|
|
|
HREF="node27.html">Creating Effects</A>
|
|
|
|
<B> Up:</B> <A NAME="tex2html762"
|
2006-11-10 08:07:56 +00:00
|
|
|
HREF="mma.html">Reference Manual</A>
|
2009-05-17 22:34:44 +00:00
|
|
|
<B> Previous:</B> <A NAME="tex2html756"
|
|
|
|
HREF="node25.html">Documentation Strings</A></DIV>
|
2006-11-10 08:07:56 +00:00
|
|
|
<!--End of Navigation Panel-->
|
|
|
|
<ADDRESS>
|
2007-04-29 06:47:40 +00:00
|
|
|
bob
|
2009-05-17 22:34:44 +00:00
|
|
|
2008-09-28
|
2006-11-10 08:07:56 +00:00
|
|
|
</ADDRESS>
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|