Spilt chords in to voices.
I'd like to write a plug-in that, when run, would split the notes of the chords in a score in to the 4 different voices. For instance, if I ran it on a C7 chord, the C would remain as the 1st voice, but the E would become the 2nd voice, the G the 3rd voice, and the B the 4th voice. I'd imagine this being possible, perhaps by running the cursor through the piece, until it finds a chord with more than one note. Once it finds that, it stores the values of each of the notes in the chord, deletes the chord, then replaces it note by note, changing the current voice of the cursor for each note.
There's only one, tiny little problem with that approach. I'm brand new to writing with Musescore. I'm familiar with java script, I've taken a semester class just about writing in it, but the current plugin documentation on Musescore.com is ancient, it's really not easy to get started when the manual is 7 or so years old. Could any one point me in the right direction, or help me find out where to start?
Comments
You have to learn the specialization of Javascript called QML (Qt Macro(or whatever) language, which is the extension language of the "Qt" system in which MuseScore's UI is written). That has its own documentation at https://doc.qt.io/qt-5/qtqml-documents-topic.html , although you are limited to Qt5.9, can't use 5.12/13. And then you must learn the specifics and rules of the expression of MuseScore in QML. The best way is to look at the plugins that are supplied, that work, simplest ones first and ask questions. It's a black art. Also: you must limit yourself to ECMA script 5; no "for element in array" or other ECMAScript 6 features. I recommend my own plugins at https://musescore.org/en/project/articulation-and-ornamentation-control , especially "red note", for learning modern code that works.
(deleted). Tools / Explode and Implode are indeed all you need.
In reply to On a musical note, as it… by [DELETED] 1831606
Indeed! I had no idea the explode/implode tools existed. I've been using Musescore since ver. 1.3 and never seem them. Are those tools new with Musescore 3.0?
In reply to Indeed! I had no idea the… by PixelGeek
No, there were plugins for 1.x, and the tools were built in but a little more hidden for MuseScore 2 (Edit / Tools). It they keep getting improved, and I think for the particular purpose at hand here of converting chords to voices, that wouldn’t have been possible prior to MuseScore 3.
FWIW, you can reproduce the effects of such a plugin currently by running Tools / Explode following by Tools / Implode.
In reply to FWIW, you can reproduce the… by Marc Sabatella
!!!! It actually does blow apart chords in the same voice! Ignore everything I said in the now-deleted second post.