Subsections


Volume and Dynamics

Before getting into MMA volume specifics, we'll present a short primer on volume as it relates to MIDI devices.

A MIDI device (a keyboard, software synth, etc.) has several methods to control how loud a sound is:

An important difference between the ``velocity'' and ``controller'' methods is that you cannot change the volume of a note once it has started using the ``velocity'' method. However, relying on the ``controller'' method doesn't always overcome this limitation: some synths or playback devices don't support channel volume controllers and having multiple notes with different volumes is impossible. So, you might need a combination of the two methods to achive your desired results.

In a MMA program there are a number ways to control the velocity of each note created.19.1

The basic method used by MMA to affect volume is to change the velocity of a ``note on'' event. However, you might also be interested in accessing your MIDI device more directly to set better mixes between channels. In that case you should read the discussion for MIDIVOLUME (here).

The rest of this chapter deals with MIDI velocity. Each note created by in a MMA program receives an initial velocity set in the pattern definition. It then goes though several adjustments. Here's the overview of the creation and changes each note's velocity setting goes though.

  1. The initial velocity is set in the pattern definition, see patterns,19.2

  2. the velocity is then adjusted by the master and track volume settings19.3 (see here for the discussion of ADJUSTVOLUME RATIO),

  3. if certain notes are to be accented, yet another adjustment is made,

  4. and, finally, if the random volume is set, more adjustment.

For the most part MMA uses conventional musical score notation for volumes. Internally, the dynamic name is converted to a percentage value. The note velocity is adjusted by the percentage.

The following table shows the available volume settings and the adjustment values.

Symbolic Name Ratio (Percentage) Adjustment
off 0
pppp 5
ppp 10
pp 25
p 40
mp 70
m 100
mf 110
f 130
ff 160
fff 180
ffff 200

The setting OFF is useful for generating fades at the end of a piece. For example:

Volume ff
Decresc Off 5
G / Gm / * 5

will cause the last 5 bars of your music to fade from a ff to silence.

As stated before, the initial velocity of a note is set in the pattern definition (see patterns). The following commands set the master volume, track volume and random volume adjustments. And, again, please note that even though this manual calls the adjustments ``volume'', they all do the same thing: manipulate the initial note velocity.


Accent

``Real musicians'',19.4 in an almost automatic manner, emphasize notes on certain beats. In popular Western music written in 4/4 time this is usually beats one and three. This emphasis sets the pulse or beat in a piece.

In MMA you can set the velocities in a pattern so that this emphasis is automatically adjusted. For example, when setting a walking bass line pattern you could use a pattern definition like:

Define Walk W1234 1 4 100; 2 4 70; 3 4 80; 4 4 70

However, it is much easier to use a definition which has all the velocities the same:

Define Walk W1234 1 1 90 * 4

and use the ACCENT command to increase or decrease the volume of notes on certain beats:

Walk Accent 1 20 2 -10 4 -10

The above command will increase the volume for walking bass notes on beat 1 by 20%, and decrease the volumes of notes on beats 2 and 4 by 10%.

You can use this command in all tracks.

When specifying the accents, you must have matching pairs of data. The first item in the pair is the beat (which can be fractional), the second is the volume adjustment. This is a percentage of the current note volume that is added (or subtracted) to the volume. Adjustment factors must be integers in the range -100 to 100.

The ACCENTs can apply to all bars in a track; as well, you can set different accents for different bars. Just use a ``{}'' pair to delimit each bar. For example:

Bass Accent {1 20} / / {1 30 3 30}

The above line will set an accent on beat 1 of bars 1, 2 and 3; in bar 4 beats 1 and 3 will be accented.

You can use a ``/'' to repeat a setting. The ``/'' can be enclosed in a ``{}'' delimiter if you want.

To reset to the ``no accenting'' default, just use an empty command:

Bass Accent

AdjustVolume

Mnemonic Volume Ratios

The ratios used to adjust the volume can be changed from the table at the start of this chapter. For example, to change the percentage used for the MF setting:

AdjustVolume MF=95 f=120

Note that you can have multiple setting on the same line.

The values used have the same format as those used for the VOLUME command, below. For now, a few examples:

AdjustVolume Mf=mp+200

will set the adjustment factor for mf to that of mp plus 200%.

And,

AdjustVolume mf=+20

will increase the current mf setting by 20%.

You might want to do these adjustment in your MMArc file(s).


Master Volume Ratio

MMA uses its master and track volumes to determine the final velocity of a note. By default, the track volume setting accounts for 60% of the adjustment and the master volume for the remaining 40%. The simple-minded logic behind this is that if the user goes to the effort of setting a volume for a track, then that is probably more important than a volume set for the entire piece.

You can change the ratio used at anytime with the ADJUSTVOLUME RATIO=<VALUE> directive. <Value> is the percentage to use for the Track volume. A few examples:

