<-- previous page     Table of Contents    Index    next page -->

SHAPE OVERRIDES AND MENSURAL NOTATION

The shapes context can be used to define overrides for certain music symbols. The overrides can then be applied, via the shapes parameter, either globally or to specific staffs, or, for symbols for which it could make sense, to specific voices. Most users will probably never use this facility, so if you are satisfied with the appearance of Mup's standard music symbols, feel free to skip this section.

These overrides apply only when Mup is choosing the symbols to use. I.e., they will not apply when symbols are explicitly specified in strings, like for rom, ital, bold, boldital, mussym, print, left, center, right, noteleft, or "with lists." If you want a symbol to be overridden everywhere, see the section on user-defined symbols.

The syntax of the shapes context is:

shapes "name"
  "symbol1" "replacement1"
  "symbol2" "replacement2"

The name is an arbitrary string which can then be used as the value of the shapes parameter. It is followed by one or more pairs of strings, with each pair on a separate line. Any subset of the allowable characters can be overridden in a given shapes context. Any not overridden will retain their normal values. As many shapes contexts as desired can be defined.

The symbols which can be overridden in score, staff, or voice context are:

upflag    dnflag    ll1rest    ll2rest
owhrest   qwhrest   dwhrest    1rest
2rest     4rest     8rest      16rest
32rest    64rest    128rest    256rest

The following symbols are only used in score or staff context, so while they can be overridden in any shapes context, if that shapes context is used at voice level, the overrides of these symbols would have no effect there:

fclef     gclef       cclef
measrpt   dblmeasrpt  quadmeasrpt
sharp     flat        nat
dblsharp  dblflat
cut       com

Note that while Mup will take the bounding boxes of overridden symbols into account, there are certain cases where it uses special knowledge of the characteristics of built-in symbols, to improve the aesthetics of their placement. If a user-defined symbol is substituted, and it has different characteristics, its placement may not look as good as the default symbol.

The replacements will likely often be user defined symbols, though built-in symbols may also be used. One example of using built-in symbols could be if you wanted to use the more simple, mensural style flags, but only on one staff, so that overriding the flags symbols on a global level would not work. For that, you could do something like:

shapes "simpleflags"
  "upflag" "mensurupflag"
  "dnflag" "mensurdnflag"
score
  staffs=2
staff 2
  shapes="simpleflags"
music

1-2: c;8d;e;e+;d+;4c+;
bar

Picture of Mup output

As an example of a user-defined symbol as the replacement, there are several variations of the C clef symbol which have been used over the centuries, and the C clef symbol is used for several clefs. Suppose you wanted only the alto clef usage to look different. You could define that different appearance symbol using the symbol context, then have a shapes context:

shapes "alt C clef"
  "cclef"  "mycclef"

then define a macro:
  define ALTO_CLEF  clef=alto ; shapes="alt C clef" @

and then use that macro in the parameters section for appropriate staffs.

There is a pre-defined "mensural" shapes context, which is:

shapes "mensural"
    "dwhrest" "mensurdwhrest"
    "1rest" "mensur1rest"
    "ll1rest" "mensurll1rest"
    "2rest" "mensur2rest"
    "ll2rest" "mensurll2rest"
    "4rest" "mensur4rest"
    "8rest" "mensur8rest"
    "16rest" "mensur16rest"
    "upflag" "mensurupflag"
    "dnflag" "mensurdnflag"

So to produce mensural notation, the recommended usage is:
score // or just the staff(s) where mensural notation is desired
     shapes = "mensural"
     noteheads = "mensural"
     stemlen = 6
     time = 3/2  // or as appropriate
     printedtime = "\(imperfminordim)" // or one of the other 7 choices
music

1: c;4e;g;8c+;b;a;g;
invisbar

1: 4f;;1c;
endbar

Picture of Mup output


   <-- previous page    Table of Contents    Index    next page -->