Re: output-attributes in 2.20.0
On Sun, 2020-08-02 at 14:32 +0200, David Kastrup wrote: > Richard Shann writes: > > > I'm trying to get the annotated SVG output that enables playback > > with a > > scrolling LilyPond score working in 2.20. > > > > In the changes http://lilypond.org/doc/v2.20/Documentation/changes/ > > inde > > x.html I read: > > > > "A new output-attributes grob property is now used for svg output > > instead of the id grob property. It allows multiple attributes to > > be > > defined as an association list. For example, #'((id . 123) (class . > > foo) (data-whatever . “bar”)) will produce the following group tag > > in > > an SVG file: … " > > > > but I see that the convert-ly changes this: > > > > \override NoteHead.id = #note-id > > > > to this: > > > > \override Score.NoteHead.output-attributes.id = #note-id > > > > which is not an alist. > > Why would output-attributes not be an alist? > > > Moreover, in the code I'm using > > (http://git.savannah.gnu.org/gitweb/?p=denemo.git;a=blob;f=actions/ > > lilypond/live- > > score.ily;h=5a9d22fe5efe89e9f63a087177d206eab63109f0;hb=HEAD) > > note-id is a procedure returning a string, which seems to be > > acceptable to the 2.18 SVG generator while the 2.20 version gives > > an > > error message: > > > > Unsupported SCM value for format: # > > Callbacks are not supported for subproperties. > > > and the output in the SVG is an empty string: > > > > > > > > while with 2.18 > > > > the output was (for example) > > > > > > > > where "Note-7-2" is the return value for the particular grob - the > > line > > 7 column 2 location information. > > > > What's more, if I write an alist value (following the documentation > > above) > > You are not following the documentation. You are presuming that the > documentation is wrong, substitute what you consider a correction, > and > the result does not work. > > > \override Score.NoteHead.output-attributes.id = #'((id . "foo")) > > > > I get the error: > > > > Unsupported SCM value for format: ((id . foo)) > > Because you set output-attributes to ((id . ((id . "foo" rather > than > to ((id . "foo")). > > > So what should output-attributes.id be set to - can it take a > > procedure > > as id could in 2.18? > > output-attributes can take a procedure (which must return a complete > alist). id doesn't. Thank you. By "output-attributes can take a procedure" I guessed you might mean "can be set equal to a procedure", although I haven't found where that is documented (*), so I set \override Score.NoteHead.output-attributes = #note-id and re-defined the procedure note-id to be #(define (note-id grob) (let* ((origin (ly:input-file-line-char-column (ly:event-property (ly:grob-property grob 'cause) 'origin))) (value (string-concatenate (list "Note-" (ly:format "~a-~a" (cadr origin) (caddr origin)) (cons (cons 'id value) '( and all is well. There is some more elegant syntax for the alist, but I'll stop while I'm ahead. Richard Shann (*) The documentation says "SVG output can optionally contain metadata for graphical objects (grobs) like note heads, rests, etc. This metadata can be standard SVG attributes like id and class, or non-standard custom attributes. Specify the attributes and their values by overriding a grob’s output- attributes property with a Scheme association list (alist). The values can be numbers, strings, or symbols. For example: " I suggest "SVG output can optionally contain metadata for graphical objects (grobs) like note heads, rests, etc. This metadata can be standard SVG attributes like id and class, or non-standard custom attributes. Specify the attributes and their values by overriding a grob’s output- attributes property with a Scheme association list (alist) or a procedure returning an alist. The values can be numbers, strings, or symbols. For example:"
Re: output-attributes in 2.20.0
Richard Shann writes: > I'm trying to get the annotated SVG output that enables playback with a > scrolling LilyPond score working in 2.20. > > In the changes http://lilypond.org/doc/v2.20/Documentation/changes/inde > x.html I read: > > "A new output-attributes grob property is now used for svg output > instead of the id grob property. It allows multiple attributes to be > defined as an association list. For example, #'((id . 123) (class . > foo) (data-whatever . “bar”)) will produce the following group tag in > an SVG file: … " > > but I see that the convert-ly changes this: > > \override NoteHead.id = #note-id > > to this: > > \override Score.NoteHead.output-attributes.id = #note-id > > which is not an alist. Why would output-attributes not be an alist? > Moreover, in the code I'm using > (http://git.savannah.gnu.org/gitweb/?p=denemo.git;a=blob;f=actions/lilypond/live-score.ily;h=5a9d22fe5efe89e9f63a087177d206eab63109f0;hb=HEAD) > > note-id is a procedure returning a string, which seems to be > acceptable to the 2.18 SVG generator while the 2.20 version gives an > error message: > > Unsupported SCM value for format: # Callbacks are not supported for subproperties. > and the output in the SVG is an empty string: > > > > while with 2.18 > > the output was (for example) > > > > where "Note-7-2" is the return value for the particular grob - the line > 7 column 2 location information. > > What's more, if I write an alist value (following the documentation > above) You are not following the documentation. You are presuming that the documentation is wrong, substitute what you consider a correction, and the result does not work. > \override Score.NoteHead.output-attributes.id = #'((id . "foo")) > > I get the error: > > Unsupported SCM value for format: ((id . foo)) Because you set output-attributes to ((id . ((id . "foo" rather than to ((id . "foo")). > So what should output-attributes.id be set to - can it take a procedure > as id could in 2.18? output-attributes can take a procedure (which must return a complete alist). id doesn't. -- David Kastrup
output-attributes in 2.20.0
I'm trying to get the annotated SVG output that enables playback with a scrolling LilyPond score working in 2.20. In the changes http://lilypond.org/doc/v2.20/Documentation/changes/inde x.html I read: "A new output-attributes grob property is now used for svg output instead of the id grob property. It allows multiple attributes to be defined as an association list. For example, #'((id . 123) (class . foo) (data-whatever . “bar”)) will produce the following group tag in an SVG file: … " but I see that the convert-ly changes this: \override NoteHead.id = #note-id to this: \override Score.NoteHead.output-attributes.id = #note-id which is not an alist. Moreover, in the code I'm using (http://git.savannah.gnu.org/gitweb/?p=denemo.git;a=blob;f=actions/lilypond/live-score.ily;h=5a9d22fe5efe89e9f63a087177d206eab63109f0;hb=HEAD) note-id is a procedure returning a string, which seems to be acceptable to the 2.18 SVG generator while the 2.20 version gives an error message: Unsupported SCM value for format: # and the output in the SVG is an empty string: while with 2.18 the output was (for example) where "Note-7-2" is the return value for the particular grob - the line 7 column 2 location information. What's more, if I write an alist value (following the documentation above) \override Score.NoteHead.output-attributes.id = #'((id . "foo")) I get the error: Unsupported SCM value for format: ((id . foo)) So what should output-attributes.id be set to - can it take a procedure as id could in 2.18? Richard Shann
PATCHES - Countdown for August 2nd
Hello, Here is the current patch countdown list. The next countdown will be on August 4th. A list of all merge requests can be found here: https://gitlab.com/lilypond/lilypond/-/merge_requests?sort=label_priority Push: !285 Define color names and procedures as safe - Tim Starling https://gitlab.com/lilypond/lilypond/-/merge_requests/285 !282 Fix and unify relocation of Python scripts - Jonas Hahnfeld https://gitlab.com/lilypond/lilypond/-/merge_requests/282 !279 Use configured LaTeX for tests of lilypond-book - Jonas Hahnfeld https://gitlab.com/lilypond/lilypond/-/merge_requests/279 !278 makefile: simplify checking for a test baseline - Dan Eble https://gitlab.com/lilypond/lilypond/-/merge_requests/278 Countdown: !297 Remove "socket" backend - Han-Wen Nienhuys https://gitlab.com/lilypond/lilypond/-/merge_requests/297 !293 Fix iteration in Tie_performer::acknowledge_audio_element - Tim Starling https://gitlab.com/lilypond/lilypond/-/merge_requests/293 !291 Fix overwriting files on Windows - Jonas Hahnfeld https://gitlab.com/lilypond/lilypond/-/merge_requests/291 !289 Inline abc make rules - Han-Wen Nienhuys https://gitlab.com/lilypond/lilypond/-/merge_requests/289 !288 Major cleanup in fret-diagrams.scm - Thomas Morley https://gitlab.com/lilypond/lilypond/-/merge_requests/288 !287 Make all the lily-library constants "safe" - Tim Starling https://gitlab.com/lilypond/lilypond/-/merge_requests/287 !286 Fix lilypond-book on Windows - Jonas Hahnfeld https://gitlab.com/lilypond/lilypond/-/merge_requests/286 !284 Copy markup lists when concatenating - David Kastrup https://gitlab.com/lilypond/lilypond/-/merge_requests/284 !270 Tweak outside-staff-placement-directive regression test - Jean Abou Samra https://gitlab.com/lilypond/lilypond/-/merge_requests/270 !268 Update documentation for font changes - Daniel Benjamin Miller https://gitlab.com/lilypond/lilypond/-/merge_requests/268 !264 Cleanup annotation and font-size - Thomas Morley https://gitlab.com/lilypond/lilypond/-/merge_requests/264 !84 Rewrite doc build - Han-Wen Nienhuys https://gitlab.com/lilypond/lilypond/-/merge_requests/84 Review: !295 musicxml2ly: Enable the '--no-rest-positions' option - John Lemcke https://gitlab.com/lilypond/lilypond/-/merge_requests/295 New: !299 Ensure string for ps-quote in dump-pdf-bookmarks - Thomas Morley https://gitlab.com/lilypond/lilypond/-/merge_requests/299 !298 Fix crash on isolated mid-score percent repeat - Dan Eble https://gitlab.com/lilypond/lilypond/-/merge_requests/298 !296 lily.scm: reformat `-dhelp` output - Werner Lemberg https://gitlab.com/lilypond/lilypond/-/merge_requests/296 Waiting: !292 Separate iterator creation from context creation - Dan Eble https://gitlab.com/lilypond/lilypond/-/merge_requests/292 !263 website fixes for cross checking !84 - Han-Wen Nienhuys https://gitlab.com/lilypond/lilypond/-/merge_requests/263 !261 doc: Fixes for info file installation - Werner Lemberg https://gitlab.com/lilypond/lilypond/-/merge_requests/261 !223 Clean up and annotate postprocess_html.py - Han-Wen Nienhuys https://gitlab.com/lilypond/lilypond/-/merge_requests/223 !204 Move parallel processing to lilypond-book - Han-Wen Nienhuys https://gitlab.com/lilypond/lilypond/-/merge_requests/204 !202 Fix xrefs in learning manual - Han-Wen Nienhuys https://gitlab.com/lilypond/lilypond/-/merge_requests/202 !200 Add snippet translations - Han-Wen Nienhuys https://gitlab.com/lilypond/lilypond/-/merge_requests/200 *** Regards, James
Re: GSoC-2020 update: Jul 31
Am Samstag, den 01.08.2020, 23:31 +0200 schrieb Jean Abou Samra: > While I generally prefer merging over rebasing, since we enforce an > all-fast-forward policy for merging to master, I think we should rebase > here. My reasoning is that you put in more information when resolving > conflicts during a rebase: merging means you unify two diverging > histories, thus you get prompted once and for all, but rebasing forces > you to resolve conflicts for each intermediary commit. But only for conflicts that git detects. For example, it doesn't guarantee at all that every intermediate commit can be built afterwards (in fact, I rather find this unlikely for larger changes). > As far as my > understanding extends, if Owen merges now, there will still be work left > for rebasing at the end of the project, part of which will be > duplicated. By contrast, rebasing now means less error-prone work in the > future. I think we're not going to just merge (in whatever way) all commits from the branch to master at the end of the summer, are we? Eventually this means the changes need to be split into reviewable chunks, as is also a policy of the project. For now, I'd leave the branch where it is. At least this guarantees that all commits work the way Owen wrote them. Jonas signature.asc Description: This is a digitally signed message part