Difference between revisions of "Score examples"

From Jon's Wiki
Line 1: Line 1:
;Note: To yoink Lilypond snippets from Wikipedia articles, see [https://en.wikipedia.org/wiki/Special:PagesWithProp?propname=score&namespace=0 Special:PagesWithProp] and search for the "score" property.
+
;Note 1: This wiki applies a solid white background to all Score output, as a temporary fix for otherwise unreadable transparent PNG images when in dark-mode.
 +
;Note 2: To yoink Lilypond snippets from Wikipedia articles, see [https://en.wikipedia.org/wiki/Special:PagesWithProp?propname=score&namespace=0 Special:PagesWithProp] and search for the "score" property.
  
  

Revision as of 06:01, 30 November 2022

Note 1
This wiki applies a solid white background to all Score output, as a temporary fix for otherwise unreadable transparent PNG images when in dark-mode.
Note 2
To yoink Lilypond snippets from Wikipedia articles, see Special:PagesWithProp and search for the "score" property.


From Cadence:


   \new PianoStaff <<
      \new Staff <<
         \new Voice \relative c'' {
             \stemUp \clef treble \key e \minor \time 4/4
             \partial2 b4 b a g fis2 e1
             }
         \new Voice \relative c' {
             \stemDown
              \partial2 e4 e8 dis e fis g e e4 dis b1
              }
            >>
     \new Staff <<
         \new Voice \relative c' {
             \stemUp \clef bass \key e \minor \time 4/4
             \partial2 g8 a b4 c b cis b8 a! gis1
             }
         \new Voice \relative c {
             \stemDown
             \partial2 e8 fis g e c d e c ais4 b e,1
             }
         >>
    >>

Multi-system input

From String Quartet No. 1 (Górecki)


{
 \relative {
 \key c \minor
 \clef "treble_(8)"
 \time 4/4
    c'1 as2 bes2 c2 c2 es2 d2 c1 es1 f2 es2
    d2 c2 c2 bes2 c1 c1 f2 d2 es2 g2 f2 es2 f1
    f1 bes,2 c2 d2 es2 f2 d2 c1 c1 bes2 as2 bes2 g2
    as2 bes2 g1 f1 as2 bes2 c2 as2 bes2 g2 f1
}
 \addlyrics {
        Już się zmierz -- cha, nad -- cho -- dzi noc, po -- pro -- śmy
        Bo -- ga o po -- moc, a -- by on na -- szym stra -- żem był,
        od złych czar -- tów nas o -- bro -- nił, któ -- rzy naj -- wię -- cej
        w_ciem -- no -- ści u -- ży -- wa -- ją swej chy -- tro -- ści. \bar "||"
    }
}

Testing raw input

Note
this requires safe mode to be disabled, which it isn't on this wiki.

From Keyboard Sonata, K. 141 (Scarlatti), testing raw=1:


\version "2.18.2"
\header {
  tagline = ##f
}

% thèmes
temaRep = { \repeat unfold 6 { d16 } \repeat unfold 6 { f } \repeat unfold 6 { e } \repeat unfold 6 { d } \repeat unfold 6 { e } \repeat unfold 6 { a }
  % ms. 7
  d16 bes a g f e | f g a d, e cis }
temaBass = { < d g a d >8 r8 r8 | q r8 r8 | < a' cis e a >8 r8 r8 | < bes cis d g >8 r8 r8 | < a d e a >8 r8 r8 |
   % ms. 6
   < f a d >8 r8 r8 | < g bes d g >8 r8 r8 | < a d f >4 < a e' g >8 }
temaBassG = { < d g a d >8 r8 r8 | q r8 r8 | < a' d e a >8 r8 r8 | < bes d g >8 r8 r8 | < a d e a >8 r8 r8 |
   % ms. 6
   < f a d >8 r8 r8 | < g bes d g >8 r8 r8 | < a d f >4 < a e' g >8 }

% petites notes
trillD = { \tag #'print { d8.\trill } \tag #'midi { e32 d e d~ d } }
trillG = { \tag #'print { g8.\trill } \tag #'midi { a32 g a g~ g } }

upper = \relative c'' {
  \clef treble 
  \key d \minor
  \time 3/8
  \tempo 4. = 80
  % \tempo 8 = 210
  \set Staff.midiInstrument = #"harpsichord"

  s8*0^"Allegro" \temaRep | d16 bes a g f e { \relative c' \temaRep } | d4. | \repeat unfold 2 { a''4.~ | a16 e cis a g' e } | 
  % ms. 23
  a4. | bes16 g d bes g bes | g'4. | a16 f c a f a | 
  % ms. 27
  f'4. | g16 e c g e g | e'4. | f16 d a f d f | f' e d c bes a | 
  % ms. 32
  bes'16 a g f e d | \repeat unfold 2 { cis16 d \trillD cis32 d | e f g16 \trillG f32 g } | 
  % ms. 37
  a16 e cis a e cis | \change Staff = "lower" a16 e cis a e cis | \tempo 8 = 130  a4.

}

lower = \relative c {
  \clef bass
  \key d \minor
  \time 3/8
  \set Staff.midiInstrument = #"harpsichord"

    % **************************************
    \temaBass | << { d8 } \\ { d,4 s8 } >>
    \relative c, \temaBassG < d, d' >4.
    % ms. 19
    \repeat unfold 2 { a'''16 f d a f d | a4. }
    a''16 f d a f d | g,4.
    g''16 e c g e c | f,4.
    f''16 d bes f d bes | e,4.
    e''16 cis a e cis a | d,4.
    << { d''4. | \repeat unfold 5 { g4. } a8 } \\ { d,,8 e f | g a bes | \repeat unfold 4 { a8 bes4 } a8 } >>
    s4
    s4. | s4.

}

thePianoStaff = \new PianoStaff <<
    \set PianoStaff.instrumentName = #"Clav."
    \new Staff = "upper" \upper
    \new Staff = "lower" \lower
  >>

\score {
  \keepWithTag #'print \thePianoStaff
  \layout {
      #(layout-set-staff-size 17)
    \context {
      \Score
     \override SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/2)
      \remove "Metronome_mark_engraver"
    }
  }
}

\score {
  \keepWithTag #'midi \thePianoStaff
  \midi { }
}