ABC import fails when using `%%partsfont` and/or `%%annotationfont`

• Jun 1, 2021 - 08:54
Reported version
3.6
Type
Plugins
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project

Importing the abc file with the content below only displays a single empty bar in MusScore:

%%partsfont Times 16 box bold
%%annotationfont Times 14
X: 0
T: Dixieland Delight
M: C
Q: 104
K: C perc
Z8 ||
P: A1
Z16 | \
P: B
Z11 ||
P: C
F2 c2 F2 c2 | x8 | x8 | x8 | x8 | x8 | x8 | "^(8)" x8 | x8 | x8 | x8 | x8 | x8 | x8 | x8 | "^(8)" x8 ||
P: A2
"_White-tail buck deer" x8 | x8 | x8 | x8 | x8 | x8 | x8 | "^(8)" x8 | x8 | x8 | x8 | x8 | x8 | x8 | x8 | "^(8)" x8 ||
P: B
x8 | x8 | x8 | x "^(4)" x7 | x8 | x8 | x8 | x "^(4)" x7 | x8 | x8 | x "^(3)" x7 ||
P: C
x8 | x8 | x8 | x "^(4)" x7 | x8 | x8 | x8 | F2 "^(4)" z6 ||
%O 
x [Q: 125] F2 F2 F2 F2 | x8 | x8 | x "^(4)" x7 ||
P: C
FcFc FcFc | x8 | x8 | "^(4)" x8 | x8 | x8 | x8 | "^(4)" x8 | x8 | x8 | x8 | "^(4)" x8 | x8 | x8 | x8 | "^(4)" x8 ||
P: B
F2 F2 F2 F2 | x8 | x8 | x "^(4)" x7 | x8 | x8 | x8 | x "^(4)" x7 | x8 | x8 | x "^(3)" x7 |
P: C
FcFc FcFc | x8 | x8 | "^(4)" x8 | x8 | x8 | x8 | "^(4)" x8 | x8 | x8 | x8 | "^(4)" x8 | x8 | x8 | x8 | F2 "^(4)" F2 F2 z2 |]

Comments

Severity S1 - Blocker S3 - Major
Workaround No Yes

Drop the 1st two lines and it'll import the "real" ABC part.

It doesn't block you from using ABC import all together and doesn't crash either -> Major

Title Nothing imported ABC import fails when using `%%partsfont` and/or `%%annotationfont`

This may even be by design, or get turned into a feature request, as far as I can tell using %%partsfont and/or %%annotationfont are just not implemented

See https://wim.vree.org/svgParse/abc2xml.html :
Most elements from ABC are translated, but some translations are only partially implemented. In general %%commands are not implemented except:

  • %%abc-include. Allows you to include another .abc file. The included file, however, is not further checked for %%abc-include lines.
  • %%score, %%staves. When multiple %%score instructions are present only the first one is honoured.
  • %%scale, %%pagewidth, %%pageheight, %%leftmargin and %%rightmargin. The scale value is the distance between two stafflines in millimeters. The other values are also in millimeters unless they are followed by a unit (cm,in,pt).
  • %%MIDI program and %%MIDI channel (or I:MIDI ..) are translated when used in a current voice (i.e. after a V: definition). Instrument/channel changes mid-voice are translated to a text direction which carries the midi parameters as playback setting. In %%MIDI program num, the number should range from 0 to 127. In %%MIDI channel num, the number is starts from one. The midi translation supports mapping multiple voices whith different instruments to one stave. (i.e. the resulting xml part will have multiple instruments). This feature, though present in MusicXML is not supported by MuseScore, nor by Finale Notepad. These programs only allow one instrument per stave.
  • %%MIDI transpose is translated and has the same effect as transpose= in the clef, i.e. only play back is transposed, not notation.
  • %%MIDI drummap is translated to an equivalent I:percmap
  • All %%instructions can be inlined: %%command ... == [I:command ...]
Severity S3 - Major S5 - Suggestion

So indeed a feature request. And one that isn't for MuseScore's plugin, but rather for that web service named above.
I guess it should at least just ignore those %% things it doesn't yet support.

Maybe you could contact the author via the email address mentioned at the bottom of https://wim.vree.org/svgParse/abc2xml.html

In reply to by Jojo-Schmitz

Yes, I thought it would just ignore the feature it doesn't support and was about to test without the annotations.
However, I spent time playing around with abcjs' print options and have managed to render the sheet into PDF in the abcjs editor using Firefox's Print to PDF option.
Installed Edwin font and set the annotations to

%%titlefont Edwin 25
%%partsfont Times-Bold 18 box
%%tempofont Georgia 18
%%annotationfont Georgia 14

Using Georgia for numbers instead of MScoreBC (can't get that to be recognized and not worth the time since Georgia is ok).
I suggest this as a workaround for the case when a PDF output is required. Of course, it doesn't help if the notes are required for editing in MuseScore.