bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 1660 in lilypond: harmonicOn doesn't work in TabStaff


From: lilypond
Subject: Re: Issue 1660 in lilypond: harmonicOn doesn't work in TabStaff
Date: Mon, 23 May 2011 14:14:27 +0000


Comment #1 on issue 1660 by address@hidden: harmonicOn doesn't work in TabStaff
http://code.google.com/p/lilypond/issues/detail?id=1660

harmonicsOn only changes the form of the notehead.

There's no way via an override to get the note to be a harmonic on the TabStaffs w/o redoing the C++ side. It can, however, be done via music events. To wit:

#(define (harmonics-on music)
  (let ((es (ly:music-property music 'elements))
        (e (ly:music-property music 'element))
        (n (ly:music-property music 'name))
        (a (ly:music-property music 'articulations)))
    (if (ly:music? e)
        (ly:music-set-property!
         music 'element
         (harmonics-on e)))
    (if (eq? 'NoteEvent n)
        (ly:music-set-property!
         music 'articulations
         (cons (make-music 'HarmonicEvent) a))
        (map harmonics-on es)))
  music)

harmonickize =
#(define-music-function (parser location m) (ly:music?)
  (harmonics-on m))


music = \relative c'' {
  % Ok, it works in Staff and TabStaff
 <b\2\harmonic>2 <e\harmonic>

\harmonickize {
 b2\2 e
}

 <g,\3\harmonic>1
}

\new StaffGroup <<
 \new Staff { \clef "G_8" \music }
 \new TabStaff { \clef "moderntab" \music }






reply via email to

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