Skip to content

Commit

Permalink
Update to ms3 (#9)
Browse files Browse the repository at this point in the history
closes #8: making the plugin compatible with MuseScore 3
* Ensure at least v3.0.5 is used
* fixed up dropdown text symbol reference and alignment
* updated translations for Qt5.12/MVSC_64 toolchain Dutch
  • Loading branch information
jeetee committed Mar 18, 2019
1 parent fb9928d commit 2294115
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 53 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MuseScore TempoChanges
This plugin uses the hidden tempo texts technique to simulate linear tempo changes such as accelerando and ritradando in [MuseScore](https://musescore.org). The technique itself is taken straight out of [the online handbook](https://musescore.org/en/handbook/tempo-0#ritardando-accelerando).
This plugin uses the hidden tempo texts technique to simulate linear tempo changes such as accelerando and ritradando in [MuseScore](https://musescore.org). The technique itself is taken straight out of [the online handbook](https://musescore.org/en/handbook/tempo#ritardando-accelerando).

More info and installation instructions to be found at [the project page on musescore.org](https://musescore.org/nl/project/tempochanges).
More info and installation instructions to be found at [the project page on musescore.org](https://musescore.org/project/tempochanges).

Tested with MuseScore 2.0.2, should work on 2.0+
Tested with MuseScore 3.0.5
46 changes: 23 additions & 23 deletions TempoChanges.qml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
//=============================================================================
// TempoChanges Plugin
//
// Based on the principle of hidden tempo markings mentioned in the 2.0 handbook
// Based on the principle of hidden tempo markings mentioned in the handbook
// Attempts to create a linear ritartando or accelerando
//
// Copyright (C) 2016 Johan Temmerman (jeetee)
// Copyright (C) 2016-2019 Johan Temmerman (jeetee)
//=============================================================================
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.3
import QtQuick.Layouts 1.1

import MuseScore 1.0
import MuseScore 3.0

MuseScore {
menuPath: "Plugins.TempoChanges"
version: "2.3.1"
description: qsTr("Creates linear hidden tempo markers.\nSee also: https://musescore.org/en/handbook/tempo-0#ritardando-accelerando")
version: "3.0.0"
description: qsTr("Creates linear hidden tempo markers.\nSee also: https://musescore.org/en/handbook/tempo#ritardando-accelerando")
pluginType: "dialog"
//requiresScore: true //not supported before 2.1.0, manual checking onRun
requiresScore: true

width: 240
height: 240

onRun: {
if (!curScore) {
console.log(qsTranslate("Ms::MuseScore", "No score open.\nThis plugin requires an open score to run.\n"));
if ((mscoreMajorVersion == 3) && (mscoreMinorVersion == 0) && (mscoreUpdateVersion < 5)) {
console.log(qsTr("Unsupported MuseScore version.\nTempoChanges needs v3.0.5 or above.\n"));
Qt.quit();
}
}
Expand Down Expand Up @@ -198,28 +198,28 @@ MuseScore {
model: ListModel {
id: beatBaseList
//mult is a tempo-multiplier compared to a crotchet
//ListElement { text: '\uE1D0'; mult: 8 ; sym: '<sym>metNoteDoubleWhole</sym>' } // 2/1
ListElement { text: '\uE1D2'; mult: 4 ; sym: '<sym>metNoteWhole</sym>' } // 1/1
//ListElement { text: '\uE1D3 \uE1E7 \uE1E7'; mult: 3.5 ; sym: '<sym>metNoteHalfUp</sym><sym>metAugmentationDot</sym><sym>metAugmentationDot</sym>' } // 1/2..
ListElement { text: '\uE1D3 \uE1E7'; mult: 3 ; sym: '<sym>metNoteHalfUp</sym><sym>metAugmentationDot</sym>' } // 1/2.
ListElement { text: '\uE1D3'; mult: 2 ; sym: '<sym>metNoteHalfUp</sym>' } // 1/2
ListElement { text: '\uE1D5 \uE1E7 \uE1E7'; mult: 1.75 ; sym: '<sym>metNoteQuarterUp</sym><sym>metAugmentationDot</sym><sym>metAugmentationDot</sym>' } // 1/4..
ListElement { text: '\uE1D5 \uE1E7'; mult: 1.5 ; sym: '<sym>metNoteQuarterUp</sym><sym>metAugmentationDot</sym>' } // 1/4.
ListElement { text: '\uE1D5'; mult: 1 ; sym: '<sym>metNoteQuarterUp</sym>' } // 1/4
ListElement { text: '\uE1D7 \uE1E7 \uE1E7'; mult: 0.875 ; sym: '<sym>metNote8thUp</sym><sym>metAugmentationDot</sym><sym>metAugmentationDot</sym>' } // 1/8..
ListElement { text: '\uE1D7 \uE1E7'; mult: 0.75 ; sym: '<sym>metNote8thUp</sym><sym>metAugmentationDot</sym>' } // 1/8.
ListElement { text: '\uE1D7'; mult: 0.5 ; sym: '<sym>metNote8thUp</sym>' } // 1/8
ListElement { text: '\uE1D9 \uE1E7 \uE1E7'; mult: 0.4375; sym: '<sym>metNote16thUp</sym><sym>metAugmentationDot</sym><sym>metAugmentationDot</sym>' } //1/16..
ListElement { text: '\uE1D9 \uE1E7'; mult: 0.375 ; sym: '<sym>metNote16thUp</sym><sym>metAugmentationDot</sym>' } //1/16.
ListElement { text: '\uE1D9'; mult: 0.25 ; sym: '<sym>metNote16thUp</sym>' } //1/16
//ListElement { text: '\uECA0'; mult: 8 ; sym: '<sym>metNoteDoubleWhole</sym>' } // 2/1
ListElement { text: '\uECA2'; mult: 4 ; sym: '<sym>metNoteWhole</sym>' } // 1/1
//ListElement { text: '\uECA3 \uE1E7 \uE1E7'; mult: 3.5 ; sym: '<sym>metNoteHalfUp</sym><sym>metAugmentationDot</sym><sym>metAugmentationDot</sym>' } // 1/2..
ListElement { text: '\uECA3 \uECB7'; mult: 3 ; sym: '<sym>metNoteHalfUp</sym><sym>metAugmentationDot</sym>' } // 1/2.
ListElement { text: '\uECA3'; mult: 2 ; sym: '<sym>metNoteHalfUp</sym>' } // 1/2
ListElement { text: '\uECA5 \uECB7 \uECB7'; mult: 1.75 ; sym: '<sym>metNoteQuarterUp</sym><sym>metAugmentationDot</sym><sym>metAugmentationDot</sym>' } // 1/4..
ListElement { text: '\uECA5 \uECB7'; mult: 1.5 ; sym: '<sym>metNoteQuarterUp</sym><sym>metAugmentationDot</sym>' } // 1/4.
ListElement { text: '\uECA5'; mult: 1 ; sym: '<sym>metNoteQuarterUp</sym>' } // 1/4
ListElement { text: '\uECA7 \uECB7 \uECB7'; mult: 0.875 ; sym: '<sym>metNote8thUp</sym><sym>metAugmentationDot</sym><sym>metAugmentationDot</sym>' } // 1/8..
ListElement { text: '\uECA7 \uECB7'; mult: 0.75 ; sym: '<sym>metNote8thUp</sym><sym>metAugmentationDot</sym>' } // 1/8.
ListElement { text: '\uECA7'; mult: 0.5 ; sym: '<sym>metNote8thUp</sym>' } // 1/8
ListElement { text: '\uECA9 \uECB7 \uECB7'; mult: 0.4375; sym: '<sym>metNote16thUp</sym><sym>metAugmentationDot</sym><sym>metAugmentationDot</sym>' } //1/16..
ListElement { text: '\uECA9 \uECB7'; mult: 0.375 ; sym: '<sym>metNote16thUp</sym><sym>metAugmentationDot</sym>' } //1/16.
ListElement { text: '\uECA9'; mult: 0.25 ; sym: '<sym>metNote16thUp</sym>' } //1/16
}
currentIndex: 5
implicitHeight: 42
style: ComboBoxStyle {
font.family: 'MScore Text'
font.pointSize: 18
padding.top: 5
padding.bottom: -10
padding.bottom: 5
}
}

Expand Down
4 changes: 2 additions & 2 deletions translations/generating these qm files.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set PATH=%PATH%;C:\Qt\5.6\mingw49_32\bin;C:\Qt\5.4\mingw491_32\bin
lrelease.exe -nounfinished locale_*.ts
set PATH=%PATH%;C:\Qt\5.12.2\msvc2017_64\bin
lrelease.exe -nounfinished locale_nl.ts locale_de.ts
PAUSE
2 changes: 1 addition & 1 deletion translations/generating these ts files.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REM add more local_xx.ts files to this string when required
set PATH=%PATH%;C:\Qt\5.6\mingw49_32\bin;C:\Qt\5.4\mingw491_32\bin
set PATH=%PATH%;C:\Qt\5.12.2\msvc2017_64\bin
lupdate.exe -locations relative -no-obsolete ../ -ts locale_de.ts
lupdate.exe -locations relative -no-obsolete ../ -ts locale_nl.ts
PAUSE
Binary file modified translations/locale_de.qm
Binary file not shown.
22 changes: 11 additions & 11 deletions translations/locale_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@
<context>
<name>Ms::MuseScore</name>
<message>
<location filename="../TempoChanges.qml" line="+28"/>
<source>No score open.
This plugin requires an open score to run.
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+157"/>
<location filename="../TempoChanges.qml" line="+185"/>
<source>Staff Text</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -29,12 +22,19 @@ This plugin requires an open score to run.
<message>
<location line="-230"/>
<source>Creates linear hidden tempo markers.
See also: https://musescore.org/en/handbook/tempo-0#ritardando-accelerando</source>
See also: https://musescore.org/en/handbook/tempo#ritardando-accelerando</source>
<translation>Erzeugt lineare versteckte Tempomarkierungen.
Siehe auch: https://musescore.org/de/handbuch/tempo-0#ritardando-accelerando</translation>
Siehe auch: https://musescore.org/de/node/278604#ritardando-accelerando</translation>
</message>
<message>
<location line="+9"/>
<source>Unsupported MuseScore version.
TempoChanges needs v3.0.5 or above.
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+175"/>
<location line="+166"/>
<source>BPM beat:</source>
<translation>BPM Schläge:</translation>
</message>
Expand Down
Binary file modified translations/locale_nl.qm
Binary file not shown.
27 changes: 14 additions & 13 deletions translations/locale_nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@
<context>
<name>Ms::MuseScore</name>
<message>
<location filename="../TempoChanges.qml" line="+28"/>
<source>No score open.
This plugin requires an open score to run.
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+157"/>
<location filename="../TempoChanges.qml" line="+185"/>
<source>Staff Text</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -29,13 +22,21 @@ This plugin requires an open score to run.
<message>
<location line="-230"/>
<source>Creates linear hidden tempo markers.
See also: https://musescore.org/en/handbook/tempo-0#ritardando-accelerando</source>
<translatorcomment>Nederlands handboek heeft (nog) geen item over rit-accel</translatorcomment>
<translation>Maakt onzichtbare tempo text elementen aan.
Zie ook: https://musescore.org/nl/handboek/tempo-0</translation>
See also: https://musescore.org/en/handbook/tempo#ritardando-accelerando</source>
<translation>Maakt verborgen tempomarkeringen aan.
Zie ook: https://musescore.org/nl/node/278604#ritardando-accelerando</translation>
</message>
<message>
<location line="+9"/>
<source>Unsupported MuseScore version.
TempoChanges needs v3.0.5 or above.
</source>
<translation>MuseScore versie niet ondersteund.
Versie 3.0.5 of hoger is vereist.
</translation>
</message>
<message>
<location line="+175"/>
<location line="+166"/>
<source>BPM beat:</source>
<translation>BPM tel:</translation>
</message>
Expand Down

0 comments on commit 2294115

Please sign in to comment.