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
|
<!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>Begin/End Blocks</TITLE>
<META NAME="description" CONTENT="Begin/End Blocks">
<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="node19.html">
<LINK REL="previous" HREF="node17.html">
<LINK REL="up" HREF="mma.html">
<LINK REL="next" HREF="node19.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html566"
HREF="node19.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/usr/lib/latex2html/icons/next.png"></A>
<A NAME="tex2html564"
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="tex2html558"
HREF="node17.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="tex2html567"
HREF="node19.html">Documentation Strings</A>
<B> Up:</B> <A NAME="tex2html565"
HREF="mma.html">Reference Manaul</A>
<B> Previous:</B> <A NAME="tex2html559"
HREF="node17.html">Other Commands and Directives</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<LI><A NAME="tex2html568"
HREF="node18.html#SECTION001810000000000000000">Begin</A>
<LI><A NAME="tex2html569"
HREF="node18.html#SECTION001820000000000000000">End</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H1><A NAME="SECTION001800000000000000000"></A>
<A NAME="sec-blocks"></A>
<BR>
Begin/End Blocks
</H1>
<P>
Entering a series of directives for a specific track can get quite tedious. To make the creation of library files a bit easier, you can create a block. For example, the following:
<P>
<TABLE CELLSPACING=0 CELLPADDING=5" BGCOLOR="OldLace" BORDER=3><TR> <TD>
<BLOCKQUOTE><B>Drum Define X 0 2 100; 50 2 90
<BR>
Drum Define Y 0 2 100
<BR>
Drum Sequence X Y </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
Can be replaced with:
<P>
<TABLE CELLSPACING=0 CELLPADDING=5" BGCOLOR="OldLace" BORDER=3><TR> <TD>
<BLOCKQUOTE><B>Drum Begin
<BR> Define X 0 2 100; 50 2 90
<BR> Define Y 0 2 100
End
<BR>
Drum Sequence X Y </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
Or, even more simply, with:
<P>
<TABLE CELLSPACING=0 CELLPADDING=5" BGCOLOR="OldLace" BORDER=3><TR> <TD>
<BLOCKQUOTE><B>Drum Begin Define
<BR> X 0 2 100; 50 2 90
<BR> Y 0 2 100
<BR>
End </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
If you examine some of the library files you will see that we use this shortcut a lot.
<P>
<H1><A NAME="SECTION001810000000000000000">
Begin</A>
</H1>
<P>
The <I>Begin</I> command requires any number of arguments. Valid examples include:
<P>
<TABLE CELLSPACING=0 CELLPADDING=5" BGCOLOR="OldLace" BORDER=3><TR> <TD>
<BLOCKQUOTE><B>Begin Drum
<BR>
Begin Chord2
<BR>
Begin Walk Define </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
Once a <I>Begin</I> block has been entered, all subsequent lines have the words from the <I>Begin</I> command prepended to each line of data. There is not much magic here--<I>Begin</I>/<I>End</I> is really just some syntactic sugar.
<P>
<H1><A NAME="SECTION001820000000000000000">
End</A>
</H1>
<P>
To finish off a <I>Begin</I> block, use a single <I>End</I> on a line by itself.
<P>
Defining musical data, repeats, or other <I>Begin</I>s inside a block (other than COMMENT blocks) will not work.
<P>
Nesting is permitted. Eg:
<P>
<TABLE CELLSPACING=0 CELLPADDING=5" BGCOLOR="OldLace" BORDER=3><TR> <TD>
<BLOCKQUOTE><B>Scale Begin
<BR> Begin Define
<BR> </B></BLOCKQUOTE><I>stuff</I><BLOCKQUOTE><B>
<BR> End
<BR> Sequence </B></BLOCKQUOTE><I>stuff</I><BLOCKQUOTE><B>
<BR>
End </B></BLOCKQUOTE>
</TD></TR></TABLE>
<P>
A <I>Begin</I> must be competed with a <I>End</I> before the end of a file, otherwise an error will be generated. The <I>Use</I> and <I>Include</I> commands are not permitted inside a block.
<HR>
<!--Navigation Panel-->
<A NAME="tex2html566"
HREF="node19.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/usr/lib/latex2html/icons/next.png"></A>
<A NAME="tex2html564"
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="tex2html558"
HREF="node17.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="tex2html567"
HREF="node19.html">Documentation Strings</A>
<B> Up:</B> <A NAME="tex2html565"
HREF="mma.html">Reference Manaul</A>
<B> Previous:</B> <A NAME="tex2html559"
HREF="node17.html">Other Commands and Directives</A>
<!--End of Navigation Panel-->
<ADDRESS>
Bob
2004-12-02
</ADDRESS>
</BODY>
</HTML>
|