File: node4.html

package info (click to toggle)
mma 16.06-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 45,212 kB
  • sloc: python: 14,894; sh: 26; makefile: 13; perl: 12
file content (1362 lines) | stat: -rw-r--r-- 40,057 bytes parent folder | download | duplicates (2)
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
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
<!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>Patterns</TITLE>
<META NAME="description" CONTENT="Patterns">
<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="node5.html">
<LINK REL="previous" HREF="node3.html">
<LINK REL="up" HREF="mma.html">
<LINK REL="next" HREF="node5.html">
</HEAD>

<BODY  bgcolor="#ffffff">

<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html515"
  HREF="node5.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html513"
  HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html507"
  HREF="node3.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>   
<BR>
<B> Next:</B> <A NAME="tex2html516"
  HREF="node5.html">Sequences</A>
<B> Up:</B> <A NAME="tex2html514"
  HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A NAME="tex2html508"
  HREF="node3.html">Tracks and Channels</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="tex2html517"
  HREF="node4.html#SECTION00410000000000000000">Defining a Pattern</A>
<UL>
<LI><A NAME="tex2html518"
  HREF="node4.html#SECTION00411000000000000000">Bass</A>
<LI><A NAME="tex2html519"
  HREF="node4.html#SECTION00412000000000000000">Chord</A>
<LI><A NAME="tex2html520"
  HREF="node4.html#SECTION00413000000000000000">Arpeggio</A>
<LI><A NAME="tex2html521"
  HREF="node4.html#SECTION00414000000000000000">Walk</A>
<LI><A NAME="tex2html522"
  HREF="node4.html#SECTION00415000000000000000">Scale</A>
<LI><A NAME="tex2html523"
  HREF="node4.html#SECTION00416000000000000000">Aria</A>
<LI><A NAME="tex2html524"
  HREF="node4.html#SECTION00417000000000000000">Plectrum</A>
<LI><A NAME="tex2html525"
  HREF="node4.html#SECTION00418000000000000000">Drum</A>
<LI><A NAME="tex2html526"
  HREF="node4.html#SECTION00419000000000000000">Drum Tone</A>
</UL>
<BR>
<LI><A NAME="tex2html527"
  HREF="node4.html#SECTION00420000000000000000">Including Existing Patterns in New Definitions</A>
<LI><A NAME="tex2html528"
  HREF="node4.html#SECTION00430000000000000000">Multiplying and Shifting Patterns</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION00400000000000000000"></A>
<A NAME="sec-pats"></A>
<BR>
Patterns
</H1>

<P>

<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  builds its output based on P<SMALL>ATTERN</SMALL>s and S<SMALL>EQUENCE</SMALL>s
supplied by you. These can be defined in the same file as the rest of
the song data, or can be included (see
<A HREF="node32.html#sec-paths">here</A>) from a library file.

<P>
A pattern is a definition for a voice or track which describes what
rhythm to play during the current bar. The actual notes selected for
the rhythm are determined by the song bar data (see
<A HREF="node8.html#sec-music">here</A>).

<P>

<H1><A NAME="SECTION00410000000000000000">
Defining a Pattern</A>
</H1>

<P>
The formats for the different tracks vary, but are similar enough to
confuse the unwary.

<P>
Each pattern definition consists of three parts:

<P>

<UL>
<LI>A unique label to identify the pattern. This is
  case-insensitive.  Note that the same label names can be used in
  different tracks--for example, you could use the name ``MyPattern''
  in both a Drum and Chord pattern ... but this is probably not a
  good idea. Names can use punctuation characters, but must not begin
  with an underscore (``_''). The pattern names ``z'' or ``Z'' and
  ``-'' are also reserved.

<P>
</LI>
<LI>A series of note definitions. Each set in the series is
  delimited with a ``;''.

<P>
</LI>
<LI>The end of the pattern definition is indicated by the
  end-of-line. 
</LI>
</UL>

<P>
In the following sections definitions are shown in continuation lines;
however, it is quite legal to mash all the information onto a single
line.

<P>
The following concepts are used when defining a pattern:

<P>
<DL>
<DD><A NAME="beat-offset"></A></DD>
<DT><STRONG>Start</STRONG></DT>
<DD>When to start the note. This is expressed as a beat
  offset. For example, to start a note at the start of a bar you use
  ``1'', the second beat would be ``2'', the fourth ``4'', etc. You
  can easily use off-beats as well: The ``and'' of 2 is ``2.5'', the
  ``and ahh'' of the first beat is ``1.75'', etc. Using a beat offset
  greater than the number of beats in a bar or less than ``0'' is not
  permitted. Please note that offsets in the range ``0'' to ``.999''
  will actually be played in the <SPAN  CLASS="textit">previous</SPAN> bar using the chord
  specified at beat 1 of the current bar (this can be useful in Jazz
  charts, and it will generate a warning!).<A NAME="tex2html22"
  HREF="#foot1813"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">1</SPAN></SUP></A>  See
  T<SMALL>IME</SMALL> (<A HREF="node17.html#time">here</A>).

