Skip to content

Commit

Permalink
Merge pull request #5 from pklion/muse4
Browse files Browse the repository at this point in the history
Add support for MuseScore 4
  • Loading branch information
nozomu-y authored Jan 5, 2024
2 parents 7458cdc + 0db97a2 commit 4e276fa
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Movable Do Plugin for MuseScore 3
# Movable Do Plugin for MuseScore 3 / 4

指定された調性をもとに移動ドを振る MuseScore 3 のプラグインです。
指定された調性をもとに移動ドを振る MuseScore 3 / 4 のプラグインです。

## インストール

`movable-do.qml`[ダウンロード](https://github.com/nozomu-y/MovableDo/releases/download/v1.4/movable-do.qml)し、[MuseScore のハンドブック](https://musescore.org/ja/%E3%83%8F%E3%83%B3%E3%83%89%E3%83%96%E3%83%83%E3%82%AF/furakuin#installation)を参考にインストールしてください。

MuseScore 4 での導入の際は、「プラグイン」フォルダ内に**更にもう一階層フォルダを作成**し、その中に `movable-do.qml` を移動してください。

## デモ

![demo](https://github.com/nozomu-y/MovableDo/blob/media/demo.gif?raw=true)
35 changes: 28 additions & 7 deletions movable-do.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,31 @@
// License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
//=============================================================================

import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2

import MuseScore 3.0
import MuseScore.UiComponents 1.0

MuseScore {

id: root

version: "1.4"
description: "This plugin inserts movable do texts derived from the given tonality"
menuPath: "Plugins.MovableDo"

Component.onCompleted: {
if (mscoreMajorVersion >= 4) {
title = "Movable Do";
}
}

property int tonalityIndex: -1
property int notationIndex: -1

// Small note name size is fraction of the full font size.
property real fontSizeMini: 0.7

Expand Down Expand Up @@ -307,7 +320,7 @@ MuseScore {
id: form
width: exporterColumn.width + 30
height: exporterColumn.height + 30
color: "lightgray"
color: (mscoreMajorVersion < 4 ? "lightgray" : "#F5F5F6")
ColumnLayout {
id: exporterColumn
GridLayout {
Expand All @@ -318,21 +331,29 @@ MuseScore {
Label {
text: qsTr('調性')
}
ComboBox {
StyledDropdown {
id: tonality
model: [
"C-Dur", "G-Dur", "D-Dur", "A-Dur", "E-Dur", "H-Dur", "Fis-Dur", "Cis-Dur", "F-Dur", "B-Dur", "Es-Dur", "As-Dur", "Des-Dur", "Ges-Dur", "Ces-Dur",
"a-moll", "e-moll", "h-moll", "fis-moll", "cis-moll", "gis-moll", "dis-moll", "ais-moll", "d-moll", "g-moll", "c-moll", "f-moll", "b-moll", "es-moll", "as-moll"
]
currentIndex: root.tonalityIndex
onActivated: function(index) {
root.tonalityIndex = index
}
}
Label {
text: qsTr('表記')
}
ComboBox {
StyledDropdown {
id: notation
model: ["d r m", "ド レ ミ"]
currentIndex: root.notationIndex
onActivated: function(index) {
root.notationIndex = index
}
}
Button {
FlatButton {
id: button
text: qsTr("決定")
onClicked: {
Expand All @@ -342,7 +363,7 @@ MuseScore {
notation.currentIndex)
curScore.endCmd()
tonalityDialog.visible = false
Qt.quit()
quit()
}
}
}
Expand Down

0 comments on commit 4e276fa

Please sign in to comment.