Download Reference Manual
Transcript
Repeats 1, 2, 3, 1, 2, 4, 1, 2, 5, 6 This works just like standard sheet music. Note that both R EPEAT E NDING and R EPEAT E ND can take an optional argument indicating the number of times to use the ending or to repeat the block. The effect of an optional count for R EPEAT E NDING is illustrated in the example, above. The following simple example: Repeat 1 Am 2 Cm RepeatEnd 3 Will expand to: 1, 2, 1, 2, 1, 2 Note that the optional argument “3” produces a total of three copies. The default argument for R EPEAT is “2”. Using “1” cancels the R EPEAT and “0” deletes the entire section. Using “1” and “0” are useful in setting up Coda sections where you want a different count the second time the section is played. Note that the count argument can be a macro. Have a look at the sample file repeats.mma for lots of examples. Combining optional counts with both R EPEAT E NDING and R EPEAT E ND is permitted. Another example: Repeat 1 Am 2 C RepeatEnding 2 3 D7 RepeatEnd 2 Produces: 1, 2, 3, 1, 2, 3, 1, 2, 1, 2 MmA processes repeats by reading the input file and creating duplicates of the repeated material. This means that a directive in the repeated material would be processed multiple times. Unless you know what you are doing, directives should not be inserted in repeat sections. Be especially careful if you define a pattern inside a repeat. Using T EMPO with a “+” or “-” will be problematic as well. Repeats can be nested to any level. Some count values for R EPEAT E ND or E ND R EPEAT and R EPEAT E NDING will generate a warning message. Using the optional text NoWarn as the first argument will suppress the message: 100