bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \balloonText applied to single note errors with symbol->string ??


From: David Kastrup
Subject: Re: \balloonText applied to single note errors with symbol->string ??
Date: Mon, 30 Sep 2019 12:35:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> Am Sa., 28. Sept. 2019 um 21:54 Uhr schrieb David Kastrup <address@hidden>:
>>
>> Thomas Morley <address@hidden> writes:
>>
>> > Hi,
>> >
>> > the code below
>> >
>> > \layout { \context { \Voice \consists "Balloon_engraver" } }
>> > { c'-\balloonText #'(2 . 0) \markup { "1" } }
>> >
>> > returns (in 2.21.0):
>> > ERROR: In procedure symbol->string:
>> > ERROR: Wrong type argument in position 1 (expecting symbol): ()
>> >
>> > 2.18.2 gives a more useful message:
>> > /home/hermann/lilypond/usr/share/lilypond/current/scm/lily-library.scm:242:8:
>> > In procedure symbol->string in expression (process-procedure book
>> > paper ...):
>> > /home/hermann/lilypond/usr/share/lilypond/current/scm/lily-library.scm:242:8:
>> > Wrong type argument in position 1 (expecting symbol): ()
>> >
>> > Though, I've no clue where symbol->string comes into the game...
>>
>> In lily/balloon-engraver.cc
>>
>> > Ofcourse the NR recommends to use balloonText _inside_ of chords, and
>> > indeed the problem goes away, wrapping the note in an event-chord.
>> > But shouldn't it work as a postevent to a single note, too??
>>
>> The implementation does not work with separate AnnotateOutput events
>> (more exactly, they require specifying the particular grob type to use
>> since usually a number of grobs could be annotated).  One could try to
>> capture all rhythmic-events and annotate them all.  It's all reasonably
>> icky stuff that should at one point of time be upgraded to look like
>> what we do with footnotes.  As a stopgap measure, one could use the
>> following patch for a bit nicer behavior.
>
> Hi David,
>
> thanks for the explanations.
> A warning directly pointing to the problem is of course very helpful.
>
> Though, how about making balloonText work outside of chords? Therefore
> one could provide an optional default argument, i.e. NoteHead, for
> in-chord usage.

Well, that's not really a solution rather than papering over a problem
in a manner that will happen to match expected use in the majority of
uses.  Make no mistake, it would decrease the amount of problem reports
but be quite confusing when it doesn't do the trick.

For just bypassing the warning, one could just put in NoteHead fixedly
in the music for the \balloonText case and be done without changing any
interface.  But the result is a missing warning and thus unchanged code.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]