Sorry, there was an error in my posted snipped. Here is the correct version:

\version "2.16.2"
#(define (note-number grob)
 (string-concatenate
  (list
   "NoteHead/"
   (number->string
    (ly:pitch-semitones
     (ly:event-property (ly:grob-property grob 'cause) 'pitch))))))

\relative c' {
  \time 4/4
\override NoteHead #'id = #note-number
    c d e
}

Please compile with lilypond -dbackend=svg test_id.ly

As expected, each notehead in the output is assigned with an id value, e.g., NoteHead/0, where the number indicates the pitch. Now I want to replace the pitch with its position in time expressed in bars and beats. Is this possible?

Best, Boris


On 20.04.14 16:24, Thomas Morley wrote:
please give us the link or provide a compilable snippet.
Otherwise I doubt you will get much help.

--
Boris Lau
-> Web:   http://www.borislau.de
-> Phone: +49 761 1529078 | SMS: +49 174 9436758
-> Mail:  Kartäuserstr. 124, D-79104 Freiburg, Germany

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to