AdjustVolume Ratio=60

This duplicates the default setting.

AdjustVolume Ratio=40

Volume adjustments use 40% of the track volume and 60% of the master volume.

AdjustVolume Ratio=100

Volume adjustments use only the track volume (and ignore the master volume completely).

AdjustVolume Ratio=0

Volume adjustments use only the master volume (and ignore the track volumes completely).

Any value in the range 0 to 100 can be used as an argument for this command. This setting is saved in GROOVEs.

CRESC and DECRESC commands can give unexpected results, depending on the value of the current ratio. For example, you might think that you can fade to silence with a command like:

Decresc m pppp 4

However, since the ratio, by default, is set to 60 you are only changing the master volume. Two ways you can fix this are:

AdjustVolume Ratio=0
Decresc m pppp 4

which changes the ratio. If you are also changing GROOVEs you might want to use:

AllGrooves AdjustVolume Ratio=0

or, change the volumes for the master and tracks:

Alltracks Decresc m pppp 4
Decresc m pppp 4

Feel free to experiment with different ratios.


Volume

The volume for a track and the master volume, is set with the VOLUME command. Volumes can be specified much like standard sheet music with the conventional dynamic names. These volumes can be applied to a track or to the entire song. For example:

Arpeggio-Piano Volume p

sets the volume for the Arpeggio-Piano track to something approximating piano.

Volume f

sets the master volume to forte.

In most cases the volume for a specific track will be set within the GROOVE definition; the master volume is used in the music file to adjust the overall feel of the piece.

When using VOLUME for a specific track, you can use a different value for each bar in a sequence:

Drum Volume mp ff / ppp

A ``/'' can be used to repeat values.

In addition to the ``musical symbols'' like ff and mp you can also use numeric values to indicate a percentage. In this case you can use intermediate values to those specified in the table above. For example, to set the volume between mf and f, you could do something like:

Volume 87

But, we don't recommend that you use this!

A better option is to increment or decrement an existing volume by a percentage. A numeric value prefaced by a ``+'' or ``-'' is interpreted as a change. So:

Drum-Snare Volume -20

would decrement the existing volume of the DRUM-SNARE track by 20%. If an adjustment creates a negative volume, the volume will be set to 0 and a warning message will be displayed.

And, finally, for fine tuning you can adjust a ``musical symbol'' volume by a percentage. The volume ``mf-10'' will generate a volume 10% less than the value of ``mf''; ``f+20'' will generate a volume 20% greater than ``f''.

MMA volume adjustments are velocity adjustments. If a note has an initial velocity of 127 you really can't make it louder. So, we recommend that you start off notes with a middle-of-the-road velocity setting (we use 90) which leaves room for MMA 's volume commands to make adjustments.


Cresc and Decresc

If you wish to adjust the volume over one or more bars use the CRESC or DECRESC19.5 commands. These commands work in both the master context and individual tracks.

For all practical purposes, the two commands are equivalent, except for a possible warning message. If the new volume in less than the current volume in a CRESC a warning will be displayed; the converse applies to a DECRESC. In addition, a warning will be displayed if the effect of either command results in no volume change.

The command requires two or three arguments. The first argument is an optional initial volume followed by the new (destination) volume and the number of bars the adjustment will take.

For example:

Cresc fff 5

will gradually vary the master volume from its current setting to a ``triple forte'' over the next 5 bars. Note that the very next bar will be played at the current volume and the fifth bar at fff with the other three bars at increasing volumes.

Similarly:

Drum-Snare Decresc mp 2

will decrease the ``drum-snare'' volume to ``mezzo piano'' over the next 2 bars.

Finally, consider:

Cresc pp mf 4

which will set the current volume to pp and then increase it to mf over the next 4 bars. Again, note that the very next bar will be played at pp and the fourth at mf.

You can use numeric values (not recommended!) in these directives:

Cresc 20 100 4

As well as increment/decrement:

Volume ff
...
Decresc -10 -40 4

The above example will first set the volume to 10% less than the current ff setting. Then it will decrease the volume over the next 4 bars to a volume 40% less than the new setting for the first bar.

A SEQCLEAR command will reset all track volumes to the default M.

When applying CRESC or DECRESC at the track level the volumes for each bar in the sequence will end up being the same. For example, assuming a two bar sequence length, you might have:

Chord Volume MP F

which alternates the volume between successive bars in the CHORD track. Now, if you were to:

Chord Cresc M FF 4

The following actions take effect:

  1. A warning message will be displayed,
  2. The volume for the chord track will be set to m,
  3. The volume for the chord track will increment to ff over the next four bars,
  4. The volume for the sequence will end up being ff for all the bars in the remaining sequence. You may need to reissue the initial chord volume command.

You may find that certain volume adjustments don't create the volumes you are expecting. In most cases this will be due to the fact that MMA uses a master and track volume to determine the final result. So, if you want a fade at the end of a piece you might do:

Decresc m pppp 4

and find that the volume on the last bar is still too loud. There are two simple solutions:

These methods will produce similar, but different results.

The adjustments made for CRESC and DECRESC are applied over each bar effected. This means that the first note or notes in a bar will be louder (or softer) than the last. You can use this effect for interesting changes by using a single bar for the range. Assuming a current volume of mp:

Cresc fff 1

will set the final notes in the following bar to be fff, etc.

If you have a number of bars with the same chord and the track you are modifying has UNIFY enabled the volume will not change. UNIFY creates long notes sustained over a number of bars for which the volume is only set once.

Sometimes a CRESC19.6 command will span a groove change. MMA handles this in two different ways:

Swell

Often you want a crescendo to be followed by a decrescendo (or, less commonly, a decrescendo followed by a crescendo). Technically, this is a messa di voce.19.7 You'll see the notation in sheet music with opposed ``hairpins''.

A SWELL is set with a command like:

Swell pp ff 4

or

Chord Swell ff 4

In the first case the master volume will be increased over 2 bars from pp to ff and then back to pp. In the second case the CHORD volume will be increased to ff over 2 bars, then back to the original volume.

You can achieve the same results with a pair of CRESC and DECRESC commands (and you might be safer to do just this since SWELL doesn't issue as many warnings).

Note that, just like in CRESC, you can skip the first argument (the initial volume setting). Also, note that the final argument is the total number of bars to effect (and it must be 2 or more).


RVolume

Not even the best musician can play each note at the same volume. Nor would he or she want to--the result would be quite unmusical ... so MMA tries to be a bit human by randomly adjusting note volume with the RVOLUME command.

The command can be applied to any specific track. Examples:

Chord RVolume 10
Drum-Snare RVolume 5

The RVOLUME argument is a percentage value by which a volume is adjusted. A setting of 0 disables the adjustment for a track (this is the default).

When set, the note velocity (after the track and master volume adjustments) is randomized up or down by the value. Again, using the above example, let us assume that a note in the current pattern gets a MIDI velocity of 88. The random factor of 10 will adjust this by 10% up or down--the new value can be from 78 to 98.

The idea behind this is to give the track a more human sounding effect. You can use large values, but it's not recommended. Usually, values in the 5 to 10 range work well. You might want slightly larger values for drum tracks.

You can further fine-tune the RVOLUME settings by using a minimum and maximum value in the form MINIMUM,MAXIMUM. Note the COMMA! For example:

Chord RVolume 0,10 -10,0 -10,20 8

Would set different minimum and maximum adjustment values for different sequence points. In the above example the adjustments would be in the range 0 to 10, -10 to 0, -10 to 20 and -8 to 8.

Notes:

Saving and Restoring Volumes

Dynamics can get quite complicated, especially when you are adjusting the volumes of a track inside a repeat or other complicated sections of music. In this section attempts to give some general guidelines and hints.

For the most part, the supplied groove files will have balanced volumes between the different instruments. If you find that some instruments or drum tones are consistently too loud or soft, spend some time with the chapter on Fine Tuning.

Remember that GROOVEs save all the current volume settings. This includes the master setting as well as individual track settings. So, if you are using the mythical groove ``Wonderful'' and think that the Chord-Piano volume should be louder in a particular song it's easy to do something like:

Groove Wonderful
Chord-Piano Volume ff
DefGroove Wonderful

Now, when you call this groove the new volume will be used. Note that you'll have to do this for each variation of the groove that you use in the song.

In most songs you will not need to do major changes. But, it is nice to use the same volume each time though a section. In most cases you'll want to do a explicit setting at the start of a section. For example:

Repeat
Volume mf
...
Cresc ff 5
...
EndRepeat

Another useful technique is the use of the $_LASTVOLUME macro. For example:

Volume pp
...
Cresc f 5
...
$_LastVolume // restores to pp



Footnotes

... created.19.1
We'll try to be consistent and refer to a MIDI ``volume'' as a ``velocity'' and internal MMA adjustments to velocity as volumes.
...sec-pats,19.2
Solo and Melody track notes use an initial velocity of 90.
... settings19.3
Please don't confuse the concept of MMA master and track volumes with MIDI channel volumes.
... musicians'',19.4
as opposed to mechanical.
...DECRESC19.5
We use the term ``decrescendo'', others prefer ``diminuendo''.
...CRESC19.6
This applies to DECRESC and SWELL as well.
... voce.19.7
Some references indicate that messa di voce applies to a single tone, and MMA is not capable of doing this.
Bob van der Poel 2017-03-25