Gilles <[email protected]> writes:
>> You noticed yourself that this does not work well with chords, but it
>> also does not play overly well with \relative if you write \av c' for
>> example.
>
> In the \samePitch function, i try to play with the property
> 'to-relative-callback. It seems to work also here but of course, it is
> heavier -:( (see below )
Yes. In this kind of situation, it is probably the simplest way out.
If you use \displayLilyMusic _after_ applying \relative to such an
expression, you would not notice the difference...
> For chords, is it conceivable to imagine a ly:pitches? function, (so
> for chords), that would be compatible in #{ #}, in the same way
> ly:pitch? is. And even, an ly:pitch?-or-ly:pitches? function for
> notes and chords ? (well, probably with better names ...)
I guess you overestimate the role of ly:pitch? here. It basically is a
predicate that the parser applies to basic LilyPond syntax entities to
figure out whether to permit them into the function.
Now it is true that there is a bit of disambiguation going on as well,
and it is actually true that in current master, ly:pitch? is indeed
special-cased, meaning you can't mix it with other predicates. But that
is slated to go. So if you want to accept note-or-chord, just accept a
ly:music? expression and go from there, looking at its being note or
chord.
--
David Kastrup
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user