diff --git a/src/notation/internal/masternotation.cpp b/src/notation/internal/masternotation.cpp index 0e89686edf587..b423c63408892 100644 --- a/src/notation/internal/masternotation.cpp +++ b/src/notation/internal/masternotation.cpp @@ -413,37 +413,48 @@ void MasterNotation::applyOptions(mu::engraving::MasterScore* score, const Score QString text("metNoteQuarterUp = %1"); double bpm = scoreOptions.tempo.valueBpm; + double quarterNotesPerDuration = 1; + bool withDot = scoreOptions.tempo.withDot; switch (scoreOptions.tempo.duration) { case DurationType::V_WHOLE: text = "metNoteWhole = %1"; + quarterNotesPerDuration = 4; break; case DurationType::V_HALF: if (withDot) { text = "metNoteHalfUpspacemetAugmentationDot = %1"; + quarterNotesPerDuration = 3; } else { text = "metNoteHalfUp = %1"; + quarterNotesPerDuration = 2; } break; case DurationType::V_QUARTER: if (withDot) { text = "metNoteQuarterUpspacemetAugmentationDot = %1"; + quarterNotesPerDuration = 1.5; } else { text = "metNoteQuarterUp = %1"; + quarterNotesPerDuration = 1; } break; case DurationType::V_EIGHTH: if (withDot) { text = "metNote8thUpspacemetAugmentationDot = %1"; + quarterNotesPerDuration = 0.75; } else { text = "metNote8thUp = %1"; + quarterNotesPerDuration = 0.5; } break; case DurationType::V_16TH: if (withDot) { text = "metNote16thUpspacemetAugmentationDot = %1"; + quarterNotesPerDuration = 0.375; } else { text = "metNote16thUp = %1"; + quarterNotesPerDuration = 0.25; } break; default: @@ -455,6 +466,7 @@ void MasterNotation::applyOptions(mu::engraving::MasterScore* score, const Score tt->setXmlText(text.arg(bpm)); double tempo = scoreOptions.tempo.valueBpm; + tempo *= quarterNotesPerDuration; // setTempo expects a value in Quarter Notes Per Second tempo /= 60; // bpm -> bps tt->setTempo(tempo);