Hi all,

I'm trying to provide id-values to noteheads or barlines for use with the SVG output so I can access them using JavaScript. In the archive I found the snipped below.

1. Is there a property that gives me a timecode-like value for a notehead with a bar and beat number of a note?

2. I also tried to assign a string id to a BarLine, but that doesn't appear in the svg. Is there a workaround for that?

Best, Boris

#(define (note-number grob)
(string-concatenate
 (list
  "NoteHead/"
  (number->string
    (ly:beam-score-count)))))
      (ly:event-property (ly:grob-property grob 'cause)'pitch))))))
      (number->string


\override NoteHead #'id = #note-number


\relative c' {
  c8 d e f
}

--
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
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to