<P>
The offset can be further modified by appending a note length (see
  the duration chart, below). If you want to specify an offset in the
  middle of the first beat you can use ``1.5'' or ``1+8''. The latter
  means the first beat plus the value of an eight note. This notation
  is quite useful when generating ``swing'' sequences. For example,
  two ``swing eights'' chords on beat one would be notated as: ``1 81
  90; 1+81 82 90''.

<P>
You can subtract note lengths as well, but this is rarely done. And,
  to make your style files completely unreadable, you can even use
  note length combinations. So, yes, the following pattern is
  fine:<A NAME="tex2html23"
  HREF="#foot1814"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN></SUP></A>
<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Chord Define C1 2-81+4 82 90  </B> 
   
	    </td></tr>
      </Table>

<P>
<A NAME="notelength"></A>
<P>
</DD>
<DT><STRONG>Duration</STRONG></DT>
<DD>The length of a note is somewhat standard musical
  notation. Since it is impractical to draw in graphical notes or to
  use fractions (like <SPAN  CLASS="textbf">1/4</SPAN>) 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT> , uses a shorthand
  notation detailed in the following table:

<P>
<BLOCKQUOTE>

		<Table CellSpacing=0 Width="80%" Align="Center" CellPadding=10 BGColor="#dddddd" Border=3>
           <tr> <td>
	       
      <TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="LEFT"><SPAN  CLASS="textit">Notation</SPAN></TD>
<TD ALIGN="LEFT"><SPAN  CLASS="textit">Description</SPAN></TD>
</TR>
<TR><TD ALIGN="LEFT">1</TD>
<TD ALIGN="LEFT">Whole note</TD>
</TR>
<TR><TD ALIGN="LEFT">2</TD>
<TD ALIGN="LEFT">Half</TD>
</TR>
<TR><TD ALIGN="LEFT">4</TD>
<TD ALIGN="LEFT">Quarter</TD>
</TR>
<TR><TD ALIGN="LEFT">8</TD>
<TD ALIGN="LEFT">Eighth</TD>
</TR>
<TR><TD ALIGN="LEFT">81</TD>
<TD ALIGN="LEFT">The first  of a pair of swing eights</TD>
</TR>
<TR><TD ALIGN="LEFT">82</TD>
<TD ALIGN="LEFT">The second of a pair of swing eights</TD>
</TR>
<TR><TD ALIGN="LEFT">16</TD>
<TD ALIGN="LEFT">Sixteenth</TD>
</TR>
<TR><TD ALIGN="LEFT">32</TD>
<TD ALIGN="LEFT">Thirty-second</TD>
</TR>
<TR><TD ALIGN="LEFT">64</TD>
<TD ALIGN="LEFT">Sixty-fourth</TD>
</TR>
<TR><TD ALIGN="LEFT">3</TD>
<TD ALIGN="LEFT">Eight note triplet</TD>
</TR>
<TR><TD ALIGN="LEFT">43</TD>
<TD ALIGN="LEFT">Quarter note triplet</TD>
</TR>
<TR><TD ALIGN="LEFT">23</TD>
<TD ALIGN="LEFT">Half note triplet</TD>
</TR>
<TR><TD ALIGN="LEFT">6</TD>
<TD ALIGN="LEFT">Sixteenth note triplet</TD>
</TR>
<TR><TD ALIGN="LEFT">5</TD>
<TD ALIGN="LEFT">Eight note quintuplet</TD>
</TR>
<TR><TD ALIGN="LEFT">0</TD>
<TD ALIGN="LEFT">A single MIDI tick</TD>
</TR>
<TR><TD ALIGN="LEFT">ddT</TD>
<TD ALIGN="LEFT">dd MIDI ticks.</TD>
</TR>
</TABLE> 
	
           </td></tr>
        </Table>

</BLOCKQUOTE>

<P>
The ``81'' and ``82'' notations represent the values of a pair of
  eighth notes in a swing pair. These values vary depending on the
  setting of S<SMALL>WING</SMALL>M<SMALL>ODE </SMALL>S<SMALL>KEW</SMALL>, see
  <A HREF="node18.html#swingmode">here</A>.

<P>
The note length ``0'' is a special value often used in drum tracks
  where the actual ``ringing''length appears to be controlled by the
  MIDI synth, not the driving program. Internally, a ``0'' note length
  is converted to a single MIDI tick.

<P>
Lengths can have a single or double dot appended. For example,
  ``2.'' is a dotted half note and ``4..'' adds an eight and sixteenth
  value to a quarter note.

<P>
Note lengths can be combined using ``+''. For example, to make a
  dotted eight note use the notation ``8+16'', a dotted half ``2+4'',
  and a quarter triplet ``3+3''.

