TUTORIAL: How to create a custom palette and share it with other users.

• May 27, 2021 - 21:26

If you want to create a palette that does not uses images available within MuseScore, you have to follow a 3 step process that involves:

  1. create a "development" version that uses the MuseScuse3 user folder location (in my case /Users/luca/Documents/MuseScore3/Pictures) as source for the pictograms
  2. load the "development" version in MuseScore
  3. export the palette from MuseScore into a "exported" version
  4. modify the exported palette (by removing a specific xml element from the exported palette.xml)
  5. create the "distribution" version (by zipping the modified folder).

Hereafter is shown for the Laban Palette that I just shared .

Creating the Laban palette for distribution

In this tutorial I would like to share how I made and shared the Laban palette. That is a palette with the Laban symbols used by choreographer but also by music conductors from the school of James Jordan, and that want to use those symbols as way of preparing the Laban Movement Score Analysis of a partiture.

0.A) Get the appropriate images
First of all, I needed appropriate images with a license that allow redistribution such as
licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.

I found them in wikimedia, shared by Dr. Jeffrey Scott Longstaff (https://commons.wikimedia.org/wiki/User:Jeffrey_Scott_Longstaff). He is a very acknowledged expert in the field of Laban notation.

All the images that he shared in Wikimedia could be found at https://commons.wikimedia.org/wiki/Special:ListFiles/Jeffrey_Scott_Long…

In order to download them(I used Firefox https://www.mozilla.org/de/firefox/ and the https://addons.mozilla.org/en-US/firefox/addon/downthemall/ plugin ).

0.B) Scalable Vector Graphics
In order to be properly handled by MuseScore, it is important that the images be in the format called Scalable Vector Graphics. The images from Jeffrey however were all in JPG format. To convert them in SVG I used the following approach:

brew install imagemagick
brew install potrace
for f in *.jpg; do convert ./"$f" ./"${f%.jpg}.svg"; done

1) Now we are ready to create the "development version" of the Laban palette.

1.A) create a folder with the following content:
- a subfolder called META-INF
- in the META-INF folder a file called container.xml
- a subfolder called Pictures
- a file called palette.xml

1.B) copy all the svg images created in step 0.B into the /Users/myuserid/Documents/MuseScore3/Pictures folder that is created automatically by MuseScore the first time it is executed.

1.C) as 1.B however copy them in the subfolder called Pictures in step 1.A

1.D) The container.xml specifies the location of the palette.xml file and also the local file names of the images to be used.

<?xml version="1.0" encoding="UTF-8"?>
<container>
  <rootfiles>
  <rootfile full-path="palette.xml"></rootfile>
  <file>Pictures/Laban-frontal-high-right.svg</file>
  <file>Pictures/Laban-center.svg</file>
  <file>Pictures/Laban-diagonal-backward-deep-left.svg</file>
   ...
  <file>Pictures/Laban-vertical-high.svg</file>
  </rootfiles>
 </container>

1.E) edit the palette.xml as shown:

<?xml version="1.0" encoding="UTF-8"?>
<museScore version="3.02">
  <Palette name="Laban">
    <type>Custom</type>
    <gridWidth>48</gridWidth>
    <gridHeight>48</gridHeight>
    <mag>1</mag>
    <grid>1</grid>
    <moreElements>0</moreElements>
      <Cell name="Center" custom="1">
          <Image>
            <track>0</track>
            <linkPath>/Users/myuserid/Documents/MuseScore3/Pictures/Laban-center.svg</linkPath>
            <size w="2.140416" h="4.89236"/>
          </Image>
        </Cell>
.....
    </Palette>
  </museScore>

1.F) Created laban-dev.mpal doing:
zip -r ../laban-dev.mpal .

2) load the "development" version in MuseScore

At this point I started MuseScore and loaded the laban-dev.mpal palette.
It worked nicely, however it was making use of the individually saved files within the /Users/myuserid/Documents/MuseScore3/Pictures/
folder and therefore is not easy to be ported to other users.

3) export the palette from MuseScore into a "exported" version

I then exported that palette from the MuseScore core menu and saved it automatically as "Laban.mpal".

4) modify the exported palette by removing a specific xml element from the palette.xml file of the exported Laban.mpal.

4.A) unzip Laban.mpal
4.B) remove all the  <linkPath> elements from the palette.xml file

5) create the "distribution" version (by zipping the modified folder).

The final version, distributable and without risk of sharing internal file location informations, is then achieved by removing the "linkPath" lines from the autogenerated palette.xml file and then doing a final zip.

zip -r ../laban-distrib.mpal .

Attachment Size
laban-distrib.mpal 20.1 KB

Comments

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