humdrum-tools / verovio-humdrum-viewer

Verovio Humdrum Viewer
http://verovio.humdrum.org
37 stars 9 forks source link

Original clefs #56

Closed mkonik closed 7 years ago

mkonik commented 7 years ago

Command alt+o not working even if original clefs are encoded.

craigsapp commented 7 years ago

They do not work for me either, and I don't see the problem yet (both on the command-line and in VHV).

Strangely, TMP scores still work with displaying original clefs (on the TMP website and on the command-line):

http://www.tassomusic.org/work/?id=Trm0047m

screen shot 2017-08-18 at 8 44 56 am
craigsapp commented 7 years ago

The problem occurs because omet triggers encoding of the alternate encoding, so if oclef is given without *omet, then the alternate clef was not being encoded:

**kern
*oclefC3
*clefGv2
*omet(C)
*M4/2
=1-
2e
2e
2r
2d
==
*-

Generates:

verovio  input.krn --app-xpath-query="./rdg[contains(@label, 'original-clef')]"
screen shot 2017-08-19 at 12 00 15 pm

But removing the omet caused the alternate encoding to not be added:

**kern
*oclefC3
*clefGv2
=1-
2e
2e
2r
2d
==
*-

Since there is no original-clef alternate encoding in the file, it is ignored:

verovio  input.krn --app-xpath-query="./rdg[contains(@label, 'original-clef')]"
screen shot 2017-08-19 at 12 07 15 pm

But now fixed so that oclef or omet by themselves will encode properly:

**kern
*oclefC3
*clefGv2
=1-
2e
2e
2r
2d
==
*-
verovio  input.krn --app-xpath-query="./rdg[contains(@label, 'original-clef')]"
screen shot 2017-08-19 at 12 10 46 pm

Changed an "and" to an "or" in the logical for determining whether or not to encode an alternate clef/mensuration:

   if (m_oclef.size() || m_omet.size()) {
        storeOriginalClefMensurationApp();
   }

Should now be working in VHV:

screen shot 2017-08-19 at 12 33 35 pm

Pressing alt-o:

screen shot 2017-08-19 at 12 33 30 pm