Sequences
Keywords: mma

Subsections

- Defining Sequences
- SeqClear
- SeqRnd
- SeqRndWeight
- SeqSize

#
Sequences

Patterns by themselves don't do much good. They have to be combined into sequences to be of any use to you or to MMA .

# Defining Sequences

A SEQUENCE command sets the pattern(s) used in creating each track in your song:

Track Sequence Pattern1 Pattern2 ...

“Track” can be any valid track name: “Chord”, “Walk”, “Walk-Sus”, “Arpeggio-88”, etc.

All pattern names used when setting a sequence need to be defined when this command is issued; or you can use a pattern which has not been previously defined using “def” right in the sequence command by enclosing the pattern definition in a set of curly brackets “{ }”.

Simple Sequence
SeqClear SeqSize 2 Begin Drum Sequence Snare4 Tone Snaredrum1 End Begin Drum-1 Sequence Bass1 Bass2 Tone KickDrum2 End Chord Sequence Broken8 Bass Sequence Broken8 Arpeggio Sequence { 1 1 100 * 8 } { 1 1 80 * 4 }

This example creates a 2 bar pattern. The Drum, Chord and Bass patterns repeat on every bar; the Drum-1 sequence repeats after 2 bars. Note how the Arpeggio pattern is defined at run-time.5.1

If there are fewer patterns than SEQSIZE, the sequence will be filled out to correct size. If the number of patterns used is greater than SEQSIZE (see directives) a warning message will be printed and the pattern list will be truncated.

When defining longer sequences, you can use the “repeat” symbol, a single “/”, to save typing. For example, the following two lines are equivalent:

Bass Sequence Bass1 Bass1 Bass2 Bass2 Bass Sequence Bass1 / Bass2 /

The special pattern name “-” (no quotes, just a single hyphen), or a single “z” can be used to turn a track off. For example, if you have set the sequences in this example and decide to delete the Bass halfway though the song you could:

Bass Sequence -

The special sequences, “-” or “z”, are also the equivalent of a rest or “tacet” sequence. For example, in defining a 4 bar sequence with a bass pattern on the first 3 bars and a walking bass on bar 4 you might do something like:

Bass Sequence Bass4-13 / / z Walk Sequence z / / Walk4-4

If you already have a sequence defined5.2 you can repeat or copy the existing pattern by using a single “*” as the pattern name. This is useful when you are modifying an existing sequence.

For example, assume that we have created a four bar GROOVE called “Neato”. Now, we want to change the CHORD pattern to use for an introduction ... but, we really only want to change the fourth bar in the pattern:

Groove Neato Chord Sequence * * * {1 2 90} Defgroove NeatoIntro

When a sequence is created a series of pointers to the existing patterns are created. If you change the definition of a particular pattern later in your file the new definition will have no effect on your existing sequences.

Sequences are the workhorse of MMA . With them you can set up many interesting patterns and variations. This chapter should certainly give more detail and many more examples.

Sequence definitions can get quite long and may need multiple lines. You can do this by using “ \” marked continuation lines. Or, to make it possible to have comments at the end of lines, MMA will parse SEQUENCE lines and attempt to join lines together until a matching number of “{”s and “}”s are found. One caution: in order for this feature to work with multi-bar sequences you must have non-matching braces on a line. For example, this will work:

Chord Sequence {1 4 90; 3 4 90} { 1 1 90}

This will not work:

Chord Sequence {1 4 90 } ¡¡Wrong!! {1 1 90}

In the second example MMA reads the first “{1 4 90}” and figures that's the end of the sequence. When if finds the next line, it's totally confused.

The following commands help manipulate sequences in your creations:

#
SeqClear

This command clears all existing sequences from memory. It is useful when defining a new sequence and you want to be sure that no “leftover” sequences are active. The command:

SeqClear

deletes all sequence information, with the important exception that SOLO and STICKY (here) tracks are ignored.

Alternately, the command:

Drum SeqClear

deletes all drum sequences. This includes the track “Drum”, “Drum1”, etc.

If you use a sub-track:

Chord-Piano SeqClear

only the sequence for that track is cleared.5.3

In addition to clearing the sequence pattern, the following other settings are restored to a default condition:

- Track Invert setting,

- Track Sequence Rnd setting,

- Track MidiSeq setting,

- Track octave,

- Track voice,

- Track Rvolume,

- Track Volume,

- Track RTime,

- Track RDuration,

- Track Strum.

CAUTION: It is not possible to clear only a track like DRUM or CHORD using this command. The command

Chord SeqClear

resets all CHORD tracks, whereas the command:

Chord-Foo SeqClear

resets the CHORD-FOO track. If you need to clear only the CHORD track use the “-” option.

#
SeqRnd

Normally, the patterns used for each bar are selected in order. For example, if you had a sequence:

Drum-2 Sequence P1 P2 P3 z

bar 1 would use “P1”, bar 2 “P2”, etc. However, it is quite possible (and fun and useful) to insert a randomness to the order of sequences. MMA can achieve this in three different ways:

1. Separately for each track:

   Drum-Snare SeqRnd On

2. Globally for all tracks:

   SeqRnd On

