<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (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>Riffs</TITLE> <META NAME="description" CONTENT="Riffs"> <META NAME="keywords" CONTENT="mma"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mma.css"> <LINK REL="next" HREF="node8.html"> <LINK REL="previous" HREF="node6.html"> <LINK REL="up" HREF="mma.html"> <LINK REL="next" HREF="node8.html"> </HEAD> <BODY bgcolor="#ffffff"> <!--Navigation Panel--> <A NAME="tex2html422" HREF="node8.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html420" HREF="mma.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html414" HREF="node6.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <BR> <B> Next:</B> <A NAME="tex2html423" HREF="node8.html">Musical Data Format</A> <B> Up:</B> <A NAME="tex2html421" HREF="mma.html">Reference Manual</A> <B> Previous:</B> <A NAME="tex2html415" HREF="node6.html">Grooves</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00700000000000000000"></A> <A NAME="sec-riff"></A> <BR> Riffs </H1> <P> In previous chapters you were shown how to create a P<SMALL>ATTERN</SMALL> which becomes a part of a S<SMALL>EQUENCE</SMALL>. And how to set a musical style by defining a G<SMALL>ROOVE</SMALL>. <P> These predefined G<SMALL>ROOVE</SMALL>s are wonderful things. And, yes, entire accompaniment tracks can be created with just some chords and a single G<SMALL>ROOVE</SMALL>. But, often a bit of variety in the track is needed. <P> The R<SMALL>IFF</SMALL> command permits the setting of an alternate pattern for any track for a single bar-this overrides the current S<SMALL>EQUENCE</SMALL> for that track. <P> The syntax for R<SMALL>IFF</SMALL> is very similar to that of D<SMALL>EFINE</SMALL>, with the exception that no pattern name is used. You might think of R<SMALL>IFF</SMALL> as the setting of an S<SMALL>EQUENCE</SMALL> with an anonymous pattern. <P> A R<SMALL>IFF</SMALL> is set with the command: <P> <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3> <tr><td> <B>Track Riff Pattern </B> </td></tr> </Table> <P> where: <P> <DL> <DT><STRONG>Track</STRONG></DT> <DD>is any valid <FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> track name, <P> </DD> <DT><STRONG>Pattern</STRONG></DT> <DD>is any existing pattern name defined for the specified track, or a pattern definition following the same syntax as a D<SMALL>EFINE</SMALL>. In addition the pattern can be a single ``z'', indicating no pattern for the specified track. <P> </DD> </DL> <P> Following is a short example using R<SMALL>IFF</SMALL> to change the Chord Pattern: <P> <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3> <tr><td> <B>Groove Rhumba <BR> 1 Fm7 <BR> 2 Bb7 <BR> 3 EbM7 <BR> Chord Riff 1 4 100; 3 8 90; 3.666 8 80; 4.333 8 70 <BR> 4 Eb6 / Eb <BR> 5 Fm7 </B> </td></tr> </Table> <P> 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 R<SMALL>IFF</SMALL> command. <P> The next example shows that R<SMALL>IFF</SMALL> patterns can be defined just like the patterns used in a sequence. <P> <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3> <tr><td> <B>Drum Define Emph8 1 0 128 * 8 <BR> Groove Blues <BR> 1 C <BR> 2 G <BR> Drum-Clap Riff Emph8 <BR> 3 G <BR> 4 F <BR> Drum-Clap Riff Emph8 <BR> 5 C </B> </td></tr> </Table> <P> Here the <I>Emph8</I> 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 <I>Drum-Clap</I> track was previously defined in the Blues G<SMALL>ROOVE</SMALL> as random claps on beats 2 and 4--our R<SMALL>IFF</SMALL> changes this to a louder volume with multiple hits. <P> 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 S<SMALL>EQUENCE</SMALL> directive. <P> A few things to keep in mind when using R<SMALL>IFF</SMALL>s: <P> <UL> <LI>Each R<SMALL>IFF</SMALL> is in effect for only one bar (see the discussion below about multiple R<SMALL>IFF</SMALL>s. <P> </LI> <LI>R<SMALL>IFF</SMALL> 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 R<SMALL>IFF</SMALL> will apply. <P> </LI> <LI>The existing voicing, articulation, etc. for the track will apply to the R<SMALL>IFF</SMALL>. <P> </LI> <LI>It's quite possible to use a macro for repeated R<SMALL>IFF</SMALL>s. The following example uses a macro which sets the V<SMALL>OLUME</SMALL>, A<SMALL>RTICULATE</SMALL>, etc. as well as the pattern. Note how the pattern is initially set as single whole note, but, redefined in the R<SMALL>IFF</SMALL> 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. <P> <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3> <tr><td> <B>Mset CRiff <BR> Begin Scale <BR> Define Run 1 1 120 <BR> Riff Run * $SSpeed <BR> Voice AltoSax <BR> Volume f <BR> Articulate 80 <BR> Rskip 5 <BR> End <BR> MsetEnd <BR> Groove Blues <BR> 1 C <BR> Set SSpeed 8 <BR> $CRiff <BR> 2 G <BR> 3 G <BR> Set SSpeed 12 <BR> $CRIFF <BR> 5 C </B> </td></tr> </Table> <P> </LI> <LI>A R<SMALL>IFF</SMALL> can only be deleted by using it (i.e., a music bar follows the setting), with a S<SMALL>EQ</SMALL>C<SMALL>LEAR</SMALL> or by a track D<SMALL>ELETE</SMALL>. <P> </LI> </UL> <P> R<SMALL>IFF</SMALL>s can also be used to specify a bar of music in a S<SMALL>OLO</SMALL> or M<SMALL>ELODY</SMALL> track. Please see <A HREF="node10.html#chap-solo">Solo and Melody</A>. <P> The above examples show how to apply a temporary pattern to a single bar--the bar which follows the R<SMALL>IFF</SMALL> command. But, you can ``stack''<A NAME="tex2html35" HREF="#foot2960"><SUP>7.1</SUP></A> a number of patterns to be processed sequentially. Each successive R<SMALL>IFF</SMALL> command adds a pattern to the stack; these patterns are then ``pulled'' from the stack as successive chord lines are processed. <P> Recycling an earlier example, lets assume that you want to use a customized pattern for bars 4 and 5 in a mythical song: <P> <Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3> <tr><td> <B>Groove Rhumba <BR> 1 Fm7 <BR> 2 Bb7 <BR> 3 EbM7 <BR> Chord Riff 1 4 100; 3 8 90; 3.666 8 80; 4.333 8 70 <BR> Chord Riff 1 2 100; 3 8 90; <BR> 4 Eb6 / Eb <BR> 5 Fm7 </B> </td></tr> </Table> <P> In this example the first <I>Chord Riff</I> will be used in bar 4; the second in bar 5. For an example of this see the sample file <TT><B>egs/riffs.mma</B></TT>. <P> I often use this feature when creating a S<SMALL>OLO</SMALL> line. <BR><HR><H4>Footnotes</H4> <DL> <DT><A NAME="foot2960">... ``stack''</A><A HREF="node7.html#tex2html35"><SUP>7.1</SUP></A></DT> <DD>Actually a queue or FIFO (First In, First Out) buffer. </DD> </DL><HR> <!--Navigation Panel--> <A NAME="tex2html422" HREF="node8.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html420" HREF="mma.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html414" HREF="node6.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <BR> <B> Next:</B> <A NAME="tex2html423" HREF="node8.html">Musical Data Format</A> <B> Up:</B> <A NAME="tex2html421" HREF="mma.html">Reference Manual</A> <B> Previous:</B> <A NAME="tex2html415" HREF="node6.html">Grooves</A> <!--End of Navigation Panel--> <ADDRESS> bob 2007-03-07 </ADDRESS> </BODY> </HTML>