Last active
July 13, 2023 07:20
-
-
Save Vaults/335162c039eea88a023d25c1857fb358 to your computer and use it in GitHub Desktop.
Musescore to Lilypond (.mszc to .ly)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#./mszc-to-ly.sh musescore-file.mszc | |
# will output a corresponding lilypond file with the same name in the same folder | |
MUSESCORE="<path to musescore>" | |
FILE=$1 | |
FILE_BASE=$(echo $FILE | sed 's/.mscz//') | |
LILY_FILE="$FILE_BASE.ly" | |
MUSICXML_OUTPUT=/tmp/tmp.musicxml | |
$MUSESCORE "$FILE" -o "$MUSICXML_OUTPUT" | |
echo "$(pwd)/$LILY_FILE" | |
musicxml2ly "$MUSICXML_OUTPUT" -o "$LILY_FILE" | |
rm $MUSICXML_OUTPUT | |
sed -i.bak "s/\(\\\stemUp\|\\\stemDown\)//g" "$LILY_FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment