lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Score and parts with global variable


From: Mark Knoop
Subject: Re: Score and parts with global variable
Date: Sun, 4 Nov 2018 11:06:29 +0000

At 21:37 on 04 Nov 2018, Andrew Bernard wrote:
>After a long time using lilypond, for solo instrumental music
>exclusively, now setting a string quartet for the first time and
>needing score and parts. I confess that I am confused about using a
>global variable for tempo indications and so on and so forth. Two
>newbie questions.
>
>1.
>
>In the NR template for a SQ with part this is given:
>
>music = {
>  <<
>    \tag #'score \tag #'vn1
>    \new Staff \with { instrumentName = "Violin 1" }
>    << \global \Violinone >>
>
>    \tag #'score \tag #'vn2
>    \new Staff \with { instrumentName = "Violin 2" }
>    << \global \Violintwo>>
>
>    \tag #'score \tag #'vla
>    \new Staff \with { instrumentName = "Viola" }
>    << \global \Viola>>
>
>    \tag #'score \tag #'vlc
>    \new Staff \with { instrumentName = "Cello" }
>    << \global \Cello >>
>  >>  
>}
>
>I am unable to understand why the \global information does not print
>four times. How does this work? The template by the way does not give
>example code for the \global variable.

Yes, it does somewhat depend on what you put in global. I do something like 
this:

global = {
  \time 4/4
  \tempo 4=72
  s1*4
  \bar "||"
  \time 3/4
  \tempo 4=96
  s1*3/4*12
  \bar "|."
}

% define violinone. violintwo, viola, cello

\book {
  \bookOutputName "score"
  \score {
    \new Score {
      <<
        \new Dynamics \global
        \new Staff \violinone
        \new Staff \violintwo
        \new Staff \viola
        \new Staff \cello
      >>
    }
  }
}

\book {
  \bookOutputName "violinone"
  \score {
    \new Score {
      <<
        \new Dynamics \global
        \new Staff \violinone
      >>
    }
  }
}

-- 
Mark Knoop



reply via email to

[Prev in Thread] Current Thread [Next in Thread]