[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Accessing "timecode" of notes or bars
From: |
Boris Lau |
Subject: |
Accessing "timecode" of notes or bars |
Date: |
Sun, 20 Apr 2014 15:45:20 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
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
- Accessing "timecode" of notes or bars,
Boris Lau <=