A tutorial on how to encode multiple staves in **kern data.

Multiple staves

Each **kern spine in the data will produce a staff in the graphical notation. The lowest staff is the left-most spine in the data, and the highest staff in the notation is the right-most spine.

Here is a more complicated example where the number of voices changes on each staff:

Note that when the subspines for adjacent staves merge at the same time (at the end of measure 2), then the merges must be staggered for grouping clarity. Also when a spine needs to expand from one to three voices, there must be two *^ expansions (the first to go from one to two subspines, and the second to go from two to three spines). Also note the use of 2ryy, which is used to delay merging of the spines until the end of the measure (otherwise the two right subspines could merge together before merging with the first subspine for the staff at the end of the measure). Also note that subspines should not be ended before the full duration of the last note in the subspine (so the first two subspines in the top staff in measure 2 can not merge half-way through the measure since the note in the first subspine has not yet finished sounding).