Compiling Multiple Parts

15 views
Skip to first unread message

Greg Lindstrom

unread,
Sep 22, 2024, 2:09:14 PM9/22/24
to Frescobaldi
I have a score with multiple instrumental parts and would like to know how to extract the parts from the score. 

First pass I had the score and all the parts in a single file with "\book" statements for each part (and the score). This wrote out each part to it's own file as I wanted, but I have to rename each file to the corresponding part. Is there a way to specify the filename when using this method?

Next, I have each individual part in a separate "ly" file and can compile them individually. Is there a way to have a single command or script which would engrave each file? Using this method, I can name the files whatever I want, but I'm sticking to the filename being the name of the parts; euph1.pdf, trumpet2.pdf, etc.

Until I figure this out, compiling a full score is a real pain.

And I've see some things about ".ily" files for parts? What's that all about.

Thanks for any help you can provide.

--greg

Knute Snortum

unread,
Sep 22, 2024, 4:44:39 PM9/22/24
to fresc...@googlegroups.com
On Sun, Sep 22, 2024 at 11:09 AM Greg Lindstrom <gslin...@gmail.com> wrote:
I have a score with multiple instrumental parts and would like to know how to extract the parts from the score. 

First pass I had the score and all the parts in a single file with "\book" statements for each part (and the score). This wrote out each part to it's own file as I wanted, but I have to rename each file to the corresponding part. Is there a way to specify the filename when using this method?

 

Next, I have each individual part in a separate "ly" file and can compile them individually. Is there a way to have a single command or script which would engrave each file? Using this method, I can name the files whatever I want, but I'm sticking to the filename being the name of the parts; euph1.pdf, trumpet2.pdf, etc.

You don't say what OS you're using, but if it's Linux, I have a script that does probably more than you want:

#!/usr/bin/env bash

declare version engrave lilypondFile

read -rp "Enter to version of LilyPond to engrave with: " version
engrave="/home/xxx/lilypond/lilypond-${version}/bin/lilypond"

if [[ ! -x "$engrave" ]]; then
echo "Cannot find or execute $engrave." >&2
exit 1
fi

for lilypondFile in *.ly; do
echo -e "\n*** Engraving $lilypondFile..."
"$engrave" -dno-point-and-click "$lilypondFile"
done

It will ask for the LilyPond version, then engrave every .ly file in that directory.  You will need to adjust the LilyPond path to fit your system.


And I've see some things about ".ily" files for parts? What's that all about.

That's just a filename convention for a LIlyPond include file.  See:



--
Knute Snortum


Reply all
Reply to author
Forward
0 new messages