In addition to the ``Pattern'', ``Sequence'', ``Groove'' and ``Repeat'' and other directives discussed earlier, and chord data, MMA supports a number of directives which affect the flavor of your music.
The subjects presented in this chapter are ordered alphabetically.
Sometimes you want to apply the same command to all the currently defined tracks; for example, you might want to ensure that no tracks have SEQRND set. Yes, you could go though each track (and hope you don't miss any) and explicitly issue the command:
Bass SeqRnd Off
....
Chord SeqRnd Off |
But,
AllTracks SeqRnd Off |
is much simpler. Similarly, you can set the articulation for all tracks with:
AllTracks Articulate 80 |
You can even combine this with a BEGIN/END like:
Begin AllTracks
Articulate 80 SeqRnd Off Rskip 0 End |
This command is handy when you are changing an existing GROOVE.
Note that only currently defined tracks are effected by this command.
A further option is to limit ALLTRACKS to specific tracks type. For example, you might want to set all the DRUM track volumes to ``FF'':
AllTracks Drum Volume ff |
Or to set the articulation on BASS and WALK tracks:
AllTracks Bass Walk Articulate 55 |
It is assumed that all the arguments following the initial command which are valid track types (Bass, Chord, Arpeggio, Scale, Drum, Walk, Melody, or Solo) are track type limiters.
When MMA processes a music file, all the note lengths specified in a pattern are converted to MIDI lengths.
For example in:
Bass Define BB 1 4 1 100; 2 4 5 90; 3 4 1 80; 4 4 5 90 |
bass notes on beats 1, 2, 3 and 4 are define. All are quarter notes. MMA , being quite literal about things, will make each note exactly 192 MIDI ticks long--which means that the note on beat 2 will start at the same time as the note on beat 1 ends.
MMA has an articulate setting for each voice. This value is applied to shorten or lengthen the note length. By default, the setting is 90. Each generated note duration is taken to be a percentage of this setting, So, a quarter note with a MIDI tick duration of 192 will become 172 ticks long.
If articulate is applied to a short note, you are guaranteed that the note will never be less than 1 MIDI tick in length.
To set the value, use a line like:
Chord-1 Articulate 96 |
Articulate values must be greater than 0 and less than or equal to 200. Values over 100 will lengthen the note. Settings greater than 120 will generate a warning.
You can specify a different ARTICULATE for each bar in a sequence. Repeated values can be represented with a ``/'':
Chord Articulate 50 60 / 30 |
Notes: The full values for the notes are saved with the pattern definition. The articulation adjustment is applied at run time. The ARTICULATE setting is saved with a GROOVE.
Sometimes it is useful to duplicate the settings from one voice to another. The COPY command does just that:
Bass-1 Copy Bass |
will copy the settings from the Bass track to the Bass-1 track.
The COPY command only works between tracks of the same type.
The following settings are copied:
Warning: You are probably better off to use internal macros for this.
As previously discussed, a comment in MMA is anything following a ``//'' in a line. A second way of marking a comment is with the COMMENT directive. This is quite useful in combination the BEGIN and END directives. For example:
Begin Comment
This is a description spanning several lines which will be ignored by MMA. End |
You could achieve the same with:
// This is a description spanning
// several lines which will be // ignored by MMA. |
or even:
Comment This is a description spanning
Comment several lines which will be Comment ignored by MMA. |
One minor difference between // and COMMENT is that the first is discarded when the input stream is read; the more verbose version is discarded during line processing.
Quite often it is handy to delete large sections of a song with a BEGIN COMMENT/END on a temporary basis.
To enable you to find problems in your song files (and, perhaps, even find problems with MMA itself) various debugging messages can be displayed. These are normally set from the command line command line.
However, it is possible to enable various debugging messages dynamically in a song file using the DEBUG directive. In a debug statement you can enable or disable any of a variety of messages. A typical directive is:
Debug Debug=On Expand=Off Patterns=On |
Each section of the debug directive consists of a mode and the command word ON or OFF. The two parts must be joined by a single ``''. You may use the values ``0'' for ``Off'' and ``1'' for ``On'' if desired.
The available modes with the equivalent command line switches are:
Mode Command Line Equivalent Debug -d debugging messages Filenames -o display filenames Patterns -p pattern creation Sequence -s sequence creation Runtime -r running progress Warnings -w warning messages Expand -e display expanded lines
The modes and command are case-insensitive (although the command line switches are not).
The current state of the debug flags is saved in the variable $_Debug and the state prior to a change is saved in $_LastDebug.
If you are using a track in only one part of your song, especially if it is at the start, it may be wise to free that track's resources when you are done with it. The DELETE command does just that:
Solo Delete |
If a MIDI channel has been assigned to that track, it is marked as ``available'' and the track is deleted. Any data already saved in the MIDI track will be written when MMA is finished processing the song file.
In tracks using chords or scales you can change the direction in which they are applied:
Scale Direction UP |
The effects differ in different track types. For SCALE and ARPEGGIO tracks:
UP Plays in upward direction only DOWN Plays in downward direction only BOTH Plays upward and downward (default) RANDOM Plays notes from the chord or scale randomly
When this command is encountered in a SCALE track the start point of the scale is reset.
A WALK track recognizes the following option settings:
BOTH The default. The bass pattern will go up and down a partial scale. Some notes may be repeated. UP Notes will be chosen sequentially from an ascending, partial scale. DOWN Notes will be chosen sequentially from a descending, partial scale. RANDOM Notes will be chosen in a random direction from a partial scale.
All four patterns are useful and create quite different effects.
The CHORD tracks DIRECTION only has an effect when the STRUM setting has a non-zero value. In this case the following applies:
UP The default. Notes are sounded from the lowest tone to the highest. DOWN Notes are sounded from the highest to the lowest. BOTH The UP and DOWN values are alternated. RANDOM Ignored (uses UP).
You can specify a different DIRECTION for each bar in a sequence. Repeated values can be represented with a ``/'':
Arpeggio Direction Up Down / Both |
The setting is ignored by BASS, DRUM and SOLO tracks.
Some instruments (Steel-drums, banjos, marimbas, etc.) are normally played with rapidly repeating notes. Instead of painfully inserting long lists of these notes, you can use the MALLET directive. The MALLET directive accepts a number of options, each an OPTION=VALUE pair. For example:
Solo-Marimba Mallet Rate=16 Decay=-5 |
This command is also useful in creating drum rolls. For example:
Begin Drum-Snare2
Tone SnareDrum1 Volume F Mallet Rate=32 Decay=-3 Rvolume 3 Sequence z z z 1 1 100 End |
The following options are supported:
The RATE must be a valid note length (i.e., 8, 16, or even 16.+8).
For example:
Solo-Marimba Mallet Rate=16 |
will set all the notes in the ``Solo-Marimba'' track to be sounded a series of 16th notes.
To disable this setting use a value of ``0''.
You can adjust the volume (velocity) of the notes being repeated when MALLET is enabled:
Drum-Snare Mallet Decay=-15 |
The argument is a percentage of the current value to add to the note each time it is struck. In this example, assuming that the note length calls for 4 ``strikes'' and the initial velocity is 100, the note will be struck with a velocity of 100, 85, 73 and 63.
Important: a positive value will cause the notes to get louder, negative values cause the notes to get softer.
Note velocities will never go below 1 or above 255. Note, however, that notes with a velocity of 1 will most likely be inaudible.
The decay option value must be in the range -50 to 50; however, be cautious using any values outside the range -5 to 5 since the volume (velocity) of the notes will change quite quickly. The default value is 0 (no decay).
When MMA initializes and after the SEQCLEAR command all track octaves are set to ``4''. This will place most chord and bass notes in the region of middle C.
You can change the octave for any voice with OCTAVE command. For example:
Bass-1 Octave 3 |
Sets the notes used in the ``Bass-1'' track one octave lower than normal.
The octave specification can be any value from 0 to 10. Various combinations of INVERT, TRANSPOSE and OCTAVE can force notes to be out of the valid MIDI range. In this case the lowest or highest available note will be used.
You can specify a different OCTAVE for each bar in a sequence. Repeated values can be represented with a ``/'':
Chord Octave 4 5 / 4 |
To disable the generation of MIDI output on a specific track:
Bass Off |
This can be used anywhere in a file. Use it to override the effect of a predefined groove, if you wish. This is simpler than resetting a voice in a groove. The only way to reset this command is with a ON directive.
To enable the generation of MIDI output on a specific track which has been disabled with an OFF directive:
Bass On |
The PRINT directive will display its argument to the screen when it is encountered. For example, if you want to print the filename of the input file while processing, you could insert:
Print Making beautiful music for MY SONG |
No control characters are supported.
This can be useful in debugging input files.
The PRINTACTIVE directive will the currently active GROOVE and the active tracks. This can be quite useful when writing groove files and you want to modify and existing groove.
Any parameters given are printed as single comment at the end of the header line.
This is strictly a debugging tool. No PRINTACTIVE statements should appear in finalized grooves or song files.
All of the random functions (RTIME, RSKIP, etc.) in MMA depend on the Python random module. Each time MMA generates a track the values generated by the random functions will be different. In most cases this is a ``good thing''; however, you may want MMA to use the same sequence of random values21.1 each time it generates a track. Simple: just use:
RndSeed 123.56 |
at the top of your song file. You can use any value you want: it really doesn't make any difference, but different values will generate different sequences.
You can also use this with no value, in which case Python uses its own value (see the Python manual for details). Essentially, using no value undoes the effect which permits the mixing of random and not-so-random sections in the same song.
One interesting use of RNDSEED could be to ensure that a repeated section is identical: simply start the section with something like:
Repeat
RndSeed 8 ... chords |
It is highly recommended that you do not use this command in library files.
To aid in creating syncopated sounding patterns, you can use the RSKIP directive to randomly silence or skip notes. The command takes a value in the range 0 to 99. The ``0'' argument disables skipping. For example:
Begin Drum
Define D1 1 0 90 Define D8 D1 * 8 Sequence D8 Tone OpenHiHat RSkip 40 End |
In this case a drum pattern has been defined to hit short ``OpenHiHat'' notes 8 per bar. The RSKIP argument of ``40'' causes the note to be NOT sounded (randomly) only 40% of the time.
Using a value of ``10'' will cause notes to be skipped 10% of the time (they are played 90% of the time), ``90'' means to skip the notes 90% of the time, etc.
You can specify a different RSKIP for each bar in a sequence. Repeated values can be represented with a ``/'':
Scale RSkip 40 90 / 40 |
If you use the RSKIP in a chord track, the entire chord will not be silenced. The option will be applied to the individual notes of each chord. This may or may not be what you are after. You cannot use this option to generate entire chords randomly. For this effect you need to create several chord patterns and select them with SEQRND.
One of the biggest problem with computer generated drum and rhythm tracks is that, unlike real musicians, the beats are precise and ``on the beat''. The RTIME directive attempts to solve this.
The command can be applied to all tracks.
Drum-4 Rtime 4 |
The value passed to the RTime directive are the number of MIDI ticks with which to vary the start time of the notes. For example, if you specify ``5'' the start times will vary from -5 to +5 ticks) on each note for the specified track. There are 192 MIDI ticks in each quarter note.
Any value from 0 to 100 can be used; however values in the range 0 to 10 are most commonly used. Exercise caution in using large values!
You can specify a different RTIME for each bar in a sequence. Repeated values can be represented with a ``/'':
Chord RTime 4 10 / 4 |
RTIME is guaranteed never to start a note before the start of a bar.
This option is only used by SCALE tracks. It can be set for other tracks, but the setting is not used.
By default, the SCALETYPE is set to AUTO. The settings permissible are:
CHROMATIC Forces use of a chromatic scale AUTO Uses scale based on the current chord (default)
When this command is encountered in a SCALE track the start point of the scale is reset.
If your sequence, or groove, has more than one pattern (i.e., you have set SeqSize to a value other than 1), you can use this directive to force a particular pattern point to be used. The directive:
Seq |
resets the sequence counter to 1. This means that the next bar will use the first pattern in the current sequence. You can force a specific pattern point by using an optional value after the directive. For example:
Seq 8 |
forces the use of pattern point 8 for the next bar. This can be quite useful if you have a multi-bar sequence and, perhaps, the eight bar is variation which you want used every eight bars, but also for a transition bar, or the final bar. Just put a SEQ 8 at those points. You might also want to put a SEQ at the start of sections to force the restart of the count.
If you have enable sequence randomization with the SEQRND ON command, the randomization will be disabled by a SEQ command.21.2 However, settings of track SEQRND will not be effected. One difference between SEQRND OFF and SEQ is that the current sequence point is set with the latter; with SEQRND OFF it is left at a random point.
Note: Using a value greater than the current SEQSIZE is not permitted.
This is a very useful command! For example, look at the four bar introduction of the song ``Exactly Like You'':
Groove BossanovaEnd
seq 3 1 C seq 2 2 Am7 seq 1 3 Dm7 seq 3 4 G7 / G7#5 |
In this example the four bar ``ending groove'' has been used to create an interesting introduction.
By default MMA plays all the notes in a chord at the same time. To make the chord more like something a guitar or banjo might play, use the STRUM directive. For example:
Chord-1 Strum 5 |
sets the strumming factor to 5 for track Chord-1.
Setting the STRUM in any track other than a CHORD track will generate a warning message and the command will be ignored.
The strum factor is specified in MIDI ticks. Usually values around 10 to 15 work just fine. The valid range for STRUM is 0 to 100.
You can specify a different STRUM for each bar in a sequence. Repeated values can be represented with a ``/'':
Chord Strum 20 5 / 10 |
Note: When chords have both a STRUM and INVERT applied, the order of the notes played will not necessarily be root, third, etc. The notes are sorted into ascending order, so for a C major scale with and INVERT of 1 the notes played would be ``E G C''. That is, unless the DIRECTION has been set to ``DOWN'' in which case the order would be reversed (but the notes would be the same).
You can change the key of a piece with the ``Transpose'' command. For example, if you have a piece notated in the key of ``C'' and you want it played back in the key of ``D'':
Transpose 2 |
will raise the playback by 2 semi-tones. Since MMA 's author plays tenor saxophone
Transpose -2 |
which puts the MIDI keyboard into the same key as the horn, is not an uncommon directive
You can use any value between -12 and 12. All tracks (with the logical exception of the drum tracks) are effected by this command.
The UNIFY command is used to force multiple notes of the same voice and pitch to be combined into a single, long, tone. This is very useful when creating a sustained voice track. For example, consider the following which might be used in real groove file:
Begin Bass-Sus
Sequence 1 1 1 90 4 Articulate 100 Unify On Voice TremoloStrings End |
Without the UNIFY ON command the strings would be sounded (or hit) four times during each bar; with it enabled the four hits are combined into one long tone. This tone can span several bars if the note(s) remain the same.
The use of this command depends on a number of items:
You can specify a different UNIFY for each bar in a sequence. Repeated values can be represented with a ``/'':
Chord Unify On / / Off |
But, you probably don't want to use this particular feature.
Valid arguments are ``On'' or ``1'' to enable; ``Off'' or ``0'' to disable.
The MIDI instrument or voice used for a track is set with:
Chord-2 Voice Piano1 |
Voices apply only to the specified track. The actual instrument can be specified via the MIDI instrument number, or with the symbolic name. See the tables in the MIDI voicing section for lists of the recognized names.
You can create interesting effects by varying the voice used with drum tracks. By default ``Voice 0'' is used. However, you can change the drum voices. The supplied library files do not change the voices since this appears to be highly dependent on the MIDI synth you are using.
You can specify a different VOICE for each bar in a sequence. Repeated values can be represented with a ``/'':
Chord Voice Piano1 / / Piano2 |
It is possible to set up translations for the selected voice: see VOICETR.