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

### Chord attributes

There are optional attributes that are associated with an entire chord rather than an individual note. These are put inside square brackets before the list of notes and the time value. There are several classes of information:

- chord style (grace, cue, diam, or xnote)
- head shape
- symbols to be printed with a chord
- slashes
- stem direction
- stem length
- padding
- chord location tag
- horizontal offset
- rest distance

Each class of information is separated from the other by a semicolon. All classes are optional, and can occur in any order.

#### Chord style

Several chord styles can be specified. Grace note chords are designated by the word "grace," or cue note chords by "cue." Grace notes can be specified as any undotted time value of eighth note or shorter, but are treated as taking no time. The time value given is merely used to specify how many flags or beams to put on the grace note. You can also specify a quarter note grace note, which will be printed as a small, stemless note, as is used to show a "prebend" in guitar music. (Actually, you can force a stem if you want, by specifying a len, as is described later.) Cue notes have time like regular notes, but they are printed smaller. If there are several grace notes in a row, they will be beamed automatically. However, you cannot mix quarter (stemless) grace notes with shorter ones. Cue notes follow the same beaming rules as regular notes.

It is also possible to specify "diam," or "xnote." In the case of "diam," the chords will be drawn with diamond-shaped notes, while with "xnote," the chords will be drawn with X-shaped notes. A diamond shaped note head will be used for xnotes that are half note or longer. Here are some examples:

    [grace]

    [xnote]

    [cue; xnote]

    [diam]

#### Head shape

If you want to have the note heads in a chord use a shape other than the normal shapes, you use hs followed by the name of the head shape in quotes. There is an entire section on shaped notes, so only the basics are covered here. The xnote and diam described above are really just shorthands for two common head shapes. The method using hs lets you use many other note head styles, such as a slash, or triangle.

    1: [hs "righttri"]cf; [hs "slash"]fa;

The section on shaped notes lists all the builtin head shape names, and explains how you can define your own.

#### Symbols to be printed with a chord

It is possible to specify one or more musical symbols or text strings to be printed with a chord. This is typically used for things like staccato and accent marks. The word "with" is followed by one or more things to print. If there are more than one, they are separated by commas. They will be printed outwards from the notes in the order specified.

The "with" list is not allowed on space groups. On rests, the side on which the items are printed is determined as if the rests had a stem, so if they are not placed on the side you want, in some cases forcing the "stem" direction will produce what you want.

The list can include symbols from the following table:

Symbol | Meaning
`.` | staccato
`-` | legato
`>` | accent
`^` | accent

A quoted string can also be specified (e.g., "ff", "adagio", etc.). This will be printed in the font and size specified by the The "withfontfamily," "withfont," and "withsize" parameters. Any of the special music characters can be printed by using the usual convention, e.g., \(ferm) for a fermata. (This is described in a later section.) However, it is usually preferable to use the printing of text strings relative to beats.

Here are some examples:

    [with ., -]
    [with ^, "\(ferm)"]
    [with "sfz"; cue]

If the symbols acc_hat, ferm, or wedge are used by themselves in a "with" list item, they are handled specially. If the stem direction is such that the upside down versions of these characters should be used, the upside down version will be used.

#### Slashes

Diagonal lines to be drawn through the stem of the group can be specified using

    slash N

where N is the number of slashes to draw. In the case of grace notes, N can only be 1, which will produce a grace note with a slash through it. In the case of other notes, N can be 1 or greater, and is used to specify tremolo or repetition of the note group. Examples:

    [slash 2]
    [grace; slash 1]

#### Stem direction

The chord stem direction can be specified as "up" or "down". Normally Mup chooses the stem direction, but once in a while you may want to override its choice. There are some restrictions. All chords beamed together and the pair of chords in an alternation pair (described later) must have the same stem direction. Examples:

    [up]
    [down]

For voice 3, stem direction works a little differently. By default, the stem direction for voice 3 is up, but for voice 3 on any given staff, when you specify a stem direction, that direction will remain in effect until explicitly changed. Thus, for example, if you want all voice 3 stems on a given staff in an entire song to be down, you only need to specify "[down]" on the first chord. Grace notes on voice 3, however, are always stem up unless explicitly forced down.

#### Stem len

Normally, Mup sets stem lengths as appropriate, but sometimes you might want to make a stem longer or shorter than normal. This is done with the keyword "len" followed by a length in stepsizes. Some examples:

    [ len 14 ]
    [ len 7; up ]