<P>
Note lengths can also be combined using a ``-''. For example, to
  make a dotted half you could use ``1-4''. Subtraction might appear
  silly at first, but is useful in generating a note <SPAN  CLASS="textit">just</SPAN> a bit
  shorter than its full beat. For example, ``1-0'' will generate a
  note 1 MIDI tick shorter than a whole note. This can be used in
  generating breaks in sustained tones.<A NAME="tex2html24"
  HREF="#foot1816"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">3</SPAN></SUP></A>
<P>
It is permissible to combine notes with ``dots'', ``+''s and
  ``-''s. The notation ``2.+4'' would be the same as a whole note.

<P>
A number of special tuplet values (ie, 3, 6, 5) have been hard-coded
  into the above table. However, it is easy to use others. Just
  specify the note in the ratio format ``Count:Base'' where ``Count''
  is the number of divisions and ``Base'' is a note duration from the
  above table (ie, 2, 4, 8, etc.). So, an eight note triplet could be
  set as ``3:4'' (there are 3 eight note triplets in a quarter) or a
  whole note divided into 5 would be ``5:1''. The ``Base'' value
  cannot be a MIDI tick value or be dotted. It is possible to create
  tuplet values which are not playable and/or permitted in standard
  musical notation. Ratio tuplets can be added, subtracted and dotted.

<P>
The actual duration given to a note will be adjusted by the
  A<SMALL>RTICULATE</SMALL> value <A HREF="node29.html#articulate">here</A>).

<P>
In special cases you might want to forget all standard duration
  conventions and specify the length of a note or chord in MIDI
  ticks. Just append a single ``t'' or ``T'' to end of the value. For
  example, a quarter note duration can be set with a ``4'' or
  ``192t''. Using MIDI values can simplify the creation of odd-length
  beats.

<P>
When using MIDI tick values you <SPAN  CLASS="textit">cannot</SPAN> use ``+'', ``-'' or ``.'' to
  combine or modify the value.

<P>
</DD>
<DT><STRONG>Volume</STRONG></DT>
<DD>The MIDI velocity<A NAME="tex2html25"
  HREF="#foot1571"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">4</SPAN></SUP></A> to use for the specified note.
  For a detailed explanation of how 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  calculates the volume of a
  note, see <A HREF="node19.html#sec-volume">read this</A>.

<P>
MIDI velocities are limited to the range 0 to 127. However, 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT> 
  does not check the volumes specified in a pattern for
  validity.<A NAME="tex2html26"
  HREF="#foot1578"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">5</SPAN></SUP></A>
<P>
In most cases velocities in the range 50 to 100 are useful.

<P>
</DD>
</DL>

<P>
Patterns can be defined for B<SMALL>ASS</SMALL>, W<SMALL>ALK</SMALL>, C<SMALL>HORD</SMALL>,
A<SMALL>RPEGGIO</SMALL> and D<SMALL>RUM</SMALL> tracks. All patterns are shared by the
tracks of the same type--<SPAN  CLASS="textit">Chord-Sus</SPAN> and <SPAN  CLASS="textit">Chord-Piano</SPAN>
share the patterns for <SPAN  CLASS="textit">Chord</SPAN>. As a convenience, 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  will
permit you to define a pattern for a sub-track, but remember that it
will be shared by all similar tracks.  For example:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Drum Define S1 1 0 50   </B> 
   
	    </td></tr>
      </Table>

<P>
and

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Drum-woof Define S1 1 0 50   </B> 
   
	    </td></tr>
      </Table>

<P>
Will generate identical outcomes.<A NAME="tex2html27"
  HREF="#foot1591"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">6</SPAN></SUP></A>
<P>

<H2><A NAME="SECTION00411000000000000000"></A> <A NAME="sec-bass"></A>
<BR>
Bass
</H2>

<P>
A B<SMALL>ASS</SMALL> pattern is defined with:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Position Duration Offset Volume ; ...</B> 
   
	    </td></tr>
      </Table>

<P>
Each group consists of an beat offset for the start point, the note
duration, the note offset and volume.

<P>
The note offset is one of the digits ``1'' through ``7'', each
representing a note of the chord scale. So, if you want to play the
root and fifth in a traditional bass pattern you'd use ``1'' and ``5''
in your pattern definition.

<P>
The note offset can be modified by appending a single or multiple set
of ``+'' or ``-'' signs. Each ``+'' will force the note up an octave;
each ``-'' forces it down. This modifier is handy in creating bass
patterns when you wish to alternate between the root note and the root
up an octave ... but users will find other interesting
patterns. There is no limit to the number of ``+''s or ``-''s. You can
even use both together if you're in a mood to obfuscate.

<P>
The note offset can be further modified with a single accidental ``#'',
``SPMamp;'', ``B'' or ``b''. This modifier will raise or lower the note by a
semitone.<A NAME="tex2html28"
  HREF="#foot1817"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">7</SPAN></SUP></A> In the boogie-woogie
