Skip to content

Commit

Permalink
Update example related to issue #7
Browse files Browse the repository at this point in the history
  • Loading branch information
craigsapp committed Apr 15, 2020
1 parent b1d0c15 commit d6443b3
Showing 1 changed file with 51 additions and 7 deletions.
58 changes: 51 additions & 7 deletions _includes/humdrum/multiple_staves.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,46 @@
## 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.

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.

{% include verovio.html
humdrum-min-height="360px"
humdrum-min-height="320px"
source="staves1"
scale="50"
scale="55"
pageWidth="1400"
%}
<script type="application/x-humdrum" id="staves1">
**kern **kern
*M4/4 *M4/4
=1 =1
1C 4c
. 4e
. 4g
. 4cc
=2 =2
1GG 4dd
. 4b
. 4f
. 4a
=3 =3
1C; 1g;
== ==
*- *-
</script>


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

{% include verovio.html
humdrum-min-height="450px"
humdrum-min-width="350px"
source="staves2"
scale="45"
pageWidth="1400"
%}
<script type="application/x-humdrum" id="staves2">
**kern **kern
*M4/4 *M4/4
=1 =1
Expand All @@ -35,10 +63,26 @@ in the notation is the right-most spine.
*v *v *
=2 =2
1AA; 1f;
= =
== ==
*- *-

</script>

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).





0 comments on commit d6443b3

Please sign in to comment.