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 a typo found while searching for the old 64th limit

Backport of musescore#8894, part 4
  • Loading branch information
Jojo-Schmitz committed May 12, 2022
1 parent dd81ad4 commit 4f1f138
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion importexport/musicxml/importmxmlpass2.cpp
Expand Up @@ -265,7 +265,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
10 changes: 10 additions & 0 deletions mscore/file.cpp
Expand Up @@ -965,6 +965,16 @@ MasterScore* MuseScore::getNewFile()
bpm *= 16;
}
break;
case 128:
if (ts.numerator() % 3 == 0) {
text = "<sym>metNote64ndUp</sym><sym>space</sym><sym>metAugmentationDot</sym> = %1";
bpm *= 9;
}
else {
text = "<sym>metNote128thUp</sym> = %1";
bpm *= 32;
}
break;
default:
break;
}
Expand Down
6 changes: 6 additions & 0 deletions mscore/menus.cpp
Expand Up @@ -1935,6 +1935,12 @@ void MuseScore::addTempo()
else
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
2 changes: 2 additions & 0 deletions mscore/timedialog.cpp
Expand Up @@ -158,6 +158,7 @@ int TimeDialog::denominator2Idx(int denominator) const
case 16: val = 4; break;
case 32: val = 5; break;
case 64: val = 6; break;
case 128:val = 7; break;
}
return val;
}
Expand All @@ -177,6 +178,7 @@ int TimeDialog::denominator() const
case 4: val = 16; break;
case 5: val = 32; break;
case 6: val = 64; break;
case 7: val = 128; break;
}
return val;
}
Expand Down
5 changes: 5 additions & 0 deletions mscore/timedialog.ui
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
10 changes: 9 additions & 1 deletion mscore/timesigwizard.ui
Expand Up @@ -143,6 +143,11 @@
<string>64</string>
</property>
</item>
<item>
<property name="text">
<string>128</string>
</property>
</item>
</widget>
</item>
<item>
Expand Down Expand Up @@ -490,6 +495,9 @@
<tabstop>tempoGroup</tabstop>
<tabstop>spinboxTempo</tabstop>
</tabstops>
<resources/>
<resources>
<include location="musescore.qrc"/>
<include location="musescore.qrc"/>
</resources>
<connections/>
</ui>

0 comments on commit 4f1f138

Please sign in to comment.