From 80f2332dcc1b4908559cb798c9615790820f98ad Mon Sep 17 00:00:00 2001 From: lasconic Date: Thu, 7 Feb 2019 11:29:37 +0100 Subject: [PATCH 1/4] port to MuseScore 3. Remove placement feature for now. --- README.md | 12 ++-- harmonica_chromatic_C_12h.js | 53 ---------------- harmonica_chromatic_C_16h.js | 54 ----------------- harmonica_diatonic_A.js | 53 ---------------- harmonica_diatonic_Bb.js | 53 ---------------- harmonica_diatonic_C.js | 53 ---------------- harmonica_diatonic_D.js | 53 ---------------- harmonica_diatonic_F.js | 53 ---------------- harmonica_diatonic_G.js | 53 ---------------- harmonica_hohner_highlander_D.js | 53 ---------------- harmonica_master_hohner_highlander_A.js | 81 ------------------------- harmonica_tablature.qml | 54 ++++++++--------- 12 files changed, 30 insertions(+), 595 deletions(-) delete mode 100644 harmonica_chromatic_C_12h.js delete mode 100644 harmonica_chromatic_C_16h.js delete mode 100644 harmonica_diatonic_A.js delete mode 100644 harmonica_diatonic_Bb.js delete mode 100644 harmonica_diatonic_C.js delete mode 100644 harmonica_diatonic_D.js delete mode 100644 harmonica_diatonic_F.js delete mode 100644 harmonica_diatonic_G.js delete mode 100644 harmonica_hohner_highlander_D.js delete mode 100644 harmonica_master_hohner_highlander_A.js diff --git a/README.md b/README.md index ba5cb5a..5a9f7ad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -This is a plugin for MuseScore 1.2 to add harmonica tablature notation below the notes. It currently supports - +This is a plugin for MuseScore 3 to add harmonica tablature notation below the notes. It currently supports + * the Hohner Highlander only, for both side, A highlander and D - [Reference](http://musescore.org/sites/musescore.org/files/Hohner%20Highlander%20scale.jpg) * Diatonic A - [Reference](http://harmopoint.com/harmonica-virtuel/) [and for overblows and overdraws](http://www.overblow.com/?menuid=26) * Diatonic Bb - [Reference](http://musescore.org/sites/musescore.org/files/Lee%20Oskar%20Diatonic%20Bb.jpg) [and for overblows and overdraws](http://www.overblow.com/?menuid=26) @@ -20,12 +20,12 @@ If you want to have your harmonica added to the it, please contact me, or better * ' = halfstep bend * " = whole step bend * "' = 3 halfsteps bend -* +X° = overblow -* -X° = overdraw +* +X? = overblow +* -X? = overdraw * "<" = slide -Bends, over blow, over draw may be supported if it's the only way to play the note. -If there are two holes for one note, a choice has been made (draw) +Bends, over blow, over draw may be supported if it's the only way to play the note. +If there are two holes for one note, a choice has been made (draw) ##More info See the official [project page](http://musescore.org/en/project/harmonicatablature) diff --git a/harmonica_chromatic_C_12h.js b/harmonica_chromatic_C_12h.js deleted file mode 100644 index b5fb50e..0000000 --- a/harmonica_chromatic_C_12h.js +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 60 C C# D D# E F F# G G# A A# B -var holes = ["+1", "<+1", "-1", "<-1", "+2", "-2", "<-2", "+3", "<+3", "-3", "<-3", "-4", - "+4", "<+4", "-5", "<-5", "+6", "-6", "<-6", "+7", "<+7", "-7", "<-7", "-8", - "+8", "<+8", "-9", "<-9", "+10", "-10", "<-10", "+11", "<+11", "-11", "<-11", "-12", - "+12", "<+12", "<-12" -]; - -var shift = 60; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Chromatic C 12 holes', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_chromatic_C_16h.js b/harmonica_chromatic_C_16h.js deleted file mode 100644 index 73c09aa..0000000 --- a/harmonica_chromatic_C_16h.js +++ /dev/null @@ -1,54 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 48 C C# D D# E F F# G G# A A# B -var holes = ["+1", "<+1", "-1", "<-1", "+2", "-2", "<-2", "+3", "<+3", "-3", "<-3", "-4", - "+4", "<+4", "-5", "<-5", "+6", "-6", "<-6", "+7", "<+7", "-7", "<-7", "-8", - "+8", "<+8", "-9", "<-9", "+10", "-10", "<-10", "+11", "<+11", "-11", "<-11", "-12", - "+12", "<+12", "-13", "<-13", "+14", "-14", "<-14", "+15", "<+15", "-15", "<-15", "-16", - "+16" -]; - -var shift = 48; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Chromatic C 16 holes', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_diatonic_A.js b/harmonica_diatonic_A.js deleted file mode 100644 index deb2588..0000000 --- a/harmonica_diatonic_A.js +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 57 A Bb B C C# D Eb E F F# G Ab -var holes = ["+1", "-1'", "-1", "+1°", "+2", "-2\"", "-2'", "-2", "-3\"'", "-3\"", "-3'", "-3", - "+4", "-4'", "-4", "+4°", "+5", "-5", "+5°", "+6", "-6'", "-6", "+6°", "-7", - "+7", "-7°", "-8", "+8'", "+8", "-9", "+9'", "+9", "-9°", "-10", "+10\"", "+10'", - "+10" -]; - -var shift = 57; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Diatonic A', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_diatonic_Bb.js b/harmonica_diatonic_Bb.js deleted file mode 100644 index 46c4584..0000000 --- a/harmonica_diatonic_Bb.js +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 58 Bb B C Db D Eb E F Gb G Ab A -var holes = ["+1", "-1'", "-1", "+1°", "+2", "-2\"", "-2'", "-2", "-3\"'", "-3\"", "-3'", "-3", - "+4", "-4'", "-4", "+4°", "+5", "-5", "+5°", "+6", "-6'", "-6", "+6°", "-7", - "+7", "-7°", "-8", "+8'", "+8", "-9", "+9'", "+9", "-9°", "-10", "+10\"", "+10'", - "+10" -]; - -var shift = 58; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Diatonic Bb', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_diatonic_C.js b/harmonica_diatonic_C.js deleted file mode 100644 index 7beff1c..0000000 --- a/harmonica_diatonic_C.js +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 60 C C# D D# E F F# G G# A A# B -var holes = ["+1", "-1'", "-1", "+1°", "+2", "-2\"", "-2'", "-2", "-3\"'", "-3\"", "-3'", "-3", - "+4", "-4'", "-4", "+4°", "+5", "-5", "+5°", "+6", "-6'", "-6", "+6°", "-7", - "+7", "-7°", "-8", "+8'", "+8", "-9", "+9'", "+9", "-9°", "-10", "+10\"", "+10'", - "+10" -]; - -var shift = 60; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Diatonic C', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_diatonic_D.js b/harmonica_diatonic_D.js deleted file mode 100644 index 5d5a6ec..0000000 --- a/harmonica_diatonic_D.js +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 60D Eb E F F# G Ab A Bb B C C# -var holes = ["+1", "-1'", "-1", "+1°", "+2", "-2\"", "-2'", "-2", "-3\"'", "-3\"", "-3'", "-3", - "+4", "-4'", "-4", "+4°", "+5", "-5", "+5°", "+6", "-6'", "-6", "+6°", "-7", - "+7", "-7°", "-8", "+8'", "+8", "-9", "+9'", "+9", "-9°", "-10", "+10\"", "+10'", - "+10" -]; - -var shift = 62; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Diatonic D', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_diatonic_F.js b/harmonica_diatonic_F.js deleted file mode 100644 index 059e503..0000000 --- a/harmonica_diatonic_F.js +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 53 F F# G Ab A Bb B C C# D Eb E -var holes = ["+1", "-1'", "-1", "+1°", "+2", "-2\"", "-2'", "-2", "-3\"'", "-3\"", "-3'", "-3", - "+4", "-4'", "-4", "+4°", "+5", "-5", "+5°", "+6", "-6'", "-6", "+6°", "-7", - "+7", "-7°", "-8", "+8'", "+8", "-9", "+9'", "+9", "-9°", "-10", "+10\"", "+10'", - "+10" -]; - -var shift = 53; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Diatonic F', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_diatonic_G.js b/harmonica_diatonic_G.js deleted file mode 100644 index fbcf9c6..0000000 --- a/harmonica_diatonic_G.js +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 55 G G# A A# B C C# D D# E F F# -var holes = ["+1", "-1'", "-1", "+1°", "+2", "-2\"", "-2'", "-2", "-3\"'", "-3\"", "-3'", "-3", - "+4", "-4'", "-4", "+4°", "+5", "-5", "+5°", "+6", "-6'", "-6", "+6°", "-7", - "+7", "-7°", "-8", "+8'", "+8", "-9", "+9'", "+9", "-9°", "-10", "+10\"", "+10'", - "+10" -]; - -var shift = 55; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Diatonic G', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_hohner_highlander_D.js b/harmonica_hohner_highlander_D.js deleted file mode 100644 index 1a6203e..0000000 --- a/harmonica_hohner_highlander_D.js +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 54F# G G# A A# B C C# D D# E F -var holes = ["+1", "", "", "-2", "", "", "", "-4", "+5", "", "-6", "", - "+7", "-8", "", "+9", "", "-10", "", "-12", "+11", "", "-14", "", - "+13", "-16", "", "+15", "", "-18", "", "-20", "+17", "", "", "", - "+19" -]; - -var shift = 54; - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Hohner Highlander, D side', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_master_hohner_highlander_A.js b/harmonica_master_hohner_highlander_A.js deleted file mode 100644 index b6b9b54..0000000 --- a/harmonica_master_hohner_highlander_A.js +++ /dev/null @@ -1,81 +0,0 @@ -//============================================================================= -// MuseScore -// Harmonica plugin -// -// Copyright (C)2012 lasconic -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - - // 57A A# B C C# D D# E F F# G G# -var holes = ["+1", "", "-2", "", "+3", "" , "", "-4", "", "", "-6", "", - "+7", "", "-8", "", "+9", "-10", "", "+11", "", "-12", "-14", "", - "+13", "", "-16","", "+15", "", "-18", "+17", "", "-20", "", "", - "+19" -]; - -var shift = 57; - - -function applyFingerings(score, fingerings, shift) - { - var cursor = new Cursor(score); - cursor.staff = 0; - cursor.voice = 0; - cursor.rewind(); // set cursor to first chord/rest - var font = new QFont("Lucida Sans", 8); - while (!cursor.eos()) { - if (cursor.isChord()) { - var pitch = cursor.chord().topNote().pitch; - var index = pitch - shift; - if(index >= 0 && index < fingerings.length){ - var textString = fingerings[index]; - if (textString.length > 0) { - var text = new Text(curScore); - text.text = textString; - text.defaultFont = font; - text.yOffset = 6; - text.xOffset = -1.5; - cursor.putStaffText(text); - } - } - } - cursor.next(); - } - } - -//--------------------------------------------------------- -// init -//--------------------------------------------------------- - -function init() - { - } - -//------------------------------------------------------------------- -// run -//------------------------------------------------------------------- - -function run() - { - applyFingerings(curScore, holes, shift); - } - -var mscorePlugin = { - menu: 'Plugins.Harmonica Tablature.Hohner Highlander, A side', - init: init, - run: run - }; - -mscorePlugin; - diff --git a/harmonica_tablature.qml b/harmonica_tablature.qml index 1aca248..0061941 100644 --- a/harmonica_tablature.qml +++ b/harmonica_tablature.qml @@ -11,13 +11,13 @@ // the file LICENCE.GPL //============================================================================= -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 -import MuseScore 1.0 +import QtQuick 2.9 +import QtQuick.Controls 1.5 +import QtQuick.Layouts 1.3 +import MuseScore 3.0 MuseScore { - version: "2.0" + version: "3.0" description: "Harmonica Tab plugin" menuPath: "Plugins.Harmonica Tablature" pluginType: "dialog" @@ -99,22 +99,20 @@ MuseScore { harp.tuning = harp.get(currentIndex).tuning } } - ComboBox { - currentIndex: 1 - model: ListModel { - id: placetext - property var position - ListElement { text: "Higher"; position: -2 } - ListElement { text: "Above staff"; position: 0 } - ListElement { text: "Below staff"; position: 10 } - ListElement { text: "Lower"; position: 12 } - } - width: 100 - onCurrentIndexChanged: { - console.debug(placetext.get(currentIndex).text + ", " + placetext.get(currentIndex).position) - placetext.position = placetext.get(currentIndex).position - } - } + // ComboBox { + // currentIndex: 1 + // model: ListModel { + // id: placetext + // property var position + // ListElement { text: "Above staff"; position: "above" } + // ListElement { text: "Below staff"; position: "below" } + // } + // width: 100 + // onCurrentIndexChanged: { + // console.debug(placetext.get(currentIndex).text + ", " + placetext.get(currentIndex).position) + // placetext.position = placetext.get(currentIndex).position + // } + // } } RowLayout { anchors.horizontalCenter: parent.horizontalCenter @@ -254,8 +252,10 @@ MuseScore { var endStaff; var endTick; var fullScore = false; - var textposition = placetext.position - console.log("textposition set to " +placetext.position) + // TODO : deal with placement + //var textposition = placetext.position + //console.log("textposition set to " + placetext.position) + cursor.rewind(1); if (!cursor.segment) { // no selection fullScore = true; @@ -295,10 +295,7 @@ MuseScore { // iterate through all grace chords var notes = graceChords[i].notes; tabNotes(notes, text); - // there seems to be no way of knowing the exact horizontal pos. - // of a grace note, so we have to guess: - text.pos.x = -2.5 * (graceChords.length - i); - text.pos.y = textposition; + // TODO: deal with placement of grace note on the x axis cursor.add(text); // new text for next element text = newElement(Element.STAFF_TEXT); @@ -306,10 +303,7 @@ MuseScore { var notes = cursor.element.notes; tabNotes(notes, text); - text.pos.y = textposition; - if ((voice == 0) && (notes[0].pitch > 83)) - text.pos.x = 1; cursor.add(text); } // end if CHORD cursor.next(); From 74c944ab6bc9391ec0bebfc00ef084b07b324f9e Mon Sep 17 00:00:00 2001 From: lasconic Date: Thu, 7 Feb 2019 11:44:44 +0100 Subject: [PATCH 2/4] add placement option back --- harmonica_tablature.qml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/harmonica_tablature.qml b/harmonica_tablature.qml index 0061941..186e9b2 100644 --- a/harmonica_tablature.qml +++ b/harmonica_tablature.qml @@ -99,20 +99,20 @@ MuseScore { harp.tuning = harp.get(currentIndex).tuning } } - // ComboBox { - // currentIndex: 1 - // model: ListModel { - // id: placetext - // property var position - // ListElement { text: "Above staff"; position: "above" } - // ListElement { text: "Below staff"; position: "below" } - // } - // width: 100 - // onCurrentIndexChanged: { - // console.debug(placetext.get(currentIndex).text + ", " + placetext.get(currentIndex).position) - // placetext.position = placetext.get(currentIndex).position - // } - // } + ComboBox { + currentIndex: 1 + model: ListModel { + id: placetext + property var position + ListElement { text: "Above staff"; position: "above" } + ListElement { text: "Below staff"; position: "below" } + } + width: 100 + onCurrentIndexChanged: { + console.debug(placetext.get(currentIndex).text + ", " + placetext.get(currentIndex).position) + placetext.position = placetext.get(currentIndex).position + } + } } RowLayout { anchors.horizontalCenter: parent.horizontalCenter @@ -252,9 +252,8 @@ MuseScore { var endStaff; var endTick; var fullScore = false; - // TODO : deal with placement - //var textposition = placetext.position - //console.log("textposition set to " + placetext.position) + + var textposition = (placetext.position === "above" ? Placement.ABOVE : Placement.BELOW); cursor.rewind(1); if (!cursor.segment) { // no selection @@ -296,6 +295,8 @@ MuseScore { var notes = graceChords[i].notes; tabNotes(notes, text); // TODO: deal with placement of grace note on the x axis + text.placement = textposition + text.offset = Qt.point(-40, 0) cursor.add(text); // new text for next element text = newElement(Element.STAFF_TEXT); @@ -303,6 +304,7 @@ MuseScore { var notes = cursor.element.notes; tabNotes(notes, text); + text.placement = textposition cursor.add(text); } // end if CHORD From 80f6720bfdca16959c228e17335e95a0ea854b23 Mon Sep 17 00:00:00 2001 From: lasconic Date: Thu, 7 Feb 2019 15:31:30 +0100 Subject: [PATCH 3/4] better positioning for grace notes --- harmonica_tablature.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harmonica_tablature.qml b/harmonica_tablature.qml index 186e9b2..a35d294 100644 --- a/harmonica_tablature.qml +++ b/harmonica_tablature.qml @@ -296,7 +296,7 @@ MuseScore { tabNotes(notes, text); // TODO: deal with placement of grace note on the x axis text.placement = textposition - text.offset = Qt.point(-40, 0) + text.offset = Qt.point(-40 * (graceChords.length - i), 0) cursor.add(text); // new text for next element text = newElement(Element.STAFF_TEXT); From 9668e0cf9293d6093f75d236798915efbaf36e4a Mon Sep 17 00:00:00 2001 From: David Wynn Date: Mon, 24 Aug 2020 12:27:27 -0700 Subject: [PATCH 4/4] Add Sixteen Hole Chromatic Based off the Standard Chromatic set --- harmonica_tablature.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/harmonica_tablature.qml b/harmonica_tablature.qml index a35d294..4acf94a 100644 --- a/harmonica_tablature.qml +++ b/harmonica_tablature.qml @@ -92,6 +92,7 @@ MuseScore { ListElement { text: "Power Bender (Brendan Power), valved"; tuning: 11 } ListElement { text: "Power Draw (Brendan Power), valved"; tuning: 12 } ListElement { text: "Standard Chromatic"; tuning: 4 } + ListElement { text: "16 Hole Chromatic"; tuning: 13 } } width: 100 onCurrentIndexChanged: { @@ -205,7 +206,13 @@ MuseScore { "-10" ]; powerDraw[-2] = "+1bb"; powerDraw[-1] = "+1b"; //Two notes below the key at blow 1 // Brendan Power's tuning, half valved - + var sixteenChromatic = ["+1`", '+1`s', "-1`", "-1`s", "+2`", "-2`", "-2`s", "+3`", "+3`s", "-3`", "-3`s","-4`", "+4`", "+4`s", + "+1", '+1s', "-1", "-1s", "+2", "-2", "-2s", "+3", "+3s", "-3", "-3s","-4", + "+4", "+4s", "-5", "-5s", "+6", "-6", "-6s", "+7", "+7s", "-7", "-7s", "-8", + "+8", "+8s", "-9", "-9s", "+10", "-10", "-10s", "+11", "+11s", "-11", "-11s", "-12", + "+12", "+12s", "-12", "-12s" ]; + + var tuning = richter switch (harp.tuning) { case 1: tuning = richter; break; @@ -220,6 +227,7 @@ MuseScore { case 10: tuning = paddyRichter; break; case 11: tuning = powerBender; break; case 12: tuning = powerDraw; break; + case 13: tuning = sixteenChromatic; break; default: tuning = richter; break; }