[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extract pitch and duration from ly:music
From: |
David Kastrup |
Subject: |
Re: Extract pitch and duration from ly:music |
Date: |
Wed, 21 Feb 2018 15:29:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Paolo Prete <address@hidden> writes:
> Hello,
> is it possible to extract pitch and duration, inside a function, from
> a ly:music (a simple note) parameter?
> I would like to obtain something like:
> func = #(define-music-function (parser location note dur)
> (ly:music) #{ .... $mypitch $myduration ..... #} )
> ... But I don't understand if is there a way to obtain $mipitch and
> $myduration
> I know that I can extract them with scheme:
> ((mypitch (ly:music-property note 'pitch '())) (myduration
> (ly:music-property note 'duration '())))
>
> But I see that it is not possible to use $mypitch and $myduration in
> the #{ ... #} scope.
Can you tell us what makes you see that?
--
David Kastrup