How to create an script (batch) or plug-in toMuseScore 2.0.2

• Apr 12, 2016 - 16:37

Hi, gang!!!

I wonder if there is a very easy manual (handbook) to dummies (like me) to teach us how to create an script (batch) or plug-in to MuseScore 2.0.2.

I want to create one to automatize the following actions:

1) Open a lot of MuseScore files (*.mscz).

2) To change (if we want to do that) the instruments used on the pieces. Track by Track.

3) To change the velocity of all, or any, of the instruments used on the pieces.

4) To change the "Information" data of the pieces.

Is it possible? ???

Where can I find help to make it? ???

Greetings & Blessings from Chile!!!!!!!



Ola Juan,

I'm afraid it is not very easy/simple, however it is not something impossible. I have written couple of .awk / .sed scripts to automate similar tasks but they require AWK (or GAWK) and SED to be present on your computer. You'd need to download and unpack/install them to your computer and have a little bit of research what they can do. Also I have used my scripts only on Windows based computers though they should work fine on Linux as well (as unix is a native home of those tools).

Internally a MuseScore file (uncompressed *.mscx) is a XML file which in turn is a plain text file and it can be (carefully) manipulated in any text editor or by any tool capable of manipulating text files, e.g. using search/replace, regular expressions etc.

I have attached a couple of scripts you may find useful as your starting point.

I have tried to automate similar task and pick the same (midi) instruments for all hymns/scores and set volume levels and panning of instruments (balance left-right) to pre-defined, consistent values. See mixer*.* attachments.

Also I tried to automate updating some of the score "information" metatags - see revision*.* attachments.

I also written a very simple plugin to update the score metatags from title, composer & lyricist - see *.qml

And most importantly backup your scores before applying anything.

Have fun and report back if you get something useful working,
Cheers, Miro

Attachment Size
_mixer.bat_.txt 1.45 KB
_mixer_Clear.awk_.txt 1.76 KB
_mixer_Set.awk_.txt 4.57 KB
_revision.bat_.txt 1.26 KB
_revision.sed_.txt 1017 bytes
_revision.awk_.txt 4.59 KB
setmetatags.qml 1.38 KB

Do you still have an unanswered question? Please log in first to post your question.