Aaron Hill <[email protected]> writes:
> On 2018-05-11 06:53, Gianmaria Lari wrote:
>> Sorry to bother with a simple question. Why this does not work?
>>
>> \version "2.19.81"
>> pit = #(define-music-function
>> (p) (ly:pitch?)
>> #{ $p #}
>> )
>> { \pit c' }
>
> The result is "error: music function cannot return c'". It appears
> that a simple pitch by itself is not enough to qualify as music.
It's desirable to be able to enter pitches as #{ c' #} and similar. Add
a duration to get a music expression.
> If you change the function to "#{ { $p } #}", it compiles.
Yes, but the duration is not really well-defined here (happens to end up
as the default duration of the current parser).
--
David Kastrup
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user