humdrum-tools / verovio-humdrum-viewer

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

Missing clefs in rendering #16

Closed rettinghaus closed 7 years ago

rettinghaus commented 7 years ago

This is strange: Clefs get converted to MEI but aren't showing up in the rendering. Any ideas? http://verovio.humdrum.org/?file=musedata/mozart/quartet/k590-01.krn

craigsapp commented 7 years ago

That is because the clefs are not attached to a particular staff line (encoding error). I'll add a default line assignment in the conversion if none is given to minimize the error:

*clefG  --> *clefG2 (should nearly always work)
*clefF -->  *clefF4   (should nearly always work)
*clefC -->  *clefC3  (should usually work, particularly for violas)

The clefs are still wrong. I think that an automatic clef-assignment algorithm was applied (which was not so accurate) since the bottom clef for the cello part should be F3 and the viola in C3.

This data file comes from a "stage-1" version of MuseData, which means that it is approximately MIDI-quality and not in a finished encoding state: no beams, slurs, articulations, clef/key/time changes, text directions, etc. It is the output of real-time performance on a MIDI keyboard (so may also have accidental spelling errors). This was encoded in 1997, before reasonable OMR processing, and hasn't been further processed (other than being converted to Humdrum in 2000 and some cleanup by me in 2001--although not clefs, obviously).

The !!!AFT record at the bottom of the file is an indication of the state of the data ("stage1"). I don't see why !!!AFT was used as there is a more appropriate one !!!EST for encoding status. (I don't see an entry for !!!AFT in the official list even).

Of interest, I added a filter command to VHV that applies automatic beaming, which improves readability:

!!!filter: autobeam

Typing "alt-f" first to freeze the rendering is safest, and then "alt-f" to re-draw when done adding the line. Add that line anywhere in the file and it should be displayed with beams:

screen shot 2017-02-09 at 12 57 44

I will have to adjust the beaming algorithm to no include rests on the ends...

Typing alt-c will "compile" the filter and put the resulting Humdrum data back into the editor (the MEI data viewable with alt-m is always displaying the filtering output:

screen shot 2017-02-09 at 13 00 27

I have recently added a fair number of graphical editing commands which you can see if you type "?" (at least on US keyboards) and play around with:

screen shot 2017-02-09 at 13 03 53