[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
collision of special notehead and accidental
From: |
takumi ikeda |
Subject: |
collision of special notehead and accidental |
Date: |
Mon, 14 Nov 2011 10:02:19 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
When using special notehead, accidental and notehead collide to some specific
notes. What should I do in order to avoid this using Scheme?
\version "2.14.2"
triBk =
#(ly:make-stencil
(list 'embedded-ps
"gsave
currentpoint translate
newpath
-.1675 .5 moveto
.65625 -.5 lineto
1.5 .5 lineto
closepath
fill
grestore" )
(cons -.1875 1.5)
(cons -.5 .5)
)
triWt =
#(ly:make-stencil
(list 'embedded-ps
"gsave
currentpoint translate
newpath
-.0775 .43 moveto
.65625 -.43 lineto
1.39 .43 lineto
closepath
0.1 setlinewidth
stroke
grestore" )
(cons -.1875 1.5)
(cons -.5 .5)
)
#(define (stencil-notehead grob)
(if (> 2 (ly:grob-property grob 'duration-log))
triWt triBk
)
)
upStem = #'(1 . .9)
downStem = #'(1 . -1)
#(define (pitch-to-stem stemdir)
(if (= UP stemdir) upStem downStem)
)
#(define (notehead-get-notecolumn nhgrob)
(ly:grob-parent nhgrob X))
#(define (notehead-get-stem nhgrob)
(let ((notecolumn (notehead-get-notecolumn nhgrob)))
(ly:grob-object notecolumn 'stem)))
#(define (stem-adjuster nhgrob)
(pitch-to-stem
(ly:grob-property (notehead-get-stem nhgrob) 'direction) ))
notes = \relative c' {
c2 cis d dis e f fis g gis a ais b
c cis d dis e f fis g gis a ais b
c4 b bes a aes g ges f e ees d des
c b bes a aes g ges f e ees d des
}
\new Staff
{
\override NoteHead #'stencil = #stencil-notehead
\override NoteHead #'stem-attachment = #stem-adjuster
<<
\notes
>>
}
- collision of special notehead and accidental,
takumi ikeda <=