[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nesting ly:music-property error
From: |
Michael Ellis |
Subject: |
Re: Nesting ly:music-property error |
Date: |
Sat, 29 Jan 2011 19:01:44 -0500 |
Sorry, my previous answer was rubbish. The following runs without
error and prints the pitch object.
myN = #(define-music-function (parser location myx ) (ly:music?)
(display-scheme-music
(ly:music-property
(car (ly:music-property myx 'elements))
'pitch))
myx)
\myN c
Cheers,
Mike
On Sat, Jan 29, 2011 at 6:46 PM, Michael Ellis
<address@hidden> wrote:
> Hi Scott,
>
> I think the problem is that the music in your example doesn't have an
> 'elements property. You can eliminate the error by changing the third
> line in your code to
>
> #(display-scheme-music (ly:music-property $myx 'pitch))
>
> but what gets displayed is an empty list '(). Probably not what you
> want, right?
>
> Some of the more experienced Schemers on the list may be able to offer
> better help.
>
> Cheers,
> Mike
>
>
>
> On Sat, Jan 29, 2011 at 6:28 PM, <address@hidden> wrote:
>> myN = #(define-music-function (parser location myx ) (ly:music?)
>> #{
>> #(display-scheme-music (ly:music-property (ly:music-property $myx 'elements)
>> 'pitch))
>> #})
>>
>> \myN c
>