[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible feature request for 'q' shorthand or tie syntax
From: |
David Kastrup |
Subject: |
Re: Possible feature request for 'q' shorthand or tie syntax |
Date: |
Fri, 21 Sep 2012 12:34:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Gilles <address@hidden> 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
- Re: Possible feature request for 'q' shorthand or tie syntax, (continued)
Re: Possible feature request for 'q' shorthand or tie syntax, Stefan Thomas, 2012/09/20