Thomas Morley <thomasmorle...@gmail.com> writes: > 2015-06-19 6:48 GMT+02:00 David Kastrup <d...@gnu.org>: >> Thomas Morley <thomasmorle...@gmail.com> writes: >> >>> 2015-06-18 23:37 GMT+02:00 David Kastrup <d...@gnu.org>: >>>> Thomas Morley <thomasmorle...@gmail.com> writes: >>>>> >>>>> \version "2.18.2" >>>>> >>>>> #(define nashville-chord-engraver >>>>> (let ((root (ly:make-pitch 0 0 0))) >>>> >>>> That should rather be >>>> >>>> #(define (nashville-chord-engraver context) >>>> (let ((root (ly:make-pitch 0 0 0))) >>>> [...] >>>> >>> >>> Thanks. >>> >>> Not sure what exactly you mean with the following. >>> Is it an additional comment to the above or a second concern? >>> >>>> In your proposal, all engraver instances share the same "root", a recipe >>>> for trouble. >> >> It is an additional comment on the above. If you have one transposed >> voice, for example, having all engravers working with the same "root" is >> not going to be a good idea. Or when having a \markup { \score ... } >> inside for some purpose, there will still only be one root for both the >> enclosing score and the score inside the markup. > > if I understand your hints correctly, then some use-cases will break > or at least return wrong/weird output. > Though, I wasn't able to find any. > May I ask you, if you've the time to find and supply an example, > triggering the problem? > > Here, what I've tried so far (the mainly unchanged engraver is included): > > \version "2.18.2" > > #(define (nashville-chord-engraver context)
Stop. I was describing the problems with the _original_ version that was using #(define nashville-chord-engraver ... instead. After changing this static definition into a function, the problem is of course fixed: every function call gets its own "root" variable. That was my point. So if you want to see the described problem, you need to change the nashville-chord-engraver definition back to the original version. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user