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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2008 (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>
<TITLE>After</TITLE>
<META NAME="description" CONTENT="After">
<META NAME="keywords" CONTENT="mma">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="mma.css">
<LINK REL="next" HREF="node28.html">
<LINK REL="previous" HREF="node26.html">
<LINK REL="up" HREF="mma.html">
<LINK REL="next" HREF="node28.html">
</HEAD>
<BODY bgcolor="#ffffff">
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html909"
HREF="node28.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html907"
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html901"
HREF="node26.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html910"
HREF="node28.html">Fine Tuning (Translations)</A>
<B> Up:</B> <A NAME="tex2html908"
HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A NAME="tex2html902"
HREF="node26.html">Triggers</A>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION002700000000000000000"></A>
<A NAME="sec-after"></A>
<BR>
After
</H1>
<P>
In the previous chapter on T<SMALL>RIGGERS</SMALL> we discussed how you can
set an event to occur when a certain chord change occurred. This
chapter, A<SMALL>FTER</SMALL>, discusses a similar concept: setting an event
to occur after a certain number of bars have been processed.
<P>
The A<SMALL>FTER</SMALL> command is used to set a
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> at some point in the
future. This can be handy when you have set a portion of your song up
in a macro and wish to make changes to volume, tempo, etc. during the
expansion of the macro.
<P>
For example, let's assume you have a short piece of music set up in
the macro $LNS:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Mset Lns
<BR> Am
<BR> C
<BR> Dm
<BR> E
<BR>
EndMset </B>
</td></tr>
</Table>
<P>
and we incorporate this into a
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> script in a number of places.
However, at some point we want the T<SMALL>EMPO</SMALL> to slow for the final
two bars. Using A<SMALL>FTER</SMALL> we can do:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>After Count=2 Tempo *.9
<BR>$LNS </B>
</td></tr>
</Table>
<P>
And have the command T<SMALL>EMPO *.9</SMALL> inserted between the second and
third bars.
<P>
A<SMALL>FTER</SMALL> has a number of options, all of which are set in
option=value pairs:
<P>
<DL COMPACT>
<DT></DT>
<DD><DL>
<DT><STRONG>Bar</STRONG></DT>
<DD>Specifies the bar number for the event to trigger. Note,
this is the value of the bar as it is created; it is not the
``comment'' bar number which optionally starts a chord line.
<P>
A special case option is the use of EOF as a pseudo line
number. In this case the command is appended to the end of the
<SPAN CLASS="textbf">current</SPAN> file. You can not delete an event set with
B<SMALL>AR=</SMALL>E<SMALL>OF</SMALL>. You might think of this as a dynamic <SMALL>MMAEND</SMALL>
<A HREF="node32.html#sec-mmaend">(here)</A>. For a ``real
life'' example of this option, see the qriff plugin supplied with
this version of
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> .
<P>
</DD>
<DT><STRONG>Count</STRONG></DT>
<DD>This is the easist and most used option. It sets the number of bars to
process before executing the command.
<P>
</DD>
<DT><STRONG>ID</STRONG></DT>
<DD>Set a string to use as an identifier for the A<SMALL>FTER</SMALL> event.
<P>
</DD>
<DT><STRONG>Remove</STRONG></DT>
<DD>A active event line can be removed using this option.
For example, if you have an event named ``Happy'' you can delete it
using the command:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>After Remove=Happy </B>
</td></tr>
</Table>
<P>
Any other commands will be ignored. A warning will be printed.
<P>
</DD>
<DT><STRONG>Repeat</STRONG></DT>
<DD>Using this option you can set an event to reoccur at a
regular interval. Very simply:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>After Repeat=4 Print another four bars </B>
</td></tr>
</Table>
<P>
will display a silly message after every four bars are processed.
<P>
</DD>
</DL>
</DD>
</DL>
<P>
Anything left on the command line after processing the options is assumed to be a valid
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> command.<A NAME="tex2html115"
HREF="#foot16384"><SUP><SPAN CLASS="arabic">27</SPAN>.<SPAN CLASS="arabic">1</SPAN></SUP></A>
<P>
A number of short examples of are contained in the <TT><SPAN CLASS="textbf">egs/after</SPAN></TT> directory.
<P>
You can have any number of A<SMALL>FTER</SMALL> event lines. Each is checked
in the order found before every line of your
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> file is processed.
<P>
Events using the C<SMALL>OUNT</SMALL> and B<SMALL>AR</SMALL> options are automatically
deleted once they have been used. Events created with the
R<SMALL>EPEAT</SMALL> option will continue to be active until they are removed
with a R<SMALL>EMOVE</SMALL> command.
<P>
Using the command line options <B>-e</B> and <B>-r</B> and copious
P<SMALL>RINT</SMALL> statements (yes, you can use A<SMALL>FTER</SMALL> for this!) will
help you determine the exact event locations.
<BR><HR><H4>Footnotes</H4>
<DL>
<DT><A NAME="foot16384">... command.</A><A
HREF="node27.html#tex2html115"><SUP><SPAN CLASS="arabic">27</SPAN>.<SPAN CLASS="arabic">1</SPAN></SUP></A></DT>
<DD>The parsing occurs the option pairs are
<B>extracted</B> from the input line and any remaining tokens are
glued back together. So, you <B>can</B> have your options inserted
inside the command ...but this is not recommend!
</DD>
</DL>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html909"
HREF="node28.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html907"
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html901"
HREF="node26.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html910"
HREF="node28.html">Fine Tuning (Translations)</A>
<B> Up:</B> <A NAME="tex2html908"
HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A NAME="tex2html902"
HREF="node26.html">Triggers</A></DIV>
<!--End of Navigation Panel-->
<ADDRESS>
Bob van der Poel
2016-06-11
</ADDRESS>
</BODY>
</HTML>
|