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

Chord-at-a-time input style

There is an alternate input style, in which you enter music a chord-at-a-time, rather than a voice-at-a-time. In this style, the specification before the colon gives one or more patterns that tells how to map notes to staffs and voices.

Suppose you want to print some music in a style common for many traditional hymns: it is to be printed on two staffs, each staff will always have exactly two notes, and the rhythm is exactly the same for all voices. With chord-at-a-time input, you specify, for each note in a chord, which staff and voice to map that note. Since there are four notes in each chord, there will be four mappings listed. You want the bottom two notes to get mapped to staff 2, and the top two notes to staff 1. This is shown as

// Bass to staff 2 voice 1
// |    Tenor to staff 2 voice 1
// |    |    Alto to staff 1 voice 1
// |    |    |    Soprano to staff 1 voice 1
[  2 1; 2 1; 1 1; 1 1 ]

Each item in the semicolon-separated list tells how to map one note. So the first note in each chord will get mapped to staff 2 voice 1. The second note in each chord will also get mapped to staff 2 voice 1. The third and fourth notes will get mapped to staff 1 voice 1.

Since voice 1 is, as always, the default, this could be written more compactly as just:

[ 2; 2; 1; 1 ]

If you wanted to input notes from top to bottom instead (in soprano-alto-tenor-bass order, rather than bass-tenor-alto-soprano order), you could use:
// Soprano
//    Alto
//       Tenor
//          Bass
[  1; 1; 2; 2 ]

If you wanted to use two separate voices on each staff (going back to bottom-to-top order), you could specify:
// Bass to staff 2 voice 2
// |    Tenor to staff 2 voice 1
// |    |    Alto to staff 1 voice 2
// |    |    |    Soprano to staff 1 voice 1
[  2 2; 2 1; 1 2; 1 1  ]

Now let's put these mappings with music data.

score
    staffs=2
    vscheme=2f
staff 2
   clef=bass

music

[ 2; 2; 1; 1 ] : facf;dgfb;2cgec+;
bar

[ 1 1; 1 2; 2 1; 2 2 ] : fcaf;bfgd;2c+egc;
bar

Picture of Mup output
In the first measure, the first two notes listed in each chord are mapped to staff 2, voice 1, while the third and fourth notes listed in each chord are mapped to staff 1 voice 1. In the second measure, two voices are used and notes are entered in descending order. Note that each note takes on the correct default octave for whichever staff it is mapped to.

It is also possible to use rests or spaces for some of the voices.

score
  key=3&
  vscheme=2f

music

[ 1 2; 1 1 ]: rb; eg; ca; gr;
bar

[ 1 2; 1 1 ]: er; sr; 8sf; se; 4sg;
bar

Picture of Mup output

Chord attributes and interchord attributes (like tie, slur, xnote, len, and alt) can be specified just like for voice-at-a-time input. Note attributes (like ? and ~) apply to the note wherever it gets mapped, and items that apply to the chord as a whole will be applied to all the notes.

[1 2; 1 1] : [cue; xnote; len 6] b-e; [with > ] ce& slur; dg~; c?g;

Picture of Mup output

It is possible to map a note to more than one place by using ranges, and/or by giving a list of staffs and voices, separated by ampersands. This may be useful, for example, if several voices are in unison. In the next example, the first note in each chord will be mapped to voice 1 of staffs 1 through 3, as well as to voice 2 of staff 1, while the second note in each chord will be mapped to voice 2 of staffs 2 and 3.

[ 1-3 1  &  1 2;  2-3 2 ] : ec;fd;ge;af;

Picture of Mup output

It is also possible to specify more than one bracketed mapping. Each must include a mapping for a different number of notes. So, for example, if some chords in a measure have two notes and others have three, you can define two maps: one for two notes, and one for three. The example below demonstrates placing alto and soprano as two voices on one staff, but sometimes the alto part splits.

// For chords with two notes,
// map the first to staff 1 voice 2 (alto),
// and the second to staff 1 voice 1 (soprano).
// For chords with three notes,
// map the first two notes to staff 1 voice 2
// (first and second alto part),
// and the third to staff 1 voice 1 (soprano).
[ 1 2; 1 1 ] [ 1 2; 1 2; 1 1 ]: cec+;df;eg;a-fc+;

Picture of Mup output
If mappings of different chords need to vary by something other than the number of notes in the chord, then you will have to use the voice-at-a-time input style.

Since the mapping specifications can get rather complex, and they may be used many times during a song, it is usually best to define macros for them, and possibly even put the macro definitions in an "include" file.

You can use the different input styles in different measures of a single song, and use different mappings in different measures. You can even mix the two input styles within a measure, but a given staff/voice can only appear on one line of input per measure. So, for example, you could choose to input staffs 1 and 2 of a song in chord-at-a-time input style, and staff 3 in voice-at-a-time style. The noteinputdir parameter is ignored on chord-at-a-time input. Location tags cannot be used with chord-at-a-time input, since often that would be ambiguous. Mid-measure parameter changes are not supported on chord-at-a-time input.


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