MMA builds its output based on patterns and sequences supplied by you. These can be defined in the same file as the rest of the song data, or can be included (see chapter 19) from a library file.
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 (Chapter 8).
The formats for the different tracks vary, but are similar enough to confuse the unwary.
Each pattern definition consists of three parts:
In the following sections we show the definitions in continuation lines; however, it is quite legal to mash all the information onto a single line.
The following concepts are used when defining a pattern:
Notation Description 1 Whole note 2 Half 4 Quarter 8 Eighth 16 Sixteenth 32 Thirtysecond 64 Sixtyfourth 3 One note of an eighth-note triplet 0 A single MIDI tick
The last 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 in converted to a single MIDI tick.
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.
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''.
It is permissible to combine notes with ``dots'' and ``+''s. The notation ``2.+4'' would be the same as a whole note.
The actual length of the note will be adjusted by the Articulate value ().
MIDI velocities are limited to the range 0 to 127. However, MMA does not check the volumes specified in a pattern for validity. This is a feature. If you want to ensure that a note is always sounded use a very large value (eg. 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.
In most cases velocities in the range 50 to 100 are useful.
Patterns can be defined for Bass, Walking, Chord, Arpeggio, Chord and Drum tracks. All patterns are shared by the tracks of the same type--Chord-Sus and Chord-Piano share the patterns for Chord. As a convenience, MMA will permit you to define a pattern for a sub-track, but remember that it will be shared by all similar tracks. For example:
Drum Define S1 1 0 50 |
and
Drum-woof Define S1 1 0 50 |
Will generate identical outcomes.4.2
A bass pattern is defined with:
Position Duration Offset Volume ; ... |
Each group consists of an beat offset for the start point, the note duration, the note offset and volume.
The note offset is one of the digits ``1'', ``3'' or ``5'', each representing the ``root'', ``third'' or ``fifth'' of the chord scale. Internally, MMA translates this into the values ``0'', ``1'' and ``2'' and plays the appropriate note from the current chord.
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 we're sure 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.
|
Example 4.1 defines 4 bass notes (probably staccato eight notes) at beats 1, 2, 3 and 4 in a 4/4 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.
You should note that the application of chord modifications like Invert will change the notes selected since MMA just selects the first, second or third note in the chord. This is convenient if you are using a Bass pattern for a harmony line, etc. Generally speaking, if you are using a Bass pattern for a conventional bass line pattern, don't apply modifiers like Invert to it.
A Chord pattern is defined with:
Position Duration Volume1 Volume2 .. ; ... |
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.
|
Example 4.2 defines a 4/4 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.
Using a volume of ``0'' will disable a note. So, you want only the root and third of a chord to sound, you could use something like:
Chord Define Dups 1 8 90 0 90 0; 3 8 90 0 90 0 |
An Arpeggio pattern is defined with:
Position Duration Volume ; ... |
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 Strum directive ().
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.4.3 Volumes are selected for the specific beat, not for the actual note.
|
Example 4.3 plays quarter note on beats 1, 2, 3 and 4 of a bar in 4/4 time.
A Walking Bass pattern is defined with:
Position Duration Volume ; ... |
Walking bass tracks play up and down the first part of a scale, paying attention to the ``color''4.4 of the chord. Walking bass lines are very common in jazz and swing music. The appear quite often as an ``emphasis'' bar in marches.
Each group consists of an beat offset, the note duration, and the note volume. MMA selects the actual note pitches to play based on the current chord (you cannot change this).
Example 4.4 plays a bass note on beats 1, 2 and 3 of a bar in 3/4 time.
A scale pattern is defined with:
Position Duration Volume ; ... |
Each group consists of an beat offset for the start point, the note duration, and volume.
Example 4.5 defines three scale patterns: ``S1'' is just a single whole note, not that useful on its own, but it used as a base for ``S4'' and ``S8''.
``S4'' is 4 quarter notes and ``S8'' is 8 eight notes. All the volumes are set to a MIDI velocity of 90.
Scale patterns are quite useful in endings. More options for scales detailed in the ScaleDirection () and ScaleType (
) sections.
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.
A Drum pattern is defined with:
Position Duration Volume; ... |
Example 4.6 plays a drum sound on beats 1, 2, 3 and 4 of a bar in 4/4 time. The MIDI velocity (volume) of the drum is 100 on beats 1 and 3; 80 on beats 2 and 4.
In this example we have used the special duration of ``0'' which indicates 1 MIDI tick.
Essential to drum definitions is the Tone directive.
When a drum pattern is defined, there is no drum tone or note specified in the pattern.. By default, all drum patterns use a snare drum sound. But, this can (and should) be changed using the Tone directive. This is normally issued at the same time as a sequence is set up (see chapter 5).
Tone is a list of drum sounds which match the sequence length. Here's a short, concocted example (see the library files for many more):
Drum Define S1 1 0 90 |
Here we first define the drum patterns ``S2'' to sound a drum on beats 1 and 3 and ``S4'' to sound on beats 1, 2, 3 and 4 (see section 4.3 for details on the ``*'' option). Next we set a sequence size of 4 bars and set a drum sequence to use this pattern. Finally, we instruct MMA 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.
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.
To repeat the same ``tone'' in a sequence list, use a single ``/''.
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''. Appendix A.3 lists all the defined symbolic names.
When defining a pattern, you can use an existing pattern name in place of a definition grouping. For example, if we have already defined a chord pattern (which is played on beats 1 and 3) as:
Chord Define M13 1 4 80; 3 4 80 |
We can create a new pattern which plays on same beats and adds a single push note just before the third beat:
Chord Define M1+3 M13; 2.5 16 80 0 |
A few points to note:
This is a powerful shortcut in creating patterns. See the included library files for examples.
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:
Track Define NewPattern OldPattern * N |
where ``Track'' is a valid track name (``Chord'', ``Walk'', ``Bass'', ``Arpeggio'' or ``Drum'', as well as ``Chord2'' or ``DRUM3'', etc.).
The ``*'' is absolutely required.
``N'' can be any integer value between 2 and 100.
|
In example 4.7 we start by defining a Drum pattern which plays a drum tone on beat 1 (assuming 4/4 time). We then derive a new pattern, ``S13'' which is the old ``S1'' multiplied by 2. This new pattern will play a tone on beats 1 and 3.
Next, ``S1234'' is created. This plays 4 notes on the each beat.
Note the definition for ``S64''. We could have multiplied ``S32'' by 2, but for illustrative purposes have used ``S1'' and multiplied it by 64.
When MMA 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.
Example 4.8 shows how to get a swing pattern which might be useful on a snare drum.
|
To see the effects of multiplying patterns, create a simple test file and process it though MMA with the ``-p'' option.
Even cooler4.5 is combining a multiplier, and existing pattern and a new pattern all in one statment. The following is quite legal (and useful):
Drum Define D1234 1 0 90 * 4 |
which creates drum hits on beats 1, 2, 3 and 4.
More contrived (but we need examples) is:
Drum Define Dfunny D1234 * 2; 1.5 0 70 * 2 |
If you're really interested in the result, run MMA with the ``-p'' option with the above definition.
An existing pattern can be modified by shifting it a beat, or portion of a beat. This is done in a MMA definition with the Shift directive. Example 4.9 shows a triplet pattern created to play on beat 1, and then a second pattern played on beat 3.
|
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 Time setting.
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:
Drum Define D1234' 1 0 90 * 4 Shift .5 |
which would create the same pattern as the longer:
Drum Define D1234' 1.5 1 90; 2.5 1 90; 3.5 1 90; 4.5 1 90 |