Scheme execution: Difference between revisions

From ZMOG test wiki (master branch)
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== T441579 examples ==
== T441579 mitigating Scheme execution risks ==


Can we just reject anything containing <code>#( ... scheme code ... )</code> sequences and be happy with slightly reduced LilyPond functionality?
Can we just reject anything containing <code>#( ... scheme code ... )</code> sequences and be happy with slightly reduced LilyPond functionality?


From [https://en.wikipedia.org/wiki/Drum_beat Drum beat], contains <code>#(ly:make-moment 1/8)</code>: <score raw="1" sound="1">
=== Examples ===
 
From [https://en.wikipedia.org/wiki/Dynamics_(music) Dynamics (music)], contains <code>#(set-global-staff-size 14)</code>: <score> {
#(set-global-staff-size 14)
\new StaffGroup
\with {
    \omit SystemStartBracket
    \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #15
  } <<
\new PianoStaff <<
\new Staff \with { \magnifyStaff #3/4 } <<
\relative c'' { \time 4/4 \clef treble \key cis \minor \tempo "Tempo I" \tempo 4 = 50 \set Staff.extraNatural = ##f r8\fff _\markup {\left-align \italic m.d.} <cis e gis cis>-> <e gis b e>->_\markup { \italic pesante} <dis fisis ais dis>-> r <d fis bis d>-> r <bis dis fis bis>-> r <cis e gis cis>->_\markup {\dynamic sffff} <e gis b e>-> <dis fisis ais dis>-> r <d fis bis d>-> r <bis dis fis bis>->}
>>
\new Staff \with { \magnifyStaff #3/4 } <<
\relative c { \time 4/4 \clef treble \key cis \minor <cis e gis cis>2-> <a' a'>4-> <gis gis'>-> <cis, e gis cis>2-> <a' a'>4-> <gis gis'>->}
>>
>>
 
\new PianoStaff <<
\new Staff \with { \magnifyStaff #3/4 } <<
\relative c { \time 4/4 \clef bass \key cis \minor \set Staff.extraNatural = ##f r8\fff _\markup {\left-align \italic m.s.} <e gis cis e>-> <gis b e gis>->_\markup { \italic pesante} <fisis ais dis fisis>-> r <fis bis d fis>-> r <dis fis bis dis>-> r <e gis cis e>->_\markup {\dynamic sffff} <gis b e gis>-> <fisis ais dis fisis>-> r <fis bis d fis>-> r <dis fis bis dis>->}
>>
\new Staff \with { \magnifyStaff #3/4 } <<
\relative c,, { \time 4/4 \clef bass \key cis \minor <cis e gis cis>2->\sustainOn <a' a'>4-> \sustainOff \sustainOn <gis gis'>->\sustainOn <cis, e gis cis>2-> \sustainOn <a' a'>4->\sustainOff \sustainOn <gis gis'>->\sustainOn}
>>
>>
>>
} </score>
 
From [https://en.wikipedia.org/wiki/Drill_Call Drill Call], contains <code>#(layout-set-staff-size 18)</code> and uses raw=1: <score lang="lilypond" raw="1">
\header {
  title  = "Drill Call"
  tagline = ##f
}
\paper {
  #(layout-set-staff-size 18)
}
\score {
  \relative c'' {
    \tempo  4=144
    \key    c \major
    \time    2/4
    \set    Staff.midiInstrument = #"french horn"
 
    \partial 8
    c16 c16
    c8-. g16 g16 g8-. e'16 e16
    e8-. c16 c16 c8  r8
    g8-. c16 e16 g8-. e8-.
    g4.              c,16 c16
    c8-. g16 g16 g8-. e'16 e16
    e8-. c16 c16 c8  r8
    g8-. g16 g16 \times 2/3 { g8 g8 g8 }
    c4 ~ c8
    \bar "|."
  }
  \layout { }
  \midi  { }
}
</score>
 
From [https://en.wikipedia.org/wiki/Drum_beat Drum beat], contains <code>#(ly:make-moment 1/8)</code> and uses raw=1: <score raw="1">
\version "2.22.0"
\version "2.22.0"
\header { tagline = ##f}
\header { tagline = ##f}
Line 35: Line 96:
</score>
</score>


From [https://en.wikipedia.org/wiki/Dynamics_(music) Dynamics (music)], contains <code>#(set-global-staff-size 14)</code>: <score sound="1"> {
From Doo-wop, uses <code>#n</code> numbers, parameters to <code>\hspace</code>: <score> {
#(set-global-staff-size 14)
\relative c' { \set Score.tempoHideNote = ##t \tempo 2 = 120
\new StaffGroup
  \clef treble
\with {
  \time 4/4
    \omit SystemStartBracket
  \key c \major
    \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #15
  <c e g>1_\markup { \concat { \translate #'(-3.5 . 0) { "C:  I" \hspace #7 "vi" \hspace #6 "IV" \hspace #6 "V" \hspace #7 "I" } } }
  } <<
  <a c e a> <f c' f a> <g b d g> <c e g> \bar "||"
\new PianoStaff <<
} }
\new Staff \with { \magnifyStaff #3/4 } <<
</score>
\relative c'' { \time 4/4 \clef treble \key cis \minor \tempo "Tempo I" \tempo 4 = 50 \set Staff.extraNatural = ##f r8\fff _\markup {\left-align \italic m.d.} <cis e gis cis>-> <e gis b e>->_\markup { \italic pesante} <dis fisis ais dis>-> r <d fis bis d>-> r <bis dis fis bis>-> r <cis e gis cis>->_\markup {\dynamic sffff} <e gis b e>-> <dis fisis ais dis>-> r <d fis bis d>-> r <bis dis fis bis>->}
>>
\new Staff \with { \magnifyStaff #3/4 } <<
\relative c { \time 4/4 \clef treble \key cis \minor <cis e gis cis>2-> <a' a'>4-> <gis gis'>-> <cis, e gis cis>2-> <a' a'>4-> <gis gis'>->}
>>
>>
 
\new PianoStaff <<
\new Staff \with { \magnifyStaff #3/4 } <<
\relative c { \time 4/4 \clef bass \key cis \minor \set Staff.extraNatural = ##f r8\fff _\markup {\left-align \italic m.s.} <e gis cis e>-> <gis b e gis>->_\markup { \italic pesante} <fisis ais dis fisis>-> r <fis bis d fis>-> r <dis fis bis dis>-> r <e gis cis e>->_\markup {\dynamic sffff} <gis b e gis>-> <fisis ais dis fisis>-> r <fis bis d fis>-> r <dis fis bis dis>->}
>>
\new Staff \with { \magnifyStaff #3/4 } <<
\relative c,, { \time 4/4 \clef bass \key cis \minor <cis e gis cis>2->\sustainOn <a' a'>4-> \sustainOff \sustainOn <gis gis'>->\sustainOn <cis, e gis cis>2-> \sustainOn <a' a'>4->\sustainOff \sustainOn <gis gis'>->\sustainOn}
>>
>>
>>
} </score>

Latest revision as of 01:05, 6 December 2026

T441579 mitigating Scheme execution risks

Can we just reject anything containing #( ... scheme code ... ) sequences and be happy with slightly reduced LilyPond functionality?

Examples

From Dynamics (music), contains #(set-global-staff-size 14):

segment of music notation generated by Score

From Drill Call, contains #(layout-set-staff-size 18) and uses raw=1:

segment of music notation generated by Score

From Drum beat, contains #(ly:make-moment 1/8) and uses raw=1:

segment of music notation generated by Score

From Doo-wop, uses #n numbers, parameters to \hspace:

segment of music notation generated by Score