lilypond-user
[Top][All Lists]
Advanced

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

non-markup stencils


From: Sean Reed
Subject: non-markup stencils
Date: Sat, 30 Apr 2005 15:05:27 +0200

thanks again han-wen, mats, donald axel, jonatan, and fairchild for the help with the bartok pizz. it opened my eyes a bit to the flexibility of self-programmed extensions, specifically for extended performance techniques.

i am now attempting to put a little cross on the stems of notes for passages or pitches which are to be performed battuto (strings) or with "slap" articulations for winds.

i attempted to modify your examples with the attached patch (see below), but the crosses always remain at a static x-y coordinate. i assume this is because i defined it as a markup command. is there a way to define a stencil (forgive me if it's incorrect terminology) that would place a cross in the note's corresponding stem while automatically modifying the y-coordinate so as to position it in the middle of that given stem (see attached example)?

thanks for your help.

best,
sean

--------------------------------------------
Sean Reed
Hamburg, Germany
Web: www.seanreed.de


*********************
\version "2.5.20"

#(def-markup-command (battuto layout props) ()
(interpret-markup layout props
(markup #:stencil
(ly:stencil-translate-axis
(ly:stencil-add
(ly:make-stencil
(list 'draw-line 0.1 0.0 -4.0 1.0 -3.0)
'(-0.2 . 0.2) '(0.2 . 2)
)
(ly:make-stencil
(list 'draw-line 0.1 0.0 -3.0 1.0 -4.0)
'(-0.2 . 0.2) '(0.2 . 2)
)
)
0.7 X
)
)
)
)

battuto = ^\markup \battuto

STUFF = {
\relative c' {
c4\battuto d\battuto e\battuto f\battuto
}%end relative
}%end STUFF




\score{
\STUFF
}%end score

**********************

JPEG image


reply via email to

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