The alt-o command toggles between 'original' and 'modern' clefs.

Pressing alt-o toggles between display of modern and original clefs. Here is an example of the feature in action:

show original/modern notation.
Pressing alt-o will toggle between modern and original clefs.

This command is useful for proof-reading against a document that uses different clefs than the final encoding will, and is also useful for generating clef-reading exercises.

The original clefs are encoded by adding “o” before “clef”:

*oclefF4	*oclefC4	*oclefC3	*oclefC1
*clefF4	*clefGv2	*clefG2	*clefG2

If there are no oclef encodings in the data, then alt-o obviously will not do anything.

Try using alt-o on the Bach chorale shown in the above figure.

Implementation notes

When converting from Humdrum to MEI, the “original” clef line is converted into this MEI code that inserts the optional encodings for the original clefs:

   <rdg label="original-clef">
            <staffDef clef.shape="C" clef.line="1" n="1" />
            <staffDef clef.shape="C" clef.line="3" n="2" />
            <staffDef clef.shape="C" clef.line="4" n="3" />
            <staffDef clef.shape="F" clef.line="4" n="4" />

The <app> element is used to provide alternate content in an MEI file. In this case there are two choices, with <lem> meaning the default choice (don’t add original clefs), and a <rdg> which is labeled original-clef. The default in this case does nothing, which means that the clef assignments at the start of the file are not altered:

   <staffGrp symbol="bracket">
      <staffDef clef.shape="G" clef.line="2" key.sig="1f" meter.count="4" meter.unit="4" meter.sym="common" n="1" label="Soprano" lines="5" />
      <staffDef clef.shape="G" clef.line="2" key.sig="1f" meter.count="4" meter.unit="4" meter.sym="common" n="2" label="Alto" lines="5" />
      <staffDef clef.shape="G" clef.line="2" clef.dis="8""below" key.sig="1f" meter.count="4" meter.unit="4" meter.sym="common" n="3" label="Tenor" lines="5" />
      <staffDef clef.shape="F" clef.line="4" key.sig="1f" meter.count="4" meter.unit="4" meter.sym="common" n="4" label="Bass" lines="5" />

In the verovio JavaScript toolkit, the option appXPathQuery can be given to the toolkit to run an XPath command on <app> data in the MEI input file. To select the original clefs, the options are set to:

var options = {
      format: "humdrum",
      pageWidth: 2000,
      pageHeight: 2500,
      appXPathQuery: "./rdg[contains(@label, 'original-clef')]"

In this case the XPath query searches for the reading that contains an attribute label which has the value original-clef.

The command-line equivalent to the above options would be:

humcat h://chorales/chor074.krn | verovio - -o chor074.svg -f humdrum -w 2000 -h 2500 --app-xpath-query="./rdg[contains(@label, 'original-clef')]"

This is similar to using strophe and/or thru in Humdrum data, although the *oclef system is a special case that does not require using strophe or thru.

Here is the equivalent using thru:


Then to use modern clefs:

thru chor074-thru.krn | verovio - -o chor074-modern.svg

and original clefs:

thru -v original-clefs chor074-thru.krn | verovio - -o chor074-original.svg

Here is similar functionality using strophe:

*S/modern	*S/original
*clefG2	*clefC1
*S/fin	*S/fin
*v	*v

To unpack the modern version with strophe:

strophe -x modern chor074-thru.krn | verovio - -o chor074-modern.svg

To unpack the original-clef version with strophe:

strophe -x original chor074-thru.krn | verovio - -o chor074-original.svg