]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/tutorial/orchestral-score.ly
patch::: 1.3.132.jcn1
[lilypond.git] / input / tutorial / orchestral-score.ly
index 0b0585013f6846dc3a58e75ce805bd89996e540b..30e0dd208729095594d2c2bf63f433b307a0c2e7 100644 (file)
@@ -1,35 +1,23 @@
-\version "1.3.120";
+\version "1.3.130";
 
 \include "paper16.ly";
 
 % #(set! point-and-click #t)
 #(define text-flat '((font-relative-size . -2) (music "accidentals--1")))
 
-staffCombineStaffProperties = {
-       \property Staff.devNullThread = #'unisolo
-       \property Staff.soloADue = ##t
-       \property Staff.soloText = #""
-       \property Staff.soloIIText = #""
+staffCombinePianoStaffProperties = {
+       \property PianoStaff.devNullThread = #'()
+       \property PianoStaff.soloADue = ##t
+       \property PianoStaff.soloText = #""
+       \property PianoStaff.soloIIText = #""
        % This is non-conventional, but currently it is
        % the only way to tell the difference.
-       \property Staff.aDueText = #"\\`a2"
-       \property Staff.splitInterval = #'(1 . 0)
-       \property Staff.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
+       \property PianoStaff.aDueText = #"\\`a2"
+       \property PianoStaff.splitInterval = #'(1 . 0)
+       \property PianoStaff.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
+       \property PianoStaff.noDirection = ##t
 }
 
-staffCombineVoiceProperties = {
-       \property Voice.devNullThread = #'unisolo
-       \property Voice.soloADue = ##t
-       \property Voice.soloText = #""
-       \property Voice.soloIIText = #""
-       % This is non-conventional, but currently it is
-       % the only way to tell the difference.
-       \property Voice.aDueText = #"\\`a2"
-       \property Voice.splitInterval = #'(1 . 0)
-       \property Voice.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
-}
-
-
 % Coriolan 218-222
 flautoI = \notes\relative c'' {
   \property Score.currentBarNumber = #218
@@ -135,10 +123,10 @@ contrabasso = \notes\relative c {
       >
       \context Staff = clarinets <
         \property Staff.midiInstrument = #"clarinet"
-       \property Staff.instrument = #`((kern . 0.5)
-         (lines "2 Clarinetti" (rows "(B" ,text-flat ")")))
-       \property Staff.instr = #`((kern . 0.5)
-         (lines "Cl."  (rows "(B" ,text-flat ")")))
+       \property Staff.instrument = #`(lines
+         "2 Clarinetti" (rows "(B" ,text-flat ")"))
+       \property Staff.instr = #`(lines
+         "Cl."  (rows "(B" ,text-flat ")"))
        \property Staff.transposing = #-2
        \notes \key f \major;
        \context Voice=one \partcombine Voice
@@ -158,10 +146,10 @@ contrabasso = \notes\relative c {
     \context StaffGroup = brass <
       \context Staff = frenshHorns <
         \property Staff.midiInstrument = #"french horn"
-       \property Staff.instrument = #`((kern . 0.5)
-         (lines "2 Corni" (rows "(E" ,text-flat ")")))
-       \property Staff.instr = #`((kern . 0.5)
-         (lines "Cor."  (rows "(E" ,text-flat ")")))
+       \property Staff.instrument = #`(lines
+         "2 Corni" (rows "(E" ,text-flat ")"))
+       \property Staff.instr = #`(lines
+         "Cor."  (rows "(E" ,text-flat ")"))
        \property Staff.transposing = #3
        \notes \key c \major;
        \context Voice=one \partcombine Voice
@@ -170,10 +158,10 @@ contrabasso = \notes\relative c {
       >
       \context Staff = trumpets <
        \property Staff.midiInstrument = #"clarinet"
-       \property Staff.instrument = #`((kern . 0.5)
-         (lines "2 Trombe" (rows "(C)")))
-       \property Staff.instr = #`((kern . 0.5)
-         (lines "Tbe." (rows "(C)")))
+       \property Staff.instrument = #`(lines
+         "2 Trombe" (rows "(C)"))
+       \property Staff.instr = #`(lines
+         "Tbe." (rows "(C)"))
        \context Voice=one \partcombine Voice
          \context Thread=one \tromboI
          \context Thread=two \tromboII
@@ -182,8 +170,8 @@ contrabasso = \notes\relative c {
     \context StaffGroup = timpani <
       \context Staff = timpani <
        \property Staff.midiInstrument = #"timpani"
-       \property Staff.instrument = #'((kern . 0.5)
-         (lines "2 Timpani" "(C-G)"))
+       \property Staff.instrument = #'(lines
+         "2 Timpani" "(C-G)")
        \property Staff.instr = #"Timp."
        \clef bass;
        \timpani
@@ -213,17 +201,16 @@ contrabasso = \notes\relative c {
          \context Thread=one \violaI
          \context Thread=two \violaII
       >
-      \context GrandStaff=bass <
+      \context PianoStaff=bass <
+       \staffCombinePianoStaffProperties
         \context Staff=one <
-         %\staffCombineStaffProperties
          \property Staff.midiInstrument = #"cello"
-         \property Staff.instrument = #'((kern . 0.5)
-           (lines "Violoncello" (rows "    e") (rows "Contrabasso")))
+         \property Staff.instrument = #'(lines
+           "Violoncello" "    e" "Contrabasso")
          \property Staff.instr = "Vc."
          \clef bass;
        >
        \context Staff=two <
-         %\staffCombineStaffProperties
          \property Staff.midiInstrument = #"contrabass"
          \property Staff.instrument = "Contrabasso"
          \property Staff.instr = "C.B."
@@ -231,8 +218,8 @@ contrabasso = \notes\relative c {
          \skip 1*4; % sustain clef
        >
        \context Staff=one \partcombine Staff
-         \context Voice=one { \staffCombineVoiceProperties \violoncello }
-         \context Voice=two { \staffCombineVoiceProperties \contrabasso }
+         \context Voice=one \violoncello
+         \context Voice=two \contrabasso
       >
     >
   >
@@ -243,6 +230,11 @@ contrabasso = \notes\relative c {
     \translator{
       \ThreadContext
       \consists "Rest_engraver";
+      
+      % Set value for engraver at thread level,
+      % to override the default that is set in ScoreContext
+      % for added engraver at Voice level
+      devNullThread = #'()
     }
     \translator{
       \VoiceContext
@@ -251,9 +243,11 @@ contrabasso = \notes\relative c {
       % The staff combine (bassi part) needs a
       % thread_devnull_engraver here.
       % Instead of maintaining two separate hierarchies,
-      % we switch add it, but switch it off immideately.
-      % The staff combine parts switch it on.
-      devNullThread = #'never
+      % we switch add it, but switch it off immediately.
+      % --> move to Score level to be able to override
+      % The staff combine part switches it on.
+      
+      %% devNullThread = #'never
       \consists "Thread_devnull_engraver";
     }
     \translator{
@@ -262,16 +256,18 @@ contrabasso = \notes\relative c {
     }
     \translator {
       \OrchestralScoreContext
-      skipBars = ##t
+      skipBars = ##t
 
       soloText = #"I."
       soloIIText = #"II."
+      % By default, turn off the Thread_devnull_engraver
+      % at Voice level
+      devNullThread = #'never
 
       % Hmm
       currentBarNumber = #218
       BarNumber \override #'padding = #3
       RestCollision \override #'maximum-rest-count = #1
-      marginScriptHorizontalAlignment = #1
       TimeSignature \override #'style = #'C
     }
   }