library file a ``6#'' is used to generate a dominant 7th.

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Bass Definition</BIG></SPAN>  <A NAME="eg:b8"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
  
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Bass Define Broken8     1 8 1 90 ;  \
<BR>&nbsp;&nbsp;&nbsp; 2 8 5 80 ;   \
<BR>&nbsp;&nbsp;&nbsp; 3 8 3 90 ;  \
<BR>&nbsp;&nbsp;&nbsp; 4 8 1+ 80   </B> 
   
	    </td></tr>
      </Table>

<P>
<BR>
<BR> <SPAN  CLASS="textbf">Sheet Music Equivalent</SPAN>

<P>
<BR>
<BR>

<P>
  <IMG WIDTH="95%"  SRC="mupex/bassb8.png" ALT="Lost Image">
 
	
	       </td> </tr>
        </Table>

<P>

<P>
<A HREF="#eg:b8">This example</A> defines 4 bass notes
(probably staccato eight notes) at beats 1, 2, 3 and 4 in a
<SPAN  CLASS="textbf">4/4</SPAN> time bar. The first note is the root of the chord, the
second is the fifth; the third note is the third; the last note is the
root up an octave. The volumes of the notes are set to a MIDI velocity
of 90 for beats 1 and 3 and 80 for beats 2 and 4.

<P>

<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  refers to note tables to determine the ``scale'' to use in a
bass pattern. Each recognized chord type has an associated scale. For
example, the chord ``Cm'' consists of the notes ``c'', ``e<SPAN CLASS="MATH"><IMG
 WIDTH="12" HEIGHT="19" ALIGN="BOTTOM" BORDER="0"
 SRC="img1.png"
 ALT="$ \flat$"></SPAN>''
and ``g''; the scale for this chord is ``c, d, e<SPAN CLASS="MATH"><IMG
 WIDTH="12" HEIGHT="19" ALIGN="BOTTOM" BORDER="0"
 SRC="img1.png"
 ALT="$ \flat$"></SPAN>, f, g, a, b''.

<P>
Due to the ease in which specific notes of a scale can be specified,
B<SMALL>ASS</SMALL> tracks and patterns are useful for much more than ``bass''
lines! These tracks are useful for sustained string voices,
interesting arpeggio and scale lines, and counter melodies.

<P>

<H2><A NAME="SECTION00412000000000000000"></A> <A NAME="sec-chordseq"></A>
<BR>
Chord
</H2>

<P>
A C<SMALL>HORD</SMALL> pattern is defined with:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Position Duration Volume1 Volume2 ...; ...</B> 
   
	    </td></tr>
      </Table>

<P>
Each group consists of an beat offset for the start point, the note
duration, and the volumes for each note in the chord. If you have
fewer volumes than notes in a chord, the last volume will apply to the
remaining notes.

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Chord Definition</BIG></SPAN>  <A NAME="eg:s4"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
  
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Chord Define Straight4+3   1 4 100 ;  \
<BR>&nbsp;&nbsp;&nbsp; 2 4 90 ;  \
<BR>&nbsp;&nbsp;&nbsp; 3 4 100 ; \
<BR>&nbsp;&nbsp;&nbsp; 4 3 90 ;  \
<BR>&nbsp;&nbsp;&nbsp; 4.3 3 80 ;  \
<BR>&nbsp;&nbsp;&nbsp; 4.6 3 80   </B> 
   
	    </td></tr>
      </Table>

<P>
<BR>
<BR> <SPAN  CLASS="textbf">Sheet Music Equivalent </SPAN>

<P>
<BR>
<BR>
    <IMG WIDTH="95%"  SRC="mupex/chord43.png" ALT="Lost Image">
 
	
	       </td> </tr>
        </Table>

<P>

<P>
<A HREF="#eg:s4">This example</A> defines a
<SPAN  CLASS="textbf">4/4</SPAN> pattern in a quarter, quarter, quarter, triplet rhythm.
The quarter notes sound on beats 1, 2 and 3; the triplet is played on
beat 4. The example assumes that you have C major for beats 1 and 2,
and G major for 3 and 4.

<P>
Using a volume of ``0'' will disable a note. So, you want only the
root and fifth of a chord to sound, you could use something like:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Chord Define Dups 1 8 90 0 90 0; 3 8 90 0 90 0   </B> 
   
	    </td></tr>
      </Table>

<P>

<H2><A NAME="SECTION00413000000000000000">
Arpeggio</A>
</H2>

<P>
An A<SMALL>RPEGGIO</SMALL> pattern is defined with:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Position Duration Volume ; ...</B> 
   
	    </td></tr>
      </Table>

<P>
The arpeggio tracks play notes from a chord one at a time. This is
quite different from chords where the notes are played all at
once--refer to the S<SMALL>TRUM</SMALL> directive
(<A HREF="node29.html#strum">here</A>).