3. For a selected set of tracks (keeping the tracks synchronized):

   SeqRnd Drum-Snare Chord-2 Chord-3

To disable random sequencing:

SeqRnd Off Drum SeqRnd Off

To illustrate the different effects you can generate, assume that you have a total of four tracks defined: Drum-Snare, Drum-Low, Chord and Bass; your sequence size is 4 bars; and you have created some type of sequence for each track with a commands similar to:

Drum-Snare Sequence D1 D2 D3 D4 Drum-Low Sequence D11 D22 D33 D44 Chord Sequence C1 C2 C3 C4 Bass Sequence B1 B2 B3 B4

With no sequence randomization at all, the tracks will be be processed as:

> Track \ Bar | 1 | 2 | 3 | 4 | 5
> Drum-Snare | D1 | D2 | D3 | D4 | D1
> Drum-Low | D11 | D22 | D33 | D44 | D11
> Chord | C1 | C2 | C3 | C4 | C1
> Bass | B1 | B2 | B3 | B4 | B1

Next, assume we have set sequence randomization with:

SeqRnd On

Now, the sequence may look like:

> Track \ Bar | 1 | 2 | 3 | 4 | 5
> Drum-Snare | D3 | D1 | D1 | D2 | D4
> Drum-Low | D33 | D11 | D11 | D22 | D44
> Chord | C3 | C1 | C1 | C2 | C4
> Bass | B3 | B1 | B1 | B2 | B4

Note that the randomization keeps the different sequences together: Drum sequences D3 and D33 are always played with Chord sequence C3, etc.

Next, we will set randomization for a Drum and Chord track only:

Drum-Low SeqRnd On Chord SeqRnd On

> Track \ Bar | 1 | 2 | 3 | 4 | 5
> Drum-Snare | D1 | D2 | D3 | D4 | D1
> Drum-Low | D22 | D11 | D44 | D44 | D33
> Chord | C3 | C4 | C2 | C1 | C1
> Bass | B1 | B2 | B3 | B4 | B1

In this case there is no relationship between any of the randomized tracks.

Finally, it is possible to set a “global” randomization for a selected set of tracks. In this case we will set the Drum tracks only:

SeqRnd Drum-Snare Drum-Low

> Track \ Bar | 1 | 2 | 3 | 4 | 5
> Drum-Snare | D3 | D1 | D4 | D4 | D2
> Drum-Low | D33 | D11 | D44 | D44 | D22
> Chord | C1 | C2 | C3 | C4 | C1
> Bass | B1 | B2 | B3 | B4 | B1

Note that the drum sequences always “line up” with each other and the Chord and Bass sequences follow in the normal order.

The SEQCLEAR command will disable all sequence randomization. The SEQ command will disable “global” (for all tracks) randomization.

#
SeqRndWeight

When SEQRND is enabled each sequence for the track (or globally) has an equal chance of being selected. There are times when you may want to change this behavior. For example, you might have a sequence like this:

Chord Sequence C1 C2 C3 C4

and you feel that the patterns C1 and C2 need to be used twice as often as C3 and C4. Simple:

Chord SeqRndWeight 2 2 1 1

Think of the random selection occurring like selecting balls out of bag. The SEQRNDWEIGHT command “fills up the bag”. In the above case, there will be two C1 and C2 balls, one C3 and C4 ball— for a total of six balls.

If you have a “0” in any spot that sequence will never be selected.

And alternate selection method uses the FROM option. In this case the option is followed by a list of bar offsets, each representing a valid sequence point:

Seqsize 10 SeqRndWeight From=1,4,9

In this example SEQRND will only select sequences from 1, 4 and 9. It is the same as:

SeqRndWeight 1 0 0 1 0 0 0 0 1 0

In order to increase the odds for a certain point you can repeat it in the list.

SeqRndWeight From=1,4,4,4,4,9

is perfectly valid.

The values must be joined to the option name with a single comma and be separated by commas. No spaces are permitted. If you use the FROM option you cannot use any other options.

- This command can be used in both a track and global context.

- The effects are saved in GROOVES.

- SEQCLEAR will reset both global and track contexts to the default (equal) condition.

- Changing the bar count by using SEQSIZE will compress or expand the weight table as required. Use the $_SEQRNDWEIGHT variable for confirmation.

- To reset the weights to default, use a single “1”; setting all points to “0” is not permitted and will generate an error.

# SeqSize

The number of bars in a sequence are set with the “SeqSize” command. For example:

SeqSize 4

sets it to 4 bars. The SeqSize applies to all tracks.

This command resets the sequence counter to 1.

If some sequences have already been defined, they will be truncated or expanded to the new size. Truncation is done by removing patterns from the end of the sequence; expansion is done by duplicating the sequence until it is long enough.

#### Footnotes

... run-time.5.1
  If you run MMA with the “-s” option you'll see pattern names in the format “_1”. The leading underscore indicates that the pattern was dynamically created in the sequence.
... defined5.2
  In reality there is always a sequence defined for every track, but it might be a series of “rest” bars.
... cleared.5.3
  It is probably easier to use the command:

  Chord-Piano Sequence -

  if that is what you want to do. In this case only sequence pattern is cleared.