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 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432
  
     | 
    
      <!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>A More Complex Example</TITLE>
<META NAME="description" CONTENT="A More Complex Example">
<META NAME="keywords" CONTENT="mma-tutorial">
<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-tutorial.css">
<LINK REL="next" HREF="node5.html">
<LINK REL="previous" HREF="node3.html">
<LINK REL="up" HREF="mma-tutorial.html">
<LINK REL="next" HREF="node5.html">
</HEAD>
<BODY  bgcolor="#ffffff">
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html76"
  HREF="node5.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html74"
  HREF="mma-tutorial.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html68"
  HREF="node3.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>   
<BR>
<B> Next:</B> <A NAME="tex2html77"
  HREF="node5.html">Library File Creation</A>
<B> Up:</B> <A NAME="tex2html75"
  HREF="mma-tutorial.html">Tutorial</A>
<B> Previous:</B> <A NAME="tex2html69"
  HREF="node3.html">A Simple Example</A>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html78"
  HREF="node4.html#SECTION00410000000000000000">Deep River--A Swinging Spiritual</A>
<LI><A NAME="tex2html79"
  HREF="node4.html#SECTION00420000000000000000">Future Directions</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H1><A NAME="SECTION00400000000000000000">
A More Complex Example</A>
</H1>
<P>
Fun time. We're going to take an old (slow) spiritual and surprise some people!
We'll also learn about repeats, play with volumes, and do some interesting
tempo things.
<P>
<H1><A NAME="SECTION00410000000000000000">
Deep River--A Swinging Spiritual</A>
</H1>
<P>
		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">A Public Domain Song</BIG></SPAN>  <A NAME="eg:deepriver"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
    <IMG WIDTH="95%"  SRC="mup/deep.png" ALT="Lost Image">
	<BR>
	
	       </td> </tr>
        </Table>
<P>
<P>
Rather than list the song separately, we've inter spaced the listing with
textual comments. If you want to see the listing, it is in the <SPAN  CLASS="textbf">egs</SPAN>
directory.
<P>
We start out with a comment block.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>// Deep River   </B> 
   
	    </td></tr>
      </Table>
<P>
Start off by selecting the 4 beat metronome.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Groove metronome2-4  </B> 
   
	    </td></tr>
      </Table>
<P>
We want to surprise our listeners a bit, so we start off with a ``normal''
tempo. The single ``z'' produces a 4 beat introduction.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Tempo 90 
<BR>
z 
<BR>
Groove FolkArticulated   </B> 
   
	    </td></tr>
      </Table>
<P>
As an introduction we play some nice, gentle chords for 4 bars.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>1 	F 
<BR>
2 	Dm 
<BR>
3 	Gm 
<BR>
4 	C7  </B> 
   
	    </td></tr>
      </Table>
<P>
Surprise time. We are going to pump the tempo up to 140 BPM and
select the Swing2 Groove.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Tempo 140 
<BR>
Groove Swing2  </B> 
   
	    </td></tr>
      </Table>
<P>
If we just did a switch of rhythm and tempo it'd be quite ``interesting''.
We need some
kind of a transition. Hmmm, what if we have two beats (not four) of swing
drums? We could create a 2 beat measure, but it's quite cool to give the
drummer a real workout. So, here we double the time and put in a single
``z'' bar.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Tempo *2 
<BR>
z  </B> 
   
	    </td></tr>
      </Table>
<P>
Now, we restore the tempo to the original 140.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Tempo *.5  </B> 
   
	    </td></tr>
      </Table>
<P>
Now, just like the sheet music we insert a repeat start.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Repeat  </B> 
   
	    </td></tr>
      </Table>
<P>
Set the volume, and advise 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  that we'd like it get softer over the
next 8 bars. Here we use the optional ``start volume'' setting in the 
D<SMALL>ECRESC</SMALL> command. If we don't the current volume will be used, and
 right after a repeat that is not a good idea.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Decresc mf mp 8  </B> 
   
	    </td></tr>
      </Table>
<P>
This is straightforward chording.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>5 	F
<BR>
6 	Gm 
<BR>
7 	Dm 
<BR>
8 	Am C 
<BR>
9 	F 
<BR>
10 	Gm /  Dm 
<BR>
11 	F /  C7 
<BR>
12 	F 
<BR>
13 	Dm 
<BR>
14 	Am  </B> 
   
	    </td></tr>
      </Table>
<P>
Increase the volume over the next 4 bars, and more chording.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Cresc ff 4 
<BR>  
<BR>
15 	Bb 
<BR>
16 	Am /  /  C7 
<BR>
17 	F 
<BR>
18 	Gm 
<BR>
19 	F /  C7 
<BR>
20 	Am /  Dm C7 
<BR>
21 	F 
<BR>
22 	Gm    </B> 
   
	    </td></tr>
      </Table>
<P>
This is the first/second ending. Note how we've put a ``2'' at the end
of the next line ... this forces 2 repeats.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>RepeatEnding 2 
<BR>  
<BR>
23 	/  /  /  C7 
<BR>
24 	F   </B> 
   
	    </td></tr>
      </Table>
<P>
For the second and third time we play this we want a more interesting
accompaniment. So, we select ``Swing2Plus'' which adds a clarinet doing
its thing.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Groove Swing2Plus  </B> 
   
	    </td></tr>
      </Table>
<P>
This ends the repeated section.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>RepeatEnd   </B> 
   
	    </td></tr>
      </Table>
<P>
For our 2 bar ending we select the ``Swing2End'' groove. Next, we
ritard our tempo over the next 2 bars. 
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Groove Swing2End 
<BR>
Tempo -40 2 
<BR>  
<BR>
1 	/  /  /  C7   </B> 
   
	    </td></tr>
      </Table>
<P>
The ``Swing2End'' groove has a neat little saxophone scale. But only on the
third and fourth bars. It is a four bar sequence and the first two give
the sax player time to rest. The <SPAN  CLASS="textbf">Seq 3</SPAN> forces the sequence to use
the bar with the solo. We also set the solo to a louder volume.
<P>
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Scale Volume ff 
<BR>
Seq 3 
<BR>
1 	F 
<BR>
Fermata -1 1 200   </B> 
   
	    </td></tr>
      </Table>
<P>
To finish off the example, we add a bit of time to the last note with a <SPAN  CLASS="textbf">fermata</SPAN>
command.
<P>
Compile this example and play it. Follow along on both the sheet music and the
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  file so you understand what's happening.
<P>
<H1><A NAME="SECTION00420000000000000000">
Future Directions</A>
</H1>
<P>
Well, that's two examples.
<P>
Certainly, the ideas here only scratch the surface of what 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  can do.
We, as developers, can only hope that we've included enough commands and options
for you to create wonderful music. And hope that if we haven't, that you
let us know. 
<P>
May we suggest that you list and examine some of the
sample songs--then, it's all up to you. Have fun!
<P>
<P>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html76"
  HREF="node5.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html74"
  HREF="mma-tutorial.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html68"
  HREF="node3.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>   
<BR>
<B> Next:</B> <A NAME="tex2html77"
  HREF="node5.html">Library File Creation</A>
<B> Up:</B> <A NAME="tex2html75"
  HREF="mma-tutorial.html">Tutorial</A>
<B> Previous:</B> <A NAME="tex2html69"
  HREF="node3.html">A Simple Example</A></DIV>
<!--End of Navigation Panel-->
<ADDRESS>
Bob van der Poel
2016-06-11
</ADDRESS>
</BODY>
</HTML>
 
     |