lilypond-devel
[Top][All Lists]
Advanced

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

Re: Grob type (and other metadata) in point-and-click url


From: Patrick McCarty
Subject: Re: Grob type (and other metadata) in point-and-click url
Date: Mon, 20 Jul 2009 03:22:26 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Jul 20, 2009 at 11:05:27AM +0200, Bertalan Fodor (LilyPondTool) wrote:
> Would it be theoretically possible to include other metadata in the  
> point-and-click url besides the input file position?
> I'm looking at:
>
> (define (grob-cause offset grob
>
> I'm not sure, how much information is included in that grob object.
>
> If a text script for example would have the information that it is a  
> Voice.TextScript, or that the notehead it is coming from a note event it  
> would allow powerful finishing tools, like extra-offset, adding  
> transposition in the editors.

Yes, you can get more information from grob-cause.

A quick inspection with GDB reveals this cause for a NoteHead grob
(indented for easier reading) in a particular file I have:


(cause
 . #<Prob: Stream_event C++: Stream_event
    ((music-cause
      . #<Prob: Music C++: Music
         ((length . #<Mom 1/4>)
          (elements)
          (duration . #<Duration 4 >)
          (pitch . #<Pitch a >)
          (origin . #<location test.ly:34:33>))
          ((display-methods #<procedure #f (note parser)>)
           (name . NoteEvent)
           (types general-music
                  event
                  note-event
                  rhythmic-event
                  melodic-event))>)
    (length . #<Mom 1/4>)
    (elements)
    (duration . #<Duration 4 >)
    (pitch . #<Pitch a >)
    (origin . #<location test.ly:34:33>))
    ((class . note-event))>)


Hopefully that will give you some ideas about using grob-cause.  :-)

-Patrick




reply via email to

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