> From: "Dirck Nagy" <[email protected]>
> To: "bobroff" <[email protected]>
> Cc: "Lillypond Users Mailing List" <[email protected]>
> Sent: Saturday, November 15, 2025 10:10:54 AM
> Subject: Re: Extract parts from a completed score

> Thanks Bob, but i think i am missing something obvious. I can remove the 
> \score
> block, but what should i do with it? Will each score and part need their own
> separate file?

> Also, what are the "music definitions"? I'm assuming these are the expressions
> with an "=" sign. Would this include the "global = " ?

> What are the "music details" you refer to? Are these the notes, barlines,
> articulations, etc?

> I apologize for my ignorance, but can you see the problem here?

> So far, I have:

>     1.
> Remove the score block and copy it to a file named "foo-score.ly"

>     2.
> Rename the original file "foo-defs.ly"

>     3.
> Add an "\include foo-defs.ly" somewhere in each score and part file

>     4.
> Store all files in the same folder

> Is this what I need to do?

> What do I need to do to print individual parts, then? Remove the "bassoon = "
> and the "bassoonPart =" bits and paste them in a new file named
> "foo-bassoonPart.ly" ? Or just the "bassoonPart" bit, with "\include
> foo-defs.ly" on top? What about headers / titles etc. on the new parts?

> Once I am able to get this to work, i would like to write and share a complete
> tutorial, illustrating every single step. I think this would be useful, unless
> I am the only one who just doesn't "get it."

> If it is impossible to work from a completed score, would someone please tell
> me, and i will change my workflow...

> Thanks
> dirck

> From: [email protected] <[email protected]>
> Sent: Saturday, November 15, 2025 2:23 AM
> To: Dirck Nagy <[email protected]>
> Cc: Lillypond Users Mailing List <[email protected]>
> Subject: Re: Extract parts from a completed score

>> From: "Dirck Nagy" <[email protected]>
>> To: "Lillypond Users Mailing List" <[email protected]>, "Dirck Nagy"
>> <[email protected]>
>> Sent: Saturday, November 15, 2025 7:48:53 AM
>> Subject: Extract parts from a completed score

>> Dear Lilypond

>> Is there a (relatively) simple way to extract and print individual parts 
>> from a
>> completed score?

>> I couldn't find any tutorials. A "start to finish" list of instructions 
>> would be
>> nice; does one exist?

>> I searched the documentation and this message board, and it seems that most
>> people enter the notes in separate files for each instrument, and then 
>> combine
>> them into a complete score.

>> I'm trying to do the opposite: the score is already complete.

>> Here is a simple example created using Frescobaldi's score wizard. How could 
>> I
>> extract, and then edit and print the flute part?

>> FYI, I have been using Lilypond for years, but i am a composer, and not
>> especially computer savvy.

>> Thanks in advance!

>> Dirck

>> \version "2.24.4"

>> \header {
>> % Remove default LilyPond tagline
>> tagline = ##f
>> }

>> \paper {
>> #(set-paper-size "letter")
>> % Add space for instrument names
>> short-indent = 10\mm
>> }

>> global = {
>> \key c \major
>> \time 4/4
>> }

>> flute = \relative c'' {
>> \global
>> % Music follows here.
>> c,4 d e f g1 \bar"|."
>> }

>> bassoon = \relative c {
>> \global
>> % Music follows here.
>> a4 b c d e1
>> }

>> flutePart = \new Staff \with {
>> shortInstrumentName = "Fl."
>> } \flute

>> bassoonPart = \new Staff \with {
>> shortInstrumentName = "Bn."
>> } { \clef bass \bassoon }

>> \score {
>> <<
>> \flutePart
>> \bassoonPart

>> \layout { }
>> }

> What I do is keep my music definitions in separate files from my score files. 
> I
> would remove the \score block from this file. Then I would rename the file. If
> I have a piece called 'foo' I have all the music details in a file called
> 'foo-defs.ly' and then I have score files for parts or full scores in a
> separate file and use '\include foo-defs.ly' near the top of the file. I don't
> think in terms of extracting parts. I think in terms of builiding score where 
> a
> score may be anything from a single part to a full orcestral score.

> Hope this helps.

> David

In your example this means: 

%%%%% 

% This is the contents of your definitions (-defs.ly file). 

\version "2.24.4" 

\header { 
% Remove default LilyPond tagline 
tagline = ##f 
} 

\paper { 
#(set-paper-size "letter") 
% Add space for instrument names 
short-indent = 10\mm 
} 

global = { 
\key c \major 
\time 4/4 
} 

flute = \relative c'' { 
\global 
% Music follows here. 
c,4 d e f g1 \bar"|." 
} 

bassoon = \relative c { 
\global 
% Music follows here. 
a4 b c d e1 
} 

flutePart = \new Staff \with { 
shortInstrumentName = "Fl." 
} \flute 

bassoonPart = \new Staff \with { 
shortInstrumentName = "Bn." 
} { \clef bass \bassoon } 

%%%%% 

%%%%% 

% This is the contents of a part file for basson. 

\include "<your-definitions-file>" 

\score { 
\bassoonPart 
\layout { } 
} 

%%%%% 

%%%%% 

% This is the contents of a part file for flute. 

\include "<your-definitions-file>" 

\score { 
\flutePart 
\layout { } 
} 

%%%%% 

Yes, you will have a file containing all the musical information; globals, 
music for different instruments, etc. Then you will have a separate file for 
each score you want to produce. Each "score" can be an individual part or a 
full score, or anything in between. 

Cheers, 

DAVID 

Reply via email to