<P>
Each group consists of an beat offset, the note duration, and the note
volume. You have no choice as to which notes of a chord are played
(however, they are played in alternating ascending/descending
order.<A NAME="tex2html29"
  HREF="#foot1820"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">8</SPAN></SUP></A>)

<P>
The volume is applied to the specified note in the pattern.

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Arpeggio Definition</BIG></SPAN>  <A NAME="eg:arp4s"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
  
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Arpeggio Define 4s  1 4 100;  \
<BR>&nbsp;&nbsp;&nbsp;  2 4 90;  \
<BR>&nbsp;&nbsp;&nbsp;  3 4 100;  \
<BR>&nbsp;&nbsp;&nbsp; 4 4 100   </B> 
   
	    </td></tr>
      </Table>

<P>
<BR>
<BR> <SPAN  CLASS="textbf">Sheet Music Equivalent </SPAN> <BR>
<BR>
    <IMG WIDTH="95%"  SRC="mupex/arp4s.png" ALT="Lost Image">
 
	
	       </td> </tr>
        </Table>

<P>

<P>
<A HREF="#eg:arp4s">This example</A> plays quarter note
on beats 1, 2, 3 and 4 of a bar in <SPAN  CLASS="textbf">4/4</SPAN> time.

<P>

<H2><A NAME="SECTION00414000000000000000">
Walk</A>
</H2>

<P>
A W<SMALL>ALK</SMALL>ing Bass pattern is defined with:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Position Duration Volume ; ...</B> 
   
	    </td></tr>
      </Table>

<P>
Walking bass tracks play up and down the first part of a scale, paying
attention to the ``color''<A NAME="tex2html30"
  HREF="#foot1822"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">9</SPAN></SUP></A> of the
chord. Walking bass lines are very common in jazz and swing
music. They appear quite often as an ``emphasis'' bar in marches.

<P>
Each group consists of an beat offset, the note duration, and the note
volume. 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  selects the actual note pitches to play based on the
current chord (you cannot change this).

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Walking Bass Definition</BIG></SPAN>  <A NAME="eg:walk4"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
  
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Walk Define Walk4   1 4 100 ;  \
<BR>&nbsp;&nbsp;&nbsp; 2 4 90;  \
<BR>&nbsp;&nbsp;&nbsp; 3 4 90   </B> 
   
	    </td></tr>
      </Table>

<P>

	
	       </td> </tr>
        </Table>

<P>

<P>
<A HREF="#eg:walk4">This example</A> plays a bass note
on beats 1, 2 and 3 of a bar in <SPAN  CLASS="textbf">3/4</SPAN> time.

<P>

<H2><A NAME="SECTION00415000000000000000">
Scale</A>
</H2>

<P>
A S<SMALL>CALE</SMALL> pattern is defined with:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Position Duration Volume ; ...</B> 
   
	    </td></tr>
      </Table>

<P>
Each group consists of an beat offset for the start point, the note
duration, and volume.

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Scale Definition</BIG></SPAN>  <A NAME="eg:scale"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
  
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Scale Define S1   1 1 90  
<BR>
Scale Define S4   S1 * 4 
<BR>
Scale Define S8 S1 * 8   </B> 
   
	    </td></tr>
      </Table>
 
	
	       </td> </tr>
        </Table>

<P>

<P>
<A HREF="#eg:scale">This example</A> defines three scale
patterns: ``S1'' is just a single whole note, not that useful on its
own, but it is used as a base for ``S4'' and ``S8''.

<P>
``S4'' is 4 quarter notes and ``S8'' is 8 eight notes. All the volumes
are set to a MIDI velocity of 90.

<P>
Scale patterns are quite useful in endings. More options for scales
detailed in the S<SMALL>CALE</SMALL>D<SMALL>IRECTION</SMALL>
(<A HREF="node29.html#scale-direction">here</A>) and S<SMALL>CALE</SMALL>T<SMALL>YPE</SMALL>
(<A HREF="node29.html#scale-type">here</A>) sections.

<P>

<H2><A NAME="SECTION00416000000000000000">
Aria</A>
</H2>

<P>
An A<SMALL>RIA</SMALL> pattern is defined with:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Position Duration Volume ; ...</B> 
   
	    </td></tr>
      </Table>

<P>
much like a scale pattern. Please refer to the the A<SMALL>RIA</SMALL> section
(<A HREF="node12.html#chap-aria">here</A>) for more details.

<P>

<H2><A NAME="SECTION00417000000000000000">
Plectrum</A>
</H2>

<P>
An P<SMALL>LECTRUM</SMALL> pattern is defined with:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Position Strum Volume1 Volume2 ...; ...</B> 
   
	    </td></tr>
      </Table>

<P>
Note the absence of a duration setting. For details, please refer to
the the P<SMALL>LECTRUM</SMALL> section
(<A HREF="node11.html#chap-plectrum">here</A>) for more details.

<P>

<H2><A NAME="SECTION00418000000000000000"></A> <A NAME="sec-drum"></A>
<BR>
Drum
</H2>

<P>
Drum tracks are a bit different from the other tracks discussed so
far. Instead of having each track saved as a separate MIDI track, all
the drum tracks are combined onto MIDI track 10.

<P>
A Drum pattern is defined with:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Position Duration Volume; ...</B> 
   
	    </td></tr>
      </Table>

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Drum Definition</BIG></SPAN>  <A NAME="eg:s2"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
  
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Drum Define S2  1 0 100;  \
<BR>&nbsp;&nbsp;&nbsp; 2 0  80 ;   \
<BR>&nbsp;&nbsp;&nbsp; 3 0  100 ;  \
<BR>&nbsp;&nbsp;&nbsp; 4 0 80   </B> 
   
	    </td></tr>
      </Table>
 
	
	       </td> </tr>
        </Table>

<P>

<P>
<A HREF="#eg:s2">This example</A> plays a drum sound on
beats 1, 2, 3 and 4 of a bar in <SPAN  CLASS="textbf">4/4</SPAN> time. The MIDI velocity
(volume) of the drum is 100 on beats 1 and 3; 80 on beats 2 and 4.

<P>
This example uses the special duration of ``0'', which indicates 1
MIDI tick.

<P>

<H2><A NAME="SECTION00419000000000000000"></A> <A NAME="drum-tone"></A>
<BR>
Drum Tone
</H2> 

<P>
Essential to drum definitions is the T<SMALL>ONE</SMALL> directive.

<P>
When a drum pattern is defined it uses the default ``note'' or
``tone'' which is a snare drum sound. But, this can (and should) be
changed using the T<SMALL>ONE</SMALL> directive. This is normally issued at
the same time as a sequence is set up (see
<A HREF="node5.html#sec-seqs">sequences</A>).

<P>
T<SMALL>ONE</SMALL> is a list of drum sounds which match the sequence length.
Here's a short, concocted example (see the library files for many
more):

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Drum Define S1 1 0 90  
<BR>
Drum Define S2 S1 * 2 
<BR>
Drum Define S4 S1 * 4 
<BR>
SeqClear 
<BR>
SeqSize 4 
<BR>
Drum Sequence S4 S2 S2 S4 
<BR>
Drum Tone SnareDrum1 SideKick LowTom1 Slap   </B> 
   
	    </td></tr>
      </Table>

