lilypond-user
[Top][All Lists]
Advanced

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

Re: Writing a number in stead of notehead.


From: Malte Meyn
Subject: Re: Writing a number in stead of notehead.
Date: Tue, 22 Mar 2016 18:58:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0



Am 22.03.2016 um 18:23 schrieb Philip Bergwerf:
Hello dear lilypond users!

I am experimenting with rhytmic notation. How can i change a notehead into a
digit? Is there a way to do that. Of course there is! Please tell me and i
did see once a notation with numbers as rhytmic notation but i couldnt find
it. If someone knows please let me know.

Cheers, Philip Bergwerf


Please be more specific: into what sort of number? Only depending on the sort of head or on the duration? The duration with or without dots, as logarithm or not? How to treat tuplets?

Here a wild guess:

%%%%%

\version "2.19.38"

\new RhythmicStaff \with {
  \override NoteHead.stencil =
  #(lambda (grob)
     (let* ((event (event-cause grob))
            (durlog (ly:duration-log (ly:event-property event 'duration)))
            (durstring (number->string (expt 2 durlog))))
       (grob-interpret-markup grob durstring)))
} {
  2. 4 4 8 16 32 32 \tuplet 3/2 { 8 8 8 } 8.. 32
}



reply via email to

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