Begin/End Blocks

Entering a series of directives for a specific track can get quite tedious. To make the creation of library files a bit easier, you can create a block. For example, the following:

Drum Define X 0 2 100; 50 2 90
Drum Define Y 0 2 100
Drum Sequence X Y

Can be replaced with:

Drum Begin
    Define X 0 2 100; 50 2 90
    Define Y 0 2 100
Drum Sequence X Y

Or, even more simply, with:

Begin Drum Define
    X 0 2 100; 50 2 90
    Y 0 2 100

If you examine some of the library files you will see that this shortcut is used a lot.


The BEGIN command requires any number of arguments. Valid examples include:

Begin Drum
Begin Chord2
Begin Walk Define

Once a BEGIN block has been entered, all subsequent lines have the words from the BEGIN command prepended to each line of data. There is not much magic here--BEGIN/END is really just some syntactic sugar.


To finish off a BEGIN block, use a single END on a line by itself.

Defining musical data or repeats inside a block (other than COMMENT blocks) will not work.

Nesting is permitted, e.g.:

Scale Begin
    Begin Define

A BEGIN must be competed with a END before the end of a file, otherwise an error will be generated. The USE and INCLUDE commands are not permitted inside a block.

Bob van der Poel 2017-03-25