lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: music-cause


From: David Kastrup
Subject: Re: music-cause
Date: Sun, 22 Jan 2012 12:36:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Graham Percival <address@hidden> writes:

> On Sun, Jan 22, 2012 at 11:49:06AM +0100, David Kastrup wrote:
>> 
>> Anybody actually using the "music-cause"?  Inside of LilyPond, the only
>> appearance (apart from its declaration) would be
>>
>>   /*
>>     ES TODO: This is a temporary fix. Stream_events should not be
>>     aware of music.
>>   */
>>   e->set_property ("music-cause", self_scm ());
>
> If it's used anywhere, it would be here:
> http://lilypond.org/website/pdf/thesis-erik-sandberg
>
> It may have been added just so he could produce some graphs or
> tables or something?  I know that I have a ton of "graph-producing
> code" in Artifastring and Vivi like that.

Seems somewhat pointless since events take the whole mutable property
list of their originating music event anyway.  If you need more for
tracking, you could just do

maketrackable =
#(define-music-function (parser location m)
  (music-map
    (lambda (m)
       (set! ly:music-property 'music-cause m)
       m)
    m))

and call that on your music before processing.


-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]