Scheme execution: Difference between revisions

From ZMOG test wiki (master branch)
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
=== Examples ===
=== Examples ===


From [https://en.wikipedia.org/wiki/Dynamics_(music) Dynamics (music)], contains <code>#(set-global-staff-size 14)</code>: <score sound="1"> {
From [https://en.wikipedia.org/wiki/Dynamics_(music) Dynamics (music)], contains <code>#(set-global-staff-size 14)</code>: <score> {
#(set-global-staff-size 14)
#(set-global-staff-size 14)
\new StaffGroup
\new StaffGroup
Line 64: Line 64:
</score>
</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" sound="1">
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 96: Line 96:
</score>
</score>


From Doo-wop: <score sound="1"> {
From Doo-wop: <score> {
\relative c' { \set Score.tempoHideNote = ##t \tempo 2 = 120
\relative c' { \set Score.tempoHideNote = ##t \tempo 2 = 120
   \clef treble
   \clef treble

Revision as of 00:56, 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:

segment of music notation generated by Score