BPM in play panel is false

• Jan 3, 2021 - 16:32
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Any score in 6/8, add a quite natural tempo (nothing exotic here) dotted quarter = 63 (remember physical metronome? 63 was possible there).
Play panel says BPM = 95
I don't know if MuseScore uses a BPM = 94.5 incorrectly displayed as 95, or if MuseScore uses a BPM of 95.
But in both cases there is a bug to fix.


Comments

63 for a dotted quarters per minute is indeed 94,5 quarter beats per minute. And that is what the Inspector shows. I guess the play pannel just rounds it, not having been updated to allow decimals, back when this got allowed for tempo texts?

Severity S4 - Minor S5 - Suggestion

Indeed, the play pannel doesn't allow to display decimals for the tempo, so not a bug, works as designed:

//---------------------------------------------------------
//   setTempo
//---------------------------------------------------------
 
void PlayPanel::setTempo(double val)
      {
      int tempo = lrint(val * 60.0);
      tempoLabel->setText(tr("Tempo\n%1 BPM").arg(tempo, 3, 10, QLatin1Char(' ')));
      }

Which is not to say that this couldn't or shouldn't get changed ;-)

Changing that to

void PlayPanel::setTempo(double val)
      {
      tempoLabel->setText(tr("Tempo\n%1 BPM").arg(val * 60, 6, 'f', 2, QLatin1Char(' ')));
      }

seems to do the trick, showing the same 3 digits before the decimal dot, padded with spaces if needed, and 2 decimals, like the inspector.
Never more than 999.00BPM, same as before and same as in Inspector too!

Reported version 3.5  

It is like this ever since the code moved from sourceforge to github, so at least ever since MuseScore 2, but probably even longer longer

Fix version
3.6.0