<P>
Here the drum patterns ``S2'' and ``S4'' are defined to sound a drum
on beats 1 and 3, and 1, 2, 3 and 4 respectively (see
<A HREF="#defmult">DefMult</A> for details on the ``*''
option). Next, a sequence size of 4 bars and a drum sequence are set
to use this pattern. Finally, 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  is instructed to use a SnareDrum1
sound in bar 1, a SideKick sound in bar 2, a LowTom1 in bar 3 and a
Slap in bar 4. If the song has more than four bars, this sequence will
be repeated.

<P>
In most cases you will probably use a single drum tone name for the
entire sequence, but it can be useful to alternate the tone between
bars.

<P>
To repeat the same ``tone'' in a sequence list, use a single ``/''.

<P>
The ``tone'' can be specified with a MIDI note value or with a
symbolic name. For example, a snare drum could be specified as ``38''
or ``SnareDrum1''.  <A HREF="node35.html#sec-drumnames">The Drumnames
  appendix</A> lists all the defined symbolic
names.

<P>
It is possible to substitute tone values. See
<A HREF="node28.html#set-drumtr">T<SMALL>ONE</SMALL>TR</A>.

<P>

<H1><A NAME="SECTION00420000000000000000">
Including Existing Patterns in New Definitions</A>
</H1>

<P>
When defining a pattern, you can use an existing pattern name in place
of a definition grouping. For example, if you have already defined a
chord pattern (which is played on beats 1 and 3) as:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Chord Define M13 1 4 80; 3 4 80   </B> 
   
	    </td></tr>
      </Table>

<P>
you can create a new pattern which plays on same beats and adds a
single push note just before the third beat:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Chord Define M1+3 M13; 2.5 16 80 0   </B> 
   
	    </td></tr>
      </Table>

<P>
A few points to note:

<P>

<UL>
<LI>the existing pattern must exist and belong to the same track,

<P>
</LI>
<LI>the existing pattern is expanded in place,

<P>
</LI>
<LI>it is perfectly acceptable to have several existing definitions,
  just be sure to delimit each with a ``;'',

<P>
</LI>
<LI>the order of items in a definition does not matter, each will be
  placed at the correct position in the bar.

<P>
</LI>
</UL>

<P>
This is a powerful shortcut in creating patterns. See the included
library files for examples.

<P>

<H1><A NAME="SECTION00430000000000000000"></A> <A NAME="defmult"></A>
<BR>
Multiplying and Shifting Patterns
</H1>

