Rick Hansen (aka RickH) wrote:

\include CommonHeader.ly                % contains header block and begins a
score block and begins a nested choir staff block
\include AltoSax1.ly                          % generic template for alto
sax and transposes for Eb
\include AltoSax2.ly                          % etc
\include TenorSax1.ly                       % etc
\include TenorSax2.ly                       % etc
\include BaritoneSax.ly                      % etc
\include CommonTrailer.ly                  % ends the choir staff block,
states the layout block, and ends the score block

Yuck!  I get what you're doing, especially with your second note
on the topic, but spreading a score {} block across include files
smacks of bad programming practice.

It would be better if we could create and assign Staves, Voices,
Lyrics, etc. to variables.  Then we could do something like this:

myMusic_ForConcertoNo3.ly:

varViolinINotes = \relative c' { a-4 b c d }
varViolinIINotes = \relative c' { d2 f }
varClarinetNotes = \relative c' { d16 e f g d f g a d2 }
varTitle = "Concerto Number 3"
varKey = { \key c \major }
varTime = { \time 4/4 }
varStyle = "Moderato"
varComposer = "Beat-hooven"

myStructure_ViolinI.ly:

varViolinIStaff = \new Staff \with {
         instrument = \markup { \sans "Violin I" }
         stringNumberOrientations = #'(left)
         fingeringOrientations = #'(right)
   } % end with
   {
        #(set-accidental-style 'modern)
        \clef "treble"
\once \override Score.RehearsalMark #'self-alignment-X = #left \mark
\markup { \bold \smaller \varStyle }
        \varKey
        \varTime
        \varViolinINotes
   }


myStructure_Orchestra.ly:

myOrchestralLayout = layout { ... }

myOrchestralScore = score {
   \myViolinIStaff
   ...
   \myOrchestralLayout
}

myCompileViolinI_ForConcertoNo3.ly:

\include "myMusic_ForConcertoNo3.ly"
\include "myStructure_ViolinI.ly"
\include "myStructure_Orchestra.ly"

\myOrchestralScore

This is a more structured approach than splitting the syntax across
files.  Perhaps it is already possible to do this -- I haven't tried.

Thoughts?

                              -Dave


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to