<-- previous page     Table of Contents    Index

Gradual MIDI changes

Often you may like to have gradual changes in things like tempo or volume or onvelocity. You can, of course, tell Mup exactly what you want for each individual note, but you can also just specify beginning and ending values and optionally some intermediate values, and Mup will do interpolation, creating as many midi commands as necessary to produce smooth gradual changes.

As a common example, suppose you want to do a ritard. You could do something like:

midi all: 3 "tempo=120 to 96" til 1m+4;

This would start the tempo at 120 quarter notes per minutes at beat 3 of the current measure and ritard to 96 per minutes at beat 4 of the following measure. If only two values are given, as in that example, the change is done linearly, but you can also specify multiple points that make up a curve. The curve is divided into equal segments: if there are three points, it will be treated as two equal segments; if four points, as three segments, etc. As an example, you could slow down and then speed back up:
midi all: 2 "tempo = 112 to 92 to 112" til 2m+4;

or increase onvelocity slowly at first and then more so:
midi 1: 1 "onvelocity= 40 to 50 to 70 to 105" til 4.5;

Changes in time signature are not allowed during a single gradual change, because it may not be entirely clear what is wanted in that case. So you have to tell Mup what you want by starting a new gradual change at each time signature change.

Note that all midi commands must either include both a "to" and a "til" or neither. The to/til are only allowed on midi commands where the values are numbers, namely channel, chanpressure, offvelocity, onvelocity, parameter, port, program, and tempo. Note that a few of those may be of rather dubious usefulness, particularly channel and port, and perhaps program. For a parameter, the parameter number is specified just once, as in:

midi 1: 1 "parameter=7, 40 to 60 to 70 to 90 to 65" til 4.5;

In the case on onvelocity or offvelocity, the items between "to" can be lists that work like those without "to," with the first applying to the top note, and so forth. The number of comma-separated items does not need to be the same in all lists, since the last value in each list will apply to any remaining notes. So to play a C major chord, accenting each note in turn from bottom to top, you could do:
midi 1: 1 "onvelocity=60,60,60,120 to 60,60,120,60 to 60,120,60 to 120,60" til 4;
1: cegc+;;;;
bar


   <-- previous page     Table of Contents    Index