read114: Pedal/lineWidth falsely dependent on DPI_F

• Jun 2, 2019 - 19:13
Reported version
3.1
Priority
P2 - Medium
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

Compiling 3.1 with DPI_F set to 1 (instead of 5) due to https://musescore.org/en/node/284218 fails in the testsuite because the 114 file’s…

  <Pedal>
    <endHookHeight>-1.5</endHookHeight>
    <lineWidth>0.15</lineWidth>   

… is supposed (perhaps wrongly?) to be read, by pedal-ref.mscx, as…

            <Pedal>
              <beginText>&lt;sym&gt;keyboardPedalPed&lt;/sym&gt;</beginText>
              <endHookHeight>-1.5</endHookHeight>
              <lineWidth>0.006</lineWidth>
              </Pedal>

… but instead reads as 0.3 (which, incidentally, is a factor of 5 from 0.006).

I believe the reference file (and the souce code) bogus, but I do not know enough about the 1.x file format to say which value would be correct in the 3.x file format.

The code is a bit questionable… volta are read like…


volta->setLineWidth(e.readDouble() * volta->spatium());

… but pedals use…


pedal->setLineWidth(qreal(e.readDouble()));

// and, further up, even

              pedal-&gt;setEndHookHeight(Spatium(e.readDouble()));

… and ottava use yet another thing.

Even if the current pedal-ref.mscx is correct, the code is wrong (and must add * 5.0 / DPI_F or something equivalent).


Comments