Difference between revisions of "Score testing"
From Jon's Wiki
m |
|||
| Line 1: | Line 1: | ||
[[File:Score_PNG_output_in_dark_theme.png|thumb|Unreadable Score extension output in dark mode]] | [[File:Score_PNG_output_in_dark_theme.png|thumb|Unreadable Score extension output in dark mode]] | ||
Hopefully I can get the Score extension working to [https://phabricator.wikimedia.org/T49578 produce SVG output], instead of the transparent PNG image that needs a white background styling for dark mode otherwise it's unreadable. | Hopefully I can get the Score extension working to [https://phabricator.wikimedia.org/T49578 produce SVG output], instead of the transparent PNG image that needs a white background styling for dark mode otherwise it's unreadable. | ||
| + | ;Update Januuary 2023: my patch was merged! :) now we wait for it to be tested and deployed. There are a few other issues, including some security and sandboxing concerns, e.g. CVE-2020-17354. | ||
== Examples == | == Examples == | ||
| Line 45: | Line 46: | ||
\bar "|." | \bar "|." | ||
} | } | ||
| + | </score> | ||
| + | |||
| + | == CV-2020-17354 == | ||
| + | |||
| + | See [https://phabricator.wikimedia.org/T259210 T259210] | ||
| + | |||
| + | 1. With defined location: <score> | ||
| + | { | ||
| + | \relative { c' } | ||
| + | } | ||
| + | |||
| + | #(begin | ||
| + | (define location 1) | ||
| + | (display "With output-def-scope\n") | ||
| + | (eval '(system "id") (ly:output-def-scope #{ \midi {} #})) | ||
| + | (display "With output-def-lookup\n") | ||
| + | ((ly:output-def-lookup #{ \midi {} #} 'system) "id") | ||
| + | ) | ||
| + | </score> | ||
| + | |||
| + | 2. and without: <score> | ||
| + | { | ||
| + | \relative { c' } | ||
| + | } | ||
| + | |||
| + | #(begin | ||
| + | (display "With output-def-scope\n") | ||
| + | (eval '(system "id") (ly:output-def-scope #{ \midi {} #})) | ||
| + | (display "With output-def-lookup\n") | ||
| + | ((ly:output-def-lookup #{ \midi {} #} 'system) "id") | ||
| + | ) | ||
| + | </score> | ||
| + | |||
| + | 3. Variant in comment from Han-wen Nienhuys: <score> | ||
| + | { | ||
| + | |||
| + | \override NoteHead.text = \system | ||
| + | \override NoteHead.stencil = | ||
| + | #(lambda (grob) | ||
| + | ((cdr (assoc 'text | ||
| + | (cadr (ly:grob-alist-chain grob '())))) "id") | ||
| + | #f) | ||
| + | c4 | ||
| + | |||
| + | } | ||
</score> | </score> | ||
Revision as of 20:46, 19 January 2023
Hopefully I can get the Score extension working to produce SVG output, instead of the transparent PNG image that needs a white background styling for dark mode otherwise it's unreadable.
- Update Januuary 2023
- my patch was merged! :) now we wait for it to be tested and deployed. There are a few other issues, including some security and sandboxing concerns, e.g. CVE-2020-17354.
Examples
Range of the contrabass trombone, as used on Wikipedia:

The Spear motif from Das Rheingold:

The Summit from Eine Alpensinfonie, which may or may not be a contrabass trombone excerpt, but probably ought to be:

CV-2020-17354
See T259210
1. With defined location:
Unable to compile LilyPond input file:
line 6 - column 1:
Spurious expression in \score2. and without:
Unable to compile LilyPond input file:
line 6 - column 1:
Spurious expression in \score3. Variant in comment from Han-wen Nienhuys:

