diff --git a/soloanalyser/soloanalyser-clear44.qml b/soloanalyser/soloanalyser-clear44.qml new file mode 100644 index 0000000..7732060 --- /dev/null +++ b/soloanalyser/soloanalyser-clear44.qml @@ -0,0 +1,62 @@ +import QtQuick 2.9 +import MuseScore 3.0 +// import Qt.labs.settings 1.0 +import "selectionhelper.js" as SelHelper +import "notehelper.js" as NoteHelper +import "chordanalyser.js" as ChordHelper +import "core.js" as Core + +/********************** +/* Parking B - MuseScore - Solo Analyser plugin - MuseScore 4.4 version +/* ChangeLog: +/* - 1.0.0: Initial release (extract from SoloAnalyser-Interactive) +/* - 1.0.1: Qt.quit issue +/* - 1.0.2: Port to MuseScore 4.0 +/* - 1.0.2: New plugin folder strucutre +/**********************************************/ + +MuseScore { + menuPath: "Plugins.Solo Analyser." + pluginName + description: "Colors and names the notes based on their role if chords/harmonies." + version: "1.0.2" + + readonly property var pluginName: "Clear" + + id: mainWindow + + //4.4 title: "Solo Analyser-Clear" + //4.4 thumbnailName: "logoSoloAnalyserClear.png" + //4.4 categoryCode: "color-notes" + + + Component.onCompleted : { + if (mscoreMajorVersion >= 4 && mscoreMajorVersion<=3) { + mainWindow.title = "Solo Analyser "+pluginName; + mainWindow.thumbnailName = "logoSoloAnalyserClear.png"; + mainWindow.categoryCode = "color-notes"; + } + } + + onRun: { + Core.clearAnalyse(); + } + + Settings { + id: settings + category: "SoloAnalyser" + // in options + property var rootColor: Core.defRootColor + property var bassColor: Core.defBassColor + property var chordColor: Core.defChordColor + property var scaleColor: Core.defScaleColor + property var errorColor: Core.defErrorColor + property var alteredColor: Core.defAlteredColor + property var colorNotes: Core.defColorNotes + property var nameNotes: Core.defNameNotes + property var textType : Core.defTextType + property var useBelowSymbols : Core.defUseBelowSymbols + property var useAboveSymbols : Core.defUseAboveSymbols + property var lookAhead : Core.defLookAhead + } + +} \ No newline at end of file diff --git a/soloanalyser/soloanalyser-interactive44.qml b/soloanalyser/soloanalyser-interactive44.qml new file mode 100644 index 0000000..afb3266 --- /dev/null +++ b/soloanalyser/soloanalyser-interactive44.qml @@ -0,0 +1,529 @@ +import QtQuick +import QtQuick.Controls +import MuseScore 3.0 +// import QtQuick.Window 2.2 +import QtQuick.Dialogs +// import QtQuick.Controls.Styles 1.4 +import QtQuick.Layouts +// import Qt.labs.settings 1.0 + +import "selectionhelper.js" as SelHelper +import "notehelper.js" as NoteHelper +import "chordanalyser.js" as ChordHelper +import "core.js" as Core + +/********************** +/* Parking B - MuseScore - Solo Analyser plugin - MuseScore 4.4 version +/* ---- Non functionning !!! ---- +/* ChangeLog: +/* - 1.3.0: Initial version based on SoloAnalyser 1.3.0 +/* - 1.3.1: New altered notes color +/* - 1.4.0: Multi track and voices +/* - 1.4.0: Settings for the multi track and voices +/* - 1.4.1: Bug with some transposing instruments +/* - 1.4.2: Don't analyse the right selection if the selection is further than a certain point in the score +/* - 1.4.2: Bug when first note is far beyond the first chord symbol +/* - 1.4.2: LookAhead option + new UI layout +/* - 1.4.3: New plugin menu's structure +/* - 1.4.3: Qt.quit issue +/* - 1.4.3: (see Core.js log 1.2.3) +/* - 1.4.4: IgnoreBrackettedChords option +/* - 1.4.4: Qt.quit issue +/* - 1.4.5: Don't analyse drum staves +/* - 1.4.6: Port to MuseScore 4.0 +/* - 1.4.6: New plugin folder strucutre +/* - 1.4.8: New option for not using chords preceeding the selection +/* - 1.4.9: loopBack option not correctly saved to the settings +/* - 1.4.10: (see Core.js log 1.2.8) +/* - 1.4.10: (see ChordAnalyser.js log 1.2.22) +/* - 1.4.11: (see ChordAnalyser.js log 1.2.23+24) +/**********************************************/ + +MuseScore { + menuPath: "Plugins.Solo Analyser." + pluginName + description: "Colors and names the notes based on their role if chords/harmonies." + version: "1.4.11" + + readonly property var pluginName: qsTr("Interactive") + + pluginType: "dialog" + width: mainRow.childrenRect.width + mainRow.anchors.leftMargin + mainRow.anchors.rightMargin + height: mainRow.childrenRect.height + mainRow.anchors.topMargin + mainRow.anchors.bottomMargin + + id: mainWindow + + //4.4 title: "Solo Analyser-Interactive" + //4.4 thumbnailName: "logoSoloAnalyserInteractive.png" + //4.4 categoryCode: "color-notes" + + + Component.onCompleted : { + if (mscoreMajorVersion >= 4 && mscoreMajorVersion<=3) { + mainWindow.title = "Solo Analyser "+pluginName; + mainWindow.thumbnailName = "logoSoloAnalyserInteractive.png"; + mainWindow.categoryCode = "color-notes"; + } + } + + onRun: { + // 1) Read config file + // AUTOMATIC + + // 2) push to screen + + select(lstColorNote, settings.colorNotes); + select(lstNameNote, settings.nameNotes); + select(lstFormText, settings.textType); + + rootColorChosser.color = settings.rootColor; + bassColorChosser.color = settings.bassColor; + chordColorChosser.color = settings.chordColor; + scaleColorChosser.color = settings.scaleColor; + alteredColorChosser.color = settings.alteredColor; + // errorColorChosser.color = settings.errorColor; + + chkUseAboveSymbols.checked = settings.useAboveSymbols; + chkUseBelowSymbols.checked = settings.useBelowSymbols; + chkLookAhead.checked = settings.lookAhead; + chkLookBack.checked = settings.lookBack; + chkIgnoreBrackettedChords.checked = settings.ignoreBrackettedChords; + + } + + function select(control, value) { + var index = 0; + for (var i = 0; i < control.model.length; i++) { + if (control.model[i].value == value) { + index = i; + break; + } + } + control.currentIndex = index; + + } + function get(control) { + return control.model[control.currentIndex].value; + + } + + Settings { + id: settings + category: "SoloAnalyser" + // in options + property var rootColor: Core.defRootColor + property var bassColor: Core.defBassColor + property var chordColor: Core.defChordColor + property var scaleColor: Core.defScaleColor + property var errorColor: Core.defErrorColor + property var alteredColor: Core.defAlteredColor + property var colorNotes: Core.defColorNotes + property var nameNotes: Core.defNameNotes + property var textType: Core.defTextType + property var useBelowSymbols: Core.defUseBelowSymbols + property var useAboveSymbols: Core.defUseAboveSymbols + property var lookAhead: Core.defLookAhead + property var lookBack: Core.defLookBack + property var ignoreBrackettedChords: Core.defIgnoreBrackettedChords + } + + GridLayout { + id: mainRow + anchors.fill: parent + anchors.topMargin: 20 + anchors.leftMargin: 20 + anchors.rightMargin: 20 + anchors.bottomMargin: 10 + + columns: 2 + columnSpacing: 5 + + + GroupBox { + title: qsTranslate("GenericUI", "Rendering options...") + //Layout.margins: 5 + Layout.alignment: Qt.AlignTop | Qt.AlignLeft + GridLayout { + columnSpacing: 5 + + rowSpacing: 10 + columns: 2 + + Layout.fillHeight: true + Layout.fillWidth: true + + NiceLabel { + text: qsTranslate("GenericUI", "Note coloring :")+" " + //Tooltip.text : qsTranslate("GenericUI", "Color all notes or only the ones defined by the chord"); + Layout.alignment: Qt.AlignLeft + Layout.fillHeight: false + } + + NiceComboBox { + //Layout.fillWidth : true + id: lstColorNote + model: [{ + 'value': "none", + 'text': qsTranslate("GenericUI", "None - Don't color notes") + }, { + 'value': "chord", + 'text': qsTranslate("GenericUI", "Chord - Color the notes present in the chord") + }, { + 'value': "all", + 'text': qsTranslate("GenericUI", "Scale - Color the notes defined by the scale") + } + ] + + } + + NiceLabel { + text: qsTranslate("GenericUI", "Note name :")+" " + //Tooltip.text : qsTranslate("GenericUI", "Name all notes or only the ones defined by the chord"); + Layout.alignment: Qt.AlignLeft + Layout.fillHeight: false + } + + NiceComboBox { + //Layout.fillWidth : true + id: lstNameNote + model: [{ + 'value': "none", + 'text': qsTranslate("GenericUI", "None - Don't name notes") + }, { + 'value': "chord", + 'text': qsTranslate("GenericUI", "Chord - Name the notes present by the chord") + }, { + 'value': "all", + 'text': qsTranslate("GenericUI", "Scale - Name the notes defined by the scale") + } + ] + + } + + NiceLabel { + text: qsTranslate("GenericUI", "Root :")+" " + } + Rectangle { + id: rootColorChosser + width: 50 + height: 30 + color: "gray" + MouseArea { + anchors.fill: parent + onClicked: { + colorDialog.color = rootColorChosser.color + colorDialog.target = rootColorChosser; + colorDialog.open(); + } + } + } + + NiceLabel { + text: qsTranslate("GenericUI", "Bass :")+" " + } + Rectangle { + id: bassColorChosser + width: 50 + height: 30 + color: "gray" + MouseArea { + anchors.fill: parent + onClicked: { + colorDialog.color = bassColorChosser.color + colorDialog.target = bassColorChosser; + colorDialog.open(); + } + } + } + + NiceLabel { + text: qsTranslate("GenericUI", "Chord :")+" " + } + Rectangle { + id: chordColorChosser + width: 50 + height: 30 + color: "gray" + MouseArea { + anchors.fill: parent + onClicked: { + colorDialog.color = chordColorChosser.color + colorDialog.target = chordColorChosser; + colorDialog.open(); + } + } + } + + NiceLabel { + text: qsTranslate("GenericUI", "Altered :")+" " + } + Rectangle { + id: alteredColorChosser + width: 50 + height: 30 + color: "gray" + MouseArea { + anchors.fill: parent + onClicked: { + colorDialog.color = alteredColorChosser.color + colorDialog.target = alteredColorChosser; + colorDialog.open(); + } + } + } + + NiceLabel { + text: qsTranslate("GenericUI", "Scale :")+" " + } + Rectangle { + id: scaleColorChosser + width: 50 + height: 30 + color: "gray" + MouseArea { + anchors.fill: parent + onClicked: { + colorDialog.color = scaleColorChosser.color + colorDialog.target = scaleColorChosser; + colorDialog.open(); + } + } + } + + /*NiceLabel { + text: "Invalid : " + } + Rectangle { + id: errorColorChosser + width: 50 + height: 30 + color: "gray" + MouseArea { + anchors.fill: parent + onClicked: { + colorDialog.color = errorColorChosser.color + colorDialog.target = errorColorChosser; + colorDialog.open(); + } + } + }*/ + + NiceLabel { + text: qsTranslate("GenericUI", "Text form :")+" " + } + + NiceComboBox { + id: lstFormText + model: [{ + value: "fingering", + text: qsTranslate("GenericUI", "As fingering") + }, { + value: "lyrics", + text: qsTranslate("GenericUI", "As lyrics") + } + ] + + } + } + } + + GroupBox { + title: qsTranslate("GenericUI", "Analyze options...") + Layout.alignment: Qt.AlignTop | Qt.AlignRight + GridLayout { + + columnSpacing: 10 + rowSpacing: 10 + Layout.fillWidth: true + + columns: 1 + + Flow { + SmallCheckBox { + id: chkLookAhead + text: qsTranslate("GenericUI", "Look ahead") + hoverEnabled: true + ToolTip.visible: hovered + ToolTip.text: qsTranslate("GenericUI", "Use the next chord if no previous chord has been found (e.g. anacrusis)") + } + } + + Flow { + SmallCheckBox { + id: chkLookBack + text: qsTranslate("GenericUI", "Look back") + hoverEnabled: true + ToolTip.visible: hovered + ToolTip.text: qsTranslate("GenericUI", "Use chords symbols preceeding the selection. Useful when the chord symbol to use is defined before the selection to analyse.") + } + } + + Flow { + SmallCheckBox { + id: chkUseAboveSymbols + text: qsTranslate("GenericUI", "Allow using preceeding staves chord symbols") + hoverEnabled: true + ToolTip.visible: hovered + ToolTip.text: qsTranslate("GenericUI", "
If a staff has no chord symbols, use the chord symbols of the first
preceeding staff having chord symbols.
Remark: When these options are used, SoloAnalyzer must be used
preferably in Concert pitch
If a staff has no chord symbols, use the chord symbols of the first
following staff having chord symbols.
Remark: When these options are used, SoloAnalyzer must be used
preferably in Concert pitch