[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: simple scheme function #{ $note #}
From: |
David Kastrup |
Subject: |
Re: simple scheme function #{ $note #} |
Date: |
Fri, 11 May 2018 18:34:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Aaron Hill <address@hidden> writes:
> On 2018-05-11 08:46, David Kastrup wrote:
>> Aaron Hill <address@hidden> 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.
>
> But can you return an incomplete music expression?
There is no "incomplete music expression". #{ ... #} is used for
converting a whole slew of different expression types from LilyPond
syntax to Scheme: pitches, durations, markups, music, numbers with
dimension and other stuff. A pitch is not an "incomplete music
expression". It's a type of its own.
--
David Kastrup
- simple scheme function #{ $note #}, Gianmaria Lari, 2018/05/11
- Re: simple scheme function #{ $note #}, Aaron Hill, 2018/05/11
- Re: simple scheme function #{ $note #}, David Kastrup, 2018/05/11
- Re: simple scheme function #{ $note #}, Aaron Hill, 2018/05/11
- Re: simple scheme function #{ $note #}, Gianmaria Lari, 2018/05/11
- Re: simple scheme function #{ $note #},
David Kastrup <=
- Re: simple scheme function #{ $note #}, Aaron Hill, 2018/05/11
- Re: simple scheme function #{ $note #}, David Kastrup, 2018/05/11
- Re: simple scheme function #{ $note #}, Aaron Hill, 2018/05/11
- Re: simple scheme function #{ $note #}, David Kastrup, 2018/05/12
- Re: simple scheme function #{ $note #}, Aaron Hill, 2018/05/12
- Re: simple scheme function #{ $note #}, David Kastrup, 2018/05/12