<P>
Since most pattern definitions are, internally, repetitious, you can
create complex rhythms by multiplying a copy of an existing pattern.
For example, if you have defined a pattern to play a chord on beats 1
though 4 (a quarter note strum), you can easily create a similar
pattern to play eighth note chords on beats 1, 1.5, etc. though 4.5
with a command like:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Track Define NewPattern OldPattern * N  </B> 
   
	    </td></tr>
      </Table>

<P>
where ``Track'' is a valid track name (``Chord'', ``Walk'', ``Bass'',
``Arpeggio'' or ``Drum'', as well as ``Chord2'' or ``DRUM3'', etc.).

<P>
The ``*'' is absolutely required.

<P>
``N'' can be any integer value between 2 and 100.

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Multiply Define</BIG></SPAN>  <A NAME="eg:drum2"></A>	
	 	   </tr> </td>
           <tr> <td >
		      
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>    Drum Define S1      1  1  100  
<BR>
Drum Define S13   S1 * 2 
<BR>
Drum Define S1234   S1      * 4 
<BR>
Drum Define S8   S1234      * 2 
<BR>
Drum Define S16   S8        * 2 
<BR>
Drum Define S32  S16        * 2 
<BR>
Drum Define S64 S1 * 64   </B> 
   
	    </td></tr>
      </Table>
 
	
	       </td> </tr>
        </Table>

<P>

<P>
In <A HREF="#eg:drum2">this example</A> a Drum pattern
is defined which plays a drum tone on beat 1 (assuming <SPAN  CLASS="textbf">4/4</SPAN>
time). Then a new pattern, ``S13'', is created. This is the old ``S1''
multiplied by 2. This new pattern will play a tone on beats 1 and 3.

<P>
Next, ``S1234'' is created. This plays 4 notes, one the each beat.

<P>
Note the definition for ``S64'': ``S32'' could have been multiplied by
2, but, for illustrative purposes, ``S1'' has been multiplied by
64--same result either way.

<P>
When 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  multiplies an existing pattern it will (usually) do what
you expect. The start positions for all notes are adjusted to the new
positions; the length of all the notes are adjusted (quarter notes
become eighth notes, etc.). No changes are made to note offsets or
volumes.

<P>
<A HREF="#eg:sw8">This example</A> shows how to get a
swing pattern which might be useful on a snare drum.

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Swing Beat Drum Definition</BIG></SPAN>  <A NAME="eg:sw8"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
  
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Begin Drum Define 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;SB8 1 2+16 90 ; 3.66 4+32 80 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;SB8   SB8 * 4 
<BR>
End   </B> 
   
	    </td></tr>
      </Table>

<P>
<BR>
<BR> <SPAN  CLASS="textbf">Sheet Music Equivalent, Normal Notation</SPAN>

<P>
<BR>
<BR>
    <IMG WIDTH="95%"  SRC="mupex/swingdrum8.png" ALT="Lost Image">

<P>
<BR>
<BR> <SPAN  CLASS="textbf">Sheet Music Equivalent, Actual Rhythm</SPAN>

<P>
  <IMG WIDTH="95%"  SRC="mupex/swingdrum8-3.png" ALT="Lost Image">
 
	
	       </td> </tr>
        </Table>

<P>

<P>
To see the effects of multiplying patterns, create a simple test file
and process it though 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  with the ``-p'' option.

<P>
Even cooler<A NAME="tex2html31"
  HREF="#foot1786"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">10</SPAN></SUP></A>  is combining a multiplier, and
existing pattern and a new pattern all in one statement. The following
is quite legal (and useful):

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Drum Define D1234 1 0 90 * 4   </B> 
   
	    </td></tr>
      </Table>

<P>
which creates drum hits on beats 1, 2, 3 and 4.

<P>
More contrived (but examples are needed) is:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Drum Define Dfunny D1234 * 2; 1.5 0 70 * 2   </B> 
   
	    </td></tr>
      </Table>

<P>
If you're really interested in the result, run 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  with the ``-p''
option with the above definition.

<P>
<A NAME="defshift"></A>
<P>
An existing pattern can be modified by <SPAN  CLASS="textit">shifting</SPAN> it a beat, or
portion of a beat. This is done in a 
<FONT Face="Serif"  Color="Navy"><I>MMA</I></FONT>  definition with the
S<SMALL>HIFT</SMALL> directive.  <A HREF="#eg:shift">This
  example</A> shows a triplet pattern created to
play on beat 1, and then a second pattern played on beat 3.

<P>

		<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="#efefef" Border=3>
		   <tr><td Align="CENTER" BGColor="White">
	      <SPAN  CLASS="textbf"><BIG CLASS="XLARGE">Shift Pattern Definition</BIG></SPAN>  <A NAME="eg:shift"></A>	
	 	   </tr> </td>
           <tr> <td >
		     
  
      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Chord Define C1-3 1 3 90;  \
<BR>&nbsp;&nbsp;&nbsp; 1.33 3 90; 1.66 3 90   </B> 
   
	    </td></tr>
      </Table>
 <BR>
