diff --git a/src/notation/internal/masternotation.cpp b/src/notation/internal/masternotation.cpp index 73da9206cd4e8..2a41dd83aacc8 100644 --- a/src/notation/internal/masternotation.cpp +++ b/src/notation/internal/masternotation.cpp @@ -414,12 +414,14 @@ void MasterNotation::applyOptions(mu::engraving::MasterScore* score, const Score mu::engraving::Fraction ts(scoreOptions.timesigNumerator, scoreOptions.timesigDenominator); QString text("metNoteQuarterUp = %1"); - double bpm = scoreOptions.tempo.valueBpm; + const double bpm = scoreOptions.tempo.valueBpm; + double tempo = bpm; // initial value for tempo, which internally is always expressed in quarter notes bool withDot = scoreOptions.tempo.withDot; switch (scoreOptions.tempo.duration) { case DurationType::V_WHOLE: text = "metNoteWhole = %1"; + tempo *= 4.0; break; case DurationType::V_HALF: if (withDot) { @@ -427,6 +429,7 @@ void MasterNotation::applyOptions(mu::engraving::MasterScore* score, const Score } else { text = "metNoteHalfUp = %1"; } + tempo *= 2.0; break; case DurationType::V_QUARTER: if (withDot) { @@ -441,6 +444,7 @@ void MasterNotation::applyOptions(mu::engraving::MasterScore* score, const Score } else { text = "metNote8thUp = %1"; } + tempo *= 0.5; break; case DurationType::V_16TH: if (withDot) { @@ -448,17 +452,21 @@ void MasterNotation::applyOptions(mu::engraving::MasterScore* score, const Score } else { text = "metNote16thUp = %1"; } + tempo *= 0.25; break; default: break; } + if (withDot) { + tempo *= 1.5; + } + mu::engraving::Segment* seg = score->firstMeasure()->first(mu::engraving::SegmentType::ChordRest); mu::engraving::TempoText* tt = new mu::engraving::TempoText(seg); tt->setXmlText(text.arg(bpm)); - double tempo = scoreOptions.tempo.valueBpm; - tempo /= 60; // bpm -> bps + tempo /= 60; // qpm -> qps tt->setTempo(tempo); tt->setFollowText(true);