Skip to content

Commit

Permalink
Allow 128th in time signatures and tempo texts
Browse files Browse the repository at this point in the history
plus fixing some typos found while searching the old 64th limit
  • Loading branch information
Jojo-Schmitz authored and igorkorsukov committed Oct 28, 2021
1 parent b23e97a commit 6ec236a
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/appshell/view/preferences/importpreferencesmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ QVariantList ImportPreferencesModel::shortestNotes() const
QVariantMap { { "title", qtrc("appshell", "32nd") }, { "value", division() / 8 } },
QVariantMap { { "title", qtrc("appshell", "64th") }, { "value", division() / 16 } },
QVariantMap { { "title", qtrc("appshell", "128th") }, { "value", division() / 32 } },
QVariantMap { { "title", qtrc("appshell", "256h") }, { "value", division() / 64 } },
QVariantMap { { "title", qtrc("appshell", "256th") }, { "value", division() / 64 } },
QVariantMap { { "title", qtrc("appshell", "512th") }, { "value", division() / 128 } },
QVariantMap { { "title", qtrc("appshell", "1024th") }, { "value", division() / 256 } }
};
Expand Down
7 changes: 7 additions & 0 deletions src/engraving/libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,13 @@ TextBase* Score::addText(Tid type)
text = "<sym>metNote64thUp</sym> = 80";
}
break;
case 128:
if (f.numerator() % 3 == 0) {
text = "<sym>metNote64ndUp</sym><sym>space</sym><sym>metAugmentationDot</sym> = 80";
} else {
text = "<sym>metNote128thUp</sym> = 80";
}
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static void fillGap(Measure* measure, int track, const Fraction& tstart, const F
// qDebug("\nfillGIFV fillGap(measure %p track %d tstart %d tend %d) restLen %d len",
// measure, track, tstart, tend, restLen);
// note: as MScore::division (#ticks in a quarter note) equals 480
// MScore::division / 64 (#ticks in a 256th note) uequals 7.5 but is rounded down to 7
// MScore::division / 64 (#ticks in a 256th note) equals 7.5 but is rounded down to 7
while (restLen > Fraction(1, 256)) {
Fraction len = restLen;
TDuration d(TDuration::DurationType::V_INVALID);
Expand Down
9 changes: 9 additions & 0 deletions src/notation/internal/masternotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,15 @@ mu::Ret MasterNotation::setupNewScore(Ms::MasterScore* score, Ms::MasterScore* t
bpm *= 16;
}
break;
case 128:
if (ts.numerator() % 3 == 0) {
text = "<sym>metNote64ndUp</sym><sym>space</sym><sym>metAugmentationDot</sym> = %1";
bpm *= 6;
} else {
text = "<sym>metNote128thUp</sym> = %1";
bpm *= 16;
}
break;
default:
break;
}
Expand Down
4 changes: 4 additions & 0 deletions src/palette/view/widgets/timedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ int TimeDialog::denominator2Idx(int denominator) const
break;
case 64: val = 6;
break;
case 128: val = 7;
break;
}
return val;
}
Expand All @@ -197,6 +199,8 @@ int TimeDialog::denominator() const
break;
case 6: val = 64;
break;
case 7: val = 128;
break;
}
return val;
}
Expand Down
5 changes: 5 additions & 0 deletions src/palette/view/widgets/timedialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@
<string>64</string>
</property>
</item>
<item>
<property name="text">
<string>128</string>
</property>
</item>
</widget>
</item>
</layout>
Expand Down
2 changes: 1 addition & 1 deletion src/project/view/additionalinfomodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ QVariantMap AdditionalInfoModel::measureCountRange() const

QVariantList AdditionalInfoModel::timeSignatureDenominators() const
{
return QVariantList { 1, 2, 4, 8, 16, 32, 64 };
return QVariantList { 1, 2, 4, 8, 16, 32, 64, 128 };
}

void AdditionalInfoModel::setKeySignature(QVariantMap keySignature)
Expand Down

0 comments on commit 6ec236a

Please sign in to comment.