You cannot specify stem length on chords inside of beams. The len can be set to 0 to produce a note head with no stem at all.

There is a stemlen parameter that can be used to set the default stem length. If you don't want any stems, setting that parameter to 0 is more convenient than setting len to 0 on each chord individually.

There are certain circumstances in which Mup will normally shorten stems slightly on beamed chords or on chords whose stems protrude from the staff. There is a stemshorten parameter that allows you to control how Mup handles those cases.

#### Padding

Sometimes it may be desirable to space notes somewhat differently than Mup would normally place them. It is possible to specify "padding" before any note group. This is done by specifying the word "pad" followed by a number of stepsizes of white space padding to add before the chord. The number can be fractional, as in 0.5 or 2.25. For example:

    [ pad 2.5 ]

The padding can also be negative. Padding affects the minimum amount of width allocated to a chord, so you can use positive padding values to force additional room in front of a chord, or negative padding to allow things closer together.

#### Chord location tag

It is possible to set a location tag which is associated with an entire chord rather than an individual note. This tag is specified like location tags for notes, with an "=" followed by a name, but is inside the square brackets rather than after a note.

    3: 2cf; [=h] egc+;
    1: [cue; with >; =_ch] fa;

#### Horizontal offset

A horizontal offset can be applied to a chord by specifying "ho" followed by a number of stepsizes. The number can be positive or negative, and can include a fractional part. A positive number will cause the chord to be placed that far right of where the horizontal center of the chord would normally be; a negative number will place it that far to the left. It is also possible to simply specify a "+" or "-" which says to place the chord to the right or left, as close as possible without running into something.

A horizontal offset is most commonly used on the third voice of a staff, although it can be used on other voices too. By default, Mup places third voice chords as close as it thinks is safe for avoiding most collisions. Sometimes it may actually be okay visually to place the chord a little closer than that, or perhaps there is a better "nook" to tuck it into on the left side. By specifying a horizontal offset, you can place chords anywhere you want. Mup makes no checks to avoid collisions when you specify a horizontal offset, so this attribute needs to be used with some care.

The ho can be used on grace groups, and has generally similar effects. It only has an effect if there are multiple voices having grace notes at the same point in time, and specifies how to move the grace note relative to where it would be if no ho had been specified.

Here is an example of the use of horizontal offset and stem direction on voice 3.

    score
      vscheme=3f

    music
    1 1: c+;b;a;c+;
    1 2: e;d;e;f;
    1 3: [ho+1] g; [ho-5.2; down]; [ho-] f; [ho+; up] a;
    bar

#### Rest distance

Usually Mup's placement of rests is satisfactory, but once in a while you might want to force a rest to be placed a little higher or lower than Mup would place it. You can specify a "dist" which is the number of stepsizes from the center of the staff to place the rest symbol, with positive numbers being above the center and negative numbers below. If the staff is transposed, the placement of the rest symbol will be adjusted accordingly.

    // The first and last rests are in normal position.
    // The second is forced higher, the third is forced lower.
    1: r; [dist 6]; [dist -4]; r;
    bar

Note that the alignrests parameter can also be used to affect how rests are placed.

#### Repeated attributes

If two or more chords in a row have the same bracketed attributes, there are two shorthand notations. Specifying an empty set of brackets "[]" means to use the same attributes as were specified on the previous chord. The previous chord must be within the same measure. Some examples:

    1: [cue] 4c;[]d;[grace; slash 1] 8f;2e;
    bar

    1: d; [with .,-]d; []e; []f;
    bar

The other shorthand is to put 3 dots after a set of bracketed items. This means to repeat the same bracketed items on all chords for the rest of the measure, or until a new set of bracketed items is specified. Items in a "with" list are omitted on rests, since usually they are things that don't make sense for rests. If you wish to cancel this before the end of a measure but without specifying a new set, the special set "[-]" can be used.

    // put staccato marks on all notes
    1: [with .]... c; d; e; g;
    bar
    // put several cue size notes in the middle of a measure
    1: c; [cue]... 8d; f; e; g; [-] 4c+;
    bar

You can use more than one set of backets on a single chord. For example "[len 5][down]" and "[len 5;down]" are equivalent. However, [-] can only be used by itself, and if you want to use [] along with another backeted set of items (to duplicate the items on the previous chord plus add some more), the empty [] needs to be first, before the other set of items.

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