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 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//en">
<!--Converted with LaTeX2HTML 2021 (Released January 1, 2021) -->
<HTML lang="en">
<HEAD>
<TITLE>A Simple Example</TITLE>
<META NAME="description" CONTENT="A Simple 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=iso-8859-2">
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
<META NAME="Generator" CONTENT="LaTeX2HTML v2021">
<LINK REL="STYLESHEET" HREF="mma-tutorial.css">
<LINK REL="next" HREF="node4.html">
<LINK REL="previous" HREF="node2.html">
<LINK REL="next" HREF="node4.html">
</HEAD>
<BODY bgcolor="#ffffff">
<DIV CLASS="navigation"><!--Navigation Panel-->
<A
HREF="node4.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="mma-tutorial.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node2.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A
HREF="node4.html">A More Complex Example</A>
<B> Up:</B> <A
HREF="mma-tutorial.html">Tutorial</A>
<B> Previous:</B> <A
HREF="node2.html">Installation</A>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A ID="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL CLASS="ChildLinks">
<LI><A ID="tex2html32"
HREF="node3.html#SECTION00310000000000000000">Fella Bird, Basic Edition</A>
<LI><A ID="tex2html33"
HREF="node3.html#SECTION00320000000000000000">Fella Bird, Improved Edition</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H1><A ID="SECTION00300000000000000000">
A Simple Example</A>
</H1>
<P>
<H1><A ID="SECTION00310000000000000000">
Fella Bird, Basic Edition</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">Sheet Music for a Popular Song</BIG></SPAN> <A ID="eg:birthday"></A>
</tr> </td>
<tr> <td >
<IMG WIDTH="95%" SRC="mup/fella.png" ALT="Lost Image">
</td> </tr>
</Table>
<P>
<P>
This example piece of music is shown in a “fake book” or “lead sheet”
style. It shows the melody notes, lyrics and chords.
<P>
If you are following along and want to try the examples please not
that you create them by using a <SPAN CLASS="textit">text editor of your choice</SPAN>
which does not do formatting. Don't use a word processing package; use
something like emacs, vim or notepad.
<P>
As a first try at making a MIDI accompaniment file, we have created the
following file:
<P>
<SPAN CLASS="textbf">// Sample tutorial file
<BR>// Fella Bird, try 1
<BR>
<BR>
Tempo 120
<BR>
Groove Rhumba
<BR>
<BR>
1 F
<BR>
2 F
<BR>
3 C7
<BR>
4 F
<BR>
5 F
<BR>
6 F
<BR>
7 C7
<BR>
8 F
<BR>
9 Gm
<BR>
10 F
<BR>
11 C7
<BR>
12 F
<BR>
13 Gm
<BR>
14 F
<BR>
15 C7
<BR>
16 F / / z!
<BR>
<BR></SPAN>
<P>
After the comments in the file, the first line to note is:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Tempo 120 </B>
</td></tr>
</Table>
<P>
This sets the tempo, or speed, of the piece to 120 beats per minute. You may
have to guess the tempo—very few pieces (especially in “fake book” style)
will include a metronome setting. For slow pieces you might want to start with a
tempo setting of “80”; for faster pieces, like swings, try around “150”; polkas
and marches, which are really in <SPAN CLASS="textbf">2/2</SPAN> time, may require fast
sounding tempos like “250”. Feel free to modify the tempo setting in
the example files—you're not going to break anything.
<P>
Since we are using the standard library which was shipped with
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> ,
we can select one of the predefined grooves:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Groove Rhumba </B>
</td></tr>
</Table>
<P>
Note that this command also sets up the “time signature” to <SPAN CLASS="textbf">4/4</SPAN>.
Not quite the same as the “cut” time indicated, but close enough. And speaking
of “close enough”, we're using a rhumba rhythm instead of the merengue indicated
in the score.
<P>
Finally, we have the chord information. The first bar (in the sheet music)
indicates an “F” chord. So that's what we tell
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> to use:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>1 F </B>
</td></tr>
</Table>
<P>
We continue in a similar manner for the rest of the song.
<P>
We've simplifed the song a bit and show only one chord per bar.
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> automatically fills out the bars so that each has four chords.
We could have entered the first bar as:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>2 F F F F </B>
</td></tr>
</Table>
<P>
or, more simply:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>2 F / / / </B>
</td></tr>
</Table>
<P>
and had the same result. But, who wants to do all that typing?
<P>
In the final bar, the last beat is a rest.
<P>
The line:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>16 F / / z! </B>
</td></tr>
</Table>
<P>
causes an “F” chord to be used on the first three beats, the fourth
beat is completely silent due the to the “z!”. Note the difference
between a “z” and “z!”—the first silences all but the drum track,
the second silences everything. See the reference manual for more details
on “z”.
<P>
Now, let's create our first MIDI file! If you are using the standard
distribution, you should find a file “fella1.mma” in the tutorial directory.
Change to this directory and type the command:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>mma fella1 </B>
</td></tr>
</Table>
<P>
Your computer should run the python script called “mma” and process the
file “fella1.mma”. The MIDI file “fella1.mid” should be created. If this doesn't
happen, please check your python installation, and make sure that you
have installed “mma” where your shell can find it. On Windows
systems which do not have case sensitive filenames you may need to use
the command “mma.py fella1”. If you are completely stuck,
drop me an email.
<P>
Now, use your favorite MIDI file player to play the song.
<P>
How'd that sound? A piano doing some chords, a jazzy bass line,
and a bit of drumming? Wonderful!
<P>
<H1><A ID="SECTION00320000000000000000">
Fella Bird, Improved Edition</A>
</H1>
<P>
If you play the MIDI created in the previous section you'll find a number
of things lacking. Certainly:
<P>
<UL>
<LI>It is hard to sing to because there is no aural indication of
when to start,
<P>
</LI>
<LI>The whole piece is the same volume,
<P>
</LI>
<LI>It's a pretty short song, so let's play it twice.
<P>
</LI>
</UL>
<P>
The following example has a number of improvements:
<P>
<SPAN CLASS="textbf"> // Sample tutorial file
<BR>// Fella Bird, try 2
<BR>
<BR>
Tempo 120
<BR>
Groove Metronome2-4
<BR>
<BR>
z * 2
<BR>
<BR>
Groove Rhumba
<BR>
Repeat
<BR>
Volume mp
<BR>
Cresc mf 4
<BR>
<BR>
1 F
<BR>
2 F
<BR>
3 C7
<BR>
4 F
<BR>
5 F
<BR>
6 F
<BR>
7 C7
<BR>
8 F
<BR>
9 Gm
<BR>
10 F
<BR>
11 C7
<BR>
<BR>
Decresc p 4
<BR>
<BR>
12 F
<BR>
13 Gm
<BR>
14 F
<BR>
15 C7
<BR>
<BR>
RepeatEnding
<BR>
<BR>
16 F / / z
<BR>
<BR>
RepeatEnd
<BR>
<BR>
17 F / / z!
<BR>
cut -1
<BR>
<BR>
<BR></SPAN>
Try running
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> on this file and listen to it. Oh my, much better.
<P>
So, let's look at the changes.
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Groove Metronome2-4 </B>
</td></tr>
</Table>
<P>
This sets the current “groove” to a metronome. To find this groove
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> will automatically process the library file “metronome”.
<P>
The metronome groove consists of wood-blocks being struck in a
<SPAN CLASS="textbf">4/4</SPAN> pattern. In order to “sound” the metronome, we need
to create an empty bar:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B> z * 2 </B>
</td></tr>
</Table>
<P>
Mind you, we could have specified a chord here and gotten the same
result (the groove has no definitions for any instruments other than
the wood-block, so nothing else will sound). But, it seems to be more
clear to use a “z”.
<P>
Okay, we lied. We didn't create an empty bar for the metronome. If
you're sharp you'll notice that the “z” is followed by “* 2”. This
means to play this bar two times. So, you get 2 bars of metronome.
Cool.
<P>
We've not made any changes to the chords, but a few little changes do
help this simple piece. Remember the dull, single volume? Well, have a
look at the “volume” directives we've included in this version. We
start the song off at a moderate volume, and increase it in several
steps. And, at the end we use a “decresc” to reduce the volume to
“quiet” over the final 4 bars.
<P>
Please refer to the
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> Reference Manual for salient details on the
volume commands.
<P>
One minor change we did make in the chords is in bar 16. Note the
change between this and bar 17. In the first we have a “z”, the
second a “z!”. The difference between the two is that we want the
precussion tracks to continue though the ending, but not on the final
beat.
<P>
Finally, to ensure a complete cutoff in the final bar we have added a
“cut” command. We're sure you'll find these minor changes a great
improvement.
<P>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A
HREF="node4.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="mma-tutorial.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node2.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A
HREF="node4.html">A More Complex Example</A>
<B> Up:</B> <A
HREF="mma-tutorial.html">Tutorial</A>
<B> Previous:</B> <A
HREF="node2.html">Installation</A></DIV>
<!--End of Navigation Panel-->
</BODY>
</HTML>
|