Riffs
Keywords: mma

Subsections

- DupRiff

#
Riffs

In previous chapters you were shown how to create a PATTERN which becomes a part of a SEQUENCE. And how to set a musical style by defining a GROOVE.

These predefined GROOVEs are wonderful things. And, yes, entire accompaniment tracks can be created with just some chords and a single GROOVE. But, often a bit of variety in the track is needed.

The RIFF command permits the setting of an alternate pattern for any track for a single bar–this overrides the current SEQUENCE for that track.

The syntax for RIFF is very similar to that of DEFINE, with the exception that no pattern name is used. You might think of RIFF as the setting of an SEQUENCE with an anonymous pattern.

A RIFF is set with the command:

Track Riff Pattern

where:

Track
  is any valid MMA track name,

Pattern
  is any existing pattern name defined for the specified track, or a pattern definition following the same syntax as a DEFINE. In addition the pattern can be a single “z”, indicating no pattern for the specified track.

Following is a short example using RIFF to change the Chord Pattern:

Groove Rhumba 1 Fm7 2 Bb7 3 EbM7 Chord Riff 1 4 100; 3 8 90; 3.666 8 80; 4.333 8 70 4 Eb6 / Eb 5 Fm7

In this case there is a Rhumba Groove for the song; however, in bar 4 the melodic pattern is emphasized by chording a quarter-note triplet over beats 3 and 4. In this case the pattern has been defined right in the RIFF command.

The next example shows that RIFF patterns can be defined just like the patterns used in a sequence.

Drum Define Emph8 1 0 128 * 8 Groove Blues 1 C 2 G Drum-Clap Riff Emph8 3 G 4 F Drum-Clap Riff Emph8 5 C

Here the Emph8 pattern is defined as a series of eighth notes. This is applied for the third and fifth bars. If you compile and play this example you will hear a sporadic hand-clap on bar 3. The Drum-Clap track was previously defined in the Blues GROOVE as random claps on beats 2 and 4—our RIFF changes this to a louder volume with multiple hits.

The special pattern “z” can be used to turn off a track for a single bar. This is similar to using a “z” in the SEQUENCE directive.

A few things to keep in mind when using RIFFs:

- Each RIFF is in effect for only one bar (see the discussion below about multiple RIFFs).

- RIFF sequences are always enabled. Even if there is no sequence for a track, or if the “z” sequence is being used, the pattern specified in RIFF will apply.

- The existing voicing, articulation, etc. for the track will apply to the RIFF.

- It's quite possible to use a macro for repeated RIFFs. The following example uses a macro which sets the VOLUME, ARTICULATE, etc. as well as the pattern. Note how the pattern is initially set as single whole note, but, redefined in the RIFF as a run controlled by another macro. In bar 2 an eight note run is played and in bar 5 this is changed to a run of triplets.

  Mset CRiff Begin Scale Define Run 1 1 120 Riff Run * $SSpeed Voice AltoSax Volume f Articulate 80 Rskip 5 End MsetEnd Groove Blues 1 C Set SSpeed 8 $CRiff 2 G 3 G Set SSpeed 12 $CRIFF 5 C

- A RIFF can only be deleted by using it (i.e., a music bar follows the setting), with a SEQCLEAR or by a track DELETE.

RIFFs can also be used to specify a bar of music in a SOLO or MELODY track. Please see Solo and Melody.

The above examples show how to apply a temporary pattern to a single bar—the bar which follows the RIFF command. But, you can “stack”7.1 a number of patterns to be processed sequentially. Each successive RIFF command adds a pattern to the stack; these patterns are then “pulled” from the stack as successive chord lines are processed.

Recycling an earlier example, let's assume that you want to use a customized pattern for bars 4 and 5 in a mythical song:

Groove Rhumba 1 Fm7 2 Bb7 3 EbM7 Chord Riff 1 4 100; 3 8 90; 3.666 8 80; 4.333 8 70 Chord Riff 1 2 100; 3 8 90; 4 Eb6 / Eb 5 Fm7

In this example the first Chord Riff will be used in bar 4; the second in bar 5. For an example of this see the sample file egs/riffs/riffs.mma.

A great use of this feature is to create a number of lines for a SOLO.

#
DupRiff

In the above section we discussed the creation of RIFFs. In addition to being fun and useful in a specified track, they can easily be duplicated between similar tracks with a single command:

Solo DupRiff Solo-1 Solo-2

will copy any pending RIFF data in the SOLO track to the SOLO-1 and SOLO-2 tracks.

A few rules:

- All the tracks must be of the same type. You can't copy a RIFF from CHORD track to a SOLO, etc.

- The source track must have RIFF data to copy.

- The destination track(s) must not have any pending RIFF data.

The use of the DUPRIFF makes it very easy to manage data for solos with multiple instruments. For example:

Begin Solo-1 Voice Flute HarmonyOnly Open End Begin Solo Voice Clarinet Begin Riff 2g+; f+; 2e+; d+; End End Solo DupRiff Solo-1

The above example creates two SOLO tracks. SOLO-1 will only play the harmony notes; SOLO will play the melody. Without DUPRIFF you would need to duplicate the note data in both tracks, either line by line or with a macro. Using DUPRIFF is much simpler.

You can reverse the action of this command so that it copies data from an existing track to the current one with the use of the keyword FROM:

Solo DupRiff From Solo-1

copies the RIFF data from SOLO-1 and inserts it into SOLO. In this mode you can only from/to one track at a time.

To keep this direction stuff all neat and tidy, you can use the optional keyword TO to duplicate the default action.

Solo DupRiff To Solo-1 Solo-2

Note: The DUPRIFF command only copies the riff that has already been read into memory. You will still need to apply the octave, harmony, etc. If you have used the STRETCH command you will need to apply that as well.

#### Footnotes

... “stack”7.1
  Actually a queue or FIFO (First In, First Out) buffer.