Automation and Part Output

• Feb 5, 2025 - 22:07

I am a computer geek and musician, and have been working with our jazz educational non-profit/group. We have a song book, that often is music we've found and converted to Musescore, and this works great for what we do. Our goal it to have lead sheets that provide melody, lyrics, and chords, with some basic roadmaps that can be easily used by our band.

Since we have people come and go, consistency and accuracy is helpful. And we are always making little changes, updating things, etc. (especially as we grow musically).

I've found the process of going into Musescore, making a change. Then outputting to PDF, then going to For Score, and importing (overwriting the old one) is not just cumbersome, but when you start to think about a trad jazz group, and we take a lead sheet, output it in C. Then select all , transcribe up a M2, pdf it for our Bb friends. Then back down to original Key, then up a M6 for our Eb friends. Then back down. Then from here, down a P8 , change cleft, output to Bass Clef, transpose back up P8, back to treble clef and then save, to be a pain. If I were doing a song like Smies, I may out Smiles_C.pdf, Smiles_C (Bb Inst).pdf, Smiles_C (Eb Inst).pdf, and Smiles_C (Bass Inst).pdf. The reason is to ensure that concert Key it labeled (so we are all playing in the same key) but then we have the different outputs.

This seems horrendous, but actually I've found an "Almost" solution that I feel like we could get over the line with a bit of help...

I've been using music21 in Python. Essentially I can use the mscore command line to open a Musescorefile and then export with -o. So if I just want to export without opening Muscore mscore Smiles_C.mscz -o Smiles_c.pdf works great!

If I instead output to music xml (mscore Smiles_C.mscz -o Smiles_C.xml) This works, and then I can use Python script, transpose it up a M2, output it to Smiles_C (Bb Inst).xml and run mscore Smiles_C (Bb Inst).xml -o Smiles_C (Bb Inst).pdf

This may sound crazy, but it actually works pretty good. But my main issue is the nice large chords in the original mscz file get made MUCH smaller on conversion to music.xml. For example even if you do:

mscore Smiles.mscz -o Smiles.xml

Then

mscore Smies.xml -o Smiles2.mscz

The chords are small.

I guess, my ideal would be a pythonic interface to Musescore in general. But knowing tech, that's likely a HUGE lift, in the short term, is there anyway to automate the what I am doing without losing the nice formatting (and without having to open Musescore and do manual things) for each file?

I'd love to discuss more what I am doing, and am happy to share code if people are interested!

Thanks! John


Comments

Consider this:
Create a master score for each piece, Perhaps start with a lead sheet you already have in C. Add a Bb staff. Then an Eb staff. Then a bass clef. C+P the C staff into the each of the other staffs. There in one place you have your Transpositions. Well except for the chord symbols. You may have to do something different for them. I'm just thinking out loud. If you need to make changes, all the parts are right there. Print out individual parts.

In reply to by bobjp

Actually, there is a better way to transpose using the command line, and it was just a little not working in MS 4

https://github.com/musescore/MuseScore/issues/24723

It looks like it will get fixed in Musescore 4.4.5 So I am excited about that, now just need to figure out the Bassclef side of it.

One of the goals of what I am doing is I want to do everything from the command line, without having to open musescore. My goal is this. We have little changes that get made, and then I have to export all 4 parts, and move them to my final locations. But with automation, I can make changes to a musescore file, and not have to do anything more. I run a script that outputs all PDFs, which get outputted to directories for each instrument (C, Bb, Eb, Bass) and then in Forescore I can just choose import all, no having to find the one that was changed. It makes updates so much easier.

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