[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to restore default-stem-attachment with note-head-stencil-override?
From: |
Thomas Morley |
Subject: |
How to restore default-stem-attachment with note-head-stencil-override? |
Date: |
Wed, 18 Jul 2012 20:00:59 +0200 |
Hi,
adding sth to a NoteHead-stencil via stencil-override returns a weird
output with stemmed NoteHeads.
In the code below I added a box around the default-note-head and the
stem is moving away.
Is there any possibility to restore the original 'stem-attachment in
an automated way?
\version "2.15.39"
#(set-global-staff-size 30)
xy =
\override NoteHead #'stencil =
#(lambda (grob)
(let* ((stil (ly:note-head::print grob))
(stil-1 (grob-interpret-markup grob (markup #:box #:stencil stil)))
(st-pos (ly:grob-property grob 'stem-attachment)))
;; This duplicates the default
(ly:grob-set-property! grob 'stem-attachment (cons (car st-pos) (cdr st-pos)))
stil-1))
\relative c'' {
\xy
\override Stem #'color = #red
\override Stem #'layer = #-10
g4
}
In the attached png you can see how it should look in the second line,
tweaked manually.
Cheers,
Harm
stem-attachment.png
Description: PNG image
- How to restore default-stem-attachment with note-head-stencil-override?,
Thomas Morley <=
- Re: How to restore default-stem-attachment with note-head-stencil-override?, Keith OHara, 2012/07/18
- Re: How to restore default-stem-attachment with note-head-stencil-override?, Thomas Morley, 2012/07/18
- Re: How to restore default-stem-attachment with note-head-stencil-override?, Keith OHara, 2012/07/18
- Re: How to restore default-stem-attachment with note-head-stencil-override?, Janek WarchoĊ, 2012/07/19
- Re: How to restore default-stem-attachment with note-head-stencil-override?, Thomas Morley, 2012/07/20
- Re: How to restore default-stem-attachment with note-head-stencil-override?, Keith OHara, 2012/07/20
- Message not available
- Message not available
- Re: How to restore default-stem-attachment with note-head-stencil-override?, Thomas Morley, 2012/07/21