File: node3.html

package info (click to toggle)
mma 21.09-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 51,828 kB
  • sloc: python: 16,751; sh: 26; makefile: 18; perl: 12
file content (478 lines) | stat: -rw-r--r-- 12,585 bytes parent folder | download
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 &ldquo;fake book&rdquo; or &ldquo;lead sheet&rdquo;
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">//&nbsp;Sample&nbsp;tutorial&nbsp;file
<BR>//&nbsp;Fella&nbsp;Bird,&nbsp;try&nbsp;1
<BR>&nbsp;
<BR>
Tempo&nbsp;120
<BR>
Groove&nbsp;Rhumba
<BR>&nbsp;
<BR>
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C7
<BR>
4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C7
<BR>
8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gm
<BR>
10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C7
<BR>
12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
13&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gm
<BR>
14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C7
<BR>
16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F&nbsp;&nbsp;/&nbsp;&nbsp;/&nbsp;z!
<BR>&nbsp;
<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&mdash;very few pieces (especially in &ldquo;fake book&rdquo; style)
will include a metronome setting. For slow pieces you might want to start with a
tempo setting of &ldquo;80&rdquo;; for faster pieces, like swings, try around &ldquo;150&rdquo;; polkas
and marches, which are really in <SPAN  CLASS="textbf">2/2</SPAN> time, may require fast
sounding tempos like &ldquo;250&rdquo;. Feel free to modify the tempo setting in
the example files&mdash;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 &ldquo;time signature&rdquo; to <SPAN  CLASS="textbf">4/4</SPAN>.
Not quite the same as the &ldquo;cut&rdquo; time indicated, but close enough. And speaking
of &ldquo;close enough&rdquo;, 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 &ldquo;F&rdquo; 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 &ldquo;F&rdquo; chord to be used on the first three beats, the fourth
beat is  completely silent due the to the &ldquo;z!&rdquo;. Note the difference
between a &ldquo;z&rdquo; and &ldquo;z!&rdquo;&mdash;the first silences all but the drum track,
the second silences everything. See the reference manual for more details
on &ldquo;z&rdquo;.

<P>
Now, let's create our first MIDI file! If you are using the standard 
distribution, you should find a file &ldquo;fella1.mma&rdquo; 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 &ldquo;mma&rdquo; and process the
file &ldquo;fella1.mma&rdquo;. The MIDI file &ldquo;fella1.mid&rdquo; should be created. If this doesn't
happen, please check your python installation, and make sure that you
have installed &ldquo;mma&rdquo; where your shell can find it. On Windows
systems which do not have case sensitive filenames you may need to use
the command &ldquo;mma.py fella1&rdquo;. 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"> //&nbsp;Sample&nbsp;tutorial&nbsp;file
<BR>//&nbsp;Fella&nbsp;Bird,&nbsp;try&nbsp;2
<BR>&nbsp;
<BR>
Tempo&nbsp;120
<BR>
Groove&nbsp;Metronome2-4
<BR>&nbsp;
<BR>
z&nbsp;*&nbsp;2
<BR>&nbsp;
<BR>
Groove&nbsp;Rhumba
<BR>
Repeat
<BR>
Volume&nbsp;mp
<BR>
Cresc&nbsp;mf&nbsp;4
<BR>&nbsp;
<BR>
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C7
<BR>
4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C7
<BR>
8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gm
<BR>
10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C7
<BR>&nbsp;
<BR>
Decresc&nbsp;p&nbsp;4
<BR>&nbsp;
<BR>
12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
13&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gm
<BR>
14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F
<BR>
15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C7
<BR>&nbsp;
<BR>
RepeatEnding
<BR>&nbsp;
<BR>
16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F&nbsp;&nbsp;/&nbsp;&nbsp;/&nbsp;z
<BR>&nbsp;
<BR>
RepeatEnd
<BR>&nbsp;
<BR>
17&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F&nbsp;&nbsp;/&nbsp;&nbsp;/&nbsp;z!
<BR>
cut&nbsp;-1
<BR>&nbsp;
<BR>&nbsp;
<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 &ldquo;groove&rdquo; to a metronome. To find this groove

<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  will automatically process the library file &ldquo;metronome&rdquo;.

<P>
The metronome groove consists of wood-blocks being struck in a
<SPAN  CLASS="textbf">4/4</SPAN> pattern. In order to &ldquo;sound&rdquo; the metronome, we need
to create an empty bar:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>&nbsp;&nbsp;&nbsp;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 &ldquo;z&rdquo;.

<P>
Okay, we lied. We didn't create an empty bar for the metronome. If
you're sharp you'll notice that the &ldquo;z&rdquo; is followed by &ldquo;* 2&rdquo;. 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 &ldquo;volume&rdquo; 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 &ldquo;decresc&rdquo; to reduce the volume to
&ldquo;quiet&rdquo; 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 &ldquo;z&rdquo;, the
second a &ldquo;z!&rdquo;.  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
&ldquo;cut&rdquo; 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>