Score examples: Difference between revisions

From ZMOG test wiki (master branch)
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
Some Score examples, using SVG output.
== Testing ==
 
[[Raw score output]]
 
=== T289399 inline usage ===
 
[https://phabricator.wikimedia.org/T289399 T289399] allows for inline use, by rendering music in a <code><nowiki><span></nowiki></code> element instead of the usual <code><nowiki><div></nowiki></code>. So for example, this example from the [https://en.wikisource.org/wiki/Page:A_Dictionary_of_Music_and_Musicians_vol_2.djvu/695 cited page] on WikiSource <score inline> { \new Staff \with { \override StaffSymbol #'line-count = #1 } { \omit Score.TimeSignature \time 6/4 \omit Score.Clef { \override Stem.length-fraction = #0.4 b'2 r } } } </score> should now form part of the text flow.
 
Without specifying the <code>inline</code> parameter, Score displays in a div, as usual: <score> { \new Staff \with { \override StaffSymbol #'line-count = #1 } { \omit Score.TimeSignature \time 6/4  \omit Score.Clef { \override Stem.length-fraction = #0.4 b'2 r } } } </score>
 
With sound requested, inline <score sound="1" inline="1"> { \new Staff \with { \override StaffSymbol #'line-count = #1 } { \omit Score.TimeSignature \time 6/4 \omit Score.Clef { \override Stem.length-fraction = #0.4 b'2 r } } } </score> does not display audio controls, otherwise: <score sound="1"> { \new Staff \with { \override StaffSymbol #'line-count = #1 } { \omit Score.TimeSignature \time 6/4 \omit Score.Clef { \override Stem.length-fraction = #0.4 b'2 r } } } </score>
 
=== T60688 staff instrument name bug ===
 
Task [https://phabricator.wikimedia.org/T60688 T60688] staff with name "Clarinet" displays as "inet" instead of "Clarinet":
 
<score>
 
\new PianoStaff <<
  \set PianoStaff.instrumentName = #"Clarinet"
  \context Staff = "up" { c'1 }
  \context Staff = "down" { \clef bass c1 }
>>
 
</score>
 
Conclusion: cannot reproduce with Lilypond 2.23.82 and Score from recent master using SVG output (see [[Special:Version]]).
 
== Example Scores for SVG output ==


From [https://en.wikipedia.org/wiki/Cadence Cadence]:
From [https://en.wikipedia.org/wiki/Cadence Cadence]:


<score lang="lilypond">
<score lang="lilypond">
   \new PianoStaff <<
   \new PianoStaff <<  
       \new Staff <<
       \new Staff <<  
         \new Voice \relative c'' {
         \new Voice \relative c'' {
             \stemUp \clef treble \key e \minor \time 4/4
             \stemUp \clef treble \key e \minor \time 4/4
Line 14: Line 42:
               \partial2 e4 e8 dis e fis g e e4 dis b1
               \partial2 e4 e8 dis e fis g e e4 dis b1
               }
               }
             >>
             >>  
     \new Staff <<
     \new Staff <<
         \new Voice \relative c' {
         \new Voice \relative c' {  
             \stemUp \clef bass \key e \minor \time 4/4
             \stemUp \clef bass \key e \minor \time 4/4
             \partial2 g8 a b4 c b cis b8 a! gis1
             \partial2 g8 a b4 c b cis b8 a! gis1
Line 37: Line 65:
  \key c \minor
  \key c \minor
  \clef "treble_(8)"
  \clef "treble_(8)"
  \time 4/4
  \time 4/4
     c'1 as2 bes2 c2 c2 es2 d2 c1 es1 f2 es2
     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
     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
     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
     as2 bes2 g1 f1 as2 bes2 c2 as2 bes2 g2 f1
}
}
Line 50: Line 78:
     }
     }
}</score>
}</score>
== Testing raw input ==
;Note: this requires safe mode to be disabled.
From [https://en.wikipedia.org/wiki/Keyboard_Sonata,_K._141_(Scarlatti) Keyboard Sonata, K. 141 (Scarlatti)], testing raw=1:
<score 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 { }
}
</score>


== Note ==
== Note ==


* For scores on Wikipedia, see [https://en.wikipedia.org/wiki/Special:PagesWithProp?propname=score Special:PagesWithProp]
* For scores on Wikipedia, see [https://en.wikipedia.org/wiki/Special:PagesWithProp?propname=score Special:PagesWithProp]

Latest revision as of 21:54, 3 December 2026

Testing

Raw score output

T289399 inline usage

T289399 allows for inline use, by rendering music in a <span> element instead of the usual <div>. So for example, this example from the cited page on WikiSource segment of music notation generated by Score should now form part of the text flow.

Without specifying the inline parameter, Score displays in a div, as usual:

segment of music notation generated by Score

With sound requested, inline segment of music notation generated by Score does not display audio controls, otherwise:

segment of music notation generated by Score

T60688 staff instrument name bug

Task T60688 staff with name "Clarinet" displays as "inet" instead of "Clarinet":

segment of music notation generated by Score

Conclusion: cannot reproduce with Lilypond 2.23.82 and Score from recent master using SVG output (see Special:Version).

Example Scores for SVG output

From Cadence:

segment of music notation generated by Score

Multi-system input

From String Quartet No. 1 (Górecki)

segment of music notation generated by Score

Note