----- Original Message -----
From: "James Harkins" <jamshar...@qq.com>
To: "lily-users" <lilypond-user@gnu.org>
Sent: Saturday, January 10, 2015 3:12 AM
Subject: Demo: Score and parts template
Hi,
Since the question came up about organizing LilyPond code for score and
parts, I thought I would make a quick demo of what I believe to be the
standard way to do it. Somehow I pieced these ideas together from LP code
that I found online (Mozart Horn Concerto, as I recall), but I don't
remember finding a compact example.
I used a few bars from a recent woodwind trio, because it uses some
notational features that you would like to be handled automatically -- and
which *are* handled automatically using these techniques:
- Multi-measure rests
- Meter changes
- Tempo markings (at the top of the score only, and in all parts)
- Clef changes in one part, independent of the others
- Transposing instruments
Comments are in the file, but to summarize briefly:
- A "global" variable holds any elements that need to be shared across all
parts. Spacer ("s") rests set the number of bars between tempo changes,
meter or key changes, rehearsal marks, double barlines etc.
- Each instrument has a variable containing notes, rests, dynamics etc.
Clef changes go into these variables (because they are specific to each
part).
- The score creates staves for each instrument and fills them with
simultaneous music expressions: << \global \instrumentNotes >>.
- A part is a "\score" containing one staff, using only the instrument's
notes. If the part is for a multi-staff instrument, like piano, the \score
would hold a PianoStaff or StaffGroup.
- \compressFullBarRests in the parts does what you think it should do.
Multi-measure rests should get broken by rehearsal marks etc. (the
"global" things), and that's exactly what happens. I also use the
\override because I don't like Kirchenpausen.
In the real piece, I have a score.ly file that \include's the global and
instrument variables, and separate oboe.ly, clarinet.ly etc. files that
\include only what's needed for each part. For the demo, it's easier to
send just one ly file but you wouldn't do it that way in real life.
/Theme and Variations/ is released under CC-BY-NC-SA 4.0; please don't
steal the notes :)
Comments welcome. Hope this is helpful.
hjh
I think this is potentially very useful. Is the clarinet part an octave
low?
If you can confirm that the clarinet is correct, then I think adding it to
the LSR, with a tag of docs and templates would be an excellent idea.
--
Phil Holmes
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user