lilypond-user
[Top][All Lists]
Advanced

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

Re: Accessing "timecode" of notes or bars


From: Boris Lau
Subject: Re: Accessing "timecode" of notes or bars
Date: Sun, 20 Apr 2014 16:50:09 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

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



reply via email to

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