<BR>

<P>
  <IMG WIDTH="95%"  SRC="mupex/trip1.png" ALT="Lost Image">

<P>
<BR>
<BR>

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Chord Define C3-3 C1-3 Shift 2   </B> 
   
	    </td></tr>
      </Table>

<P>
  <IMG WIDTH="95%"  SRC="mupex/trip3.png" ALT="Lost Image">
 
	
	       </td> </tr>
        </Table>

<P>

<P>
Note that the shift factor can be a negative or positive value. It can
be fractional. Just be sure that the factor doesn't force the note
placement to be less than 1 or greater than the T<SMALL>IME</SMALL> setting.

<P>
And, just like the multiplier discussed earlier you can shift patterns
as they are defined. And shifts and multipliers can be combined. So,
to define a series of quarter notes on the offbeat you could use:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Drum Define D1234' 1 0 90 * 4 Shift .5  </B> 
   
	    </td></tr>
      </Table>

<P>
which would create the same pattern as the longer:

<P>

      <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
        <tr><td>
    <B>Drum Define D1234' 1.5 1 90; 2.5 1 90; 3.5 1 90; 4.5 1 90   </B> 
   
	    </td></tr>
      </Table>

<P>

<P>
<BR><HR><H4>Footnotes</H4>
<DL>
<DT><A NAME="foot1813">... warning!).</A><A
 HREF="node4.html#tex2html22"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">1</SPAN></SUP></A></DT>
<DD>The exception is
    that R<SMALL>TIME</SMALL> may move the chord back into the bar.

</DD>
<DT><A NAME="foot1814">... fine:</A><A
 HREF="node4.html#tex2html23"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">2</SPAN></SUP></A></DT>
<DD>The start offset is the value of the first of a pair
    of swing eights plus a quarter <SPAN  CLASS="textit">before</SPAN> the second beat.

</DD>
<DT><A NAME="foot1816">... tones.</A><A
 HREF="node4.html#tex2html24"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">3</SPAN></SUP></A></DT>
<DD>See the supplied
    G<SMALL>ROOVE</SMALL> ``Bluegrass'' for an example.

</DD>
<DT><A NAME="foot1571">... velocity</A><A
 HREF="node4.html#tex2html25"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">4</SPAN></SUP></A></DT>
<DD>MIDI ``note on'' events are
    declared with a ``velocity'' value. Think of this as the
    ``striking pressure'' on a piano.

</DD>
<DT><A NAME="foot1578">... validity.</A><A
 HREF="node4.html#tex2html26"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">5</SPAN></SUP></A></DT>
<DD>This is a feature that you probably don't want to
    use, but if you want to ensure that a note is always sounded use a
    very large value (e.g., 1000) for the volume. That way, future
    adjustments will maintain a large value and this large value will
    be clipped to the maximum permitted MIDI velocity.

</DD>
<DT><A NAME="foot1591">... outcomes.</A><A
 HREF="node4.html#tex2html27"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">6</SPAN></SUP></A></DT>
<DD>What really happens is that
  this definition is stored in a slot named ``DRUM''.

</DD>
<DT><A NAME="foot1817">...
semitone.</A><A
 HREF="node4.html#tex2html28"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">7</SPAN></SUP></A></DT>
<DD> Be careful using this feature ... certain
  scales/chords may return non-musical results.

</DD>
<DT><A NAME="foot1820">...
order.</A><A
 HREF="node4.html#tex2html29"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">8</SPAN></SUP></A></DT>
<DD>See the D<SMALL>IRECTION</SMALL> command
  (<A HREF="node29.html#scale-direction">here</A>).

</DD>
<DT><A NAME="foot1822">... ``color''</A><A
 HREF="node4.html#tex2html30"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">9</SPAN></SUP></A></DT>
<DD>The color of a chord are items
  like ``minor'', ``major'', etc. The current walking bass algorithm
  generates acceptable (uninspired) lines. If you want something
  better there is nothing stopping you from using a R<SMALL>IFF</SMALL> to
  over-ride the computer generated pattern for important bars.

</DD>
<DT><A NAME="foot1786">... cooler</A><A
 HREF="node4.html#tex2html31"><SUP><SPAN CLASS="arabic">4</SPAN>.<SPAN CLASS="arabic">10</SPAN></SUP></A></DT>
<DD>In this case the word ``cool'' substitutes for
  the more correct ``useful''.

</DD>
</DL>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html515"
  HREF="node5.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html513"
  HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html507"
  HREF="node3.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>   
<BR>
<B> Next:</B> <A NAME="tex2html516"
  HREF="node5.html">Sequences</A>
<B> Up:</B> <A NAME="tex2html514"
  HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A NAME="tex2html508"
  HREF="node3.html">Tracks and Channels</A></DIV>
<!--End of Navigation Panel-->
<ADDRESS>
Bob van der Poel
2016-06-11
</ADDRESS>
</BODY>
</HTML>